summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2022-06-02 19:59:29 +0000
committerKarl Berry <karl@freefriends.org>2022-06-02 19:59:29 +0000
commit2cd2e4d6222a13277decca1df352460a3db27038 (patch)
tree99ae67d1dc737e1d6ddf5b78dce207c54a42d92f
parent4a7cfffc15507745d4304e7870a1cd248ecc93d4 (diff)
hvextern (2jun22)
git-svn-id: svn://tug.org/texlive/trunk@63475 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/Changes3
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty2
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/hvextern.pdfbin1220677 -> 1421889 bytes
-rw-r--r--Master/texmf-dist/doc/latex/hvextern/hvextern.tex171
-rw-r--r--Master/texmf-dist/tex/latex/hvextern/hvextern.sty251
5 files changed, 295 insertions, 132 deletions
diff --git a/Master/texmf-dist/doc/latex/hvextern/Changes b/Master/texmf-dist/doc/latex/hvextern/Changes
index a3df3662af9..80d21ff63dc 100644
--- a/Master/texmf-dist/doc/latex/hvextern/Changes
+++ b/Master/texmf-dist/doc/latex/hvextern/Changes
@@ -1,5 +1,8 @@
hvextern.sty ----------------
+v 0.28 2022-06-01 - added option output
+ - added macro \defMarkerType for own marker setting
+ (is only a link to the internal macro \hv@extern@ExampleType)
v 0.27 2022-05-27 - suppress overfull warnings for filename output
- fix for tcolorbox with minipage and breakable
- write filename in tt
diff --git a/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty b/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
index 23ff524a9aa..13b39adc83a 100644
--- a/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
+++ b/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
@@ -1,4 +1,4 @@
-%% $Id: hvdoctools.sty 1127 2019-12-29 21:42:29Z herbert $
+%% $Id: hvdoctools.sty 559 2022-05-27 06:59:29Z herbert $
%%
%% This file is distributed under the terms of the LaTeX Project Public
%% License from CTAN archives in directory macros/latex/base/lppl.txt.
diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
index d70254252ca..92deac3a7ce 100644
--- a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
+++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
index ac218c986d3..1d1bd0fd42b 100644
--- a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
+++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex
@@ -1,4 +1,4 @@
-%% $Id: hvextern.tex 559 2022-05-27 06:59:29Z herbert $
+%% $Id: hvextern.tex 562 2022-06-01 15:37:46Z herbert $
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
\documentclass[ngerman,a4paper,twoside]{article}
@@ -1285,7 +1285,7 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex}
\begin{externalDocument}[
grfOptions={width=0.30\linewidth},
- pages={1,3,5},
+ pages={1,2,3,4,5,6},
pagesep=2pt,
frame,
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
@@ -1303,7 +1303,6 @@ runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex}
%StopVisiblePreamble
\usepackage{blindtext}
\begin{document}
-Sort with xindex \verb|-l DE --config AU|
\blindtext
\Index{Österreich} \Index{Öresund}
\Index{Ostern} \Index{Ober} \Index{Oberin}
@@ -1386,13 +1385,13 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not
\begin{externalDocument}[
- grfOptions={width=0.45\linewidth},
- pages={1,3},
+ grfOptions={width=0.23\linewidth},
+ pages={1,2,3,4},pagesep=1pt,
frame,compiler=pdflatex,
showFilename,
% crop,
force=false,runs=2,code,docType=latex,
- frame,usefancyvrb]{voss}
+ frame,framesep=0pt,usefancyvrb]{voss}
%StartVisiblePreamble
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
\DeclareNewSectionCommand[
@@ -1445,10 +1444,14 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not
\subsection{Vertical space}
\begin{verbatim}
-\define@key{hv}{aboveskip}[\medskipamount]{\setlength\hv@extern@aboveskip{#1}}
-\define@key{hv}{belowpreambleskip}[\smallskipamount]{\setlength\hv@extern@belowpreambleskip{#1}}
-\define@key{hv}{belowbodyskip}[\smallskipamount]{\setlength\hv@extern@belowbodyskip{#1}}
-\define@key{hv}{belowskip}[\medskipamount]{\setlength\hv@extern@belowskip{#1}}
+\define@key{hv}{aboveskip}[\medskipamount]{%
+ \setlength\hv@extern@aboveskip{#1}}
+\define@key{hv}{belowpreambleskip}[\smallskipamount]{%
+ \setlength\hv@extern@belowpreambleskip{#1}}
+\define@key{hv}{belowbodyskip}[\smallskipamount]{%
+ \setlength\hv@extern@belowbodyskip{#1}}
+\define@key{hv}{belowskip}[\medskipamount]{%
+ \setlength\hv@extern@belowskip{#1}}
\end{verbatim}
\begin{description}
@@ -1460,9 +1463,149 @@ it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not
the command \Lcs{runExtCmd} (default \Lcs{medskipamount})
\end{description}
+
+\subsection{No output}
+By default there is an image or text as output of the external run. In a case, where
+you are only interested in the code, which should be formatted in the same style as
+other examples, you can set \Lkeyword{output} to false.
+
+
+\begin{externalDocument}[
+ output=false,
+ frame,compiler=pdflatex,
+ crop,
+ force,runs=2,code,docType=latex,
+ frame,usefancyvrb]{voss}
+%StartVisiblePreamble
+\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
+\DeclareNewSectionCommand[
+ style=section,
+ level=4,
+ beforeskip=-3.25ex plus -1ex minus -.2ex,
+ afterskip=1.5ex plus .2ex,
+ font=\normalsize,
+ indent=0pt,
+ counterwithin=subsubsection
+]{subsubsubsection}
+%StopVisiblePreamble
+\RedeclareSectionCommand[
+ level=5,
+ toclevel=5,
+ tocindent=13em,
+ tocnumwidth=5.9em,
+ counterwithin=subsubsubsection
+]{paragraph}
+\RedeclareSectionCommand[
+ level=6,
+ toclevel=6,
+ tocindent=15em,
+ tocnumwidth=6.8em
+]{subparagraph}
+\setcounter{secnumdepth}{\subsubsubsectionnumdepth}
+\setcounter{tocdepth}{\subsubsubsectiontocdepth}
+\usepackage[ngerman]{babel}
+\usepackage{libertinus}
+\usepackage{blindtext}
+\begin{document}
+\tableofcontents
+\chapter{Einführung}
+\section{Ein Abschnitt}
+\subsection{Ein Unterabschnitt}
+\subsubsection{Ein Unter-Unterabschnitt}
+\subsubsubsection{Ein Unter-Unter-Unterabschnitt}
+\blindtext
+\end{document}
+\end{externalDocument}
+
+
+\clearpage%%%%%%%%%%%%%%
+
+\section{Defining new marker}
+Suppose you do not want for a \LaTeX\ document the complete body part between \Lcs{begin}
+and \Lcs{end} printed. In this case you can define own markers, e.g.:
+
+\begin{Verbatim}[fontsize=\small,label={New marker definition},fontfamily=tt]
+\defMarkerType{ltx}
+ {\perCent StartVisibleBody}
+ {\perCent StopVisibleBody}
+ {\perCent StartVisiblePreamble}
+ {\perCent StopVisiblePreamble}
+\end{Verbatim}
+
+Whith this definition and the setting \Lkeyset{docType=ltx} the last example looks like:
+
+
+\defMarkerType{ltx}
+ {\perCent StartVisibleBody}
+ {\perCent StopVisibleBody}
+ {\perCent StartVisiblePreamble}
+ {\perCent StopVisiblePreamble}
+
+
+\begin{externalDocument}[
+ grfOptions={width=\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax},
+% pages={1},
+ crop,
+% mpwidth=0.6\linewidth,
+ frame,
+ compiler=pdflatex,
+ showFilename,
+ force=true,
+ runs=2,code,docType=ltx,
+ usefancyvrb]{voss}
+\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrreprt}
+%StartVisiblePreamble
+\DeclareNewSectionCommand[
+ style=section,
+ level=4,
+ beforeskip=-3.25ex plus -1ex minus -.2ex,
+ afterskip=1.5ex plus .2ex,
+ font=\normalsize,
+ indent=0pt,
+ counterwithin=subsubsection
+]{subsubsubsection}
+%StopVisiblePreamble
+\RedeclareSectionCommand[
+ level=5,
+ toclevel=5,
+ tocindent=13em,
+ tocnumwidth=5.9em,
+ counterwithin=subsubsubsection
+]{paragraph}
+\RedeclareSectionCommand[
+ level=6,
+ toclevel=6,
+ tocindent=15em,
+ tocnumwidth=6.8em
+]{subparagraph}
+\setcounter{secnumdepth}{\subsubsubsectionnumdepth}
+\setcounter{tocdepth}{\subsubsubsectiontocdepth}
+\usepackage[ngerman]{babel}
+\usepackage{libertinus}
+\usepackage{blindtext}
+\makeatletter\let\ps@plain\ps@empty\makeatother
+\begin{document}
+\tableofcontents
+\chapter{Einführung}
+\section{Ein Abschnitt}
+\subsection{Ein Unterabschnitt}
+\subsubsection{Ein Unter-Unterabschnitt}
+%StartVisibleBody
+\subsubsubsection{Ein Unter-Unter-Unterabschnitt}
+%StopVisibleBody
+\blindtext
+\end{document}
+\end{externalDocument}
+
+
+
+
\section{Supported engines}
\subsection{\MP\ example}
+Needs the run sequence setting to get a \texttt{pdf} from the created \texttt{dvi} output.
+It is already internally defined.
+
\begin{externalDocument}[
% grfOptions={width=0.45\linewidth},
% pages={1,3},
@@ -1495,6 +1638,10 @@ end;
\subsection{plain\TeX\ example}
+Needs the run sequence setting to get a \texttt{pdf} from the created \texttt{dvi} output.
+It is already internally defined.
+
+
\begin{externalDocument}[
grfOptions={width=0.5\linewidth},
% pages={1,3},
@@ -1557,7 +1704,9 @@ This is the start of the introduction.
-\subsection{\LaTeX\ example}
+\subsection{\LuaLaTeX\ example}
+With Lua\LaTeX\ and and using PostScript code the intermediate GhostScript run is
+not needed. The \texttt{pdf} is directly created.
\begin{externalDocument}[
grfOptions={width=0.5\linewidth},
diff --git a/Master/texmf-dist/tex/latex/hvextern/hvextern.sty b/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
index 19f14ec67fe..62c61d549ef 100644
--- a/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
+++ b/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
@@ -1,4 +1,4 @@
-%% $Id: hvextern.sty 559 2022-05-27 06:59:29Z herbert $
+%% $Id: hvextern.sty 562 2022-06-01 15:37:46Z herbert $
%% This is file `hvextern.sty',
%%
%% Copyright (C) 2016-22
@@ -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.27}
-\ProvidesFile{hvextern}[2022/05/27 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.28}
+\ProvidesFile{hvextern}[2022/06/01 v\hvexternFileversion: package for running external documents (HV)]
\RequirePackage{shellesc,xkeyval,graphicx}
\RequirePackage{fancyvrb,tikz,listings,ifplatform}
@@ -33,7 +33,6 @@
\newcounter{@@@runs}
\newcounter{hv@extern@pageCNT}
\newsavebox\hv@extern@box
-\newlength\hv@LineWidth
\newlength\hv@TextWidth
\newlength\hv@extern@pagesep
\newlength\hv@extern@mpsep
@@ -44,7 +43,9 @@
\newlength\hv@extern@belowskip
\newlength\hv@extern@shiftFN
-\AtBeginDocument{\setlength\hv@LineWidth{\the\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}}
+\newlength\hvExternLineWidth
+\AtBeginDocument{\hvExternLineWidth=\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}}
@@ -86,6 +87,7 @@
\define@boolkey{hv}[hv@extern@]{xindex}[true]{}
\define@key{hv}{xindexOptions}[]{\def\hv@extern@xindexOptions{#1}}
\define@boolkey{hv}[hv@extern@]{includegraphic}[true]{}
+\define@boolkey{hv}[hv@extern@]{output}[true]{}
\define@boolkey{hv}[hv@extern@]{inline}[true]{\hv@extern@codefalse\hv@extern@showFilenamefalse}
\define@boolkey{hv}[hv@extern@]{frame}[true]{}
\define@key{hv}{framesep}[\the\fboxsep]{\setlength\hv@extern@framesep{#1}}
@@ -107,12 +109,12 @@
\define@choicekey*+{hv}{compiler}[\val\nr]{mpost,tex,latex,luatex,python3,perl,lua,java,%
xetex,pdflatex,lualatex,xelatex,context,sh,texlua}[pdflatex]{%
- \hv@ex@typeout{Compiler type \nr}%
+ \hv@ex@typeout{Compiler type (\nr) \val}%
\def\hv@extern@compiler{\val}%
\edef\hv@extern@compilerNo{\nr}%
-}{\PackageWarning{hvextern}{erroneous input (#1) for compiler ignored. Using pdflatex.}%
- \def\hv@extern@compiler{pdflatex}%
- \def\hv@extern@compilerNo{9}%
+}{\PackageWarning{hvextern}{unknown compiler type (#1). Maybe you should define a run sequence???}%
+ \def\hv@extern@compiler{#1}%
+ \def\hv@extern@compilerNo{-1}%
}
\define@key{hv}{aboveskip}[\medskipamount]{\setlength\hv@extern@aboveskip{#1}}
\define@key{hv}{belowpreambleskip}[\smallskipamount]{\setlength\hv@extern@belowpreambleskip{#1}}
@@ -139,6 +141,7 @@
BGbody=black!8,% Backgroundcolor for body
BOpreamble=black!12,% Bodercolor for preamble
BObody=black!8,% Bodercolor for body
+ output=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
@@ -196,8 +199,8 @@
\NewDocumentCommand\run@hv@extern@sequenceList{ m }
{
\clist_map_inline:nn {#1}{%
- \ShellEscape{\hv@extern@progpath##1\space\hvExternDateiname}
- %\hv@ex@typeout{sequencerun: ##1}
+ \hv@ex@typeout{sequencerun: ##1}%
+ \ShellEscape{\hv@extern@progpath##1\space\hvExternDateiname}%
}
}
\ExplSyntaxOff
@@ -205,6 +208,7 @@
\lstset{belowskip=0pt,aboveskip=0pt}% global
\tcbset{breakable,left=2pt,right=2pt,top=2pt,bottom=2pt,boxsep=0pt}
+
\def\hv@marginpar#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@
@@ -284,8 +288,11 @@
\@namedef{#1@initPreamble}{linerange={#4}-{#5},includerangemarker=false}% code
}% {} ^^to prevent problems with lua comments
+% for the user interface
+\let\defMarkerType\hv@extern@ExampleType
+
%%------------------ the config part --------------------
-%\input{hvextern-mp.cfg}
+
%---- MP
\hv@extern@ExampleType{mp}
{beginfig(1)}
@@ -303,7 +310,6 @@
\hv@ex@typeout{running #1epstopdf #3}%
\ShellEscape{#1epstopdf\space #3.eps}%
}
-
%---- TeX
%\input{hvextern-tex.cfg}
\hv@extern@ExampleType{tex}
@@ -463,6 +469,7 @@
\else
\hv@ex@typeout{force=false: NOT running \hvExternDateiname\hv@extern@ext ...}%
\fi% end force
+ \hfuzz=\maxdimen
\ifhv@extern@code%-------------- Code Part
\hv@ex@typeout{Starting Code part with preamble ...}%
\begingroup
@@ -538,67 +545,69 @@
\hv@ex@typeout{\hvExternDateiname ----> \hv@extern@ExamplesDir}%
\ShellEscape{\hv@move \hvExternDateiname.*\space \hv@extern@ExamplesDir}%
\fi
- \ifhv@extern@includegraphic
- \ifhv@extern@inline
- \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}%
- \else
- \ifhv@extern@float
- \hv@ex@typeout{Floating environment}%
- \expandafter\figure\expandafter[\hv@extern@floatsetting]
+ \ifhv@extern@output
+ \ifhv@extern@includegraphic
+ \ifhv@extern@inline
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@fullPath}%
\else
- \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}%
+ \ifhv@extern@float
+ \hv@ex@typeout{Floating environment}%
+ \expandafter\figure\expandafter[\hv@extern@floatsetting]
\else
- \vspace{\hv@extern@belowbodyskip}\noindent
+ \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}%
+ \else
+ \vspace{\hv@extern@belowbodyskip}\noindent
+ \begingroup
+ \fi
+ \fi
+ \hv@extern@align
+ \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{%
+ \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{%
+ \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\endgroup\fi
\fi
\fi
- \hv@extern@align
- \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{%
- \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{%
- \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\endgroup\fi
- \fi
- \fi
- \else% no graphic, only text
- \ifdim\hv@extern@mpwidth>\z@
- \hfill\minipage[t]{\dimexpr\linewidth-\hv@extern@mpwidth-\hv@extern@mpsep\relax}\vspace{0pt}
- \ifhv@extern@usefancyvrb
- \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
- \else
- \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
- \fi
- \endminipage
- \else
- \vspace{\hv@extern@belowbodyskip}%
- \noindent
- \ifhv@extern@usefancyvrb
- \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \else% no graphic, only text
+ \ifdim\hv@extern@mpwidth>\z@
+ \hfill\minipage[t]{\dimexpr\linewidth-\hv@extern@mpwidth-\hv@extern@mpsep\relax}\vspace{0pt}
+ \ifhv@extern@usefancyvrb
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \else
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \fi
+ \endminipage
\else
- \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \vspace{\hv@extern@belowbodyskip}%
+ \noindent
+ \ifhv@extern@usefancyvrb
+ \expandafter\VerbatimInput\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \else
+ \expandafter\lstinputlisting\expandafter[\hv@extern@textOptions]{\hv@extern@fullPath.txt}%
+ \fi
\fi
\fi
- \fi
+ \fi% end of \ifoutput
\ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup
\vspace{\hv@extern@belowskip}%
}
@@ -616,61 +625,63 @@
\fi
\global\stepcounter{hv@example@counter}%
%------------------------------------- output -----------------------------------
- \ifhv@extern@includegraphic
- \ifhv@extern@inline
- \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}%
- \else
- \ifhv@extern@float
- \hv@ex@typeout{Floating environment}%
- \expandafter\figure\expandafter[\hv@extern@floatsetting]
- \else
- \hv@ex@typeout{No floating environment}%
- \par\noindent\begingroup
- \fi
- \hv@extern@align
- \hv@ex@typeout{Input image \hv@extern@ExamplesDir\hvExternDateiname}%
- \ifhv@extern@frame
- \begingroup
- \fboxsep=\hv@extern@framesep
- \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
- \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}}%
- \hspace{5pt}}\hspace*{-5pt}%
- \endgroup
- \else
- \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
- \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}%
+ \ifhv@extern@output
+ \ifhv@extern@includegraphic
+ \ifhv@extern@inline
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions]{\hv@extern@ExamplesDir\hvExternDateiname}%
+ \else
+ \ifhv@extern@float
+ \hv@ex@typeout{Floating environment}%
+ \expandafter\figure\expandafter[\hv@extern@floatsetting]
+ \else
+ \hv@ex@typeout{No floating environment}%
+ \par\noindent\begingroup
+ \fi
+ \hv@extern@align
+ \hv@ex@typeout{Input image \hv@extern@ExamplesDir\hvExternDateiname}%
+ \ifhv@extern@frame
+ \begingroup
+ \fboxsep=\hv@extern@framesep
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \fbox{\expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}}%
\hspace{5pt}}\hspace*{-5pt}%
- \fi
- \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\par\endgroup\fi
- \fi
- \fi
- \else% no graphic, only text
- \ifhv@extern@float
- \hv@ex@typeout{Floating environment}%
- \expandafter\figure\expandafter[!htb]
- \ifhv@extern@usefancyvrb
- \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
- \else
- \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
- \fi
- \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
- \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi
- \endfigure
- \else
- \noindent
- \ifhv@extern@usefancyvrb
- \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
- \else
- \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
- \fi
- \fi
- \fi
- \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup
+ \endgroup
+ \else
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv@extern@pages\do{%
+ \expandafter\includegraphics\expandafter[\hv@extern@grfOptions,page=\next]{\hv@extern@fullPath}%
+ \hspace{5pt}}\hspace*{-5pt}%
+ \fi
+ \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\par\endgroup\fi
+ \fi
+ \fi
+ \else% no graphic, only text
+ \ifhv@extern@float
+ \hv@ex@typeout{Floating environment}%
+ \expandafter\figure\expandafter[!htb]
+ \ifhv@extern@usefancyvrb
+ \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
+ \else
+ \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
+ \fi
+ \ifx\hv@extern@caption\@empty\else\caption{\hv@extern@caption}\fi
+ \ifx\hv@extern@label\@empty\else\label{\hv@extern@label}\fi
+ \endfigure
+ \else
+ \noindent
+ \ifhv@extern@usefancyvrb
+ \expandafter\BodyVerbatim\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
+ \else
+ \expandafter\BodyListing\expandafter[\hv@extern@lstOptions]{\hv@extern@fullPath.txt}
+ \fi
+ \fi
+ \fi
+ \fi% end \ifoutput
+ \ifhv@extern@force\expandafter\run@hv@extern@cleanup\expandafter{\hv@extern@cleanup}\fi% cleanup
\endgroup
}