texlive[68056] Master/texmf-dist: hvextern (26aug23)

commits+karl at tug.org commits+karl at tug.org
Sat Aug 26 00:43:26 CEST 2023


Revision: 68056
          http://tug.org/svn/texlive?view=revision&revision=68056
Author:   karl
Date:     2023-08-26 00:43:25 +0200 (Sat, 26 Aug 2023)
Log Message:
-----------
hvextern (26aug23)

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	2023-08-25 22:43:13 UTC (rev 68055)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/Changes	2023-08-25 22:43:25 UTC (rev 68056)
@@ -1,11 +1,12 @@
 hvextern.sty ----------------
 
+v 0.36 2023-08-24  - added option "vshift" for inline objects
 v 0.35 2023-08-22  - fix shellesc option, don`t set it globally to true
 v 0.34 2023-07-05  - fix for missing --shell-escape option
 v 0.33 2023-01-29  - fixed bug with vertical space before and end of
  	        	     the example code
 v 0.32 2022-06-23  - fixed introduced bug
-		   - added checkCode also for pdflatex and xelatex 
+		           - added checkCode also for pdflatex and xelatex 
 v 0.31 2022-06-20  - added package option checkCode to run the external 
                      file only if the code changes.
 v 0.30 2022-06-09  - added \hfuzz=\maxdimen for filename to prevent

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	2023-08-25 22:43:13 UTC (rev 68055)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex	2023-08-25 22:43:25 UTC (rev 68056)
@@ -1,7 +1,7 @@
-%% $Id: hvextern.tex 748 2023-08-22 18:03:42Z herbert $
+%% $Id: hvextern.tex 749 2023-08-24 19:10:17Z herbert $
 \RequirePackage{pdfmanagement-testphase}
 \DeclareDocumentMetadata{}
-\documentclass[ngerman,a4paper,twoside]{article}
+\documentclass[english,a4paper,twoside]{article}
 \usepackage{babel}
 \usepackage{libertinus}
 \setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro}
@@ -10,13 +10,12 @@
 \usepackage{fancyhdr}
 \pagestyle{fancy}
 \usepackage{hvlogos}
-\usepackage%[checkCode]
-{hvextern}
+\usepackage[checkCode]{hvextern}
 \usepackage{hvindex}
 \usepackage{hvdoctools}
 \usepackage{listings}
 \lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,breaklines}  
-\usepackage{xcolor,xspace}
+\usepackage{xcolor,xspace,varioref}
 \usepackage{hyperref}
 
 \def\Python{\textsf{Python}\xspace}
@@ -28,7 +27,7 @@
 \begin{document}
 \title{Writing, running and including the output of external documents 
 from within a main\newline \LaTeX\ document~--v. \hvexternFileversion}
-\author{Herbert Voß \url{herbert at dante.de}\thanks{Thanks to Karl Berry; 
+\author{Herbert Voß \url{hvoss at tug.org}\thanks{Thanks to Karl Berry; 
 Werner Lemberg; Rolf Niepraschk}}
 \maketitle
 \tableofcontents
@@ -35,7 +34,7 @@
 
 %\newpage
 
-\setkeys{hv}{%moveToExampleDir,ExampleDir=Exa,
+\setkeys{hv}{moveToExampleDir,ExampleDir=Exa,
 showFilename,verbose}
 
 
@@ -78,8 +77,13 @@
     {<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.:
+The very first compilation run of the main document must be done
+  with the \Loption{-shell-escape} command-line option, otherwise it won't
+  work.  Follow-up runs, for example, to resolve references, should
+  usually be done without \Loption{-shell-escape}.
 
+The currently used filename for the example is saved in the macro \Lcs{hvExternFilename}.
+
 \begin{verbatim}
 lualatex --shell-escape <file>
 \end{verbatim}
@@ -107,10 +111,10 @@
 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 \XeLaTeX\ and the output is insert as pdf image: 
+with \XeLaTeX\ and the output is insert as pdf image:\label{inline-exa}
 \begin{externalDocument}[%
   compiler=xelatex, inline, force=true, runs=2, grfOptions={height=8pt},%
-  crop, cropmargin=0, cleanup, docType=latex]{voss}
+  crop, cropmargin=0, cleanup, docType=latex,vshift=-1pt]{voss}
 \documentclass{ctexart}
 \pagestyle{empty}
 \begin{document} 
@@ -118,7 +122,9 @@
 \end{document}
 \end{externalDocument}
 
-Another example which needs a \pdfLaTeX\ run.  The \Index{source} code itself is also not
+The current filename of the above example is \hvExternFilename.
+
+Let's show another example which needs a \pdfLaTeX\ run.  The \Index{source} code itself is also not
 shown by the environment \Lenv{externalDocument}.
 
 
@@ -1867,8 +1873,8 @@
 \section{Other options}
 
 \begin{description}
-%\item[\Lkeyword{showFilename}] Prints the filename in the outer margin (right for oneside) or in twocolumn mode for
-%    the first column in the left and the second column in the right margin.
+\item[\Lkeyword{vshift}] A length for a vertical shift of the object, only valid for the inline mode.
+See document source of example~\vpageref{inline-exa}.
 %\item[\Lkeyword{outerFN}] Only valid for the twocolumn mode with onecolumn floats (environment \texttt{figure*}),
 %    to get the filename on the right or left of the whole page.
 %\item[\Lkeyword{shiftFN}] A length to move the printed filename up or down.
@@ -1889,6 +1895,9 @@
 \end{description}
 
 
+
+
+
 \printindex
 
 

Modified: trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty	2023-08-25 22:43:13 UTC (rev 68055)
+++ trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty	2023-08-25 22:43:25 UTC (rev 68056)
@@ -1,4 +1,4 @@
-%% $Id: hvextern.sty 747 2023-08-22 17:53:38Z herbert $
+%% $Id: hvextern.sty 749 2023-08-24 19:10:17Z herbert $
 %% This is file `hvextern.sty',
 %%
 %% Copyright (C) 2016-23
@@ -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.35}
-\ProvidesFile{hvextern}[2023/08/22 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.36}
+\ProvidesFile{hvextern}[2023/08/24 v\hvexternFileversion: package for running external documents (HV)]
 
 \newif\ifhv at extern@checkCode
 \hv at extern@checkCodefalse
@@ -36,7 +36,6 @@
   \def\hv at mkdir{mkdir }%
 \else
   \def\hv at move{mv }%
-  \def\hv at move{mv }%
   \def\hv at rm{rm }%
   \def\hv at mkdir{mkdir -p }%
   \def\hv at diff{diff }
@@ -56,6 +55,7 @@
 \newlength\hv at extern@belowbodyskip
 \newlength\hv at extern@belowskip
 \newlength\hv at extern@shiftFN
+\newlength\hv at extern@vshift
 
 \newlength\hvExternLineWidth
 \AtBeginDocument{\hvExternLineWidth=\the\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
@@ -94,6 +94,7 @@
 \define at boolkey{hv}[hv at extern@]{showFilename}[true]{}
 \define at boolkey{hv}[hv at extern@]{outerFN}[true]{}
 \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@]{crop}[true]{}
@@ -140,9 +141,10 @@
 
 \def\ResetKeys{%
  \setkeys{hv}{%
-  showFilename=false,%  Dateinamen im Rand angeben
+  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"
@@ -219,7 +221,7 @@
 \ExplSyntaxOn
 \NewDocumentCommand\run at hv@extern at cleanup{ m }
  {
-  \clist_map_inline:nn {#1}{\ShellEscape{\hv at rm \hv at extern@ExamplesDir\hvExternDateiname.##1}} 
+  \clist_map_inline:nn {#1}{\ShellEscape{\hv at rm \hv at extern@ExamplesDir\hvExternFilename.##1}} 
   \ifnum\hv at extern@compilerNo=0\relax   % we have metapost
     \ShellEscape{\hv at rm\space epsf.*}%
   \fi
@@ -228,7 +230,7 @@
  {
   \clist_map_inline:nn {#1}{%
     \hv at ex@typeout{sequencerun: ##1}%
-    \ShellEscape{\hv at extern@progpath##1\space\hv at run@options\hvExternDateiname}%
+    \ShellEscape{\hv at extern@progpath##1\space\hv at run@options\hvExternFilename}%
   } 
  }
 \ExplSyntaxOff
@@ -428,22 +430,22 @@
 %%%---------------------------------  end config part ------------------
 
 %%
-%% [#1]: Optionen  #2: Dateiname
+%% [#1]: Optionen  #2: Filename
 %%
 \newenvironment{externalDocument}[2][]
   {%
    \ifhv at extern@shellesc\gdef\hv at run@options{ --shell-escape }\else\gdef\hv at run@options{}\fi%
-   \xdef\hvExternDateiname{#2-\arabic{hv at example@counter}}%
+   \xdef\hvExternFilename{#2-\arabic{hv at example@counter}}%
    \gdef\hv at extern@savePara{#1}%
    \setkeys{hv}{#1}%                   \begin
-   \hv at ex@typeout{External filename: \hvExternDateiname}%
-   \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.pdf}{}{%  
-     \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.png}{}{%
-       \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.txt}{}{%
+   \hv at ex@typeout{External filename: \hvExternFilename}%
+   \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}{}{%
          \global\hv at extern@forcetrue}}}%   set force, if no pdf or png exists
    \begingroup
-   \hv at ex@typeout{writing file \hvExternDateiname\hv at extern@ext ...}%
-   \filecontents[force,noheader]{\hvExternDateiname\hv at extern@ext}%
+   \hv at ex@typeout{writing file \hvExternFilename\hv at extern@ext ...}%
+   \filecontents[force,noheader]{\hvExternFilename\hv at extern@ext}%
   }
   {\endfilecontents%         \end%
    \hv at ex@typeout{... done}%
@@ -450,11 +452,11 @@
    \global\stepcounter{hv at example@counter}%
    \endgroup
    \expandafter\hvExternSetKeys\expandafter{\hv at extern@savePara}%
-   \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternDateiname}%
+   \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternFilename}%
    \ifhv at extern@checkCode
      \ifluatex
-       \directlua{if GetFileContents("\hvExternDateiname\hv at extern@ext",
-		"\hv at extern@ExamplesDir\hvExternDateiname\hv at extern@ext") then
+       \directlua{if GetFileContents("\hvExternFilename\hv at extern@ext",
+		"\hv at extern@ExamplesDir\hvExternFilename\hv at extern@ext") then
 	  tex.print("\\csname hv at ex@typeout\\endcsname{current file is NOT newer: no run }\\global\\csname hv at extern@forcefalse\\endcsname")
         else
 	   tex.print("\\csname hv at ex@typeout\\endcsname{current file is newer: force run }\\global\\csname hv at extern@forcetrue\\endcsname")
@@ -461,9 +463,9 @@
 	end}%
      \else
        \hv at ex@typeout{Check, if new file has a different code}%
-       \ShellEscape{hvextern-checkfile "\hvExternDateiname\hv at extern@ext"
-		"\hv at extern@ExamplesDir\hvExternDateiname\hv at extern@ext"}%
-       \InputIfFileExists{\hvExternDateiname\hv at extern@ext.diff}{}{}%
+       \ShellEscape{hvextern-checkfile "\hvExternFilename\hv at extern@ext"
+		"\hv at extern@ExamplesDir\hvExternFilename\hv at extern@ext"}%
+       \InputIfFileExists{\hvExternFilename\hv at extern@ext.diff}{}{}%
        \ifx\hvCheckNewFile\empty
          \hv at ex@typeout{current file is NOT newer: no run }%
          \global\hv at extern@forcefalse
@@ -471,30 +473,30 @@
          \hv at ex@typeout{current file is newer: force run }%
          \global\hv at extern@forcetrue
        \fi
-       \ifhv at extern@verbose\else\ShellEscape{\hv at rm \hvExternDateiname\hv at extern@ext.diff}\fi
+       \ifhv at extern@verbose\else\ShellEscape{\hv at rm \hvExternFilename\hv at extern@ext.diff}\fi
      \fi
    \fi
    \ifhv at extern@force
      \ifx\hv at extern@runsequence\@empty
-       \hv at ex@typeout{force=true: running \hv at extern@progpath\hv at extern@compiler\ \hv at run@options \hvExternDateiname\hv at extern@ext ...}%
+       \hv at ex@typeout{force=true: running \hv at extern@progpath\hv at extern@compiler\ \hv at run@options \hvExternFilename\hv at extern@ext ...}%
        \setcounter{@@@runs}{\value{hv at extern@runs}}%
        \loop\ifnum\the@@@runs > 0\relax
          \ifcase\hv at extern@compilerNo  \relax   % we have metapost
-           \hv at ex@typeout{running mpost \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running mpost \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \or %1
-           \hv at ex@typeout{running tex \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running tex \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \or %2
-           \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \else
            \ifhv at extern@redirect
-             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext > \hvExternDateiname.txt}%
-             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname\hv at extern@ext\space > \hvExternDateiname.txt}%
+             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext > \hvExternFilename.txt}%
+             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename\hv at extern@ext\space > \hvExternFilename.txt}%
            \else
-             \hv at ex@typeout{running \hv at extern@compiler~\hv at run@options~\hvExternDateiname\hv at extern@ext}%
-             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hv at run@options\space\hvExternDateiname\hv at extern@ext}%
+             \hv at ex@typeout{running \hv at extern@compiler~\hv at run@options~\hvExternFilename\hv at extern@ext}%
+             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hv at run@options\space\hvExternFilename\hv at extern@ext}%
            \fi
          \fi
          \addtocounter{@@@runs}{-1}%
@@ -501,33 +503,33 @@
        \repeat
        \hv at ex@typeout{... done}%
        \ifhv at extern@biber
-         \ShellEscape{biber  \hvExternDateiname}%  NAch biber nochmal latex
-         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname}%
+         \ShellEscape{biber  \hvExternFilename}%  NAch biber nochmal latex
+         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename}%
        \fi
        \ifhv at extern@xindex 
-         \ShellEscape{xindex \hv at extern@xindexOptions\space \hvExternDateiname.idx}%  NAch xindex nochmal latex
-         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname}%
+         \ShellEscape{xindex \hv at extern@xindexOptions\space \hvExternFilename.idx}%  NAch xindex nochmal latex
+         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename}%
        \fi
        \expandafter\ifnum\value{hv at extern@runsAfter} > 0
-         \hv at ex@typeout{runsAfter>0: running \hv at extern@progpath\hv at extern@compiler~ \hvExternDateiname\hv at extern@ext ...}%
+         \hv at ex@typeout{runsAfter>0: running \hv at extern@progpath\hv at extern@compiler~ \hvExternFilename\hv at extern@ext ...}%
          \setcounter{@@@runs}{\value{hv at extern@runsAfter}}%
          \loop\ifnum\the@@@runs > 0\relax
            \ifcase\hv at extern@compilerNo  \relax   % we have metapost
-             \hv at ex@typeout{running mpost \hvExternDateiname\hv at extern@ext}%
-             \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+             \hv at ex@typeout{running mpost \hvExternFilename\hv at extern@ext}%
+             \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
            \or %1
-             \hv at ex@typeout{running tex \hvExternDateiname\hv at extern@ext}%
-             \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+             \hv at ex@typeout{running tex \hvExternFilename\hv at extern@ext}%
+             \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
            \or %2
-             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
-             \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext}%
+             \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
            \else
              \ifhv at extern@redirect
-               \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext > \hvExternDateiname.txt}%
-               \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname\hv at extern@ext\space > \hvExternDateiname.txt}%
+               \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext > \hvExternFilename.txt}%
+               \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename\hv at extern@ext\space > \hvExternFilename.txt}%
              \else
-               \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
-               \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname\hv at extern@ext}%
+               \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext}%
+               \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename\hv at extern@ext}%
              \fi
            \fi
            \addtocounter{@@@runs}{-1}%
@@ -538,14 +540,14 @@
        \expandafter\run at hv@extern at sequenceList\expandafter{\hv at extern@runsequence}%
      \fi  
      \ifhv at extern@crop
-       \ShellEscape{pdfcrop --margins \hv at extern@cropmargin \hvExternDateiname}%
-       \ShellEscape{\hv at move \hvExternDateiname-crop.pdf \hvExternDateiname.pdf}%
+       \ShellEscape{pdfcrop --margins \hv at extern@cropmargin \hvExternFilename}%
+       \ShellEscape{\hv at move \hvExternFilename-crop.pdf \hvExternFilename.pdf}%
      \fi
      \ifhv at extern@eps
-       \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}%
+       \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}%
      \fi
    \else
-     \hv at ex@typeout{force=false: NOT running \hvExternDateiname\hv at extern@ext ...}%
+     \hv at ex@typeout{force=false: NOT running \hvExternFilename\hv at extern@ext ...}%
    \fi%    end force
    \hfuzz=\maxdimen
    \ifhv at extern@code%--------------        Code Part
@@ -573,20 +575,20 @@
          \@nameuse{\hv at extern@docType @initPreambleFancy}%
          \edef\@@@temp{\@nameuse{\hv at extern@docType @initPreamble}}%
          % we need lstinputlisting, because \VerbatimInput doesn't work in a box
-         \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv at extern@ext}}%
+         \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv at extern@ext}}%
          \ifdim\wd\hv at extern@box > \z@\relax
            \expandafter\fvset\expandafter{\hv at extern@lstOptions}%
            \tcbset{colback=\hv at extern@BGpreamble,colframe=\hv at extern@BOpreamble}%
-           \PreambleVerbatim{\hvExternDateiname\hv at extern@ext}%
+           \PreambleVerbatim{\hvExternFilename\hv at extern@ext}%
            \vspace{\hv at extern@belowpreambleskip}%
          \fi
       \else
         \edef\@@@temp{\@nameuse{\hv at extern@docType @initPreamble}}%
-        \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv at extern@ext}}%
+        \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv at extern@ext}}%
         \ifdim\wd\hv at extern@box>\z@\relax
           \expandafter\lstset\expandafter{\hv at extern@lstOptions}%
           \tcbset{colback=\hv at extern@BGpreamble,colframe=\hv at extern@BOpreamble}%
-          \PreambleListing[\@@@temp]{\hvExternDateiname\hv at extern@ext}%
+          \PreambleListing[\@@@temp]{\hvExternFilename\hv at extern@ext}%
           \vspace{\hv at extern@belowpreambleskip}%
         \fi
       \fi
@@ -594,7 +596,7 @@
          \hv at ex@typeout{Set filename in the margin!}%
          \noindent
          \hfuzz=\maxdimen
-         \hv at marginpar{\hvExternDateiname\hv at extern@ext}%
+         \hv at marginpar{\hvExternFilename\hv at extern@ext}%
       \fi
 %     
       \hv at ex@typeout{Starting Code body ...}%}
@@ -602,12 +604,12 @@
          \@nameuse{\hv at extern@docType @initTextFancy}%
          \expandafter\fvset\expandafter{\hv at extern@lstOptions}%
          \tcbset{colback=\hv at extern@BGbody,colframe=\hv at extern@BObody}%
-         \expandafter\BodyVerbatim\expandafter[\hv at extern@lstOptions]{\hvExternDateiname\hv at extern@ext}%
+         \expandafter\BodyVerbatim\expandafter[\hv at extern@lstOptions]{\hvExternFilename\hv at extern@ext}%
       \else
          \expandafter\lstset\expandafter{\hv at extern@lstOptions}%
          \edef\@@@temp{\@nameuse{\hv at extern@docType @initText}}%
          \tcbset{colback=\hv at extern@BGbody,colframe=\hv at extern@BObody}%
-         \BodyListing[\@@@temp]{\hvExternDateiname\hv at extern@ext}%
+         \BodyListing[\@@@temp]{\hvExternFilename\hv at extern@ext}%
       \fi
     \ifdim\hv at extern@mpwidth > \z@\relax \endminipage\fi
     \endgroup
@@ -616,19 +618,20 @@
       \ifhv at extern@showFilename
         \hv at ex@typeout{Set filename in the margin!}%
         \noindent
-        \hv at marginpar{\hvExternDateiname\hv at extern@ext}%
+        \hv at marginpar{\hvExternFilename\hv at extern@ext}%
       \fi
    \fi
    \ifhv at extern@moveToExampleDir
 %     \ShellEscape{mkdir\space\hv at extern@ExamplesDir/}%
      \hv at ex@typeout{Move file into example dir}% 
-     \hv at ex@typeout{\hvExternDateiname ----> \hv at extern@ExamplesDir}%
-     \ShellEscape{\hv at move \hvExternDateiname.*\space \hv at extern@ExamplesDir}%
+     \hv at ex@typeout{\hvExternFilename ----> \hv at extern@ExamplesDir}%
+     \ShellEscape{\hv at move \hvExternFilename.*\space \hv at extern@ExamplesDir}%
    \fi
    \ifhv at extern@showoutput
      \ifhv at extern@includegraphic
        \ifhv at extern@inline
-         \expandafter\includegraphics\expandafter[\hv at extern@grfOptions]{\hv at extern@fullPath}%
+         \raisebox{\hv at extern@vshift}{%
+           \expandafter\includegraphics\expandafter[\hv at extern@grfOptions]{\hv at extern@fullPath}}%
        \else
          \ifhv at extern@float
            \hv at ex@typeout{Floating environment}% 
@@ -687,8 +690,11 @@
          \fi
        \fi
      \fi
-   \fi%  end of \ifshowoutput
-   \ifhv at extern@force\expandafter\run at hv@extern at cleanup\expandafter{\hv at extern@cleanup}\fi%   cleanup
+  \fi%  end of \ifshowoutput
+  \ifhv at extern@force\expandafter\run at hv@extern at cleanup\expandafter{\hv at extern@cleanup}\fi%   cleanup
+  \hv at ex@typeout{Move source file into example dir, in case of missing --shell-escape}% 
+%  \hv at ex@typeout{\hvExternFilename ----> \hv at extern@ExamplesDir}%
+  \ShellEscape{\hv at move \hvExternFilename\hv at extern@ext\space \hv at extern@ExamplesDir}%
   \vspace{\hv at extern@belowskip}%
 }
 
@@ -695,11 +701,11 @@
 \newcommand\runExtCmd[3][]{%  #1:options; #2:comamnd; #3:filename
   \begingroup
   \setkeys{hv}{cleanup={},code=false,includegraphic=false,#1}%
-  \xdef\hvExternDateiname{#3-\arabic{hv at example@counter}}%
-  \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternDateiname}%
+  \xdef\hvExternFilename{#3-\arabic{hv at example@counter}}%
+  \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternFilename}%
   \hv at ex@typeout{running #2}%
   \ifhv at extern@redirect
-    \ShellEscape{\hv at extern@progpath#2   > \hv at extern@ExamplesDir\hvExternDateiname.txt}%
+    \ShellEscape{\hv at extern@progpath#2   > \hv at extern@ExamplesDir\hvExternFilename.txt}%
   \else
     \ShellEscape{\hv at extern@progpath#2}%
   \fi
@@ -708,7 +714,7 @@
   \ifhv at extern@showoutput
     \ifhv at extern@includegraphic
       \ifhv at extern@inline
-        \expandafter\includegraphics\expandafter[\hv at extern@grfOptions]{\hv at extern@ExamplesDir\hvExternDateiname}%
+        \expandafter\includegraphics\expandafter[\hv at extern@grfOptions]{\hv at extern@ExamplesDir\hvExternFilename}%
       \else
         \ifhv at extern@float
           \hv at ex@typeout{Floating environment}% 
@@ -718,7 +724,7 @@
           \par\noindent\begingroup
         \fi
         \hv at extern@align
-        \hv at ex@typeout{Input image \hv at extern@ExamplesDir\hvExternDateiname}% 
+        \hv at ex@typeout{Input image \hv at extern@ExamplesDir\hvExternFilename}% 
         \ifhv at extern@frame
           \begingroup
           \fboxsep=\hv at extern@framesep
@@ -864,17 +870,17 @@
 
 \newenvironment{createPNGfromPSTricks}[3][]% #1:options  #2: pstricks packages  #3: filename
   {%
-   \xdef\hvExternDateiname{#2-\arabic{hv at example@counter}}%
+   \xdef\hvExternFilename{#2-\arabic{hv at example@counter}}%
    \gdef\hv at extern@savePara{#1}%
    \setkeys{hv}{#1}%                   \begin
-   \hv at ex@typeout{External filename: \hvExternDateiname}%
-   \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.pdf}{}{%  
-     \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.png}{}{%
-       \expandafter\IfFileExists\expandafter{\hv at extern@ExamplesDir\hvExternDateiname.txt}{}{%
+   \hv at ex@typeout{External filename: \hvExternFilename}%
+   \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}{}{%
          \global\hv at extern@forcetrue}}}%   set force, if no pdf or png exists
    \begingroup
-   \hv at ex@typeout{writing file \hvExternDateiname\hv at extern@ext ...}%
-   \filecontents[force,noheader]{\hvExternDateiname\hv at extern@ext}%
+   \hv at ex@typeout{writing file \hvExternFilename\hv at extern@ext ...}%
+   \filecontents[force,noheader]{\hvExternFilename\hv at extern@ext}%
   }
   {\endfilecontents%         \end%
    \hv at ex@typeout{... done}%
@@ -881,11 +887,11 @@
    \global\stepcounter{hv at example@counter}%
    \endgroup
    \expandafter\hvExternSetKeys\expandafter{\hv at extern@savePara}%
-   \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternDateiname}%
+   \xdef\hv at extern@fullPath{\hv at extern@ExamplesDir\hvExternFilename}%
    \ifhv at extern@checkCode
      \ifluatex
-       \directlua{if GetFileContents("\hvExternDateiname\hv at extern@ext",
-		"\hv at extern@ExamplesDir\hvExternDateiname\hv at extern@ext") then
+       \directlua{if GetFileContents("\hvExternFilename\hv at extern@ext",
+		"\hv at extern@ExamplesDir\hvExternFilename\hv at extern@ext") then
 	  tex.print("\\csname hv at ex@typeout\\endcsname{current file is NOT newer: no run }\\global\\csname hv at extern@forcefalse\\endcsname")
         else
 	   tex.print("\\csname hv at ex@typeout\\endcsname{current file is newer: force run }\\global\\csname hv at extern@forcetrue\\endcsname")
@@ -892,9 +898,9 @@
 	end}%
      \else
        \hv at ex@typeout{Check, if new file has a different code}%
-       \ShellEscape{hvextern-checkfile "\hvExternDateiname\hv at extern@ext"
-		"\hv at extern@ExamplesDir\hvExternDateiname\hv at extern@ext"}%
-       \InputIfFileExists{\hvExternDateiname\hv at extern@ext.diff}{}{}%
+       \ShellEscape{hvextern-checkfile "\hvExternFilename\hv at extern@ext"
+		"\hv at extern@ExamplesDir\hvExternFilename\hv at extern@ext"}%
+       \InputIfFileExists{\hvExternFilename\hv at extern@ext.diff}{}{}%
        \ifx\hvCheckNewFile\empty
          \hv at ex@typeout{current file is NOT newer: no run }%
          \global\hv at extern@forcefalse
@@ -902,30 +908,30 @@
          \hv at ex@typeout{current file is newer: force run }%
          \global\hv at extern@forcetrue
        \fi
-       \ifhv at extern@verbose\else\hv at rm{\hvExternDateiname\hv at extern@ext.diff}\fi
+       \ifhv at extern@verbose\else\hv at rm{\hvExternFilename\hv at extern@ext.diff}\fi
      \fi
    \fi
    \ifhv at extern@force
      \ifx\hv at extern@runsequence\@empty
-       \hv at ex@typeout{force=true: running \hv at extern@progpath\hv at extern@compiler~ \hvExternDateiname\hv at extern@ext ...}%
+       \hv at ex@typeout{force=true: running \hv at extern@progpath\hv at extern@compiler~ \hvExternFilename\hv at extern@ext ...}%
        \setcounter{@@@runs}{\value{hv at extern@runs}}%
        \loop\ifnum\the@@@runs > 0\relax
          \ifcase\hv at extern@compilerNo  \relax   % we have metapost
-           \hv at ex@typeout{running mpost \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running mpost \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runMP{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \or %1
-           \hv at ex@typeout{running tex \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running tex \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runTEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \or %2
-           \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
-           \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternDateiname}{\hv at extern@ext}%       
+           \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext}%
+           \hv at extern@runLATEX{\hv at extern@progpath}{\hv at extern@compiler}{\hvExternFilename}{\hv at extern@ext}%       
          \else
            \ifhv at extern@redirect
-             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext > \hvExternDateiname.txt}%
-             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname\hv at extern@ext\space > \hvExternDateiname.txt}%
+             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext > \hvExternFilename.txt}%
+             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename\hv at extern@ext\space > \hvExternFilename.txt}%
            \else
-             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
-             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname\hv at extern@ext}%
+             \hv at ex@typeout{running \hv at extern@compiler~ \hvExternFilename\hv at extern@ext}%
+             \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename\hv at extern@ext}%
            \fi
          \fi
          \addtocounter{@@@runs}{-1}%
@@ -932,25 +938,25 @@
        \repeat
        \hv at ex@typeout{... done}%
        \ifhv at extern@biber
-         \ShellEscape{biber  \hvExternDateiname}%  NAch biber nochmal latex
-         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname}%
+         \ShellEscape{biber  \hvExternFilename}%  NAch biber nochmal latex
+         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename}%
        \fi
        \ifhv at extern@xindex 
-         \ShellEscape{xindex \hv at extern@xindexOptions\space \hvExternDateiname.idx}%  NAch xindex nochmal latex
-         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname}%
+         \ShellEscape{xindex \hv at extern@xindexOptions\space \hvExternFilename.idx}%  NAch xindex nochmal latex
+         \ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternFilename}%
        \fi
      \else % runsequence
        \expandafter\run at hv@extern at sequenceList\expandafter{\hv at extern@runsequence}%
      \fi  
      \ifhv at extern@crop
-       \ShellEscape{pdfcrop --margins \hv at extern@cropmargin \hvExternDateiname}%
-       \ShellEscape{\hv at move \hvExternDateiname-crop.pdf \hvExternDateiname.pdf}%
+       \ShellEscape{pdfcrop --margins \hv at extern@cropmargin \hvExternFilename}%
+       \ShellEscape{\hv at move \hvExternFilename-crop.pdf \hvExternFilename.pdf}%
      \fi
      \ifhv at extern@eps
-       \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}%
+       \ShellEscape{pdftops -eps -f 1 -l 1 \hvExternFilename.pdf}%
      \fi
    \else
-     \hv at ex@typeout{force=false: NOT running \hvExternDateiname\hv at extern@ext ...}%
+     \hv at ex@typeout{force=false: NOT running \hvExternFilename\hv at extern@ext ...}%
    \fi%    end force
    \hfuzz=\maxdimen
    \ifhv at extern@code%--------------        Code Part
@@ -977,20 +983,20 @@
          \@nameuse{\hv at extern@docType @initPreambleFancy}%
          \edef\@@@temp{\@nameuse{\hv at extern@docType @initPreamble}}%
          % we need lstinputlisting, because \VerbatimInput doesn't work in a box
-         \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv at extern@ext}}%
+         \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv at extern@ext}}%
          \ifdim\wd\hv at extern@box > \z@\relax
            \expandafter\fvset\expandafter{\hv at extern@lstOptions}%
            \tcbset{colback=\hv at extern@BGpreamble,colframe=\hv at extern@BOpreamble}%
-           \PreambleVerbatim{\hvExternDateiname\hv at extern@ext}%
+           \PreambleVerbatim{\hvExternFilename\hv at extern@ext}%
            \vspace{\hv at extern@belowpreambleskip}%
          \fi
       \else
         \edef\@@@temp{\@nameuse{\hv at extern@docType @initPreamble}}%
-        \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternDateiname\hv at extern@ext}}%
+        \savebox\hv at extern@box{\expandafter\lstinputlisting\expandafter[\@@@temp]{\hvExternFilename\hv at extern@ext}}%
         \ifdim\wd\hv at extern@box>\z@\relax
           \expandafter\lstset\expandafter{\hv at extern@lstOptions}%
           \tcbset{colback=\hv at extern@BGpreamble,colframe=\hv at extern@BOpreamble}%
-          \PreambleListing[\@@@temp]{\hvExternDateiname\hv at extern@ext}%
+          \PreambleListing[\@@@temp]{\hvExternFilename\hv at extern@ext}%
           \vspace{\hv at extern@belowpreambleskip}%
         \fi
       \fi
@@ -998,7 +1004,7 @@
          \hv at ex@typeout{Set filename in the margin!}%
          \noindent
          \hfuzz=\maxdimen
-         \hv at marginpar{\hvExternDateiname\hv at extern@ext}%
+         \hv at marginpar{\hvExternFilename\hv at extern@ext}%
       \fi
 %     
       \hv at ex@typeout{Starting Code body ...}%}
@@ -1006,12 +1012,12 @@
          \@nameuse{\hv at extern@docType @initTextFancy}%
          \expandafter\fvset\expandafter{\hv at extern@lstOptions}%
          \tcbset{colback=\hv at extern@BGbody,colframe=\hv at extern@BObody}%
-         \expandafter\BodyVerbatim\expandafter[\hv at extern@lstOptions]{\hvExternDateiname\hv at extern@ext}%
+         \expandafter\BodyVerbatim\expandafter[\hv at extern@lstOptions]{\hvExternFilename\hv at extern@ext}%
       \else
          \expandafter\lstset\expandafter{\hv at extern@lstOptions}%
          \edef\@@@temp{\@nameuse{\hv at extern@docType @initText}}%
          \tcbset{colback=\hv at extern@BGbody,colframe=\hv at extern@BObody}%
-         \BodyListing[\@@@temp]{\hvExternDateiname\hv at extern@ext}%
+         \BodyListing[\@@@temp]{\hvExternFilename\hv at extern@ext}%
       \fi
     \ifdim\hv at extern@mpwidth > \z@\relax \endminipage\fi
     \endgroup
@@ -1020,14 +1026,14 @@
       \ifhv at extern@showFilename
         \hv at ex@typeout{Set filename in the margin!}%
         \noindent
-        \hv at marginpar{\hvExternDateiname\hv at extern@ext}%
+        \hv at marginpar{\hvExternFilename\hv at extern@ext}%
       \fi
    \fi
    \ifhv at extern@moveToExampleDir
 %     \ShellEscape{mkdir\space\hv at extern@ExamplesDir/}%
      \hv at ex@typeout{Move file into example dir}% 
-     \hv at ex@typeout{\hvExternDateiname ----> \hv at extern@ExamplesDir}%
-     \ShellEscape{\hv at move \hvExternDateiname.*\space \hv at extern@ExamplesDir}%
+     \hv at ex@typeout{\hvExternFilename.* ----> \hv at extern@ExamplesDir}%
+     \ShellEscape{\hv at move \hvExternFilename.*\space \hv at extern@ExamplesDir}%
    \fi
    \ifhv at extern@showoutput
      \ifhv at extern@includegraphic



More information about the tex-live-commits mailing list.