diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/abc/abc.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/abc/abc.dtx | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/Master/texmf-dist/source/latex/abc/abc.dtx b/Master/texmf-dist/source/latex/abc/abc.dtx index 0ce7aff91ac..25fb129fb16 100644 --- a/Master/texmf-dist/source/latex/abc/abc.dtx +++ b/Master/texmf-dist/source/latex/abc/abc.dtx @@ -23,7 +23,7 @@ %<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01] %<package>\ProvidesPackage{abc} %<*package> - [2015/09/09 v2.0a Enrico Gregorio] + [2016/05/15 v2.0b Enrico Gregorio] %</package> %<*driver> \documentclass{ltxdoc} @@ -38,7 +38,7 @@ %</driver> % \fi % -% \CheckSum{399} +% \CheckSum{416} % % \CharacterTable % {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z @@ -56,6 +56,8 @@ % Grave accent \` Left brace \{ Vertical bar \| % Right brace \} Tilde \~} % +% \changes{v2.0b}{2016/05/15}{Use shellesc} +% % \changes{v2.0a}{2015/09/09}{Fixed gobbling of leading lines that % start with \%} % @@ -130,7 +132,9 @@ % their documents small excerpts of music written directly in % ABC (Plus). It exploits the \verb|\write18| technique available with % the Web2C implementation of the \TeX{} system and free utilities -% like \texttt{ps2eps}, \texttt{ps2epsi} and \texttt{epstopdf}. +% like \texttt{ps2eps}, \texttt{ps2epsi} and \texttt{epstopdf}. From +% version 2.0b we check the existence of the \textsf{shellesc} package +% in order to be compatible with Lua\TeX. % % This package can be used both with \LaTeX{} and % \textsc{pdf}\LaTeX{}, without any change in the user's source file. @@ -269,7 +273,9 @@ % along with \texttt{generate} will not overwrite the output from % unnamed environment. It is possible that, during the document's % preparation, the numbers added to the default file name are out of -% synch, the process should converge. +% synch, the process should converge. Note that with Lua\TeX{} the +% \texttt{nosaveall} option can produce errors, so \texttt{saveall} is +% enabled by default, with this engine. % % % \section{Compiling documents} @@ -506,6 +512,7 @@ repeatend % The first options are boolean. % \begin{macrocode} %<*package> +\RequirePackage{ifluatex} \newif\ifabc@shellescape \newif\ifabc@generate \newif\ifabc@warning @@ -527,9 +534,15 @@ repeatend \DeclareOption{ps2epsi}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epsi}} \DeclareOption{ps2epsidos}{\def\abc@pscmd{ps2epsi}\def\abc@epsext{epi}} % \end{macrocode} -% Now we declare the default options and call the user specified ones. +% Now we declare the default options and call the user specified +% ones. Since Lua\TeX{} doesn't accept loading different PDF files +% with the same name, when this engine is used, the \texttt{saveall} +% option is enabled by default. % \begin{macrocode} \ExecuteOptions{generate,shellescape,nosaveall,ps2eps} +\ifluatex + \ExecuteOptions{saveall} +\fi \ProcessOptions\relax % \end{macrocode} % @@ -634,8 +647,15 @@ repeatend % interface. Then we check the options again and define the commands % that really do the job. % \begin{macrocode} +\ifluatex + \IfFileExists{shellesc.sty} + {\RequirePackage{shellesc}\let\abc@shell\ShellEscape} + {\def\abc@shell{\immediate\write18}} +\else + \def\abc@shell{\immediate\write18} +\fi \def\abc@doshellcommand{% - \immediate\write18{% + \abc@shell{% \ifabc@mup \abc@cmd\space \abc@opt\space @@ -648,12 +668,15 @@ repeatend \abc@tempfile\abc@ext\space \fi \ifx\abc@postopt\@empty - \else\space\abc@postopt\fi}% - \immediate\write18{% - \abc@pscmd\space\abc@tempfile.ps}% + \else\space\abc@postopt\fi + }% + \abc@shell{% + \abc@pscmd\space\abc@tempfile.ps + }% \ifpdf - \immediate\write18{% - \abc@epstopdfcmd\space\abc@tempfile.\abc@epsext}% + \abc@shell{% + \abc@epstopdfcmd\space\abc@tempfile.\abc@epsext + }% \fi } \def\abc@nodoshellcommand{% |