texlive[69651] Master/texmf-dist: hvextern (31jan24)
commits+karl at tug.org
commits+karl at tug.org
Wed Jan 31 22:00:29 CET 2024
Revision: 69651
https://tug.org/svn/texlive?view=revision&revision=69651
Author: karl
Date: 2024-01-31 22:00:29 +0100 (Wed, 31 Jan 2024)
Log Message:
-----------
hvextern (31jan24)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/hvextern/Changes
trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
Modified: trunk/Master/texmf-dist/doc/latex/hvextern/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvextern/Changes 2024-01-31 21:00:20 UTC (rev 69650)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/Changes 2024-01-31 21:00:29 UTC (rev 69651)
@@ -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 at Ex to \hv at Write@EX
v 0.37b 2023-11-22 - fix typo in documentation
v 0.37a 2023-11-20 - fix bug in documentation
Modified: trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex 2024-01-31 21:00:20 UTC (rev 69650)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex 2024-01-31 21:00:29 UTC (rev 69651)
@@ -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 @@
%\newpage
-\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,
-showFilename,verbose}
+\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,showFilename,verbose,force=false}
%\clearpage
@@ -118,7 +115,7 @@
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 @@
\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 @@
[VP
[DP]
[V’
- [V]
+ [V]
[DP]
]
]
@@ -162,7 +159,7 @@
\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 @@
compiler=python3,
code,
ext=py,
- force=true,
docType=py,
usefancyvrb,
grfOptions={width=\linewidth}]{python}
@@ -268,7 +264,6 @@
\begin{externalDocument}[
compiler=python3,
progpath=/usr/local/bin/,
- force=true,
runs=1,
code,
ext=py,
@@ -328,7 +323,7 @@
\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 @@
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 @@
\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 @@
\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 @@
mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
@@ -658,7 +650,6 @@
mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
usefancyvrb,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
@@ -745,7 +736,6 @@
% mpwidth=0.6\linewidth,
% crop,
cleanup,
- force=true,
frame,
% usefancyvrb,
% float,
@@ -798,7 +788,6 @@
% mpwidth=0.6\linewidth,
crop,
cleanup,
- force=true,
usefancyvrb,
float,
floatsetting=!ht,
@@ -861,7 +850,6 @@
% mpwidth=0.6\linewidth,
crop, cropmargin=5,
cleanup,
- force=true,
frame,
% usefancyvrb,
% float,
@@ -922,7 +910,6 @@
showFilename=false,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -947,7 +934,6 @@
code,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -973,7 +959,6 @@
showFilename=false,
crop,
cleanup,
- force=true,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
\documentclass{article}
@@ -999,7 +984,6 @@
crop,
showFilename=false,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1025,7 +1009,6 @@
showFilename=false,
crop,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1052,7 +1035,6 @@
showFilename=false,
crop,
cleanup,
- force=true,
mpwidth=0.5\linewidth,
aboveskip=0pt,belowskip=0pt,
docType=latex]{voss}
@@ -1083,7 +1065,7 @@
\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 @@
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 @@
\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 @@
\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 @@
pages=2,
crop,
cleanup,
- force=true,
xindex,
xindexOptions={-l DE --config AU},
mpwidth=0.6\linewidth,
@@ -1326,7 +1307,6 @@
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 @@
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 @@
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 @@
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 @@
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 @@
compiler=mpost,
showFilename,
% crop,
- force=true,
cleanup,
code,
docType=mp,
@@ -1696,7 +1674,6 @@
compiler=tex,
showFilename,
% crop,
- force=true,
code,
docType=tex,
ext=tex,]{voss}
@@ -1762,7 +1739,6 @@
compiler=lualatex,
showFilename,
crop,
- force=true,
code,
docType=latex,
ext=tex,]{voss}
@@ -1804,7 +1780,6 @@
compiler=context,
showFilename,
runs=2,
- force=true,
code,
docType=context,
ext=tex,]{voss}
Modified: trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty 2024-01-31 21:00:20 UTC (rev 69650)
+++ trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty 2024-01-31 21:00:29 UTC (rev 69651)
@@ -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 at extern@checkCode
\hv at extern@checkCodefalse
@@ -72,6 +72,8 @@
\newlength\hv at extern@mpwidth \setlength\hv at extern@mpwidth{\z@}
+\newif\ifhv at extern@save at force@state
+
\define at key{hv}{progpath}{\def\hv at extern@progpath{#1}}
\define at key{hv}{runsequence}[]{\def\hv at extern@runsequence{#1}}
\define at key{hv}{runs}[1]{\setcounter{hv at extern@runs}{#1}}
@@ -106,7 +108,7 @@
\define at key{hv}{shiftFN}[0pt]{\setlength\hv at extern@shiftFN{#1}}
\define at key{hv}{vshift}[0pt]{\setlength\hv at extern@vshift{#1}}%
\define at boolkey{hv}[hv at extern@]{code}[true]{}
-\define at boolkey{hv}[hv at extern@]{force}[true]{}
+\define at boolkey{hv}[hv at extern@]{force}[true]{\@nameuse{hv at extern@save at force@state#1}}
\define at boolkey{hv}[hv at extern@]{crop}[true]{}
\define at boolkey{hv}[hv at extern@]{tcbox}[true]{}
\define at boolkey{hv}[hv at extern@]{biber}[true]{}
@@ -119,7 +121,7 @@
\define at key{hv}{framesep}[\the\fboxsep]{\setlength\hv at extern@framesep{#1}}
\define at boolkey{hv}[hv at extern@]{float}[true]{}
\define at key{hv}{floatsetting}[]{\def\hv at extern@floatsetting{#1}}
-\define at key{hv}{cleanup}[{aux,log}]{\def\hv at extern@cleanup{#1}}%
+\define at key{hv}{cleanup}[{aux,log,psaux}]{\def\hv at extern@cleanup{#1}}%
\define at boolkey{hv}[hv at extern@]{moveToExampleDir}[true]{}
\define at key{hv}{align}[\centering]{\def\hv at extern@align{#1}}
\define at 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
+ outerFN=false,% use fullwidth in twocolumn mode (starred floats)
+ pages=1,% welche Seiten auszugeben sind
+ pagesep=1em,% horizontal sep between pages
+ progpath={},
+ 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
- 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
+ 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 at extern@checkCode
\ifluatex
\hv at ex@typeout{Loading hvextern.lua}%
@@ -464,8 +466,9 @@
\let\endfilecontents\endcomment
\fi
\filecontents[force,noheader]{\hvExternFilename\hv at extern@ext}%
- }
- {\endfilecontents
+ }% end \begin{externaldocument} env
+ {% start \end{externaldocument} env
+ \endfilecontents
\ifhv at extern@shellescape\hv at ex@typeout{... done}\fi
\global\stepcounter{hv at example@counter}%
\endgroup
@@ -489,7 +492,7 @@
\global\hv at extern@forcefalse
\else
\hv at ex@typeout{current file is newer: force run }%
- \global\hv at extern@forcetrue
+ \hv at extern@forcetrue
\fi
\ifhv at extern@verbose\else\ShellEscape{\hv at rm \hvExternFilename\hv at extern@ext.diff}\fi
\fi
@@ -564,7 +567,7 @@
\ifhv at extern@eps
\ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}%
\fi
- \else
+ \else % if force ...
\hv at ex@typeout{force=false: NOT running \hvExternFilename\hv at extern@ext ...}%
\fi% end force
\hfuzz=\maxdimen
@@ -713,6 +716,11 @@
\expandafter\run at hv@extern at cleanup\expandafter{\hv at extern@cleanup}%
\fi% cleanup
\vspace{\hv at extern@belowskip}%
+ \ifhv at extern@save at force@state
+ \global\hv at extern@forcetrue
+ \else
+ \global\hv at extern@forcefalse
+ \fi% restore value
}
\newcommand\runExtCmd[3][]{% #1:options; #2:comamnd; #3:filename
@@ -894,6 +902,7 @@
\expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternFilename.pdf}{}{%
\expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternFilename.png}{}{%
\expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternFilename.txt}{}{%
+ \gdef\hv at extern@save at force@state{}
\global\hv at extern@forcetrue}}}% set force, if no pdf or png exists
\begingroup
\hv at ex@typeout{writing file \hvExternFilename\hv at extern@ext ...}%
More information about the tex-live-commits
mailing list.