From a494a509f3f4a13a450c898488155f7aa5353bd3 Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Thu, 1 Feb 2024 03:00:51 +0000 Subject: CTAN sync 202402010300 --- macros/latex/contrib/hvextern/Changes | 1 + macros/latex/contrib/hvextern/doc/hvextern.pdf | Bin 1498836 -> 1481699 bytes macros/latex/contrib/hvextern/doc/hvextern.tex | 59 ++++-------- macros/latex/contrib/hvextern/latex/hvextern.sty | 107 +++++++++++---------- .../contrib/hvextern/script/hvextern-checkfile.lua | 0 5 files changed, 76 insertions(+), 91 deletions(-) mode change 100644 => 100755 macros/latex/contrib/hvextern/script/hvextern-checkfile.lua (limited to 'macros/latex/contrib/hvextern') diff --git a/macros/latex/contrib/hvextern/Changes b/macros/latex/contrib/hvextern/Changes index 3f870a713e..2d7f41812e 100644 --- a/macros/latex/contrib/hvextern/Changes +++ b/macros/latex/contrib/hvextern/Changes @@ -1,5 +1,6 @@ hvextern.sty ---------------- +v 0.39 2024-01-30 - fixed bug with check for force option v 0.38 2023-12-08 - change internal macroname \Write@Ex to \hv@Write@EX v 0.37b 2023-11-22 - fix typo in documentation v 0.37a 2023-11-20 - fix bug in documentation diff --git a/macros/latex/contrib/hvextern/doc/hvextern.pdf b/macros/latex/contrib/hvextern/doc/hvextern.pdf index d78c943a84..793507b058 100644 Binary files a/macros/latex/contrib/hvextern/doc/hvextern.pdf and b/macros/latex/contrib/hvextern/doc/hvextern.pdf differ diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex index 6dcdf79d54..7172969db8 100644 --- a/macros/latex/contrib/hvextern/doc/hvextern.tex +++ b/macros/latex/contrib/hvextern/doc/hvextern.tex @@ -1,4 +1,4 @@ -%% $Id: hvextern.tex 822 2023-11-22 12:16:48Z herbert $ +%% $Id: hvextern.tex 853 2024-01-30 20:34:00Z herbert $ \DocumentMetadata{}% for lualatex and pstricks \documentclass[english,paper=a4,twoside,usegeometry]{scrartcl} \usepackage{babel} @@ -16,8 +16,7 @@ \usepackage[automark]{scrlayer-scrpage} \pagestyle{scrheadings} \usepackage{hvlogos} -\usepackage%[checkCode] -{hvextern} +\usepackage[checkCode]{hvextern} \usepackage{hvindex} \usepackage{hvdoctools} \usepackage{listings} @@ -32,7 +31,6 @@ - \begin{document} \title{Writing, running and including the output of external documents from within a main\newline \LaTeX\ document~--v. \hvexternFileversion} @@ -43,8 +41,7 @@ Werner Lemberg; Rolf Niepraschk}} %\newpage -\setkeys{hv}{moveToExampleDir,ExampleDir=Exa, -showFilename,verbose} +\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,showFilename,verbose,force=false} %\clearpage @@ -118,7 +115,7 @@ 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 \XeLaTeX\ and the output is insert as pdf image: \begin{externalDocument}[% - compiler=xelatex, inline, force=true, runs=2, grfOptions={height=8pt},% + compiler=xelatex, inline, runs=2, grfOptions={height=8pt},% crop, cropmargin=0, cleanup, docType=latex,vshift=-1pt]{voss} \documentclass{ctexart} \pagestyle{empty} @@ -138,7 +135,7 @@ shown by the environment \Lenv{externalDocument}. \begin{minipage}{.59\linewidth} \begin{lstlisting} \begin{externalDocument}[ - compiler=pdflatex,force=true,cleanup]{voss} + compiler=pdflatex,cleanup]{voss} \documentclass{standalone} %StartVisiblePreamble \usepackage{fontenc} @@ -151,7 +148,7 @@ shown by the environment \Lenv{externalDocument}. [VP [DP] [V’ - [V] + [V] [DP] ] ] @@ -162,7 +159,7 @@ shown by the environment \Lenv{externalDocument}. \end{minipage} \begin{minipage}{.39\linewidth} \begin{externalDocument}[ - compiler=pdflatex,force=true,cleanup={log,aux},showFilename=false]{voss} + compiler=pdflatex,cleanup={log,aux},showFilename=false]{voss} \documentclass{standalone} %StartVisiblePreamble \usepackage{fontenc} @@ -218,7 +215,6 @@ catagory, which is done internally by the package. The complete definition of th compiler=python3, code, ext=py, - force=true, docType=py, usefancyvrb, grfOptions={width=\linewidth}]{python} @@ -268,7 +264,6 @@ line in the above code shows how it can be done with Python. \begin{externalDocument}[ compiler=python3, progpath=/usr/local/bin/, - force=true, runs=1, code, ext=py, @@ -328,7 +323,7 @@ e.g. \texttt{shiftFN=5ex}. \begin{externalDocument}[grfOptions={width=0.95\linewidth}, compiler=xelatex,code,mpwidth=0.6\linewidth, - crop,cleanup,force=true,usefancyvrb=false,ext=tex,showFilename=false]{voss} + crop,cleanup,usefancyvrb=false,ext=tex,showFilename=false]{voss} \documentclass{article} %StartVisiblePreamble \usepackage{tikz} @@ -438,9 +433,7 @@ runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex} pagesep=2pt, frame, runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, - , verbose, - force=true, cleanup={log,aux,toc,bbl,blg}, code,docType=latex, lstOptions={columns=fixed}]{voss} @@ -479,7 +472,7 @@ the environment \Lenv{externalDocument} is: \begin{externalDocument}[ verbose, compiler=java,ext=java,code, - force=true,docType=java,includegraphic, + docType=java,includegraphic, usefancyvrb,grfOptions={width=0.9\linewidth}]{java} import java.awt.Color; import java.awt.Graphics; @@ -558,7 +551,7 @@ the follwing example. \begin{externalDocument}[grfOptions={angle=90,width=\linewidth}, compiler=xelatex,code,mpwidth=0.6\linewidth, - crop,cleanup,force]{voss} + crop,cleanup]{voss} \documentclass{article} %StartVisiblePreamble \usepackage{tikz} @@ -610,7 +603,6 @@ to \Lcs{VerbatimInput}. The following example uses mpwidth=0.6\linewidth, crop, cleanup, - force=true, docType=latex]{voss} \RequirePackage{pdfmanagement-testphase} \DeclareDocumentMetadata{} @@ -658,7 +650,6 @@ The color of the frame is set to the same values, hence not seen. The following mpwidth=0.6\linewidth, crop, cleanup, - force=true, usefancyvrb, docType=latex]{voss} \RequirePackage{pdfmanagement-testphase} @@ -745,7 +736,6 @@ The following example uses: % mpwidth=0.6\linewidth, % crop, cleanup, - force=true, frame, % usefancyvrb, % float, @@ -798,7 +788,6 @@ which is the default. Using a caption and a label are optional. % mpwidth=0.6\linewidth, crop, cleanup, - force=true, usefancyvrb, float, floatsetting=!ht, @@ -861,7 +850,6 @@ The follwoing example was created with % mpwidth=0.6\linewidth, crop, cropmargin=5, cleanup, - force=true, frame, % usefancyvrb, % float, @@ -922,7 +910,6 @@ or \Lkeyval{b}. showFilename=false, crop, cleanup, - force=true, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} \documentclass{article} @@ -947,7 +934,6 @@ or \Lkeyval{b}. code, crop, cleanup, - force=true, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} \documentclass{article} @@ -973,7 +959,6 @@ or \Lkeyval{b}. showFilename=false, crop, cleanup, - force=true, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} \documentclass{article} @@ -999,7 +984,6 @@ or \Lkeyval{b}. crop, showFilename=false, cleanup, - force=true, mpwidth=0.5\linewidth, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} @@ -1025,7 +1009,6 @@ or \Lkeyval{b}. showFilename=false, crop, cleanup, - force=true, mpwidth=0.5\linewidth, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} @@ -1052,7 +1035,6 @@ or \Lkeyval{b}. showFilename=false, crop, cleanup, - force=true, mpwidth=0.5\linewidth, aboveskip=0pt,belowskip=0pt, docType=latex]{voss} @@ -1083,7 +1065,7 @@ next Chinese characters \label{inline-exa} \begin{externalDocument}[ compiler=xelatex, inline, runs=2, grfOptions={height=8pt}, crop, cropmargin=0, vshift=-1pt,usefancyvrb, - cleanup, force=true, docType=latex]{voss}% + cleanup, docType=latex]{voss}% \documentclass{ctexart} \pagestyle{empty} \begin{document} @@ -1100,7 +1082,7 @@ With \Lkeyset{inline} the optional argument \Lkeyword{code} is automatically set to false. The next Chinese characters \begin{externalDocument}[vshift=-1pt, compiler=xelatex, inline, runs=2, grfOptions={height=8pt}, - crop, cropmargin=0, cleanup, force=true, docType=latex]{voss} + crop, cropmargin=0, cleanup, docType=latex]{voss} \documentclass{ctexart} \pagestyle{empty} \begin{document} @@ -1140,7 +1122,7 @@ sorted digits of the number $A$: $495=954-459$. \begin{externalDocument}[ - compiler=perl, force=true, docType=pl, ext=pl, includegraphic=false, + compiler=perl, docType=pl, ext=pl, includegraphic=false, code, mpwidth=0.6\linewidth]{voss} #!/usr/bin/perl # @@ -1195,7 +1177,7 @@ outFile = io.open(shortFN..".txt","w+") -- open external file \begin{externalDocument}[ - compiler=lua, force=true, docType=lua, ext=lua, includegraphic=false, + compiler=lua, docType=lua, ext=lua, includegraphic=false, code, usefancyvrb=false,textOptions={basicstyle=\ttfamily\footnotesize}, shiftFN=6ex]{voss} #!/usr/bin/env lua @@ -1270,7 +1252,6 @@ The following examples uses pages=2, crop, cleanup, - force=true, xindex, xindexOptions={-l DE --config AU}, mpwidth=0.6\linewidth, @@ -1326,7 +1307,6 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex} frame, runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, verbose, - force=true, cleanup={log,aux,toc,bbl,blg}, code,docType=latex, lstOptions={columns=fixed}]{voss} @@ -1366,7 +1346,7 @@ The default is using \Lcs{lstinputlisting} for the printed code sequences. pages={1,3}, frame,compiler=pdflatex, % crop, - force=true,runs=2,code,docType=latex, + runs=2,code,docType=latex, frame, lstOptions={columns=fixed}]{voss} %StartVisiblePreamble @@ -1426,7 +1406,7 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not frame,compiler=pdflatex, showFilename, % crop, - force=true,runs=2,code,docType=latex, + runs=2,code,docType=latex, frame,framesep=0pt,usefancyvrb]{voss} %StartVisiblePreamble \documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook} @@ -1520,7 +1500,7 @@ other examples, you can set \Lkeyword{showoutput} to false. showoutput=false, frame,compiler=pdflatex, crop, - force=true,runs=2,code,docType=latex, + runs=2,code,docType=latex, frame,usefancyvrb]{voss} %StartVisiblePreamble \documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook} @@ -1596,7 +1576,6 @@ Whith this definition and the setting \Lkeyset{docType=ltx} the last example loo frame, compiler=pdflatex, showFilename, - force=true, runs=2,code,docType=ltx, usefancyvrb]{voss} \documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrreprt} @@ -1660,7 +1639,6 @@ It is already internally defined. compiler=mpost, showFilename, % crop, - force=true, cleanup, code, docType=mp, @@ -1696,7 +1674,6 @@ It is already internally defined. compiler=tex, showFilename, % crop, - force=true, code, docType=tex, ext=tex,]{voss} @@ -1762,7 +1739,6 @@ not needed. The \texttt{pdf} is directly created. compiler=lualatex, showFilename, crop, - force=true, code, docType=latex, ext=tex,]{voss} @@ -1804,7 +1780,6 @@ not needed. The \texttt{pdf} is directly created. compiler=context, showFilename, runs=2, - force=true, code, docType=context, ext=tex,]{voss} diff --git a/macros/latex/contrib/hvextern/latex/hvextern.sty b/macros/latex/contrib/hvextern/latex/hvextern.sty index cfdd56053d..bfe8f75e8f 100644 --- a/macros/latex/contrib/hvextern/latex/hvextern.sty +++ b/macros/latex/contrib/hvextern/latex/hvextern.sty @@ -1,7 +1,7 @@ -%% $Id: hvextern.sty 833 2023-12-08 19:31:08Z herbert $ +%% $Id: hvextern.sty 853 2024-01-30 20:34:00Z herbert $ %% This is file `hvextern.sty', %% -%% Copyright (C) 2016-23 +%% Copyright (C) 2016-24 %% Herbert Voss %% %% It may be distributed and/or modified under the @@ -12,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.38} -\ProvidesFile{hvextern}[2023/12/08 v\hvexternFileversion: package for running external documents (HV)] +\def\hvexternFileversion{0.39} +\ProvidesFile{hvextern}[2024/01/30 v\hvexternFileversion: package for running external documents (HV)] \newif\ifhv@extern@checkCode \hv@extern@checkCodefalse @@ -72,6 +72,8 @@ \newlength\hv@extern@mpwidth \setlength\hv@extern@mpwidth{\z@} +\newif\ifhv@extern@save@force@state + \define@key{hv}{progpath}{\def\hv@extern@progpath{#1}} \define@key{hv}{runsequence}[]{\def\hv@extern@runsequence{#1}} \define@key{hv}{runs}[1]{\setcounter{hv@extern@runs}{#1}} @@ -106,7 +108,7 @@ \define@key{hv}{shiftFN}[0pt]{\setlength\hv@extern@shiftFN{#1}} \define@key{hv}{vshift}[0pt]{\setlength\hv@extern@vshift{#1}}% \define@boolkey{hv}[hv@extern@]{code}[true]{} -\define@boolkey{hv}[hv@extern@]{force}[true]{} +\define@boolkey{hv}[hv@extern@]{force}[true]{\@nameuse{hv@extern@save@force@state#1}} \define@boolkey{hv}[hv@extern@]{crop}[true]{} \define@boolkey{hv}[hv@extern@]{tcbox}[true]{} \define@boolkey{hv}[hv@extern@]{biber}[true]{} @@ -119,7 +121,7 @@ \define@key{hv}{framesep}[\the\fboxsep]{\setlength\hv@extern@framesep{#1}} \define@boolkey{hv}[hv@extern@]{float}[true]{} \define@key{hv}{floatsetting}[]{\def\hv@extern@floatsetting{#1}} -\define@key{hv}{cleanup}[{aux,log}]{\def\hv@extern@cleanup{#1}}% +\define@key{hv}{cleanup}[{aux,log,psaux}]{\def\hv@extern@cleanup{#1}}% \define@boolkey{hv}[hv@extern@]{moveToExampleDir}[true]{} \define@key{hv}{align}[\centering]{\def\hv@extern@align{#1}} \define@key{hv}{ExampleDir}[Examples]{% @@ -151,64 +153,64 @@ \def\ResetKeys{% \setkeys{hv}{% - showFilename=false,% Filenamen im Rand angeben - outerFN=false,% use fullwidth in twocolumn mode (starred floats) - shiftFN=\z@,% raise printed filename - vshift=\z@,% raise object (pdf) with \raisebox{}{} - ext=tex,% file extension - code=false,% show Code - crop=false,% erzeugte PDF "croppen" - compiler=pdflatex,% zu verwendener Compiler - shellesc=false,% use shell-escape - redirect=false,% write output into a file *.txt - tcbox=true,% use tcolorbox - grfOptions={},% Optionen der einzubindenden Grafik - lstOptions={},% Optionen für das Listing - textOptions={},% Options for text output + align=\centering,% Ausgabe zentrieren + aboveskip=\medskipamount,% space above everything + belowpreambleskip=2pt, %\smallskipamount,% space below preamble + belowbodyskip=2pt, %\smallskipamount,% space below body + belowskip=\medskipamount,% space below everything BGpreamble=black!12,% Backgroundcolor for preamble BGbody=black!8,% Backgroundcolor for body BOpreamble=black!12,% Bodercolor for preamble BObody=black!8,% Bodercolor for body - showoutput=true,% with false only code is shown - includegraphic=true,% Grafik einbinden oder User überlassen - inline=false,% Grafik nicht in derselben Zeile - runs=1,% Anzahl Compiler-Durchläufe - runsAfter=0, % Anzahl Durchläufe nach makeindex - runsequence={},% Im Moment nicht aktiv biber=false,% Biber laufen lassen? - xindex=false,% xindex laufen lassen? - xindexOptions={},% options for xindex + caption=,% keine Caption + cleanup={},% Hilfsdateien nicht löschen + code=false,% show Code + compiler=pdflatex,% zu verwendener Compiler + crop=false,% erzeugte PDF "croppen" + cropmargin=2,% 2pb margin + docType=latex,% LaTeX example Code + eps=false,% create an eps output? + ExampleDir=Examples,% Unterverzeichnis für Beispiele + ext=tex,% file extension + float=false,% nicht als Gleitumgebung + floatsetting=!htb,% placement force=false,% Compiler, auch wenn PDF existiert? frame=false,% keinen Rahmen um Abbildung framesep=\the\fboxsep,% - float=false,% nicht als Gleitumgebung - floatsetting=!htb,% placement - caption=,% keine Caption + grfOptions={},% Optionen der einzubindenden Grafik + includegraphic=true,% Grafik einbinden oder User überlassen + inline=false,% Grafik nicht in derselben Zeile label=,% kein Label - pages=1,% welche Seiten auszugeben sind - pagesep=1em,% horizontal sep between pages - docType=latex,% LaTeX example Code - cleanup={},% Hilfsdateien nicht löschen + lstOptions={},% Optionen für das Listing moveToExampleDir=false,% Verschieben nach ExamplesDir - ExampleDir=Examples,% Unterverzeichnis für Beispiele - align=\centering,% Ausgabe zentrieren mpwidth=0pt,% no minipage mpsep=1em,% sep between two minipages mpvalign=t,% if side by side output the vertical alignment - usefancyvrb=false,% use VerbatimInput instead of listings + outerFN=false,% use fullwidth in twocolumn mode (starred floats) + pages=1,% welche Seiten auszugeben sind + pagesep=1em,% horizontal sep between pages progpath={}, - cropmargin=2,% 2pb margin - eps=false,% create an eps output? - aboveskip=\medskipamount,% space above everything - belowpreambleskip=2pt, %\smallskipamount,% space below preamble - belowbodyskip=2pt, %\smallskipamount,% space below body - belowskip=\medskipamount,% space below everything + redirect=false,% write output into a file *.txt + runs=1,% Anzahl Compiler-Durchläufe + runsAfter=0, % Anzahl Durchläufe nach makeindex + runsequence={},% Im Moment nicht aktiv + shellesc=false,% use shell-escape + shiftFN=\z@,% raise printed filename + showFilename=false,% Filenamen im Rand angeben + showoutput=true,% with false only code is shown + tcbox=true,% use tcolorbox + textOptions={},% Options for text output + usefancyvrb=false,% use VerbatimInput instead of listings + verbose=false,% no extra output in the logfile + vshift=\z@,% raise object (pdf) with \raisebox{}{} + xindex=false,% xindex laufen lassen? + xindexOptions={},% options for xindex }% } \ResetKeys - \ifhv@extern@checkCode \ifluatex \hv@ex@typeout{Loading hvextern.lua}% @@ -464,8 +466,9 @@ \let\endfilecontents\endcomment \fi \filecontents[force,noheader]{\hvExternFilename\hv@extern@ext}% - } - {\endfilecontents + }% end \begin{externaldocument} env + {% start \end{externaldocument} env + \endfilecontents \ifhv@extern@shellescape\hv@ex@typeout{... done}\fi \global\stepcounter{hv@example@counter}% \endgroup @@ -489,7 +492,7 @@ \global\hv@extern@forcefalse \else \hv@ex@typeout{current file is newer: force run }% - \global\hv@extern@forcetrue + \hv@extern@forcetrue \fi \ifhv@extern@verbose\else\ShellEscape{\hv@rm \hvExternFilename\hv@extern@ext.diff}\fi \fi @@ -564,7 +567,7 @@ \ifhv@extern@eps \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}% \fi - \else + \else % if force ... \hv@ex@typeout{force=false: NOT running \hvExternFilename\hv@extern@ext ...}% \fi% end force \hfuzz=\maxdimen @@ -713,6 +716,11 @@ \expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}% \fi% cleanup \vspace{\hv@extern@belowskip}% + \ifhv@extern@save@force@state + \global\hv@extern@forcetrue + \else + \global\hv@extern@forcefalse + \fi% restore value } \newcommand\runExtCmd[3][]{% #1:options; #2:comamnd; #3:filename @@ -894,6 +902,7 @@ \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.pdf}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.png}{}{% \expandafter\IfFileExists\expandafter{\hv@extern@ExamplesDir\hvExternFilename.txt}{}{% + \gdef\hv@extern@save@force@state{} \global\hv@extern@forcetrue}}}% set force, if no pdf or png exists \begingroup \hv@ex@typeout{writing file \hvExternFilename\hv@extern@ext ...}% diff --git a/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua b/macros/latex/contrib/hvextern/script/hvextern-checkfile.lua old mode 100644 new mode 100755 -- cgit v1.2.3