diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex')
-rw-r--r-- | Master/texmf-dist/doc/latex/hvextern/Changes | 3 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hvextern/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/hvextern/hvextern.pdf | bin | 1041665 -> 1148759 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/latex/hvextern/hvextern.tex | 134 |
4 files changed, 121 insertions, 20 deletions
diff --git a/Master/texmf-dist/doc/latex/hvextern/Changes b/Master/texmf-dist/doc/latex/hvextern/Changes index 3747ba251a0..5543cdd49fa 100644 --- a/Master/texmf-dist/doc/latex/hvextern/Changes +++ b/Master/texmf-dist/doc/latex/hvextern/Changes @@ -1,4 +1,7 @@ hvextern.sty ---------------- +v 0.20 2022-04-27 - use L3 for the comma separated lists + cleanup and runsequence + - move the config files into the main file v 0.19 2022-04-23 first CTAN version diff --git a/Master/texmf-dist/doc/latex/hvextern/README b/Master/texmf-dist/doc/latex/hvextern/README index c011f35cd2d..1c6052c9fd6 100644 --- a/Master/texmf-dist/doc/latex/hvextern/README +++ b/Master/texmf-dist/doc/latex/hvextern/README @@ -1,6 +1,6 @@ -This package allows to write code in tex, latex, Perl, Lua, PYthon, +This package allows to write code in tex, latex, Perl, Lua, Python, and MetaPost into external files, run that code and insert the -output as pdf or png image or text. Parts of the external code +output as pdf/png image or text. Parts of the external code can be listed in the document. The main LaTeX document must be run with the option --shell-escape diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf Binary files differindex 99a251a6e88..bdefe9bd891 100644 --- a/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf +++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.pdf diff --git a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex index 8acd4e841cb..50d93cef06f 100644 --- a/Master/texmf-dist/doc/latex/hvextern/hvextern.tex +++ b/Master/texmf-dist/doc/latex/hvextern/hvextern.tex @@ -11,6 +11,7 @@ \usepackage{listings} \lstset{basicstyle=\ttfamily\small,language=[LaTeX]TeX,breaklines} \usepackage{xcolor} +\usepackage{hyperref} \begin{document} \title{Writing, running and including the output of external documents from within a main \LaTeX\ document~--v. \hvexternFileversion} @@ -58,6 +59,15 @@ The purpose for this package is to show the output of documents which have to be a different preamble or a different engine or a complete different system, but integrating the output automatically in the main document.. +\bigskip +\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. +\end{minipage}} + + + \section{First examples} \subsection{Without showing the code} @@ -137,7 +147,7 @@ The png image is created on the fly with the following arguments of \verb|exter The code which is declared as header and main can be marked by: \begin{Verbatim} -\extern@ExampleType{py} +\hv@extern@exampleType{py} {\NumChar StartVisibleMain} {\NumChar StopVisibleMain} {\NumChar StartVisiblePreamble} @@ -296,11 +306,11 @@ The marker for the code ranges which should be listed depend to the used program everything between \verb|%StartVisiblePreamble| and \verb|%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 in an own - config file, e.g. \texttt{hv-extern-py.cfg}: + \verb|\begin{document}| and \verb|\end{document}| as body. The marker must be defined with an own +macro, e.g.: \begin{verbatim} -\extern@ExampleType{py} +\hv@extern@exampleType{py} {\NumChar StartVisibleMain} {\NumChar StopVisibleMain} {\NumChar StartVisiblePreamble} @@ -314,7 +324,7 @@ is pdflatex. The option \texttt{docType} selects the config file, which must be context, lua, pl, tex, latex, mp, and py. For Lua it is \begin{verbatim} -\extern@ExampleType{lua} +\hv@extern@exampleType{lua} {--StartVisibleMain} {--StopVisibleMain} {--StartVisiblePreamble} @@ -336,7 +346,7 @@ The deafault setting is always shown in brackets. 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. +must be end with a slash, e.g. \texttt{./bin/} %The option \texttt{runsequence} is currently not used. \begin{verbatim} \define@key{hv}{progpath}[]{\def\hv@extern@progpath{#1}} @@ -345,6 +355,54 @@ must be end with a slash, e.g. \texttt{./bin/} The option \texttt{runsequence} i \define@key{hv}{runs}[1]{\setcounter{hv@extern@runs}{#1}} \end{verbatim} +Instead of the optional arguments + \texttt{compiler}, \texttt{biber}, and \texttt{xindex} one can define an individual + command sequence by using the optional argument + \texttt{runsequence}. It must be comma separated list: + +\begin{verbatim} +runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex} +\end{verbatim} + +\begin{externalDocument}[ + grfOptions={width=0.30\linewidth}, + pages={1,3,5}, + frame, + runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, + showFilename, + verbose, + force, + cleanup={log,aux,toc,bbl,blg}, + code,docType=latex, + lstOptions={columns=fixed}]{voss} +\documentclass[paper=a5,parskip=half-,DIV=12,fontsize=12pt]{scrbook} +%StartVisiblePreamble +\usepackage[ngerman]{babel} +\usepackage{libertinus,hvindex} +\usepackage{makeidx}\makeindex +\usepackage{biblatex}\addbibresource{biblatex-examples.bib} +%StopVisiblePreamble +\usepackage{blindtext} +\begin{document} +Sort with xindex \verb|-l DE --config AU| +\blindtext +\Index{Österreich} \Index{Öresund} +\Index{Ostern} \Index{Ober} \Index{Oberin} +\Index{Österreich} \Index{Öresund} +\Index{Ödem} \Index{Oligarch} \Index{Oder} +\Index{Goldmann} +\printindex +\nocite{*}\printbibliography +\blindtext +\blinddocument + +\end{document} +\end{externalDocument} + + + + + \subsection{Grafik options} \begin{verbatim} \define@key{hv}{grfOptions}[]{\def\hv@extern@grfOptions{#1}} @@ -469,12 +527,12 @@ The color of the frame is set to the same values, hence not seen. The following \subsection{Type of the source code} The current version of \texttt{hvextern} supports code written as -\MP, \plainTeX, \LaTeX, \ConTeXt, and Python. Every type has its own config file which -defines the keywords for the linerange which should be printed for the preamble and -the body. For example the \texttt{latex} config file \texttt{hvextern-latex,cfg}: +\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: \begin{verbatim} -\extern@ExampleType{latex}% for _all_LaTeX engines +\hv@extern@exampleType{latex}% for _all_LaTeX engines {\string\begin\string{document\string}}% {\string\end\string{document\string}}% {\perCent StartVisiblePreamble}% @@ -1000,6 +1058,7 @@ For a \LaTeX\ additional programs for bibliography, index, a.s.o. maybe needed. \define@boolkey{hv}[hv@extern@]{biber}[true]{} \define@boolkey{hv}[hv@extern@]{xindex}[true]{} \define@key{hv}{xindexOptions}[]{\def\hv@extern@xindexOptions{#1}} +\define@key{hv}{runsequence}[]{\def\hv@extern@runsequence{#1}} \end{verbatim} The \texttt{biber} run needs no additional options, but for \texttt{xindex} it maybe useful. @@ -1007,13 +1066,9 @@ The following examples uses \begin{verbatim} \begin{externalDocument}[ - compiler=lualatex, runs=2, - pages=2, - crop, - xindex, - xindexOptions={-l DE --config AU}, - mpwidth=0.6\linewidth, - usefancyvrb=false, + compiler=lualatex, runs=2, pages=2,crop, + xindex, xindexOptions={-l DE --config AU}, + mpwidth=0.6\linewidth, usefancyvrb=false, docType=latex, ... ]{voss} @@ -1073,6 +1128,48 @@ Sort with xindex \verb|-l DE --config AU| \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 +sequence of commands, e.g.: +\begin{verbatim} +runsequence={lualatex,biber,{xindex -l de -c AU},lualatex,lualatex} +\end{verbatim} + +\begin{externalDocument}[ + grfOptions={width=0.30\linewidth}, + pages={1,3,5}, + frame, + runsequence={lualatex,biber,xindex -l de -c AU,lualatex,lualatex}, + showFilename, + verbose, + force, + cleanup={log,aux,toc,bbl,blg}, + code,docType=latex, + lstOptions={columns=fixed}]{voss} +\documentclass[paper=a5,parskip=half-,DIV=12,fontsize=12pt]{scrbook} +%StartVisiblePreamble +\usepackage[ngerman]{babel} +\usepackage{libertinus,hvindex} +\usepackage{makeidx}\makeindex +\usepackage{biblatex}\addbibresource{biblatex-examples.bib} +%StopVisiblePreamble +\usepackage{blindtext} +\begin{document} +Sort with xindex \verb|-l DE --config AU| +\blindtext +\Index{Österreich} \Index{Öresund} +\Index{Ostern} \Index{Ober} \Index{Oberin} +\Index{Österreich} \Index{Öresund} +\Index{Ödem} \Index{Oligarch} \Index{Oder} +\Index{Goldmann} +\printindex +\nocite{*}\printbibliography +\blindtext +\blinddocument + +\end{document} +\end{externalDocument} + @@ -1301,12 +1398,13 @@ This is the start of the introduction. verbose=false, compiler=lualatex, showFilename, -% crop, + crop, force, code, docType=latex, ext=tex,]{voss} \documentclass{report} +\pagestyle{empty} %StartVisiblePreamble \usepackage{fontenc}\usepackage{libertinus} \usepackage{pst-all} |