diff options
Diffstat (limited to 'macros/latex')
-rw-r--r-- | macros/latex/contrib/gamebooklib/Makefile | 10 | ||||
-rw-r--r-- | macros/latex/contrib/gamebooklib/gamebooklib.dtx | 228 | ||||
-rw-r--r-- | macros/latex/contrib/gamebooklib/gamebooklib.pdf | bin | 263005 -> 273926 bytes | |||
-rw-r--r-- | macros/latex/contrib/gamebooklib/gamebooklib_test.pdf | bin | 117057 -> 117057 bytes | |||
-rw-r--r-- | macros/latex/contrib/gamebooklib/gamebooklib_test.tex | 2 | ||||
-rw-r--r-- | macros/latex/contrib/hvextern/Changes | 4 | ||||
-rw-r--r-- | macros/latex/contrib/hvextern/README | 6 | ||||
-rw-r--r-- | macros/latex/contrib/hvextern/doc/hvextern.pdf | bin | 1204768 -> 1220677 bytes | |||
-rw-r--r-- | macros/latex/contrib/hvextern/doc/hvextern.tex | 39 | ||||
-rw-r--r-- | macros/latex/contrib/hvextern/latex/hvextern.sty | 111 |
10 files changed, 289 insertions, 111 deletions
diff --git a/macros/latex/contrib/gamebooklib/Makefile b/macros/latex/contrib/gamebooklib/Makefile index 6925b402bd..00dd31cbb6 100644 --- a/macros/latex/contrib/gamebooklib/Makefile +++ b/macros/latex/contrib/gamebooklib/Makefile @@ -1,4 +1,4 @@ -default: gamebooklib_test.pdf gamebooklib.pdf tidy +default: gamebooklib_test.pdf gamebooklib.pdf gamebooklib.zip tidy gamebooklib_test.pdf : gamebooklib_test.tex gamebooklib.sty pdflatex \\nonstopmode\\input gamebooklib_test.tex && \ @@ -13,6 +13,14 @@ gamebooklib.pdf : gamebooklib.sty gamebooklib.dtx makeindex -s gind.ist -o gamebooklib.ind gamebooklib.idx && \ pdflatex \\nonstopmode\\input gamebooklib.dtx +gamebooklib.zip : gamebooklib_countpagesperseed.sh gamebooklib.dtx gamebooklib.ins gamebooklib.pdf gamebooklib_test.pdf gamebooklib_test.tex Makefile README + cd ..; zip gamebooklib/gamebooklib.zip \ + gamebooklib/gamebooklib_countpagesperseed.sh \ + gamebooklib/gamebooklib.dtx gamebooklib/gamebooklib.ins \ + gamebooklib/gamebooklib.pdf gamebooklib/gamebooklib_test.pdf \ + gamebooklib/gamebooklib_test.tex gamebooklib/Makefile \ + gamebooklib/README; cd gamebooklib + tidy: rm -f *.log *.ind *.idx *.glo *.gls *.aux *.ilg # TODO: should we really be deleting the .sty? Check CTAN rules. diff --git a/macros/latex/contrib/gamebooklib/gamebooklib.dtx b/macros/latex/contrib/gamebooklib/gamebooklib.dtx index 0251127fb0..deef74af4d 100644 --- a/macros/latex/contrib/gamebooklib/gamebooklib.dtx +++ b/macros/latex/contrib/gamebooklib/gamebooklib.dtx @@ -17,7 +17,7 @@ % \iffalse % <package>\NeedsTeXFormat{LaTeX2e}[2005/12/01] % <package>\ProvidesPackage{gamebooklib} -% <package> [2021/08/24 v1.1 gamebooklib typesetting] +% <package> [2022/05/26 v1.3 gamebooklib typesetting] % %<*driver> \documentclass{ltxdoc} @@ -51,10 +51,11 @@ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % -% \CheckSum{539} +% \CheckSum{708} % % \changes{v1.0}{2021/08/10}{Initial Release} % \changes{v1.1}{2021/08/24}{Bugfix: edge case with clashing fixed-index entries} +% \changes{v1.2}{2021/09/11}{Bugfix: footnotes set justified on last line} % % \GetFileInfo{gamebooklib.sty} % @@ -67,6 +68,7 @@ % \DoNotIndex{\endgroup, \equal, \expandafter, \fi} % \DoNotIndex{\gdef, \global, \head, \hspace, \Huge, \if} % \DoNotIndex{\ifcsname, \ifhmode, \ifnum, \ifthenelse, \ifvmode} +% \DoNotIndex{\numexpr} % \DoNotIndex{\interlinepenalty, \interlinefootnotepenalty} % \DoNotIndex{\large, \leftskip, \mark, \NeedsTeXFormat} % \DoNotIndex{\newcounter, \newenvironment, \newtoks, \noexpand} @@ -74,7 +76,7 @@ % \DoNotIndex{\par, \PassOptionsToClass, \penalty, \ProcessOptions} % \DoNotIndex{\protected@xdef, \ProvidesPackage, \rand, \requirecommand} % \DoNotIndex{\RequirePackage, \rightskip, \rule, \setbox} -% \DoNotIndex{\setcounter, \stepcounter, \textbf, \typeout, \value} +% \DoNotIndex{\setcounter, \stepcounter, \textbf, \value} % \DoNotIndex{\vbox, \unvbox, \vfill, \vspace, \vsize} % \DoNotIndex{\WarningFilter, \whiledo, \Collect@Body, \CurrentOption} % \DoNotIndex{\DeclareOption, \g@addto@macro, \the, \noindent} @@ -82,6 +84,7 @@ % \DoNotIndex{\addtocounter, \refstepcounter, \label} % \DoNotIndex{\iffalse, \iftrue, \outputpenalty, \renewcommand} % \DoNotIndex{\noshuffle, \verbose, \endpage, \footnote} +% \DoNotIndex{\if\dots} % % \title{The Gamebooklib Package\thanks{This document corresponds to \textsf{Gamebooklib}~\fileversion, dated \filedate.}} % \author{Robert J Lee \\ latex@rjlee.homelinux.org} @@ -104,7 +107,7 @@ % paragraph or longer), each with a sequentially numbered value. At % the end of each entry, a link to one or more other numbered % entries is given; the reader selects one and they follow through -% the story in this order. gamebooks traditionally start at the +% the story in this order. Gamebooks traditionally start at the % entry numbered~``1'' and some gamebooks have multiple endings, % with the final section representing a success or victory for the % reader. @@ -138,8 +141,8 @@ % % To load the class, use |\usepackage[|\textit{options}|]{gamebook}| % -% The class options are described below; |[footnotes]| is normally a -% good choice, although there are some limitations. +% The class options are described below; |[footnotes,jukebox]| is +% normally a good choice, although there are some limitations. % % The user simply writes entries like this inside the document: % \begin{verbatim} @@ -239,6 +242,26 @@ % to avoid broken links. % \end{macro} % +% +% \begin{macro}{jukebox} +% \changes{v1.3}{2022/05/26}{Feature: "jukebox" shuffle} +% Use the Jukebox Index shuffling +% algorithm\footnote{\texttt{https://github.com/robertjlee/jukeboxshuffle}}. +% This is slightly slower, but tends to reduce the number of times you +% get a ``turn to~'' instrution referencing the next (or previous) +% entry in the original order, by modifying the shuffle to ensure that +% adjacent gentries in the input have much less chance of being +% adjacent in the final document. |jukebox| requires a \LaTeXe that +% supports \cs{numexpr}, and a minimum of 6 gentries. If fewer than +% 6~|gentry| environments are supplied before \cs{thegentries}, this +% option will only log a warning in verbose mode. +% +% The |jukebox| option guarantees no more adjacent entries than +% without the option, for a given |seed| value; it may not eliminate +% them completely unless the number of entries is large. The +% performance is linear to the number of entries. +% \end{macro} +% % \begin{macro}{noshuffle} % \changes{v1.0}{2021/08/10}{Noshuffle option} % In general, it's easier to write gamebooks in a more linear fashion, @@ -269,7 +292,11 @@ % each way and see which works better for your text. % \end{macro} % -% +% \begin{macro}{seed} +% It's suggested that users specify a value for ``seed'' for stable +% builds, by adding the following before including this package: +% |\usepackage[seed=123]{lcg}| +% \end{macro} % \section*{Footnotes} % % When typesetting a gamebook with footnotes, it is confusing if they @@ -295,7 +322,7 @@ % page. \TeX\ is asked not to break the page there, but this influence % is limited. It may be possible for the author to avoid this, eg by % adding a rubber length to the interline spacing (it may be easier to -% simply choose a different seed value for the |lcg| package to +% simply choose a different |seed| value for the |lcg| package to % reshuffle). % \item If you have a lot of rubber space in the text, or % variably-sized items, \LaTeX\ may expand the footnote at the end of @@ -333,7 +360,7 @@ %\StopEventually{\PrintChanges \pagebreak[4] \PrintIndex} % % \begin{macrocode} -\ProvidesPackage{gamebooklib}[2021/08/24 Gamebook by R Lee latex@rjlee.homelinux.org] +\ProvidesPackage{gamebooklib}[2022/05/25 Gamebook by R Lee latex@rjlee.homelinux.org] % \end{macrocode} % We need \LaTeXe, for the extra token registers. % \begin{macrocode} @@ -353,7 +380,7 @@ % % \begin{macro}{endpage} % The |endpage| option puts the last entry on its own page. This can -% work better when the last entryraph is about a page long, and also +% work better when the last entry is about a page long, and also % the final ``winning'' entry of the gamebook. % \begin{macrocode} \newcommand\gamebook@beforelast{} @@ -363,6 +390,19 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{jukebox} +% The |jukebox| option defines the \cs{gamebox@jukebox} macro; +% while the macro does nothing, \cs{ifcsname} can then be used to +% determine if the option was set. +% \begin{macrocode} +\DeclareOption{jukebox}{% + \newcommand\gamebook@jukebox{}% + \gamebook@info{Gamebook Library to perform jukebox index reshuffle + pass}% +}% +% \end{macrocode} +% \end{macro} +% % \begin{macro}{footnote} % The |footnote| option enables our footnote processing, to throw out % footnotes at the end of each |gentry| so that they don't appear to be @@ -370,7 +410,7 @@ % % This is genearlly recommended, unless you have a reason to turn it % off (such as a conflicting package). It's disabled by default -% because it could cause unexpected errors. +% because it could cause unexpected faults. % \begin{macrocode} \def\if@gamebook@footnotes{\iffalse} \DeclareOption{footnote}{% @@ -390,18 +430,15 @@ % \end{macrocode} % \end{macro} % +% \begin{macro}{seed} % All unknown options are passed to |lcg|, as it's our only dependency with options. -% It's suggested that users specify a value for ``seed'' for stable -% builds, by adding the following before including this package: -% -% |\usepackage[seed=123]{lcg}| % \begin{macrocode} \DeclareOption*{% \PassOptionsToClass{\CurrentOption}{lcg}% }% \ProcessOptions\relax% % \end{macrocode} -% We need to capture environment contents +% \end{macro}% We need to capture environment contents % \begin{macrocode} \RequirePackage{environ}% % \end{macrocode} @@ -504,7 +541,7 @@ % Later, we'll change the values of the $N$ bit of \cs{gentry$N$} % macros when we shuffle (the underlying token registers stay the same). % -% This relies on \cs{refstepcounter}\marg{gentryctr} before expanded +% This relies on \cs{refstepcounter}\marg{gentryctr} being expanded % before this macro. The label |gentry:\gentrycode| is thus set to the % current index of the final output entry. % \begin{macrocode} @@ -546,7 +583,7 @@ % |footnote| option was given; it sets up the output routine while the % gamebook is running. % \begin{macrocode} -\begingroup% +\begingroup% \if@gamebook@footnotes\gentry@footnotespergentry\fi% % \end{macrocode} % To begin, let's record the number of entries. This may come in @@ -561,7 +598,7 @@ % than replacing the definition of \cs{p@stkeysr@nd}. % The warning is simply that this package doesn't waste another % counter every time it changes the random limits (which happens a lot -% during Knuth shuffle): +% during the Fisher-Yates shuffle): % \begin{macrocode} \WarningFilter{lcg}{Using an already existing counter rand}% % \end{macrocode} @@ -587,22 +624,29 @@ % bottom of \cs{box255}. % \begin{macrocode} \if@gamebook@footnotes\output={% + \def\gentry@deferoutput{\the\gentry@oldoutput}% % \end{macrocode} % The \cs{outputpenalty} tells us why the output routine was called; generally, it's invoked whenever % a new floatable environment is generated, or when a page is full. Anything less than -1000 means that % the page was filled, so we should add any footnotes only in this case. % \begin{macrocode} \ifnum\outputpenalty<-\@M\else% - \edef\tmp@{footnotetoks\botmark} - \expandafter\ifcsname footnotetoks\botmark\endcsname% - \global\setbox255=\vbox to \vsize{% - \unvbox255\vfill\outputfootnotes@endpage}% - \fi% - \fi% - \the\gentry@oldoutput + \if\gentryshouldoutput0% + \unvbox255\def\gentry@deferoutput{}% + \else% + \expandafter\ifcsname footnotetoks\botmark\endcsname% + \expandafter\if\expandafter\relax\expandafter% + \detokenize\expandafter{\csname footnotetoks\botmark\endcsname}\relax\else% + \global\setbox255=\vbox to \vsize{% + \unvbox255\vfill\outputfootnotes@endpage}% + \fi\fi% + \fi\fi% + \gentry@deferoutput% +% \the\gentry@oldoutput }\fi% % \end{macrocode} % +% % \subsection*{The Shuffling Algorithm} % % The basic shuffling algorithm is to first shuffle all entries, @@ -610,7 +654,7 @@ % fixed-index entries in order and swap them into their final place. % % The original version of this package had a bug relating to multiple -% fixed-index entries. +% fixed-index entries (now fixed). % In short, let $A$, $B$, and $C$ be indices; if $A<B$ and % (unshuffled) entry number $A$ was fixed at (shuffled) % location $B$, while (unshuffled) entry number $B$ was fixed at @@ -624,8 +668,8 @@ % \TeX\ has well beyond 255 token registers these days, so don't % bother to check that limit. % -% The LCG package provides a suitable pseudo-random number generator. -% What we want is a repeatable series of dispirate numbers, not an +% The |LCG| package provides a suitable pseudo-random number generator. +% What we want is a repeatable series of disparate numbers, not an % especially random one. % %\begin{enumerate} @@ -641,14 +685,18 @@ % \item If $R\ne i$ then swap macros \cs{gentrytoks}$R$ and \cs{gentrytoks}$i$ % \item If $R\ne i$ then swap macros \cs{paraIdx}$R$ and \cs{gentryidx}$i$ % \end{enumerate} +% \item If a jukebox index sort is requested, perform an optimisation +% pass (see below) % \item For $i=1:n$, output token reg $i$ %\end{enumerate} % % Define macros \cs{csname}~|paraIdx|$n$\cs{endcsname} containing the arabic -% original page number to be put out on the $n$th output ``page'' +% original gentry number to be put out on the $n$th output gentry. +% \begin{macro}{gentrycount} % \begin{macrocode} \xdef\gentrycount{\arabic{gentryctr}}% % \end{macrocode} +% \end{macro} % we can reuse |gentryctr|; we've finished this set of paras and % kept the total count. % \begin{macrocode} @@ -660,6 +708,7 @@ \whiledo{\not{\value{gentryctr}>\gentrycount}}{% \edef\gentryidxu{\arabic{gentryctr}}% \expandafter\xdef\csname paraIdx\gentryidxu\endcsname{\gentryidxu}% + \typeout{DEFINED paraIdx\gentryidxu}% \stepcounter{gentryctr}% }% % \end{macrocode} @@ -675,13 +724,13 @@ % 1, and this counter resets after each expansion of \cs{thegentries}). % \end{macro} % \begin{macrocode} - \if@gamebook@shuffle + \if@gamebook@shuffle% \setcounter{rand}{\gentrycount}% \addtocounter{rand}{-1}\edef% \stoppoint{\arabic{rand}}% % \end{macrocode} % First, shuffle everything that isn't fixed down. -% Don't renumber para~1 or \cs{gentrycount}; Knuth-shuffle the rest +% Don't renumber para~1 or \cs{gentrycount}; Fisher-Yates-shuffle the rest % NB: we stop at \cs{gentrycount}$-2$, because \cs{gentrycount}$-1$ would only shuffle % with itself. % \begin{macrocode} @@ -734,9 +783,77 @@ \expandafter\global\expandafter\let\csname fixedat\mydest\endcsname\@undefined% \addtocounter{gentryctr}{-1}% \fi% +% \end{macrocode} +% if we are doing a jukebox shuffle, remember which final entries are fixed, so +% they don't get moved. +% \begin{macrocode} + \ifcsname gamebook@jukebox\endcsname% + \expandafter\def\csname fixedto\mydest\endcsname{}% + \fi% \fi% \stepcounter{gentryctr}% - }}\fi%SHUFFLE END + }% +% \end{macrocode} +% The jukebox shuffle requires an extra pass. This must come after +% moving fixed entries into their final place, to allow us to compare +% the initial indicies. +% We make a reasonable effort:\begin{itemize} +% \item $t$ is the current index +% \item $u$ is the next index +% \item $r$ is a random index after $u$ (make 3 attempts to find a +% non-fixed $r$) +% \item if abs$(t-u)=1$ and $r$ is not fixed, then swap $u$ and $r$ +% \textbf{if} $u$ is not fixed; otherwise: +% \item if abs$(t-u)=1$ and $r$ is not fixed, then swap $t$ and $r$ +% \textbf{if} $t$ is not fixed; +% \item otherwise, give up. +% \end{itemize} +% \begin{macrocode} + \ifcsname gamebook@jukebox\endcsname% + \ifnum\gentrycount<6% + \gamebook@info{Jukebox pass skipped; too few entries}% + \else% + \setcounter{gentryctr}{2}% + \whiledo{\not{\value{gentryctr}=\stoppoint}}{% + \edef\gentryidxt{\arabic{gentryctr}}% + \edef\curpos{\csname paraIdx\gentryidxt\endcsname}% + \stepcounter{gentryctr}% + \edef\gentryidxu{\arabic{gentryctr}}% + \edef\nextpos{\csname paraIdx\gentryidxu\endcsname}% + \edef\pdiff{\the\numexpr\curpos+\nextpos}% + \ifnum\pdiff<0\edef\pdiff{\the\numexpr-\pdiff}\fi% + \edef\sdiff{\the\numexpr\curpos-\nextpos}% + \ifnum\sdiff<0\edef\sdiff{\the\numexpr-\sdiff}\fi% + \ifnum\pdiff<\sdiff\relax\def\thediff{\pdiff}\else\def\thediff{\sdiff}\fi% + \ifnum\thediff=1% + \gamebook@info{Jukebox: entries are too close: % + \gentryidxt,\gentryidxu\space (original \curpos,\nextpos)}% + \chgrand[first=\numexpr\gentryidxu+1]% + \rand% + \expandafter\ifcsname fixedto\arabic{rand}\endcsname\rand\fi% + \expandafter\ifcsname fixedto\arabic{rand}\endcsname\rand\fi% + \expandafter\ifcsname fixedto\arabic{rand}\endcsname% + \gamebook@info{Can't reshuffle: failed to find non-fixed index}% + \else% + \ifcsname fixedto\gentryidxu\endcsname% + \ifcsname fixedto\gentryidxt\endcsname% + \gamebook@info{Can't reshuffle: \curpos\space and % + \nextpos\space are both fixed.}% + \else% + \gamebook@info{Reshuffling \gentryidxt\space to \arabic{rand}}% + \macroswap{paraIdx\gentryidxt}{paraIdx\arabic{rand}}% + \fi% + \else% + \gamebook@info{Reshuffling \gentryidxu\space to% + \arabic{rand} (alt)}% + \macroswap{paraIdx\gentryidxu}{paraIdx\arabic{rand}}% + \fi\fi\fi% + }% + \fi\fi% + }\fi%SHUFFLE END +% \end{macrocode} +% Now we can output the |gentry| token registers to let \LaTeX\ do its thing: +% \begin{macrocode} \gamebook@info{Shuffled! Gentry order:}% \setcounter{gentryctr}{1}% \whiledo{\not{\value{gentryctr}>\gentrycount}}{% @@ -749,7 +866,7 @@ % We can reuse the same counter again to output % \begin{macrocode} \setcounter{gentryctr}{0}% - \gamebook@info{Outputting \gentrycount\ gamebook entries}% + \gamebook@info{Outputting \gentrycount\space gamebook entries}% \whiledo{\value{gentryctr}<\gentrycount}{% % \end{macrocode} % Use refstepcounter in the loop to allow \cs{label} to work as expected. @@ -772,6 +889,7 @@ }% % \end{macrocode} % Finally, we clear the registers and reset the counter in case we want to start again +% (NB: fixedto is scope to the current block only, so no need to clear that) % \begin{macrocode} \gamebook@info{All gamebook entries added to main vertical list}% \setcounter{gentryctr}{1}% @@ -786,7 +904,7 @@ \stepcounter{gentryctr}% }% \setcounter{gentryctr}{0}% - \eject + \eject% \endgroup% }% % \end{macrocode} @@ -820,6 +938,30 @@ }% % \end{macrocode} % +% \begin{macro}{gentryshouldoutput} +% \changes{v1.3}{2022/05/26}{Suppress short pages option} +% This macro \textbf{may} be called from the output routine, and can +% be used to suppress page breaks. It was added because it proves +% fairly easy to write custom divider routines that can produce blank +% pages. If it expands to the number 1, then the page will be output; +% if it expands to 0, it will not be. +% +% For example, the following will prevent pages that are less than 80\% full. +% +% \verb!\renewcommand{\gentryshouldoutput}{%! +% +% \verb! \ifdim\pagetotal>0.8\pagegoal\relax1\else 0\fi}! +% +% \textbf{Caution:} if this macro continually tests false, then +% material will eventually be discarded from the main vertical list to +% ensure that \TeX\ can complete the output of the document. If you +% redefine this macro, make sure to check out output carefully for +% missing text. +% \begin{macrocode} +\newcommand{\gentryshouldoutput}{1} +% \end{macrocode} +% \end{macro} +% % \DescribeMacro{\gentryfooter} % This takes no arguments and is simply expanded after the entry is typeset. The default adds some vertical % space and a simple separator. @@ -831,9 +973,7 @@ % \end{macrocode} % % \DescribeMacro{\ignorespacesandallpars@} -% This is a technique described on StackExchange: -% -% {\small https://tex.stackexchange.com/questions/179016/\\ignore-spaces-and-pars-after-an-environment\#179034} +% This is a technique described on StackExchange\footnote{\small https://tex.stackexchange.com/questions/179016/\\\mbox{~}\hspace{1in}ignore-spaces-and-pars-after-an-environment\#179034}. % % This is used to ensure that extra space at the start and end of the |gentry| % environment is ignored. @@ -916,14 +1056,14 @@ % % This macro takes one argument, being the maximum index of footnotes to output, inclusive. % Footnotes after this index will be excluded. If not provided, the -% value provided by the counter \cs{@mfpn}, which in the default +% value provided by the counter \cs{@mfpn}, which is the default % \LaTeX\ counter, will be used. % \begin{macrocode} \newcounter{fncounter}% \newcommand{\outputfootnotes}[1]{% \begingroup% \def\in@out{}% flag that footnotes are outputting; suppresses marks - \setcounter{fncounter}{1} + \setcounter{fncounter}{1}% % \end{macrocode} % Called in vertical mode, and don't want to throw a page break. % @@ -931,7 +1071,7 @@ % \begin{macrocode} \def\footnote@rule{% % \end{macrocode} -% The next line comess from the TUGboat suggestions, and protect against various user changes +% The next line comes from the TUGboat suggestions, and protect against various user changes % \begin{macrocode} \leftskip=0pt\rightskip=0pt\interlinepenalty=1000% \penalty-1000% @@ -971,9 +1111,7 @@ \edef\tmp@@{\csname footnotetoks\arabic{fncounter}\endcsname}% % \end{macrocode} % This \cs{detokenize} black magic tests if a token reg is actually -% empty: -% -% https://tex.stackexchange.com/questions/263733/\\whats-the-best-practice-way-to-test-whether-parameter-is-empty +% empty\footnote{\texttt{https://tex.stackexchange.com/questions/263733/\\\mbox{~}\hspace{1in}whats-the-best-practice-way-to-test-whether-parameter-is-empty}} % \begin{macrocode} \expandafter\if\expandafter\relax\expandafter% \detokenize\expandafter{\the\tmp@@}\relax\else% @@ -1042,7 +1180,7 @@ % \cs{botmark} has a value, then we can output all footnotes up to % that index. % \begin{macrocode} -\g@addto@macro{\gentry@footnotespergentry}{ +\g@addto@macro{\gentry@footnotespergentry}{% \newcommand{\outputfootnotes@endpage}{% \expandafter\if\expandafter\relax\expandafter% \detokenize\expandafter{\botmark}\relax\else% diff --git a/macros/latex/contrib/gamebooklib/gamebooklib.pdf b/macros/latex/contrib/gamebooklib/gamebooklib.pdf Binary files differindex 43657233fe..363ab33390 100644 --- a/macros/latex/contrib/gamebooklib/gamebooklib.pdf +++ b/macros/latex/contrib/gamebooklib/gamebooklib.pdf diff --git a/macros/latex/contrib/gamebooklib/gamebooklib_test.pdf b/macros/latex/contrib/gamebooklib/gamebooklib_test.pdf Binary files differindex ae56f8e953..fb06cdb58f 100644 --- a/macros/latex/contrib/gamebooklib/gamebooklib_test.pdf +++ b/macros/latex/contrib/gamebooklib/gamebooklib_test.pdf diff --git a/macros/latex/contrib/gamebooklib/gamebooklib_test.tex b/macros/latex/contrib/gamebooklib/gamebooklib_test.tex index 4d661dce63..3b5a116ba2 100644 --- a/macros/latex/contrib/gamebooklib/gamebooklib_test.tex +++ b/macros/latex/contrib/gamebooklib/gamebooklib_test.tex @@ -27,7 +27,7 @@ This document was used for testing during development of gamebooklib. Please see the \texttt{gamebooklib\_test.tex} file alongside the PDF to see how the package behaves. - +\tracingmacros=1 \begin{gentry}{codea} This is the first gentry! diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes index b300396106..a3df3662af 100644 --- a/macros/latex/contrib/hvextern/Changes +++ b/macros/latex/contrib/hvextern/Changes @@ -1,5 +1,9 @@ hvextern.sty ---------------- +v 0.27 2022-05-27 - suppress overfull warnings for filename output + - fix for tcolorbox with minipage and breakable + - write filename in tt + - added verbose message for force=false v 0.26 2022-05-23 - set filenames for twocolumn mode outer/inner - added keywords outerFN and shiftFN v 0.25 2022-05-19 - added framesep keyword diff --git a/macros/latex/contrib/hvextern/README b/macros/latex/contrib/hvextern/README index 1c6052c9fd..adbd87ba71 100644 --- a/macros/latex/contrib/hvextern/README +++ b/macros/latex/contrib/hvextern/README @@ -1,6 +1,6 @@ -This package allows to write code in tex, latex, Perl, Lua, Python, -and MetaPost into external files, run that code and insert the -output as pdf/png image or text. Parts of the external code +This package allows to write code in TeX, LaTeX, ConTeXt, Java, Perl, +Lua, Python, Shell, and MetaPost into external files, run that code and +insert the output as pdf/png image or text. Parts of the external code can be listed in the document. The main LaTeX document must be run with the option --shell-escape diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf Binary files differindex 473cd8972b..d70254252c 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.pdf +++ b/macros/latex/contrib/hvextern/doc/hvextern.pdf diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex index d691aa3bed..ac218c986d 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.tex +++ b/macros/latex/contrib/hvextern/doc/hvextern.tex @@ -1,11 +1,14 @@ +%% $Id: hvextern.tex 559 2022-05-27 06:59:29Z herbert $ \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} -\documentclass[ngerman,a4paper]{article} +\documentclass[ngerman,a4paper,twoside]{article} \usepackage{babel} \usepackage{libertinus} \setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro} \usepackage{iftex} +\usepackage{fancyhdr} +\pagestyle{fancy} \usepackage{hvlogos} \usepackage{hvextern} \usepackage{hvindex} @@ -41,7 +44,8 @@ from within a main\newline \LaTeX\ document~--v. \hvexternFileversion} \begin{sloppypar} -This package allows to write external \MP, \TeX, \ConTeXt, \LaTeX, \LuaTeX, \LuaLaTeX, \XeTeX, \XeLaTeX, Lua, Perl, Java and/or Python +This package allows to write external \MP, \TeX, \ConTeXt, \LaTeX, \LuaTeX, \LuaLaTeX, \XeTeX, \XeLaTeX, +\Index{Lua}, \Index{Perl}, \Index{Java} and/or \Index{Python} source code, which will then be run via \texttt{shell escape} to create a PDF oder text output to include it into the main \LaTeX\ document. \end{sloppypar} @@ -56,7 +60,9 @@ source code ... \end{externalDocument} -\runExtCmd[<options>]{<command with arguments>}{<external filename without extension>} +\runExtCmd[<options>] + {<command with arguments>} + {<external filename without extension>} \end{verbatim} The main document \emph{must} be run with the \Loption{-shell-escape} option, otherwise it won't work, e.g.: @@ -85,10 +91,21 @@ with \texttt{lualatex} with the \texttt{-\kern1pt-shell-escape} option. \subsection{Without showing the code} This document was run with \LuaLaTeX. Suppose you want to insert the output of a document -which needs for several reasons a \pdfLaTeX\ run. Instead of created and running a document +which needs for several reasons a \XeLaTeX\ run. Instead of created and running a document outside of the main document and then to insert the output we can do this from within this \LuaLaTeX\ document itself. The external document is compiled -with \pdfLaTeX\ and the output is insert as pdf image. The \Index{source} code itself is not +with \XeLaTeX\ and the output is insert as pdf image: +\begin{externalDocument}[% + compiler=xelatex, inline, force, runs=2, grfOptions={height=8pt},% + crop, cropmargin=0, cleanup, docType=latex]{voss} +\documentclass{ctexart} +\pagestyle{empty} +\begin{document} +美好的一天. +\end{document} +\end{externalDocument} + +Another example which needs a \pdfLaTeX\ run. The \Index{source} code itself is also not shown by the environment \Lenv{externalDocument}. @@ -119,7 +136,7 @@ shown by the environment \Lenv{externalDocument}. \end{minipage} \begin{minipage}{.39\linewidth} \begin{externalDocument}[ - compiler=pdflatex,force=false,cleanup={log,aux},verbose]{voss} + compiler=pdflatex,force=false,cleanup={log,aux},showFilename=false]{voss} \documentclass{standalone} %StartVisiblePreamble \usepackage{fontenc} @@ -1583,10 +1600,11 @@ This is the start of the introduction. \begin{externalDocument}[ - grfOptions={width=0.3\linewidth}, - pages={1,2,3}, + grfOptions={width=0.31\linewidth}, + pages={1,2,3,4,5,6}, pagesep=2pt, frame, + framesep=0pt, verbose=false, compiler=context, showFilename, @@ -1616,16 +1634,20 @@ This is the start of the introduction. \chapter{Introduction} \input knuth \input knuth \chapter[rensselaer]{The Rensselaer family} +\input knuth \section{The first born} \input knuth \section{The early years} ... in those days Hasselt was ... +\input knuth \section{Living and workin in America} \input knuth \chapter[lansing]{The Lansing family} ... the Lansing family was also ... +\input knuth \chapter[cuyler]{The Cuyler family} ... much later Tydeman Cuyler ... +\input knuth \myhead[headlines]{And the end} foo \stoptext @@ -1665,6 +1687,7 @@ already exists, there is no need to create it with the next run again and again. \item[\Lkeyword{framesep}] Value for \Lcs{fbox} if keyword \texttt{frame} is used. \item[\Lkeyword{mpsep}] Distance between code and output (default 1\,em). \item[\Lkeyword{pagesep}] Distance between pages for multipage output (default 1\,em). +\item[\Lkeyword{verbose}] Print control messages into the terminal and logfile. \item[\Lkeyword{eps}] create an eps from the pdf (historical). \end{description} diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty index 8b0fa75f1f..19f14ec67f 100644 --- a/macros/latex/contrib/hvextern/latex/hvextern.sty +++ b/macros/latex/contrib/hvextern/latex/hvextern.sty @@ -1,3 +1,4 @@ +%% $Id: hvextern.sty 559 2022-05-27 06:59:29Z herbert $ %% This is file `hvextern.sty', %% %% Copyright (C) 2016-22 @@ -11,8 +12,8 @@ %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. -\def\hvexternFileversion{0.26} -\ProvidesFile{hvextern}[2022/05/23 v\hvexternFileversion: package for running external documents (HV)] +\def\hvexternFileversion{0.27} +\ProvidesFile{hvextern}[2022/05/27 v\hvexternFileversion: package for running external documents (HV)] \RequirePackage{shellesc,xkeyval,graphicx} \RequirePackage{fancyvrb,tikz,listings,ifplatform} @@ -30,6 +31,7 @@ \newcounter{hv@extern@runs} \newcounter{@@@runs} +\newcounter{hv@extern@pageCNT} \newsavebox\hv@extern@box \newlength\hv@LineWidth \newlength\hv@TextWidth @@ -42,7 +44,7 @@ \newlength\hv@extern@belowskip \newlength\hv@extern@shiftFN -\AtBeginDocument{\setlength\hv@LineWidth{\dimexpr\linewidth-2\fboxsep-2\fboxrule}} +\AtBeginDocument{\setlength\hv@LineWidth{\the\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}} \newlength\hv@extern@mpwidth \setlength\hv@extern@mpwidth{\z@} \define@key{hv}{progpath}{\def\hv@extern@progpath{#1}} @@ -57,7 +59,7 @@ \define@key{hv}{BObody}[black!8]{\def\hv@extern@BObody{#1}} \define@key{hv}{docType}[latex]{\def\hv@extern@docType{#1}} %\define@choicekey*+{hv}{docType}[\val\nr]{latex,mp,tex,py,pl,lua,java,context,sh}[latex]{% -% \hv@typeout{>>>> ´doc type \nr}% +% \hv@typeout{doc type \nr}% % \def\hv@extern@docType{\val}% %}{\PackageWarning{hvextern}{erroneous input (#1) for docType ignored. Using latex.}% % \def\hv@extern@docType{latex}% @@ -101,10 +103,11 @@ } \define@boolkey{hv}[hv@extern@]{eps}[true]{} \define@boolkey{hv}[hv@extern@]{verbose}[true]{} -\def\hv@typeout#1{\ifhv@extern@verbose\typeout{#1}\fi} +\def\hv@ex@typeout#1{\ifhv@extern@verbose\typeout{>>(hvextern) #1}\fi} + \define@choicekey*+{hv}{compiler}[\val\nr]{mpost,tex,latex,luatex,python3,perl,lua,java,% xetex,pdflatex,lualatex,xelatex,context,sh,texlua}[pdflatex]{% - \hv@typeout{>>>> Compiler type \nr}% + \hv@ex@typeout{Compiler type \nr}% \def\hv@extern@compiler{\val}% \edef\hv@extern@compilerNo{\nr}% }{\PackageWarning{hvextern}{erroneous input (#1) for compiler ignored. Using pdflatex.}% @@ -194,7 +197,7 @@ { \clist_map_inline:nn {#1}{% \ShellEscape{\hv@extern@progpath##1\space\hvExternDateiname} - %\hv@typeout{>>>> sequencerun: ##1} + %\hv@ex@typeout{sequencerun: ##1} } } \ExplSyntaxOff @@ -203,10 +206,10 @@ \tcbset{breakable,left=2pt,right=2pt,top=2pt,bottom=2pt,boxsep=0pt} \def\hv@marginpar#1{% - \leavevmode\checkoddpage - \sbox\hv@extern@box{\rotatebox[origin=C]{90}{\rule{2\hv@extern@shiftFN}{0pt}#1}}% + \sbox\hv@extern@box{\rotatebox[origin=C]{90}{\rule{2\hv@extern@shiftFN}{0pt}\texttt{#1}}}% \ht\hv@extern@box=\z@ \wd\hv@extern@box=\z@ \dp\hv@extern@box=\z@ \noindent + \checkoddpage \ifoddpage% we have a right page \if@twocolumn \ifhv@extern@outerFN @@ -239,23 +242,23 @@ } \newcommand\PreambleVerbatim[2][]{% - \hv@typeout{Running PreambleVerbatim with #1, #2}% + \hv@ex@typeout{Running PreambleVerbatim with #1, #2}% \ifhv@extern@tcbox \begin{tcolorbox}[before skip=0pt,after skip=0pt]\VerbatimInput[#1]{#2}\end{tcolorbox}% \else - \VerbatimInput[#1]{#2} + \VerbatimInput[#1]{#2}% \fi} \newcommand\BodyVerbatim[2][]{% - \hv@typeout{Running BodyVerbatim with #1, #2}% + \hv@ex@typeout{Running BodyVerbatim with #1, #2}% \ifhv@extern@tcbox \begin{tcolorbox}[before skip=0pt,after skip=0pt]\VerbatimInput[#1]{#2}\end{tcolorbox}% \else - \VerbatimInput[#1]{#2} + \VerbatimInput[#1]{#2}% \fi} \newcommand\PreambleListing[2][]{% - \hv@typeout{Running PreambleListing with #1, #2}% + \hv@ex@typeout{Running PreambleListing with #1, #2}% \ifhv@extern@tcbox \begin{tcolorbox}[before skip=0pt,after skip=0pt%,top=-2pt ]\expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}\end{tcolorbox}% @@ -264,7 +267,7 @@ \fi} \newcommand\BodyListing[2][]{% - \hv@typeout{Running BodyListing with #1, #2}% + \hv@ex@typeout{Running BodyListing with #1, #2}% \ifhv@extern@tcbox \begin{tcolorbox}[before skip=0pt,after skip=0pt,%top=-2pt ]\expandafter\lstinputlisting\expandafter[#1,aboveskip=0pt,belowskip=0pt]{#2}\end{tcolorbox}% @@ -291,13 +294,13 @@ {\perCent StopVisiblePreamble} \def\hv@extern@runMP#1#2#3#4{% path compiler file extension - \hv@typeout{>>>> running #1#2 #3#4}% + \hv@ex@typeout{running #1#2 #3#4}% \ShellEscape{#1#2\space -tex=tex\space #3#4}% - \hv@typeout{>>>> running #1tex #3}% + \hv@ex@typeout{running #1tex #3}% \ShellEscape{#1tex\space "\string\input\space epsf\string\relax\string\nopagenumbers\string\epsfbox{#3.1}\string\bye"}% - \hv@typeout{>>>> running #1dvips #3}% + \hv@ex@typeout{running #1dvips #3}% \ShellEscape{#1dvips\space -j\space -E\space -o\space #3.eps\space epsf.dvi}% - \hv@typeout{>>>> running #1epstopdf #3}% + \hv@ex@typeout{running #1epstopdf #3}% \ShellEscape{#1epstopdf\space #3.eps}% } @@ -310,11 +313,11 @@ {\perCent StopVisiblePreamble} \def\hv@extern@runTEX#1#2#3#4{% path compiler file extension - \hv@typeout{>>>> running #1#2 #3#4}% + \hv@ex@typeout{running #1#2 #3#4}% \ShellEscape{#1tex\space #3#4}% - \hv@typeout{>>>> running #1dvips #3}% + \hv@ex@typeout{running #1dvips #3}% \ShellEscape{#1dvips\space #3.dvi}% - \hv@typeout{>>>> running ps2pdf #3.ps}% + \hv@ex@typeout{running ps2pdf #3.ps}% \ShellEscape{#1ps2pdf\space -dAutoRotatePages=/None\space -dALLOWPSTRANSPARENCY\space #3.ps}% } @@ -328,11 +331,11 @@ % only for the sequence latex->dvips->ps2pdf \def\hv@extern@runLATEX#1#2#3#4{% path-compiler-file-extension - \hv@typeout{>>>> running #1#2 #3#4}% + \hv@ex@typeout{running #1#2 #3#4}% \ShellEscape{#1#2\space #3#4}% - \hv@typeout{>>>> running #1dvips #3}% + \hv@ex@typeout{running #1dvips #3}% \ShellEscape{#1dvips\space #3.dvi}% - \hv@typeout{>>>> running ps2pdf #3.ps}% + \hv@ex@typeout{running ps2pdf #3.ps}% \ShellEscape{#1ps2pdf\space -dAutoRotatePages=/None\space -dALLOWPSTRANSPARENCY\space #3.ps}% } @@ -398,47 +401,47 @@ \xdef\hvExternDateiname{#2-\arabic{hv@example@counter}}% \gdef\hv@extern@savePara{#1}% \setkeys{hv}{#1}% \begin - \hv@typeout{External filename: \hvExternDateiname}% + \hv@ex@typeout{External filename: \hvExternDateiname}% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.pdf}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.png}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternDateiname.txt}{}{% \global\hv@extern@forcetrue}}}% set force, if no pdf or png exists \begingroup - \hv@typeout{>>> writing file \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{writing file \hvExternDateiname\hv@extern@ext ...}% \filecontents[force,noheader]{\hvExternDateiname\hv@extern@ext}% } {\endfilecontents% \end% - \hv@typeout{>>> ... done}% + \hv@ex@typeout{... done}% \global\stepcounter{hv@example@counter}% \endgroup \expandafter\hvExternSetKeys\expandafter{\hv@extern@savePara}% \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}% \ifhv@extern@force \ifx\hv@extern@runsequence\@empty - \hv@typeout{>>>> force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}% + \hv@ex@typeout{force=true: running \hv@extern@progpath\hv@extern@compiler~ \hvExternDateiname\hv@extern@ext ...}% \setcounter{@@@runs}{\value{hv@extern@runs}}% \loop\ifnum\the@@@runs > 0\relax \ifcase\hv@extern@compilerNo \relax % we have metapost - \hv@typeout{>>>> running mpost \hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running mpost \hvExternDateiname\hv@extern@ext}% \hv@extern@runMP{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% \or %1 - \hv@typeout{>>>> running tex \hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running tex \hvExternDateiname\hv@extern@ext}% \hv@extern@runTEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% \or %2 - \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% \hv@extern@runLATEX{\hv@extern@progpath}{\hv@extern@compiler}{\hvExternDateiname}{\hv@extern@ext}% \else \ifhv@extern@redirect - \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext > \hvExternDateiname.txt}% \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext\space > \hvExternDateiname.txt}% \else - \hv@typeout{>>>> running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% + \hv@ex@typeout{running \hv@extern@compiler~ \hvExternDateiname\hv@extern@ext}% \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname\hv@extern@ext}% \fi \fi \addtocounter{@@@runs}{-1}% \repeat - \hv@typeout{>>> ... done}% + \hv@ex@typeout{... done}% \ifhv@extern@biber \ShellEscape{biber \hvExternDateiname}% NAch biber nochmal latex \ShellEscape{\hv@extern@progpath\hv@extern@compiler\space\hvExternDateiname}% @@ -457,9 +460,11 @@ \ifhv@extern@eps \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}% \fi + \else + \hv@ex@typeout{force=false: NOT running \hvExternDateiname\hv@extern@ext ...}% \fi% end force \ifhv@extern@code%-------------- Code Part - \hv@typeout{>>>>Starting Code part with preamble ...}% + \hv@ex@typeout{Starting Code part with preamble ...}% \begingroup \if@twocolumn \ifhv@extern@outerFN @@ -472,6 +477,7 @@ \fi \ifdim\hv@extern@mpwidth>\z@ \noindent + \tcbset{breakable=false}% \minipage[\hv@extern@mpvalign]{\hv@extern@mpwidth} \vspace{0pt}% \else @@ -499,12 +505,12 @@ \fi \fi \ifhv@extern@showFilename - \hv@typeout{>>>> Set filename in the margin!}% + \hv@ex@typeout{Set filename in the margin!}% \noindent \hv@marginpar{\hvExternDateiname\hv@extern@ext}% \fi % - \hv@typeout{>>>>Starting Code body ...}%} + \hv@ex@typeout{Starting Code body ...}%} \ifhv@extern@usefancyvrb \@nameuse{\hv@extern@docType @initTextFancy}% \expandafter\fvset\expandafter{\hv@extern@lstOptions}% @@ -521,15 +527,15 @@ \fi % end code part \ifhv@extern@code\else % only if no code \ifhv@extern@showFilename - \hv@typeout{>>>> Set filename in the margin!}% + \hv@ex@typeout{Set filename in the margin!}% \noindent \hv@marginpar{\hvExternDateiname\hv@extern@ext}% \fi \fi \ifhv@extern@moveToExampleDir % \ShellEscape{mkdir\space\hv@extern@ExamplesDir/}% - \hv@typeout{>>>> Move file into example dir}% - \hv@typeout{>>>>>>\hvExternDateiname ----> \hv@extern@ExamplesDir}% + \hv@ex@typeout{Move file into example dir}% + \hv@ex@typeout{\hvExternDateiname ----> \hv@extern@ExamplesDir}% \ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}% \fi \ifhv@extern@includegraphic @@ -537,10 +543,10 @@ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}% \else \ifhv@extern@float - \hv@typeout{>>>> Floating environment}% + \hv@ex@typeout{Floating environment}% \expandafter\figure\expandafter[\hv@extern@floatsetting] \else - \hv@typeout{>>>> No floating environment}% + \hv@ex@typeout{No floating environment}% \vspace{\hv@extern@belowbodyskip} \ifdim\hv@extern@mpwidth>\z@ \hfill\minipage[\hv@extern@mpvalign]{\dimexpr\linewidth-\hv@extern@mpwidth-1em\relax}\vspace{0pt}% @@ -550,29 +556,28 @@ \fi \fi \hv@extern@align - \hv@typeout{>>>> Input image \hv@extern@fullPath}% + \hv@ex@typeout{Input image \hv@extern@fullPath}% \ifhv@extern@frame \begingroup \fboxsep=\hv@extern@framesep \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{% - \hv@typeout{>>>> Image loop: next=\next\space \hv@extern@fullPath}% \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]% {\hv@extern@fullPath}}\hspace{\hv@extern@pagesep}}% \hspace*{-\hv@extern@pagesep}% \endgroup \else \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{% - \hv@typeout{>>>> Image loop: next=\next\space \hv@extern@fullPath}% \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]% {\hv@extern@fullPath}\hspace{\hv@extern@pagesep}}% \hspace*{-\hv@extern@pagesep}% \fi + \par% for \hv@extern@align \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi \ifhv@extern@float \endfigure \else - \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\unskip\strut\par\endgroup\fi + \ifdim\hv@extern@mpwidth>\z@ \endminipage\else\endgroup\fi \fi \fi \else% no graphic, only text @@ -585,7 +590,7 @@ \fi \endminipage \else - \vspace{\hv@extern@belowbodyskip} + \vspace{\hv@extern@belowbodyskip}% \noindent \ifhv@extern@usefancyvrb \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}% @@ -603,7 +608,7 @@ \setkeys{hv}{code=false,includegraphic=false,#1}% \xdef\hvExternDateiname{#3-\arabic{hv@example@counter}}% \xdef\hv@extern@fullPath{\hv@extern@ExamplesDir\hvExternDateiname}% - \hv@typeout{>>>> running #2}% + \hv@ex@typeout{running #2}% \ifhv@extern@redirect \ShellEscape{\hv@extern@progpath#2 > \hv@extern@ExamplesDir\hvExternDateiname.txt}% \else @@ -616,14 +621,14 @@ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}% \else \ifhv@extern@float - \hv@typeout{>>>> Floating environment}% + \hv@ex@typeout{Floating environment}% \expandafter\figure\expandafter[\hv@extern@floatsetting] \else - \hv@typeout{>>>> No floating environment}% + \hv@ex@typeout{No floating environment}% \par\noindent\begingroup \fi \hv@extern@align - \hv@typeout{>>>> Input image \hv@extern@ExamplesDir\hvExternDateiname}% + \hv@ex@typeout{Input image \hv@extern@ExamplesDir\hvExternDateiname}% \ifhv@extern@frame \begingroup \fboxsep=\hv@extern@framesep @@ -646,7 +651,7 @@ \fi \else% no graphic, only text \ifhv@extern@float - \hv@typeout{>>>> Floating environment}% + \hv@ex@typeout{Floating environment}% \expandafter\figure\expandafter[!htb] \ifhv@extern@usefancyvrb \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt} |