diff options
author | Karl Berry <karl@freefriends.org> | 2022-03-11 22:03:51 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-03-11 22:03:51 +0000 |
commit | f7047aebf5fc4b143b53cb23f9d9ea3c3eddf3be (patch) | |
tree | cebef55a7e2e238f4cb95eeac7a072191816eb60 /Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex | |
parent | 0a573a4905225d13a773434edef1a5e0bf1d3da9 (diff) |
pyluatex (11mar22)
git-svn-id: svn://tug.org/texlive/trunk@62638 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex')
-rw-r--r-- | Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex | 35 |
1 files changed, 8 insertions, 27 deletions
diff --git a/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex b/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex index 7446313863b..eeff387c21d 100644 --- a/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex +++ b/Master/texmf-dist/doc/lualatex/pyluatex/pyluatex.tex @@ -15,7 +15,7 @@ \usepackage{url} \title{The \emph{pyluatex} package} \author{Tobias Enderle\\\url{https://github.com/tndrle/PyLuaTeX}} -\date{v0.4.2 (2022/02/13)} +\date{v0.4.3 (2022/03/10)} \begin{document} \maketitle \raggedright @@ -90,34 +90,12 @@ The folder \inlcode|example| contains additional example documents: \item \inlcode|typesetting-minted.tex|\\[0.5ex] A detailed example for typesetting code and output with the \textit{minted} package \end{itemize} -For more intricate use cases have a look at our tests in the folder \inlcode|test|. - \section{Installation} PyLuaTeX is available in TeX Live, MiKTeX, and on CTAN\footnote{\url{https://ctan.org/pkg/pyluatex}} as \inlcode|pyluatex|. To install PyLuaTeX in \textbf{TeX Live} run \inlcode|tlmgr install pyluatex|.\\[0.5ex] In \textbf{MiKTeX}, PyLuaTeX can be installed in the \textit{MiKTeX Console}. -To install PyLuaTeX \textbf{manually}, do the following steps: -\begin{enumerate} -\item Locate your local \textit{TEXMF} folder\\[0.5ex] -The location of this folder may vary. Typical defaults for TeX Live are \inlcode|~/texmf| for Linux, -\inlcode|~/Library/texmf| for macOS, and \inlcode|C:\Users\<user name>\texmf| for Windows. -If you are lucky, the command \inlcode|kpsewhich -var-value=TEXMFHOME| tells you the location. -For MiKTeX, the folder can be found and configured in the \textit{MiKTeX Console}. -\item Download the latest release\footnote{\url{https://github.com/tndrle/PyLuaTeX/releases/latest}} of PyLuaTeX -\item Put the downloaded files in the folder \inlcode|TEXMF/tex/latex/pyluatex| (where \inlcode|TEXMF| is the folder located in 1.)\\[0.5ex] -The final folder structure must be -\begin{tcblisting}{breakable,listing only, - size=fbox,colframe=black!8,boxrule=3pt,colback=black!8} -TEXMF/tex/latex/pyluatex/ -|-- pyluatex-interpreter.py -|-- pyluatex-json.lua -|-- pyluatex.lua -|-- pyluatex.sty -|-- ... -\end{tcblisting} -\end{enumerate} \section{Reference} PyLuaTeX offers a simple set of options, macros and environments. @@ -129,9 +107,6 @@ For an example, see the Typesetting Code section. \subsection{Package Options} \begin{itemize} -\item \inlcode|verbose|\\[0.5ex] - If this option is set, Python input and output is written to the \LaTeX{} log file.\\[0.5ex] - \textit{Example:} \inlcode|\usepackage[verbose]{pyluatex}| \item \inlcode|executable|\\[0.5ex] Specifies the path to the Python executable. (default: \inlcode|python3|)\\[0.5ex] \textit{Example:} \inlcode|\usepackage[executable=/usr/local/bin/python3]{pyluatex}| @@ -139,13 +114,19 @@ For an example, see the Typesetting Code section. By default, PyLuaTeX aborts the compilation process when Python reports an error. If the \inlcode|ignoreerrors| option is set, the compilation process is not aborted.\\[0.5ex] \textit{Example:} \inlcode|\usepackage[ignoreerrors]{pyluatex}| +\item \inlcode|localimports|\\[0.5ex] + If this option is set, the folder containing the TeX input file is added to the Python path. This allows local Python packages to be imported. (default: \inlcode|true|)\\[0.5ex] + \textit{Example:} \inlcode|\usepackage[localimports=false]{pyluatex}| \item \inlcode|shutdown|\\[0.5ex] Specifies when the Python process is shut down. (default: \inlcode|veryveryend|)\\[0.5ex] \textit{Options:} \inlcode|veryveryend|, \inlcode|veryenddocument|, \inlcode|off|\\[0.5ex] PyLuaTeX uses the hooks of the package \textit{atveryend} to shut down the Python interpreter when the compilation is done. With the option \inlcode|veryveryend|, Python is shut down in the \inlcode|\AtVeryVeryEnd| hook. With the option \inlcode|veryenddocument|, Python is shut down in the \inlcode|\AtVeryEndDocument| hook. With the option \inlcode|off|, Python is not shut down explicitly. However, the Python process will shut down when the LuaTeX process finishes even if \inlcode|off| is selected. Using \inlcode|off| on Windows might lead to problems with SyncTeX, though.\\[0.5ex] \textit{Example:} \inlcode|\usepackage[shutdown=veryenddocument]{pyluatex}| +\item \inlcode|verbose|\\[0.5ex] + If this option is set, Python input and output is written to the \LaTeX{} log file.\\[0.5ex] + \textit{Example:} \inlcode|\usepackage[verbose]{pyluatex}| \end{itemize} -Package options (except for \inlcode|executable| and \inlcode|shutdown|) can be changed in the document with the +The package options \inlcode|verbose| and \inlcode|ignoreerrors| can be changed in the document with the \inlcode|\pyoption| command, e.g. \inlcode|\pyoption{verbose}{true}| or \inlcode|\pyoption{ignoreerrors}{false}|. \subsection{Macros} |