diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex |
Initial commit
Diffstat (limited to 'macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex')
-rw-r--r-- | macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex b/macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex new file mode 100644 index 0000000000..ccc6983c15 --- /dev/null +++ b/macros/latex/contrib/auto-pst-pdf-lua/doc/auto-pst-pdf-lua-doc.tex @@ -0,0 +1,92 @@ +\listfiles +\documentclass[english]{article} + +\usepackage{pst-poker} +\usepackage[cleanup={}]{auto-pst-pdf-lua} +\ifpdf + \usepackage{fontspec} + \usepackage{dejavu-otf} +\else + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{dejavu} +\fi + +\usepackage{babel} +\usepackage[a4paper,tmargin=1cm,bmargin=1.5cm,includeheadfoot]{geometry} +\usepackage{listings} +\title{\texttt{auto-pst-pdf-lua}, v. 0.03\\ using Lua\LaTeX\ with PSTricks} +\author{Herbert Voß} +\begin{document} +\maketitle + +The package is based on \texttt{auto-pst-pdf} and uses for the \texttt{latex} run the +program \texttt{dvilualatex}. The package can have all optional arguments which are +possible for \texttt{auto-pst-pdf}. + + +\section{The example code} + +\lstset{basicstyle=\ttfamily\small,language={[LaTeX]TeX},frame=lrtb} +\begin{lstlisting} +\documentclass{article} +\usepackage{pst-poker} +\usepackage{auto-pst-pdf-lua} +\ifpdf + \usepackage{fontspec} + \usepackage{dejavu-otf} +\else + \usepackage[T1]{fontenc} + \usepackage[utf8]{inputenc} + \usepackage{dejavu} +\fi + +\begin{document} + +An example for using Luacode: +$\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ + +An example for PostScript code: + +\bigskip +\begin{postscript} +\As~\Ad~\Ac~\Ah~\crdAs~\crdAd~\crdAc~\crdAh +\end{postscript} +\end{document} +\end{lstlisting} + +\section{The output} + +And here comes the output when running with \verb|lualatex --shell-escape <file>|: + + +An example for using Luacode: +$\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ + +An example for PostScript code: + +\bigskip +\begin{postscript} +\As~\Ad~\Ac~\Ah~\crdAs~\crdAd~\crdAc~\crdAh +\end{postscript} + + +\section{Caveats} + +When running \texttt{dvilualatex} the package \texttt{fontspec} cannot be active. If you +need it, then just just the \texttt{\textbackslash ifpdf} switch: + +\begin{verbatim} +\ifpdf + \usepackage{fontspec}%% for the lualatex run(s) + \usepackage{dejavu-otf} +\else + \usepackage[T1]{fontenc}% for the dvilualatex run + \usepackage[utf8]{inputenc} + \usepackage{dejavu} +\fi +\end{verbatim} + + + +\end{document}
\ No newline at end of file |