From d1c302ed5a53246283181ec1ab9a537ec5a6959e Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 19 Mar 2018 21:48:26 +0000 Subject: auto-pst-pdf-lua (19mar18) git-svn-id: svn://tug.org/texlive/trunk@47028 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/doc/latex/auto-pst-pdf-lua/Changes | 1 + .../texmf-dist/doc/latex/auto-pst-pdf-lua/README | 11 +++++--- .../auto-pst-pdf-lua/auto-pst-pdf-lua-doc.pdf | Bin 63624 -> 69013 bytes .../auto-pst-pdf-lua/auto-pst-pdf-lua-doc.tex | 29 ++++++++++++++++++--- .../latex/auto-pst-pdf-lua/auto-pst-pdf-lua.sty | 29 +++++++++++++++------ 5 files changed, 54 insertions(+), 16 deletions(-) (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/Changes b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/Changes index e42550b1e34..1dcd4d5435b 100644 --- a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/Changes +++ b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/Changes @@ -1,4 +1,5 @@ auto-pst-pdf-lua.sty ---------------- +v 0.02 2018-03-19 added test for luatex run v 0.01 2018-03-17 first CTAN version diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/README b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/README index 2d2cb6a3120..f0888346e11 100644 --- a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/README +++ b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/README @@ -1,9 +1,9 @@ -This package is a wrapper for package auto-pst-pdf -from Will Robertson which itself is a wrapper -for pst-pdf from Rolf Niepraschk. +This package is a slightly modified version of auto-pst-pdf +from Will Robertson which itself is a wrapper for pst-pdf +from Rolf Niepraschk. auto.pst-pdf-lua allows the use of lualatex -tohether with PostScript related code, eg. PSTricks +together with PostScript related code, eg. PSTricks %% It may be distributed and/or modified under the @@ -13,3 +13,6 @@ tohether with PostScript related code, eg. PSTricks %% http://www.latex-project.org/lppl.txt %% and version 1.3c or later is part of all distributions of LaTeX %% version 2005/12/01 or later. + + +Herbert Voß, hvoss@tug.org \ No newline at end of file diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.pdf b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.pdf index 135c44ad7a4..14bdb0a11ca 100644 Binary files a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.pdf and b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.pdf differ diff --git a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.tex b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.tex index da3e304ee6a..054930be97f 100644 --- a/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.tex +++ b/Master/texmf-dist/doc/latex/auto-pst-pdf-lua/auto-pst-pdf-lua-doc.tex @@ -15,13 +15,14 @@ \usepackage{babel} \usepackage[a4paper,tmargin=1cm,bmargin=1.5cm,includeheadfoot]{geometry} \usepackage{listings} -\title{\texttt{auto-pst-pdf-lua}, v. 0.01\\ using Lua\LaTeX\ with PSTricks} +\title{\texttt{auto-pst-pdf-lua}, v. 0.02\\ 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}. +program \texttt{dvilualatex}. The package can have all optional arguments which are +possible for \texttt{auto-pst-pdf}. \section{The example code} @@ -47,8 +48,9 @@ $\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ An example for PostScript code: +\bigskip \begin{postscript} -\As \crdAs +\As~\Ad~\Ac~\Ah~\crdAs~\crdAd~\crdAc~\crdAh \end{postscript} \end{document} \end{lstlisting} @@ -63,9 +65,28 @@ $\pi^{\pi}=\directlua{tex.print(math.pi^math.pi)}$ An example for PostScript code: +\bigskip \begin{postscript} -\As \crdAs +\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 diff --git a/Master/texmf-dist/tex/latex/auto-pst-pdf-lua/auto-pst-pdf-lua.sty b/Master/texmf-dist/tex/latex/auto-pst-pdf-lua/auto-pst-pdf-lua.sty index 00c156c7766..bae13851734 100644 --- a/Master/texmf-dist/tex/latex/auto-pst-pdf-lua/auto-pst-pdf-lua.sty +++ b/Master/texmf-dist/tex/latex/auto-pst-pdf-lua/auto-pst-pdf-lua.sty @@ -1,7 +1,8 @@ %% -%% This is file `auto-pst-pdf-lua.sty', +%% This is file `auto-pst-pdf-lua.sty', a modified version of +%% auto-pst-pdf from Will Robertson %% -%% Copyright (C) 2018 Herbert Voß +%% Copyright (C) 2018 Herbert Voss %% %% It may be distributed and/or modified under the %% conditions of the LaTeX Project Public License, either version 1.3c @@ -12,8 +13,8 @@ %% version 2005/12/01 or later. %% %% -\ProvidesPackage{auto-pst-pdf-lua}[2018/03/17 v0.01 Wrapper for auto-pst-pdf-lua] -\RequirePackage{ifpdf,xkeyval,ifplatform} +\ProvidesPackage{auto-pst-pdf-lua}[2018/03/17 v0.02 using auto-pst-pdf for LuaLaTeX] +\RequirePackage{ifpdf,xkeyval,ifplatform,ifluatex} \newif\if@app@off@ \newif\if@app@crop@ \newcounter{app@runs} @@ -67,6 +68,11 @@ cleanup={log,aux,dvi,ps,pdf}, runs=1 } +\ifluatex\else + \PackageWarning{auto-pst-pdf-lua}% + {^^J No LuaTeX running! + ^^J Package auto-pst-pdf-lua falls back to auto-pst-pdf!}% +\fi \ifwindows \ExecuteOptionsX{pspdf={}} \else @@ -111,10 +117,17 @@ \OnlyIfFileExists{\@tempa}{\app@exe{\app@rm "\@tempa"}}}} \def\app@remove@container{\app@try@rm{\app@pics}} \def\app@cleanup{\app@try@rm{\app@rm@files}} -\def\app@cmd@latex#1#2{dvilualatex \app@latex@opts\space - "\unexpanded{\let\APPmakepictures\empty\input} #1"} -\def\app@cmd@extralatex#1#2{dvilualatex \app@latex@opts\space - "\unexpanded{\let\APPmakepictures\undefined\input} #1"} +\ifluatex + \def\app@cmd@latex#1#2{dvilualatex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\empty\input} #1"} + \def\app@cmd@extralatex#1#2{dvilualatex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\undefined\input} #1"} +\else + \def\app@cmd@latex#1#2{latex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\empty\input} #1"} + \def\app@cmd@extralatex#1#2{latex \app@latex@opts\space + "\unexpanded{\let\APPmakepictures\undefined\input} #1"} +\fi \def\app@cmd@dvips#1#2{dvips \app@dvips@opts\space -o "#2" "#1"} \def\app@cmd@pstopdf#1#2{ps2pdf \app@pspdf@opts\space "#1" "#2"} \def\app@cmd@pdfcrop#1#2{pdfcrop \app@pdfcrop@opts\space "#1" "#2"} -- cgit v1.2.3