| 1 |
\listfiles |
| 2 |
\documentclass[english]{article} |
| 3 |
|
| 4 |
\usepackage{pst-poker} |
| 5 |
\usepackage[cleanup={},pspdf={-dALLOWPSTRANSPARENCY -dNOSAFER}]{auto-pst-pdf-lua} |
| 6 |
\ifpdf |
| 7 |
\usepackage{fontspec} |
| 8 |
\usepackage{dejavu-otf} |
| 9 |
\else |
| 10 |
\usepackage[T1]{fontenc} |
| 11 |
\usepackage{dejavu} |
| 12 |
\fi |
| 13 |
|
| 14 |
\usepackage{babel} |
| 15 |
\usepackage[a4paper,tmargin=1cm,bmargin=1.5cm,includeheadfoot]{geometry} |
| 16 |
\usepackage{listings} |
| 17 |
\title{\texttt{auto-pst-pdf-lua}, v. 0.03a\\ using Lua\LaTeX\ with PSTricks} |
| 18 |
\author{Herbert Voß} |
| 19 |
\begin{document} |
| 20 |
\maketitle |
| 21 |
|
| 22 |
The package is based on \texttt{auto-pst-pdf} and uses for the \texttt{latex} run the |
| 23 |
program \texttt{dvilualatex}. The package can have all optional arguments which are |
| 24 |
possible for \texttt{auto-pst-pdf}. For all PSTricks examples the package should be |
| 25 |
loaded with the following optional arguments: |
| 26 |
|
| 27 |
\lstset{basicstyle=\ttfamily\small,language={[LaTeX]TeX},frame=lrtb} |
| 28 |
\begin{lstlisting} |
| 29 |
\usepackage[cleanup={},pspdf={-dALLOWPSTRANSPARENCY -dNOSAFER}]{auto-pst-pdf-lua} |
| 30 |
\end{lstlisting} |
| 31 |
|
| 32 |
The possible options are preset to |
| 33 |
|
| 34 |
\begin{lstlisting} |
| 35 |
\ExecuteOptionsX{% |
| 36 |
ext=tex, |
| 37 |
crop=on, |
| 38 |
latex={}, |
| 39 |
dvips={-Ppdf}, |
| 40 |
pdfcrop={}, |
| 41 |
cleanup={log,aux,dvi,ps,pdf}, |
| 42 |
runs=1, |
| 43 |
} |
| 44 |
\end{lstlisting} |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
\section{The example code} |
| 49 |
|
| 50 |
\begin{lstlisting} |
| 51 |
\documentclass{article} |
| 52 |
\usepackage{pst-poker} |
| 53 |
\usepackage{auto-pst-pdf-lua} |
| 54 |
\ifpdf |
| 55 |
\usepackage{fontspec} |
| 56 |
\usepackage{dejavu-otf} |
| 57 |
\else |
| 58 |
\usepackage[T1]{fontenc} |
| 59 |
\usepackage{dejavu} |
| 60 |
\fi |
| 61 |
|
| 62 |
\begin{document} |
| 63 |
|
| 64 |
An example for using Luacode: |
| 65 |
$\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ |
| 66 |
|
| 67 |
An example for PostScript code: |
| 68 |
|
| 69 |
\bigskip |
| 70 |
\begin{postscript} |
| 71 |
\As~\Ad~\Ac~\Ah~\crdAs~\crdAd~\crdAc~\crdAh |
| 72 |
\end{postscript} |
| 73 |
\end{document} |
| 74 |
\end{lstlisting} |
| 75 |
|
| 76 |
\section{The output} |
| 77 |
|
| 78 |
And here comes the output when running with \verb|lualatex --shell-escape <file>|: |
| 79 |
|
| 80 |
|
| 81 |
An example for using Luacode: |
| 82 |
$\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ |
| 83 |
|
| 84 |
An example for PostScript code: |
| 85 |
|
| 86 |
\bigskip |
| 87 |
\begin{postscript} |
| 88 |
\As~\Ad~\Ac~\Ah~\crdAs~\crdAd~\crdAc~\crdAh |
| 89 |
\end{postscript} |
| 90 |
|
| 91 |
|
| 92 |
\section{Caveats} |
| 93 |
|
| 94 |
When running \texttt{dvilualatex} the package \texttt{fontspec} cannot be active. If you |
| 95 |
need it, then just just the \texttt{\textbackslash ifpdf} switch: |
| 96 |
|
| 97 |
\begin{verbatim} |
| 98 |
\ifpdf |
| 99 |
\usepackage{fontspec}%% for the lualatex run(s) |
| 100 |
\usepackage{dejavu-otf} |
| 101 |
\else |
| 102 |
\usepackage[T1]{fontenc}% for the dvilualatex run |
| 103 |
\usepackage{dejavu} |
| 104 |
\fi |
| 105 |
\end{verbatim} |
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
\end{document} |