summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/hvextern/doc/hvextern.tex
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
committerNorbert Preining <norbert@preining.info>2023-08-30 03:01:17 +0000
commit4fee29360f7566a474b6143951b0744fa151edc9 (patch)
tree1af77d3ca21368f054b09f30dd60e8028a91be62 /macros/latex/contrib/hvextern/doc/hvextern.tex
parent64e26532c685fd24d6983508c6239e3c268b810b (diff)
CTAN sync 202308300301
Diffstat (limited to 'macros/latex/contrib/hvextern/doc/hvextern.tex')
-rw-r--r--macros/latex/contrib/hvextern/doc/hvextern.tex50
1 files changed, 29 insertions, 21 deletions
diff --git a/macros/latex/contrib/hvextern/doc/hvextern.tex b/macros/latex/contrib/hvextern/doc/hvextern.tex
index 84b2df5183..ae1528783d 100644
--- a/macros/latex/contrib/hvextern/doc/hvextern.tex
+++ b/macros/latex/contrib/hvextern/doc/hvextern.tex
@@ -1,16 +1,21 @@
-%% $Id: hvextern.tex 749 2023-08-24 19:10:17Z herbert $
-\RequirePackage{pdfmanagement-testphase}
-\DeclareDocumentMetadata{}
+%% $Id: hvextern.tex 753 2023-08-29 07:22:20Z herbert $
+%\RequirePackage{pdfmanagement-testphase}
+\DocumentMetadata{}
\documentclass[english,a4paper,twoside]{article}
\usepackage{babel}
\usepackage{libertinus}
\setmonofont[Scale=MatchLowercase,FakeStretch=0.88]{AnonymousPro}
+\newfontfamily\NotoSansMono[Ligatures=TeX,Scale=MatchLowercase,
+ FakeStretch=0.90,Ligatures=ResetAll%,RawFeature=-tlig
+ ]{Noto Sans Mono}
+\newfontfamily\CodeTwo{CODE2000}[Scale=MatchLowercase]
\usepackage{iftex}
\usepackage{fancyhdr}
\pagestyle{fancy}
\usepackage{hvlogos}
-\usepackage[checkCode]{hvextern}
+\usepackage%[checkCode]
+{hvextern}
\usepackage{hvindex}
\usepackage{hvdoctools}
\usepackage{listings}
@@ -24,6 +29,8 @@
\def\Java{\textsf{Java}\xspace}
+
+
\begin{document}
\title{Writing, running and including the output of external documents
from within a main\newline \LaTeX\ document~--v. \hvexternFileversion}
@@ -48,7 +55,7 @@ showFilename,verbose}
There exists only one option \Loption{checkCode} which is valid
for all \TeX-compiler. In this case an already existing external file will only be compiled, if the
-external code changed. This dosn't depends on the setting of the option \Lkeyword{force}.
+external code changed. This doesn't depends on the setting of the option \Lkeyword{force}.
\Loption{checkCode} can speed up the compilation time.
\section{Syntax}
@@ -81,16 +88,12 @@ 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}
-
-
-
The purpose for this package is to show the output of documents which have to be compiled with
a different preamble or a different engine or a complete different system, but integrating the output
automatically in the main document..
@@ -111,7 +114,7 @@ This document was run with \LuaLaTeX. Suppose you want to insert the output of a
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:\label{inline-exa}
+with \XeLaTeX\ and the output is insert as pdf image:
\begin{externalDocument}[%
compiler=xelatex, inline, force=true, runs=2, grfOptions={height=8pt},%
crop, cropmargin=0, cleanup, docType=latex,vshift=-1pt]{voss}
@@ -121,8 +124,9 @@ with \XeLaTeX\ and the output is insert as pdf image:\label{inline-exa}
美好的一天.
\end{document}
\end{externalDocument}
+The current filename of the above example is \hvExternFilename\ and for the source
+see page \pageref{inline-exa}.
-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}.
@@ -317,7 +321,7 @@ A vertical shift of the filename is possible by setting a length to the keyword
e.g. \texttt{shiftFN=5ex}.
-\clearpage%%%%%%%%%%%%
+%\clearpage%%%%%%%%%%%%
\begin{externalDocument}[grfOptions={width=0.95\linewidth},
compiler=xelatex,code,mpwidth=0.6\linewidth,
@@ -1072,10 +1076,10 @@ not part of your current font.
With the setting \LKeyset{inline=true} the optional keyword \Lkeyword{code} and \Lkeyword{showFilename}
is automatically set to false. The
-next Chinese characters
+next Chinese characters \label{inline-exa}
\begin{externalDocument}[
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
- crop, cropmargin=0,
+ crop, cropmargin=0, vshift=-1pt,usefancyvrb,
cleanup, force=true, docType=latex]{voss}%
\documentclass{ctexart}
\pagestyle{empty}
@@ -1086,11 +1090,12 @@ next Chinese characters
are inserted as \Index{inline image} without showing the code. The complete code looks like:
+\let\myFont\CodeTwo
-\begin{Verbatim}
+\begin{Verbatim}[fontfamily=myFont]
With \Lkeyset{inline} the optional argument \Lkeyword{code} is
automatically set to false. The next Chinese characters
-\begin{externalDocument}[
+\begin{externalDocument}[vshift=-1pt,
compiler=xelatex, inline, runs=2, grfOptions={height=8pt},
crop, cropmargin=0, cleanup, force=true, docType=latex]{voss}
\documentclass{ctexart}
@@ -1103,6 +1108,7 @@ are inserted as inline image without showing the code. The complete
code looks like:
\end{Verbatim}
+With the keyword \Lkeyword{vshift} the inserted image can be moed in vertically direction.
\subsection{Input text instead of an image}
By default the created pdf which can be, of course, only text, will be inserted by \Lcs{includegraphics}.
@@ -1267,7 +1273,7 @@ The following examples uses
mpwidth=0.6\linewidth,
usefancyvrb=false,
docType=latex]{voss}
-\documentclass[paper=a6,DIV=18,parskip=half-]{screxa}
+\documentclass[paper=a6,DIV=18,parskip=half-]{scrartcl}
\pagestyle{empty}
\usepackage{libertinus}
\setmonofont{DejaVu Sans Mono}[Scale=MatchLowercase,FakeStretch=0.9]
@@ -1858,13 +1864,13 @@ to get the directory listed:
\begin{verbatim}
-\runExtCmd[redirect,verbose,lstOptions={basicstyle=\ttfamily\small}]{df}{voss}
+\runExtCmd[redirect,verbose,lstOptions={basicstyle=\ttfamily\small}]{du}{voss}% *nix
\end{verbatim}
\medskip
-\runExtCmd[redirect,verbose,lstOptions={basicstyle=\ttfamily\footnotesize}]{df}{voss}
+\runExtCmd[redirect,verbose,lstOptions={basicstyle=\ttfamily\small}]{du}{voss}
@@ -1883,8 +1889,10 @@ already exists, there is no need to create it with the next run again and again.
if the package option \Loption{checkCode} exists.
\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[\Lkeyword{moveToExampleDir}] name of a directory for the examples, must first be created by the user himself
-\item[\Lkeyword{ExampleDir}] move all examples into a directory
+\item[\Lkeyword{moveToExampleDir}] move all examples into a directory, must be set \emph{before} the
+option \Lkeyword{ExampleDir}.
+\item[\Lkeyword{ExampleDir}] name of a directory for the examples, must
+ first be created by the user himself.
\item[\Lkeyset{tclbox=false}] Can be used if there are some negative interactions between package \Lpack{listings}
and package \Lpack{tcolorbox}.
\item[\Lkeyword{framesep}] Value for \Lcs{fbox} if keyword \texttt{frame} is used.