texlive[63260] Master: hvextern (8may22)
commits+karl at tug.org
commits+karl at tug.org
Sun May 8 22:23:52 CEST 2022
Revision: 63260
http://tug.org/svn/texlive?view=revision&revision=63260
Author: karl
Date: 2022-05-08 22:23:52 +0200 (Sun, 08 May 2022)
Log Message:
-----------
hvextern (8may22)
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
trunk/Master/tlpkg/libexec/ctan2tds
Added Paths:
-----------
trunk/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
Modified: trunk/Master/texmf-dist/doc/latex/hvextern/Changes
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvextern/Changes 2022-05-08 20:21:01 UTC (rev 63259)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/Changes 2022-05-08 20:23:52 UTC (rev 63260)
@@ -1,5 +1,8 @@
hvextern.sty ----------------
+v 0.23 2022-05-08 - added \runExtCmd
+ - added doctype shell
+v 0.22 2022-05-05 - added mpvalign, tclbox
v 0.21 2022-04-30 - added java support
v 0.20 2022-04-27 - use L3 for the comma separated lists
cleanup and runsequence
Added: trunk/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
===================================================================
--- trunk/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty 2022-05-08 20:23:52 UTC (rev 63260)
@@ -0,0 +1,100 @@
+%% $Id: hvdoctools.sty 1127 2019-12-29 21:42: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.
+%% Either version 1.3 or, at your option, any later version.
+%%
+% Copyright 2019 Herbert Voss hvoss at tug.org
+%%
+\ProvidesPackage{hvdoctools}[%
+ 2019/11/27 v.0.01 (Herbert Voss) macros for package documentation (hv)]
+%
+\NeedsTeXFormat{LaTeX2e}
+
+\RequirePackage{makeidx}\makeindex
+
+\def\Lfile#1{\texttt{#1}\index{#1@\texttt{#1} (file)}}
+\def\Lext#1{\texttt{.#1}\index{#1@\texttt{.#1} (file extension)}}
+\def\Ldim#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1} (length)}}
+\def\Lcs#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1}}}
+\def\nxLcs#1{\texttt{\textbackslash#1}}
+\def\Lenv#1{\texttt{#1}\index{#1@\texttt{#1} (environment)}}
+\def\Lpack#1{\texttt{#1}\index{#1@\texttt{#1} (package)}}
+\let\LPack\Lpack
+\def\Lprog#1{\texttt{#1}\index{#1@\texttt{#1} (program)}}
+\def\Lcolor#1{\texttt{#1}\index{#1@\texttt{#1} (color)}}
+\def\Loption#1{\texttt{#1}\index{#1@\texttt{#1} (package option)}}
+\def\Lkeyword#1{\texttt{#1}\index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}}}
+\def\Lkeyval#1{\texttt{#1}\index{#1@\texttt{#1} (value)}}
+\def\Lskip#1{\texttt{\textbackslash#1}\index{#1@\texttt{\textbackslash#1} (skip)}}
+\def\Lkeyset#1{\expandafter\Lkeyset at i#1\@nil}
+\def\Lkeyset at i#1=#2\@nil{\texttt{#1=#2}%
+ \index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}}
+ \index{#2@\texttt{#2} (value)}\index{Value!#2@\texttt{#2}}}
+
+\def\LKeyset#1{\expandafter\LKeyset at i#1\@nil}
+\def\LKeyset at i#1=#2\@nil{\texttt{#1=#2}%
+ \index{#1@\texttt{#1} (keyword)}\index{Keyword!#1@\texttt{#1}}}
+\newsavebox\boxdef
+\newenvironment{BDef}
+ {\begin{lrbox}{\boxdef}
+ \def\arraystretch{1.0}
+ \begin{tabular}{@{}l@{}l@{}l@{}}}
+ {\end{tabular}\end{lrbox}
+ {\BCmd\fbox{\usebox\boxdef}\endBCmd}
+ \aftergroup\@afterindentfalse\aftergroup\@afterheading
+ }
+\def\Lclass#1{\texttt{#1}\index{#1@\texttt{#1} (doc class)}}
+
+\newskip\BDefaboveskip
+\newskip\BDefbelowskip
+\newskip\BDefinlineskip
+\setlength\BDefaboveskip{0pt plus 2pt}% first-level list topsep
+\setlength\BDefbelowskip{10pt}
+\setlength\BDefinlineskip{6pt}
+
+\newenvironment{BCmd}{
+ \@beginparpenalty-\@lowpenalty
+ \topsep\BDefaboveskip
+ \fboxsep3pt
+ \flushleft}
+ {\@endparpenalty\@M
+ \@topsepadd\BDefbelowskip
+ \endflushleft}
+
+\newenvironment{BCmd*}{%
+ \@beginparpenalty\@M
+ \topsep\BDefinlineskip
+ \fboxsep3pt
+ \flushleft}
+ {\@endparpenalty5000
+ \endflushleft}
+
+\def\OptArgs{\colorbox{black!20}{\texttt{[Options]}}\kern1pt}
+\def\OptArg{\@ifnextchar*\OptArg at i{\OptArg at ii*}}% star version without braces
+\def\OptArg at i*#1{\colorbox{black!20}{\texttt{#1}}\kern1pt}
+\def\OptArg at ii*#1{\colorbox{black!20}{\texttt{[#1]}}\kern1pt}
+\def\DBS{{\ttfamily\textbackslash\textbackslash}}
+
+\newcommand\Larg [1]{{\normalfont\itshape#1\/}}
+\newcommand\Larga[1]{$\langle$\Larg{#1}$\rangle$}% angles
+\newcommand\Largb[1]{\lcb\Larg{#1}\rcb} % curly brace
+\newcommand\Largs[1]{\lsb\Larg{#1}\rsb} % square brackets
+\newcommand\Largr[1]{\lrb\Larg{#1}\rrb} % round brackets
+\newcommand\LBEG[1]{{\normalfont\ttfamily\bs{}begin\lcb#1\rcb}\xLenv{#1}}
+\newcommand\LmBEG[1]{{\normalfont\ttfamily\bs{}begin\lcb#1\rcb}\xLmenv{#1}}
+\newcommand\LEND[1]{{\normalfont\ttfamily\bs{}end\lcb#1\rcb}\xLenv{#1}}
+\newcommand\LmEND[1]{{\normalfont\ttfamily\bs{}end\lcb#1\rcb}\xLmenv{#1}}
+
+\DeclareRobustCommand\bs{{\normalfont\ttfamily\textbackslash}} % \let\bslash=\bs
+\DeclareRobustCommand\lcb{{\normalfont\ttfamily\textbraceleft}}
+\DeclareRobustCommand\rcb{{\normalfont\ttfamily\textbraceright}}
+\DeclareRobustCommand\lsb{{\normalfont\ttfamily[}}
+\DeclareRobustCommand\rsb{{\normalfont\ttfamily]}}
+\DeclareRobustCommand\lrb{{\normalfont\ttfamily(}}
+\DeclareRobustCommand\rrb{{\normalfont\ttfamily)}}
+\DeclareRobustCommand\false{{\ttfamily false}}
+\DeclareRobustCommand\true{{\ttfamily true}}
+
+
+\endinput
Property changes on: trunk/Master/texmf-dist/doc/latex/hvextern/hvdoctools.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
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 2022-05-08 20:21:01 UTC (rev 63259)
+++ trunk/Master/texmf-dist/doc/latex/hvextern/hvextern.tex 2022-05-08 20:23:52 UTC (rev 63260)
@@ -8,21 +8,29 @@
\usepackage{hvlogos}
\usepackage{hvextern}
+\usepackage{hvindex}
+\usepackage{hvdoctools}
\usepackage{listings}
\lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,breaklines}
-\usepackage{xcolor}
+\usepackage{xcolor,xspace}
\usepackage{hyperref}
+
+\def\Python{\textsf{Python}\xspace}
+\def\Perl{\textsf{Perl}\xspace}
+\def\Lua{\textsf{Lua}\xspace}
+\def\Java{\textsf{Java}\xspace}
+
+
\begin{document}
\title{Writing, running and including the output of external documents
from within a main \LaTeX\ document~--v. \hvexternFileversion}
\author{Herbert Voß\thanks{herbert at dante.de}}
\maketitle
-
\tableofcontents
\newpage
-\setkeys{hv}{moveToExampleDir,ExampleDir=Examples}
+\setkeys{hv}{moveToExampleDir,ExampleDir=Examples,showFilename,verbose}
\section{Syntax}
\begin{verbatim}
@@ -36,7 +44,7 @@
\end{sloppypar}
-There is only one environment:
+There is only one environment and one command:
\begin{verbatim}
\begin{externalDocument}[<options>]{<external filename without extension>}
@@ -44,12 +52,14 @@
source code
...
\end{externalDocument}
+
+\runExtCmd[<options>]{<command with arguments>}{<external filename without extension>}
\end{verbatim}
-The main document \emph{must} be run with the \texttt{-shell-escape} option, otherwise it won't work, e.g.:
+The main document \emph{must} be run with the \Loption{-shell-escape} option, otherwise it won't work, e.g.:
\begin{verbatim}
-laulatex --shell-escape <file>
+lualatex --shell-escape <file>
\end{verbatim}
@@ -63,7 +73,7 @@
\noindent
\fbox{\begin{minipage}{\dimexpr\linewidth-2\fboxsep-2\fboxrule\relax}
\emph{All} examples in this document are created on-the-fly while running this \LaTeX\ document
-with \texttt{lualatex} with the \texttt{-\kern2pt-shell-escape} option.
+with \texttt{lualatex} with the \texttt{-\kern1pt-shell-escape} option.
\end{minipage}}
@@ -75,8 +85,8 @@
which needs for several reasons a \pdfLaTeX\ run. Instead of created and running a document
outside of the main document and then to insert the output
we can do this from within this \LuaLaTeX\ document itself. The external document is compiled
-with \pdfLaTeX\ and the output is insert as pdf image. The source code itself is not
-shown by the environment \texttt{externalDocument}.
+with \pdfLaTeX\ and the output is insert as pdf image. The \Index{source} code itself is not
+shown by the environment \Lenv{externalDocument}.
\begin{minipage}{.59\linewidth}
@@ -106,7 +116,7 @@
\end{minipage}
\begin{minipage}{.39\linewidth}
\begin{externalDocument}[
- compiler=pdflatex,force,cleanup={log,aux},verbose]{voss}
+ compiler=pdflatex,force=false,cleanup={log,aux},verbose]{voss}
\documentclass{standalone}
%StartVisiblePreamble
\usepackage{fontenc}
@@ -129,7 +139,7 @@
\end{minipage}
\subsection{Showing code and output of a Python example}
-The png image is created on the fly with the following arguments of \verb|externalDocument|:
+The \ttIndex{png} image is created on the fly with the following arguments of \Lenv{externalDocument}:
\begin{Verbatim}
\begin{externalDocument}[
@@ -154,7 +164,7 @@
{\NumChar StopVisiblePreamble}
\end{Verbatim}
-\verb|\NumChar| is the default Python comment character \# and needs to be saved with a different
+\Lcs{NumChar} is the default Python comment character \#\index{\#} and needs to be saved with a different
catagory, which is done internally by the package. The complete definition of the code is:
@@ -164,7 +174,7 @@
showFilename,
code,
ext=py,
- force,
+ force=false,
docType=py,
usefancyvrb,
grfOptions={width=\linewidth}]{python}
@@ -206,7 +216,7 @@
And with using this code we get the image as png inserted. The given filename of the external
document is
-internally extended by a consecutive number which isn't known to the Python code. However,
+internally extended by a consecutive number which isn't known to the \Index{Python} code. However,
it is no problem in any programming language to get the name of a running file. The forlast
line in the above code shows how it can be done with Python.
@@ -214,7 +224,7 @@
\begin{externalDocument}[
compiler=python3,
progpath=/usr/local/bin/,
- force,
+ force=false,
showFilename,
runs=1,
code,
@@ -263,7 +273,7 @@
\begin{externalDocument}[grfOptions={width=0.95\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
- crop,cleanup,force,usefancyvrb=false,ext=tex]{voss}
+ crop,cleanup,force=false,usefancyvrb=false,ext=tex]{voss}
\documentclass{article}
%StartVisiblePreamble
\usepackage{tikz}
@@ -302,9 +312,9 @@
\end{document}
\end{verbatim}
-everything between \verb|%StartVisiblePreamble| and \verb|%StopVisiblePreamble| will be listed as
+everything between \ttIndex{\%StartVisiblePreamble} and \ttIndex{\%StopVisiblePreamble} will be listed as
preamble and in case of a \LaTeX\ source everything between
- \verb|\begin{document}| and \verb|\end{document}| as body. The marker must be defined with an own
+ \Lcs{begin\{document\}} and \Lcs{end\{document\}} as body. The marker must be defined with an own
macro, e.g.:
\begin{verbatim}
@@ -315,11 +325,14 @@
{\NumChar StopVisiblePreamble}
\end{verbatim}
-\verb|\NumChar| is the comment character \#, which needs a special handling. This version of \texttt{hvextern}
-supports the following programming languages (option \texttt{compiler}):
-mpost, tex, latex, luatex, python3, perl, lua, xetex, pdflatex, lualatex, xelatex, and context. The default
-is pdflatex. The option \texttt{docType} selects the config file, which must be one of
-context, lua, pl, tex, latex, mp, and py. For Lua it is
+\Lcs{NumChar} is the comment character \#, which needs a special handling. This version of \Lpack{hvextern}
+supports the following programming languages (option \Lkeyword{compiler}):
+\Lkeyval{mpost}, \Lkeyval{tex}, \Lkeyval{latex}, \Lkeyval{luatex},
+\Lkeyval{python3}, \Lkeyval{perl}, \Lkeyval{lua}, \Lkeyval{xetex},
+\Lkeyval{pdflatex}, \Lkeyval{lualatex}, \Lkeyval{xelatex}, and \Lkeyval{context}. The default
+is \Lkeyval{pdflatex}. The option \Lkeyword{docType} selects the config file, which must be one of
+\Lkeyval{context}, \Lkeyval{lua}, \Lkeyval{pl}, \Lkeyval{tex}, \Lkeyval{latex},
+\Lkeyval{mp}, and \Lkeyval{py}. For Lua it is
\begin{verbatim}
\hv at extern@exampleType{lua}
@@ -330,7 +343,8 @@
\end{verbatim}
-It defines the marker strings for the listed code sequences. In some cases you have to use multiple times the same value
+It defines the marker strings for the listed code sequences.
+In some cases you have to use multiple times the same value
for different optional arguments, e.g.
\begin{verbatim}
@@ -339,12 +353,12 @@
\section{Optional arguments}
-The deafault setting is always shown in brackets.
+The default setting is always shown in brackets.
\subsection{Programs and runs}
-The \texttt{progpath} should only in some
-rare cases needed. In general all used compilers will be found by the system. A given \texttt{progpath}
-must be end with a slash, e.g. \texttt{./bin/} %The option \texttt{runsequence} is currently not used.
+The \Lkeyword{progpath} should only in some
+rare cases needed. In general all used compilers will be found by the system. A given \Lkeyword{progpath}
+must be end with a slash, e.g. \Lkeyval{./bin/}
\begin{verbatim}
\define at key{hv}{progpath}[]{\def\hv at extern@progpath{#1}}
@@ -354,9 +368,9 @@
\end{verbatim}
Instead of the optional arguments
- \texttt{compiler}, \texttt{biber}, and \texttt{xindex} one can define an individual
+ \Lkeyword{compiler}, \Lkeyword{biber}, and \Lkeyword{xindex} one can define an individual
command sequence by using the optional argument
- \texttt{runsequence}. It must be comma separated list:
+ \Lkeyword{runsequence}. It must be comma separated list:
\begin{verbatim}
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}
@@ -369,7 +383,7 @@
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
showFilename,
verbose,
- force,
+ force=false,
cleanup={log,aux,toc,bbl,blg},
code,docType=latex,
lstOptions={columns=fixed}]{voss}
@@ -398,8 +412,8 @@
\end{externalDocument}
-The following Java-program creates the Mandelbrot set as png image. The valid setting for
-the environment \texttt{externalDocument} is:
+The following \Java-program creates the Mandelbrot set as png image. The valid setting for
+the environment \Lenv{externalDocument} is:
\begin{verbatim}
compiler=java,ext=java,docType=java,
@@ -408,7 +422,7 @@
\begin{externalDocument}[
verbose,
compiler=java,ext=java,code,
- force,docType=java,includegraphic,
+ force=false,docType=java,includegraphic,
usefancyvrb,grfOptions={width=0.9\linewidth}]{java}
import java.awt.Color;
import java.awt.Graphics;
@@ -472,15 +486,15 @@
\end{externalDocument}
+%$
-
\subsection{Grafik options}
\begin{verbatim}
\define at key{hv}{grfOptions}[]{\def\hv at extern@grfOptions{#1}}
\end{verbatim}
-The option is passed to \verb|\includegraphics|, e.g. \verb|angle=90,width=\linewidth| for
+The option is passed to \Lcs{includegraphics}, e.g. \verb|angle=90,width=\linewidth| for
the follwing example.
\begin{externalDocument}[grfOptions={angle=90,width=\linewidth},
@@ -516,8 +530,8 @@
\define at key{hv}{lstOptions}[]{\def\hv at extern@lstOptions{#1}}
\end{verbatim}
-The option is passed either to \verb|\lstinputlisting|, or, if \texttt{usefancyvrb} is active,
-to \verb|\VerbatimInput|. The following example uses
+The option is passed either to \Lcs{lstinputlisting}, or, if \Lkeyword{usefancyvrb} is active,
+to \Lcs{VerbatimInput}. The following example uses
\begin{verbatim}
lstOptions={basicstyle=\sffamily\itshape\scriptsize},
@@ -533,7 +547,7 @@
mpwidth=0.6\linewidth,
crop,
cleanup,
- force,
+ force=false,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
\DeclareDocumentMetadata{}
@@ -559,7 +573,7 @@
\define at key{hv}{BObody}[black8]{\def\hv at extern@BObody{#1}}
\end{verbatim}
-The options are passed to \verb|tcolorbox| and preset to \texttt{black12} and \texttt{black!8}.
+The options are passed to \Lpack{tcolorbox} and preset to \Lcolor{black"!12} and \Lcolor{black"!8}.
The color of the frame is set to the same values, hence not seen. The following example uses
\begin{verbatim}
@@ -579,7 +593,7 @@
mpwidth=0.6\linewidth,
crop,
cleanup,
- force,
+ force=false,
usefancyvrb,
docType=latex]{voss}
\RequirePackage{pdfmanagement-testphase}
@@ -598,7 +612,7 @@
\subsection{Type of the source code}
-The current version of \texttt{hvextern} supports code written as
+The current version of \Lpack{hvextern} supports code written as
\MP, \plainTeX, \LaTeX, \ConTeXt, and Python. Every type has its own keywords for the
linerange which should be printed for the preamble and
the body. For example the \texttt{latex} config is:
@@ -627,15 +641,15 @@
...}
\end{verbatim}
-The type of the source code can be different to the compiler, e.g. source \texttt{latex},
-but compiler \texttt{lualatex}.
+The type of the source code can be different to the compiler, e.g. source \Lkeyval{latex},
+but compiler \Lkeyval{lualatex}.
\subsection{Output as floating object with caption and label}
By default the images are not inserted as a float. This can be changed by
-the keyword \texttt{float}, a caption and a label are optional. The float type is always
-\texttt{figure}.
+the keyword \Lkeyword{float}, a caption and a label are optional. The float type is always
+\Lenv{figure}.
\begin{verbatim}
\define at boolkey{hv}[hv at extern@]{float}[true]{}
@@ -656,7 +670,7 @@
% mpwidth=0.6\linewidth,
crop,
cleanup,
- force,
+ force=false,
usefancyvrb,
float,
caption={An example for Coxeter images},
@@ -696,7 +710,7 @@
\define at boolkey{hv}[hv at extern@]{frame}[true]{}
\end{verbatim}
-With \texttt{frame} the pages can be framed (internally by \verb|\fbox|).
+With \Lkeyword{frame} the pages can be framed (internally by \Lcs{fbox}).
It is leaved to the user to choose the correct image width for the pages.
The following example uses:
@@ -718,7 +732,7 @@
% mpwidth=0.6\linewidth,
% crop,
cleanup,
- force,
+ force=false,
frame,
% usefancyvrb,
% float,
@@ -744,8 +758,8 @@
\subsection{Cropping the PDF}
-Instead of using the documentclass \texttt{standalone}, which already crops the created PDF,
-one can use the optional argument \texttt{crop}.
+Instead of using the \Index{documentclass} \Lclass{standalone}, which already crops the created PDF,
+one can use the optional argument \Lkeyword{crop}.
\begin{verbatim}
\define at boolkey{hv}[hv at extern@]{crop}[true]{}
@@ -755,7 +769,8 @@
It is also possible to crop a document with more than one page. In this case the
beginning and end of the pages should be on the same height. Otherwise the pages
-will have different heights after cropping (see next image). The follwoing example was created with
+will have different heights after \Index{cropping} (see next image).
+The follwoing example was created with
\begin{verbatim}
pages={1,2,3},
@@ -776,7 +791,7 @@
% mpwidth=0.6\linewidth,
crop, cropmargin=5,
cleanup,
- force,
+ force=false,
frame,
% usefancyvrb,
% float,
@@ -802,20 +817,22 @@
\subsection{Code and output side by side}
By default the code and the output is on top of each other. With setting the
-width of a minipage with \texttt{mpwidth} greater than 0\,pt the output will be side by side.
+width of a minipage with \Lkeyword{mpwidth} greater than 0\,pt the output will be side by side.
\begin{verbatim}
\define at key{hv}{mpwidth}[0pt]{\setlength\hv at extern@mpwidth{#1}}
+\define at key{hv}{mpvalign}[0pt]{\def\hv at extern@mpvalign{#1}}
\end{verbatim}
-\texttt{mpwidth} is the width of the code. The rest of the line, minus 1em for the space between
+\Lkeyword{mpwidth} is the width of the code. The rest of the line, minus 1em for the space between
the minipages, will be the possible
-width for the output and will be calculated automatically. The two minipages are
-aligned by its top.
+width for the output and will be calculated automatically. The two \Index{minipages} are
+aligned by defaults to its top. This can be changed by setting \Lkeyword{mpvalign} to \Lkeyval{c}
+or \Lkeyval{b}.
-\subsection{Align of the output}
+\subsection{Horizontal alignment of the output}
%\begin{verbatim}
%\define at key{hv}{align}[\centering]{\def\hv at extern@align{#1}}
@@ -834,7 +851,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -857,7 +874,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -881,7 +898,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
docType=latex]{voss}
\documentclass{article}
\pagestyle{empty}
@@ -905,7 +922,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
mpwidth=0.5\linewidth,
docType=latex]{voss}
\documentclass{article}
@@ -929,7 +946,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
mpwidth=0.5\linewidth,
docType=latex]{voss}
\documentclass{article}
@@ -954,7 +971,7 @@
code,
crop,
cleanup,
- force,
+ force=false,
mpwidth=0.5\linewidth,
docType=latex]{voss}
\documentclass{article}
@@ -965,8 +982,8 @@
\end{externalDocument}
\subsection{Inline images}
-By default code and image are own paragraphs. With the optional argument \texttt{inline} the created
-image can be part of the current line. This may make sense, if you need characters which are
+By default code and image are own paragraphs. With the optional argument \Lkeyword{inline} the created
+image can be part of the \Index{current line}. This may make sense, if you need characters which are
not part of your current font.
\begin{verbatim}
@@ -973,11 +990,11 @@
\define at boolkey{hv}[hv at extern@]{inline}[true]{\hv at extern@codefalse}
\end{verbatim}
-With \texttt{inline=true} the optional argument \texttt{code} is automatically set to false. The
+With the setting \LKeyset{inline=true} the optional keyword \Lkeyword{code} is automatically set to false. The
next Chinese characters
\begin{externalDocument}[
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
- crop, cropmargin=0, cleanup, force, docType=latex]{voss}%
+ crop, cropmargin=0, cleanup, force=false, docType=latex]{voss}%
\documentclass{ctexart}
\pagestyle{empty}
\begin{document}
@@ -984,16 +1001,16 @@
美好的一天
\end{document}
\end{externalDocument}
-are inserted as inline image without showing the code. The complete code looks like:
+are inserted as \Index{inline image} without showing the code. The complete code looks like:
\begin{Verbatim}
-With \texttt{inline=true} the optional argument \texttt{code} is automatically set to false. The
+With \Lkeyset{inline} the optional argument \Lkeyword{code} is automatically set to false. The
next Chinese characters
\begin{externalDocument}[
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
- crop, cropmargin=0, cleanup, force, docType=latex]{voss}
+ crop, cropmargin=0, cleanup, force=false, docType=latex]{voss}
\documentclass{ctexart}
\pagestyle{empty}
\begin{document}
@@ -1005,9 +1022,9 @@
\subsection{Input text instead of an image}
-By default the created pdf which can be, of course, only test, wil be insert by \verb|\incudegraphics|.
-If you have only text as output and dont want to create a pdf you can insert this kind of
-output as verbatim text by setting \verb|includegraphic=false|.
+By default the created pdf which can be, of course, only text, will be inserted by \Lcs{includegraphics}.
+If you have only text as output and don't want to create a pdf you can insert this kind of
+output as verbatim text by setting \Lkeyset{includegraphic=false}.
\begin{verbatim}
\define at boolkey{hv}[hv at extern@]{includegraphic}[true]{}
@@ -1015,9 +1032,9 @@
The textfile must have the same main filename with the extension
-\verb|.txt|. As already mentioned, in every programming language you can get the current
-used filename from within the code itself. The following Perl example which calculates the
-Kaprekar constants uses
+\Lext{txt}. As already mentioned, in every programming language you can get the current
+used filename from within the code itself. The following \Perl example which calculates the
+\Index{Kaprekar} constants uses
\begin{verbatim}
my $filename = $0; # the current filename
@@ -1025,12 +1042,13 @@
$filename = "${filename}.txt"; # for the output
\end{verbatim}
-Only for some completeness: a Kaprekar constant is a number $A$ with $\max(A)-\min(A)=A$. $\max$ and $\min$ are the
+Only for some completeness: a Kaprekar constant is a number $A$ with $\max(A)-\min(A)=A$.
+$\max$ and $\min$ are the
sorted digits of the number $A$: $495=954-459$.
\begin{externalDocument}[
- compiler=perl, force, docType=pl, ext=pl, includegraphic=false,
+ compiler=perl, force=false, docType=pl, ext=pl, includegraphic=false,
code, mpwidth=0.6\linewidth]{voss}
#!/usr/bin/perl
#
@@ -1074,7 +1092,7 @@
%$
-Another example with running Lua to calculate and print the Pascal's triangle. The internal filename
+Another example with running \Lua to calculate and print the \Index{Pascal's triangle}. The internal filename
is available with
\begin{verbatim}
@@ -1085,7 +1103,7 @@
\begin{externalDocument}[
- compiler=lua, force, docType=lua, ext=lua, includegraphic=false, code, usefancyvrb=false]{voss}
+ compiler=lua, force=false, docType=lua, ext=lua, includegraphic=false, code, usefancyvrb=false]{voss}
#!/usr/bin/env lua
local filename = arg[0]
local shortFN = filename:match("(.+)%..+")
@@ -1124,7 +1142,7 @@
\subsection{Running additional external programs}
-For a \LaTeX\ additional programs for bibliography, index, a.s.o. maybe needed.
+For a \LaTeX\ additional programs for \Index{bibliography}, \Index{index}, a.s.o. maybe needed.
\begin{verbatim}
\define at boolkey{hv}[hv at extern@]{biber}[true]{}
@@ -1133,7 +1151,7 @@
\define at key{hv}{runsequence}[]{\def\hv at extern@runsequence{#1}}
\end{verbatim}
-The \texttt{biber} run needs no additional options, but for \texttt{xindex} it maybe useful.
+The \Lkeyword{biber} run needs no additional options, but for \Lkeyword{xindex} it maybe useful.
The following examples uses
\begin{verbatim}
@@ -1158,7 +1176,7 @@
pages=2,
crop,
cleanup,
- force,
+ force=false,
xindex,
xindexOptions={-l DE --config AU},
mpwidth=0.6\linewidth,
@@ -1200,8 +1218,8 @@
\end{externalDocument}
-Instad of using the options \texttt{compiler}, \texttt{biber}, and \texttt{xindex}
-one can also use only the optional argument \texttt{runsequence} to define an individuell
+Instad of using the options \Lkeyword{compiler}, \Lkeyword{biber}, and \Lkeyword{xindex}
+one can also use only the optional argument \Lkeyword{runsequence} to define an individuell
sequence of commands, e.g.:
\begin{verbatim}
runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex}
@@ -1214,7 +1232,7 @@
runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex},
showFilename,
verbose,
- force,
+ force=false,
cleanup={log,aux,toc,bbl,blg},
code,docType=latex,
lstOptions={columns=fixed}]{voss}
@@ -1248,7 +1266,7 @@
\subsection{Using \texttt{listings}}
-The default is using \verb|\lstinputlisting| for the printed code sequences.
+The default is using \Lcs{lstinputlisting} for the printed code sequences.
\begin{externalDocument}[
grfOptions={width=0.45\linewidth},
@@ -1256,9 +1274,9 @@
frame,compiler=pdflatex,
showFilename,
% crop,
- force,runs=2,code,docType=latex,
+ force=false,runs=2,code,docType=latex,
frame,
- lstOptions={columns=fixed}]{Schubert-A}
+ lstOptions={columns=fixed}]{voss}
%StartVisiblePreamble
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
\DeclareNewSectionCommand[
@@ -1306,8 +1324,8 @@
-It also possible to use \verb|\VerbatimInput| from package \texttt{fancyvrb}. In general
-it makes no difference using the optional argument \texttt{usefancyvrb} or not.
+It also possible to use \Lcs{VerbatimInput} from package \Lpack{fancyvrb}. In general
+it makes no difference using the optional argument \Lkeyword{usefancyvrb} or not.
\begin{externalDocument}[
@@ -1316,8 +1334,8 @@
frame,compiler=pdflatex,
showFilename,
% crop,
- force,runs=2,code,docType=latex,
- frame,usefancyvrb]{Schubert-A}
+ force=false,runs=2,code,docType=latex,
+ frame,usefancyvrb]{voss}
%StartVisiblePreamble
\documentclass[chapterprefix=on,parskip=half-,DIV=12,fontsize=12pt]{scrbook}
\DeclareNewSectionCommand[
@@ -1376,7 +1394,7 @@
compiler=mpost,
showFilename,
% crop,
- force,
+ force=false,
cleanup,
code,
docType=mp,
@@ -1408,7 +1426,7 @@
compiler=tex,
showFilename,
% crop,
- force,
+ force=false,
code,
docType=tex,
ext=tex,]{voss}
@@ -1472,7 +1490,7 @@
compiler=lualatex,
showFilename,
crop,
- force,
+ force=false,
code,
docType=latex,
ext=tex,]{voss}
@@ -1512,7 +1530,7 @@
compiler=context,
showFilename,
runs=2,
- force,
+ force=false,
code,
docType=context,
ext=tex,]{voss}
@@ -1553,22 +1571,38 @@
\end{externalDocument}
+\section{Running external commands}
+Integrating the current directory of this document we can use the macro \Lcs{runExtCmd} with
+the optional argument \Lkeyword{redirect}
+
+\begin{verbatim}
+\runExtCmd[redirect]{ls -la}{voss}
+\end{verbatim}
+
+to get the directory listed:
+
+\medskip
+\runExtCmd[redirect,verbose]{ls -la}{voss}
+
+
\section{Other options}
\begin{description}
-\item[\texttt{force=false}] can speed up the comiling time for the document. If a created image/output
+\item[\Lkeyset{force=false}] can speed up the comiling time for the document. If a created image/output
already exists, there is no need to create it with the next run again and again.
-\item[\texttt{cleanup}] the auxiliary files of a \LaTeX-run are deleted, preset to \texttt{.aux}, \texttt{.log}.
+\item[\Lkeyword{cleanup}] the auxiliary files of a \LaTeX-run are deleted, preset to \texttt{aux}, \texttt{log}.
It must be a comma seperated list of the extensions of the main file, s.g. \texttt{cleanup=\{aux,log\}}.
-\item[\texttt{copyToExampleDir}] name of a directory for the examples, must first be created by the user himself
-\item[\texttt{ExamplesDir}] move all examples into a directory
-\item[\texttt{eps}] create an eps from the pdf (historical)
+\item[\Lkeyword{copyToExampleDir}] name of a directory for the examples, must first be created by the user himself
+\item[\Lkeyword{ExamplesDir}] move all examples into a directory
+\item[\Lkeyset{tclbox=false}] Can be used if there are some negative interactions between package \Lpack{listings}
+ and package \Lpack{tcolorbox}.
+\item[\Lkeyword{eps}] create an eps from the pdf (historical).
\end{description}
+\printindex
-
\end{document}
Modified: trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty 2022-05-08 20:21:01 UTC (rev 63259)
+++ trunk/Master/texmf-dist/tex/latex/hvextern/hvextern.sty 2022-05-08 20:23:52 UTC (rev 63260)
@@ -11,8 +11,8 @@
%% and version 1.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
-\def\hvexternFileversion{0.21}
-\ProvidesFile{hvextern}[2022/04/30 v\hvexternFileversion: package for running external documents (HV)]
+\def\hvexternFileversion{0.23}
+\ProvidesFile{hvextern}[2022/05/08 v\hvexternFileversion: package for running external documents (HV)]
\RequirePackage{shellesc,xkeyval,graphicx,marginnote,fancyvrb,tikz,listings,ifplatform}
\RequirePackage{tcolorbox,xparse}
@@ -48,6 +48,7 @@
\define at key{hv}{pages}[1]{\def\hv at extern@pages{#1}}
\define at key{hv}{cropmargin}[2]{\def\hv at extern@cropmargin{#1 }}
\define at key{hv}{mpwidth}[0pt]{\setlength\hv at extern@mpwidth{#1}}
+\define at key{hv}{mpvalign}[t]{\def\hv at extern@mpvalign{#1}}
\define at key{hv}{ext}[tex]{\def\hv at extern@ext{.#1}}
\define at boolkey{hv}[hv at extern@]{redirect}[true]{}
\define at boolkey{hv}[hv at extern@]{usefancyvrb}[true]{}
@@ -55,6 +56,7 @@
\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]{}
+\define at boolkey{hv}[hv at extern@]{tcbox}[true]{}
\define at boolkey{hv}[hv at extern@]{biber}[true]{}
\define at boolkey{hv}[hv at extern@]{xindex}[true]{}
\define at key{hv}{xindexOptions}[]{\def\hv at extern@xindexOptions{#1}}
@@ -79,7 +81,7 @@
%\define at key{hv}{compiler}[pdflatex]{\def\hv at extern@compiler{#1}}
\define at choicekey*+{hv}{compiler}[\val\nr]{mpost,tex,latex,luatex,python3,perl,lua,java,%
- xetex,pdflatex,lualatex,xelatex,context}[pdflatex]{%
+ xetex,pdflatex,lualatex,xelatex,context,sh,texlua}[pdflatex]{%
\hv at typeout{>>>> Compiler type \nr}%
\def\hv at extern@compiler{\val}%
\edef\hv at extern@compilerNo{\nr}%
@@ -96,6 +98,7 @@
crop=false,% erzeugte PDF "croppen"
compiler=pdflatex,% zu verwendener Compiler
redirect=false,% write output into a file *.txt
+ tcbox=true,% use tcolorbox
grfOptions={},% Optionen der einzubindenden Grafik
lstOptions={},% Optionen für das Listing
BGpreamble=black!12,% Backgroundcolor for preamble
@@ -121,12 +124,14 @@
ExampleDir=Examples,% Unterverzeichnis für Beispiele
align=\centering,% Ausgabe zentrieren
mpwidth=0pt,% no minipage
+ mpvalign=t,% if side by side output the vertical alignment
usefancyvrb=false,% use VerbatimInput instead of listings
progpath={},
cropmargin=2,% 2pb margin
eps=false,% create an eps output?
- }
+ }%
}
+
\ResetKeys
{\catcode`\%=12
@@ -157,13 +162,33 @@
\lstset{belowskip=0pt,aboveskip=0pt}% global
\tcbset{breakable,left=2pt,right=2pt,top=2pt,bottom=2pt,boxsep=0pt}
-\newcommand\PreambleVerbatim[2][]{\begin{tcolorbox}\VerbatimInput[#1]{#2}\end{tcolorbox}}
+\newcommand\PreambleVerbatim[2][]{%
+ \ifhv at extern@tcbox
+ \begin{tcolorbox}\VerbatimInput[#1]{#2}\end{tcolorbox}%
+ \else
+ \VerbatimInput[#1]{#2}
+ \fi}
-\newcommand\BodyVerbatim[2][]{\begin{tcolorbox}\VerbatimInput[#1]{#2}\end{tcolorbox}}
+\newcommand\BodyVerbatim[2][]{%
+ \ifhv at extern@tcbox
+ \begin{tcolorbox}\VerbatimInput[#1]{#2}\end{tcolorbox}%
+ \else
+ \VerbatimInput[#1]{#2}
+ \fi}
-\newcommand\PreambleListing[2][]{\begin{tcolorbox}[top=-2pt]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}}
+\newcommand\PreambleListing[2][]{%
+ \ifhv at extern@tcbox
+ \begin{tcolorbox}[top=-2pt]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}%
+ \else
+ \expandafter\lstinputlisting\expandafter[#1]{#2}%
+ \fi}
-\newcommand\BodyListing[2][]{\begin{tcolorbox}[top=-2pt]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}}
+\newcommand\BodyListing[2][]{%
+ \ifhv at extern@tcbox
+ \begin{tcolorbox}[top=-2pt]\expandafter\lstinputlisting\expandafter[#1]{#2}\end{tcolorbox}%
+ \else
+ \expandafter\lstinputlisting\expandafter[#1]{#2}%
+ \fi}
\newcounter{hv at example@counter}
@@ -272,6 +297,15 @@
{//StopVisiblePreamble}
+%---- Shell
+%\input{hvextern-sh.cfg}
+\hv at extern@ExampleType{sh}
+ {\NumChar StartVisibleMain}
+ {\NumChar StopVisibleMain}
+ {\NumChar StartVisiblePreamble}
+ {\NumChar StopVisiblePreamble}
+
+
%%%--------------------------------- end config part ------------------
%%
@@ -280,6 +314,7 @@
\newenvironment{externalDocument}[2][]{%
\xdef\hvExternDateiname{#2-\arabic{hv at example@counter}}%
\setkeys{hv}{#1}% \begin
+ \hv at 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}{}{%
@@ -307,10 +342,11 @@
\hv at 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}%
\else
- \hv at typeout{>>>> running \hv at extern@compiler~ \hvExternDateiname\hv at extern@ext}%
\ifhv at extern@redirect
+ \hv at 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}%
\else
+ \hv at 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}%
\fi
\fi
@@ -325,7 +361,7 @@
\ShellEscape{xindex \hv at extern@xindexOptions\space \hvExternDateiname.idx}% NAch xindex nochmal latex
\ShellEscape{\hv at extern@progpath\hv at extern@compiler\space\hvExternDateiname}%
\fi
- \else
+ \else % runsequence
\expandafter\run at hv@extern at sequenceList\expandafter{\hv at extern@runsequence}%
\fi
\ifhv at extern@crop
@@ -335,11 +371,12 @@
\ifhv at extern@eps
\ShellEscape{pdftops -eps -f 1 -l 1 \hvExternDateiname.pdf}%
\fi
- \fi
+ \fi% end force
\ifhv at extern@code%-------------- Code Part
+ \hv at typeout{>>>>Starting Code part ...}%
\par\noindent
\begingroup
- \ifdim\hv at extern@mpwidth>\z@ \minipage[t]{\hv at extern@mpwidth}\vspace{0pt}\fi
+ \ifdim\hv at extern@mpwidth>\z@ \minipage[\hv at extern@mpvalign]{\hv at extern@mpwidth}\vspace{0pt}\fi
\ifhv at extern@usefancyvrb
\@nameuse{\hv at extern@docType @initPreambleFancy}%
\edef\@@@temp{\@nameuse{\hv at extern@docType @initPreamble}}%
@@ -377,8 +414,8 @@
\fi
\ifdim\hv at extern@mpwidth > \z@\relax \endminipage\fi
\endgroup
- \fi
- \ifhv at extern@code\else
+ \fi % end code part
+ \ifhv at extern@code\else % only if no code
\ifhv at extern@showFilename
\hv at typeout{>>>> Set filename in the margin!}%
\marginnote{\rotatebox{90}{\hvExternDateiname}}%
@@ -387,6 +424,7 @@
\ifhv at extern@moveToExampleDir
% \ShellEscape{mkdir\space\hv at extern@ExamplesDir/}%
\hv at typeout{>>>> Move file into example dir}%
+ \hv at typeout{>>>>>>\hvExternDateiname ---- \hv at extern@ExamplesDir}%
\ShellEscape{\hv at move \hvExternDateiname.*\space \hv at extern@ExamplesDir}%
\fi
\ifhv at extern@includegraphic
@@ -399,7 +437,7 @@
\else
\hv at typeout{>>>> No floating environment}%
\ifdim\hv at extern@mpwidth>\z@
- \hfill\minipage[t]{\dimexpr\linewidth-\hv at extern@mpwidth-1em\relax}\vspace{0pt}%
+ \hfill\minipage[\hv at extern@mpvalign]{\dimexpr\linewidth-\hv at extern@mpwidth-1em\relax}\vspace{0pt}%
\else
\par\noindent\begingroup
\fi
@@ -427,15 +465,76 @@
\else% no graphic, only text
\ifdim\hv at extern@mpwidth>\z@
\hfill\minipage[t]{\dimexpr\linewidth-\hv at extern@mpwidth-1em\relax}\vspace{0pt}
- \noindent\VerbatimInput{\hv at extern@ExamplesDir\hvExternDateiname.txt}
+ \noindent\BodyListing{\hv at extern@ExamplesDir\hvExternDateiname.txt}
\endminipage
\else
- \noindent\VerbatimInput{\hv at extern@ExamplesDir\hvExternDateiname.txt}
+ \noindent\BodyListing{\hv at extern@ExamplesDir\hvExternDateiname.txt}
\fi
\fi
\ifhv at extern@force\expandafter\run at hv@extern at cleanup\expandafter{\hv at extern@cleanup}\fi% cleanup
}
+
\stepcounter{hv at example@counter}%
+
+
+\newcommand\runExtCmd[3][]{%
+ \begingroup
+ \setkeys{hv}{code=false,includegraphic=false,#1}%
+ \xdef\hvExternDateiname{#3-\arabic{hv at example@counter}}%
+ \hv at typeout{>>>> running #2}%
+ \ifhv at extern@redirect
+ \ShellEscape{\hv at extern@progpath#2 > \hv at extern@ExamplesDir\hvExternDateiname.txt}%
+ \else
+ \ShellEscape{\hv at extern@progpath#2}%
+ \fi
+ \global\stepcounter{hv at example@counter}%
+ %------------------------------------- output -----------------------------------
+ \ifhv at extern@includegraphic
+ \ifhv at extern@inline
+ \expandafter\includegraphics\expandafter[\hv at extern@grfOptions]{\hv at extern@ExamplesDir\hvExternDateiname}%
+ \else
+ \ifhv at extern@float
+ \hv at typeout{>>>> Floating environment}%
+ \begin{figure}[!htb]
+ \else
+ \hv at typeout{>>>> No floating environment}%
+ \par\noindent\begingroup
+ \fi
+ \hv at extern@align
+ \hv at typeout{>>>> Input image \hv at extern@ExamplesDir\hvExternDateiname}%
+ \ifhv at extern@frame
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv at extern@pages\do{%
+ \fbox{\expandafter\includegraphics\expandafter[\hv at extern@grfOptions,page=\next]{\hv at extern@ExamplesDir\hvExternDateiname}}%
+ \hspace{5pt}}\hspace*{-5pt}%
+ \else
+ \expandafter\@for\expandafter\next\expandafter:\expandafter=\hv at extern@pages\do{%
+ \expandafter\includegraphics\expandafter[\hv at extern@grfOptions,page=\next]%
+ {\hv at extern@ExamplesDir\hvExternDateiname}%
+ \hspace{5pt}}\hspace*{-5pt}%
+ \fi
+ \ifx\hv at extern@caption\@empty\else\caption{\hv at extern@caption}\fi
+ \ifx\hv at extern@label\@empty\else\label{\hv at extern@label}\fi
+ \ifhv at extern@float
+ \end{figure}%
+ \else
+ \ifdim\hv at extern@mpwidth>\z@ \endminipage\else\par\endgroup\fi
+ \fi
+ \fi
+ \else% no graphic, only text
+ \ifhv at extern@float
+ \hv at typeout{>>>> Floating environment}%
+ \begin{figure}[!htb]
+ \noindent\BodyListing{\hv at extern@ExamplesDir\hvExternDateiname.txt}
+ \ifx\hv at extern@caption\@empty\else\caption{\hv at extern@caption}\fi
+ \ifx\hv at extern@label\@empty\else\label{\hv at extern@label}\fi
+ \end{figure}
+ \else
+ \noindent\BodyListing{\hv at extern@ExamplesDir\hvExternDateiname.txt}
+ \fi
+ \fi
+ \ifhv at extern@force\expandafter\run at hv@extern at cleanup\expandafter{\hv at extern@cleanup}\fi% cleanup
+ \endgroup
+}
%
%%
\endinput
Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds 2022-05-08 20:21:01 UTC (rev 63259)
+++ trunk/Master/tlpkg/libexec/ctan2tds 2022-05-08 20:23:52 UTC (rev 63260)
@@ -2052,10 +2052,10 @@
'hlist', 'hlist\.tex|' . $standardtex,
'hobby', 'code\.tex|' . $standardtex,
'mhchem', 'hpstatement.inc|' . $standardtex,
- 'hrefhide', '\.sty|[^c]\.cfg', # omit ltxdoc.cfg, would be system-wide
+ 'hrefhide', '\.sty|[^c]\.cfg', # omit ltxdoc.cfg, would be system-wide
'huawei', '.*cover-picture\.pdf|' . $standardtex,
- 'hvextern', '\.cfg|' . $standardtex,
- 'hyper', '^[^d].*\.sty|\.hyp', # not defpattern.sty
+ 'hvextern', 'hv(?!doctools).*\.sty', # negative lookahead fun
+ 'hyper', '^[^d].*\.sty|\.hyp', # not defpattern.sty
'hyphenex', 'ushyphex\.tex',
'hyplain', '(hyrules|hy.*plain|hylang)\..*',
'ibygrk', 'iby4extr.tex|ibycus4.tex|ibycusps.tex|pssetiby.tex|setiby4.tex|tlgsqq.tex|version4.tex|' . $standardtex,
@@ -2151,7 +2151,7 @@
'mathabx', 'mathabx\.(dcl|tex)|' . $standardtex,
'mathdots', 'mathdots\.tex|' . $standardtex,
'mathlig', '\.tex',
- 'mathsemantics','mathsemantics(?!-documentation-local).*\.sty', # negative lookahead fun
+ 'mathsemantics','mathsemantics(?!-documentation-local).*\.sty',
'mdframed', '\.mdf|' . $standardtex,
'media4svg', '\.lua|' . $standardtex,
'metanorma', 'x?l$|' . $standardtex,
More information about the tex-live-commits
mailing list.