summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-10-25 20:13:48 +0000
committerKarl Berry <karl@freefriends.org>2022-10-25 20:13:48 +0000
commite4d598c31f2635d2baf122c23c60531bd3d4b028 (patch)
tree16f293cbf02f7acc5d889261f66bd2bb9fc369f6
parent674bfbf42250fb6f09bdd2b4f509cd53e178a821 (diff)
docshots (25oct22)
git-svn-id: svn://tug.org/texlive/trunk@64808 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/docshots/DEPENDS.txt1
-rw-r--r--Master/texmf-dist/doc/latex/docshots/docshots.pdfbin336674 -> 335433 bytes
-rw-r--r--Master/texmf-dist/source/latex/docshots/docshots.dtx25
-rw-r--r--Master/texmf-dist/tex/latex/docshots/docshots.sty14
4 files changed, 21 insertions, 19 deletions
diff --git a/Master/texmf-dist/doc/latex/docshots/DEPENDS.txt b/Master/texmf-dist/doc/latex/docshots/DEPENDS.txt
index da7d0486850..93a73e061e6 100644
--- a/Master/texmf-dist/doc/latex/docshots/DEPENDS.txt
+++ b/Master/texmf-dist/doc/latex/docshots/DEPENDS.txt
@@ -2,7 +2,6 @@ hard iexec
hard fancyvrb
hard pdfcrop
hard pgf
-hard pgf-blur
hard pgfopts
hard listings
hard minted \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/docshots/docshots.pdf b/Master/texmf-dist/doc/latex/docshots/docshots.pdf
index fbec067a70e..888639741de 100644
--- a/Master/texmf-dist/doc/latex/docshots/docshots.pdf
+++ b/Master/texmf-dist/doc/latex/docshots/docshots.pdf
Binary files differ
diff --git a/Master/texmf-dist/source/latex/docshots/docshots.dtx b/Master/texmf-dist/source/latex/docshots/docshots.dtx
index 8dfd11cf522..2e6d03614c2 100644
--- a/Master/texmf-dist/source/latex/docshots/docshots.dtx
+++ b/Master/texmf-dist/source/latex/docshots/docshots.dtx
@@ -50,7 +50,7 @@
%<package>\NeedsTeXFormat{LaTeX2e}
%<package>\ProvidesPackage{docshots}
%<*package>
-[2022-10-18 0.0.4 TeX Samples Next to Their PDF Snapshots in DTX]
+[2022-10-25 0.0.5 TeX Samples Next to Their PDF Snapshots in DTX]
%</package>
%<*driver>
\documentclass{ltxdoc}
@@ -128,9 +128,13 @@
% \begin{docshot}
% \documentclass{article}
% \usepackage{tikz}
+% \usetikzlibrary{backgrounds}
% \pagestyle{empty}
% \begin{document}
-% \begin{tikzpicture}
+% \begin{tikzpicture}[
+% show background rectangle,
+% background rectangle/.style=
+% {draw=none,fill=gray!20}]
% \node [circle,draw] (v0) {$v_0$};
% \node [circle,draw=orange,thick,
% below right of=v0] (v1) {$v_1$};
@@ -355,6 +359,7 @@ Hello, world!
% \section{Prerequisites}
% \DescribeMacro{\docshotPrerequisite}
+% \changes{0.0.3}{2022/10/14}{The command is added to enable copying of supplementary files into docshots snippets processing directory.}
% If you need some files to be present next to the |.tex| snippet while
% it's rendered by |pdflatex|, you can use |\docshotPrerequisite| with
% a single mandatory argument. The argument is the name of a file you need
@@ -429,8 +434,7 @@ Hello, world!
% \StopEventually{}
% \section{Implementation}
-
-% \changes{v0.0.1}{2022/10/09}{Initial version}
+% \changes{0.0.1}{2022/10/09}{Initial version}
% First, we include a few packages:
% \begin{macrocode}
@@ -439,17 +443,18 @@ Hello, world!
\RequirePackage{xcolor}
\RequirePackage{graphicx}
\RequirePackage{tikz}
-\usetikzlibrary{shadows.blur}
% \end{macrocode}
% Then, we process package options:
+% \changes{0.0.4}{2022/10/18}{Package options "lstinputlisting" and "inputminted" introduced to enable printing of verbatim text either via listings or minted packages.}
+% \changes{0.0.5}{2022/10/24}{Package option "log" added, which enables detailed logging via exec. By default, there is no logging at all.}
% \begin{macrocode}
\RequirePackage{pgfopts}
+\def\docshots@log{}
\pgfkeys{
/docshots/.cd,
dtx/.store in=\docshots@dtx,
- log/.store in=\docshots@log,
- log/.default=,
+ log/.code=\def\docshots@log{log},
lstinputlisting/.store in=\docshots@lstinputlisting,
inputminted/.store in=\docshots@inputminted,
tmpdir/.store in=\docshots@tmpdir,
@@ -472,7 +477,7 @@ Hello, world!
left/.default=.3\linewidth,
right/.store in=\docshots@right,
right/.default=.55\linewidth,
- tmpdir,pdflatex,gs,pdfcrop,margin,hspace,left,right,runs,log
+ tmpdir,pdflatex,gs,pdfcrop,margin,hspace,left,right,runs
}
\ProcessPgfOptions{/docshots}
% \end{macrocode}
@@ -549,7 +554,7 @@ Hello, world!
% Otherwise, we ask |pdfcrop| to crop the PDF:
% \begin{macrocode}
\IfFileExists{\docshots@tmpdir/\jobname/\hash.crop.pdf}
- {\message{docshots: on't pdfcrop, the PDF already exists
+ {\message{docshots: won't pdfcrop, the PDF already exists
(\docshots@tmpdir/\jobname/\hash.crop.pdf)^^J}}
{\iexec[\docshots@log,quiet]{\docshots@pdfcrop\space
--margins \docshots@margin\space
@@ -574,7 +579,7 @@ Hello, world!
\begingroup%
\par%
\tikz[baseline=(a.north)]
- \node (a) [draw=gray]
+ \node (a) [draw=gray,inner sep=0]
{\includegraphics[width=\docshots@left]
{\docshots@tmpdir/\jobname/\hash.crop.pdf}};%
\hspace{\docshots@hspace}%
diff --git a/Master/texmf-dist/tex/latex/docshots/docshots.sty b/Master/texmf-dist/tex/latex/docshots/docshots.sty
index f9f9c6225e5..10016c493da 100644
--- a/Master/texmf-dist/tex/latex/docshots/docshots.sty
+++ b/Master/texmf-dist/tex/latex/docshots/docshots.sty
@@ -31,8 +31,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{docshots}
-[2022-10-18 0.0.4 TeX Samples Next to Their PDF Snapshots in DTX]
-
+[2022-10-25 0.0.5 TeX Samples Next to Their PDF Snapshots in DTX]
@@ -64,14 +63,13 @@
\RequirePackage{xcolor}
\RequirePackage{graphicx}
\RequirePackage{tikz}
-\usetikzlibrary{shadows.blur}
\RequirePackage{pgfopts}
+\def\docshots@log{}
\pgfkeys{
/docshots/.cd,
dtx/.store in=\docshots@dtx,
- log/.store in=\docshots@log,
- log/.default=,
+ log/.code=\def\docshots@log{log},
lstinputlisting/.store in=\docshots@lstinputlisting,
inputminted/.store in=\docshots@inputminted,
tmpdir/.store in=\docshots@tmpdir,
@@ -94,7 +92,7 @@
left/.default=.3\linewidth,
right/.store in=\docshots@right,
right/.default=.55\linewidth,
- tmpdir,pdflatex,gs,pdfcrop,margin,hspace,left,right,runs,log
+ tmpdir,pdflatex,gs,pdfcrop,margin,hspace,left,right,runs
}
\ProcessPgfOptions{/docshots}
@@ -137,7 +135,7 @@
{}}}%
\iexec[\docshots@log,quiet]{rm -f \docshots@tmpdir/\jobname/after.sh}
\IfFileExists{\docshots@tmpdir/\jobname/\hash.crop.pdf}
- {\message{docshots: on't pdfcrop, the PDF already exists
+ {\message{docshots: won't pdfcrop, the PDF already exists
(\docshots@tmpdir/\jobname/\hash.crop.pdf)^^J}}
{\iexec[\docshots@log,quiet]{\docshots@pdfcrop\space
--margins \docshots@margin\space
@@ -156,7 +154,7 @@
\begingroup%
\par%
\tikz[baseline=(a.north)]
- \node (a) [draw=gray]
+ \node (a) [draw=gray,inner sep=0]
{\includegraphics[width=\docshots@left]
{\docshots@tmpdir/\jobname/\hash.crop.pdf}};%
\hspace{\docshots@hspace}%