summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2018-03-26 21:16:38 +0000
committerKarl Berry <karl@freefriends.org>2018-03-26 21:16:38 +0000
commit1b9c31dfc4a61ac2077b6f069dcdb74f4d0d6bb2 (patch)
treeb038df69d48c4a0d12b7c2bdaa5ae4721d1d867d /Master/texmf-dist/tex
parent82b00f8ff627ca67a518482f47510e1fc574766f (diff)
standalone (26mar18)
git-svn-id: svn://tug.org/texlive/trunk@47136 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cfg4
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.cls79
-rw-r--r--Master/texmf-dist/tex/latex/standalone/standalone.sty4
3 files changed, 42 insertions, 45 deletions
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cfg b/Master/texmf-dist/tex/latex/standalone/standalone.cfg
index 38649960e92..50d36bf05ed 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.cfg
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.cfg
@@ -1,7 +1,7 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{standalone.cfg}[%
- 2018/03/24
- v1.3
+ 2018/03/26
+ v1.3a
Default configuration file for 'standalone' class]%
%% Enabled the "varwidth" option if the "varwidth" package is available:
%%\IfFileExists{varwidth.sty}{%
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.cls b/Master/texmf-dist/tex/latex/standalone/standalone.cls
index 6d653925f10..298fb50f8ca 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.cls
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.cls
@@ -18,8 +18,8 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{standalone}[%
- 2018/03/24
- v1.3
+ 2018/03/26
+ v1.3a
Class to compile TeX sub-files standalone]
\newif\ifstandalone
\standalonetrue
@@ -525,6 +525,10 @@
\sa@startignore
}
\fi
+\ifluatex
+\RequirePackage{luatex85}
+\RequirePackage{pdftexcmds}
+\fi
\ifsa@convert
\ifx\sa@convert@quote\relax
\begingroup
@@ -848,16 +852,16 @@
\let\on@line\@gobble
\def\sa@convert#1{%
\IfFileExists{\outfile}{%
- \edef\filemodbefore{\csname pdffilemoddate\endcsname{\outfile}}%
+ \edef\filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\outfile}}%
}{%
\IfFileExists{\outname\outext}{%
- \edef\filemodbefore{\csname pdffilemoddate\endcsname{\outname\outext}}%
+ \edef\filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\outname\outext}}%
}{%
\IfFileExists{\outname-0\outext}{%
- \edef\filemodbefore{\csname pdffilemoddate\endcsname{\outname-0\outext}}%
+ \edef\filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\outname-0\outext}}%
}{%
\IfFileExists{\outname-1\outext}{%
- \edef\filemodbefore{\csname pdffilemoddate\endcsname{\outname-1\outext}}%
+ \edef\filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\outname-1\outext}}%
}{%
\def\filemodbefore{}%
}}}}%
@@ -868,7 +872,7 @@
\@tempswafalse
\ifx\@tempa\@tempb
\@tempswatrue
- \edef\infile@filemodbefore{\csname pdffilemoddate\endcsname{\infile}}%
+ \edef\infile@filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
\else
\global\let\sa@convert@stop\relax
\fi
@@ -876,6 +880,7 @@
-jobname \sa@convert@quote\sa@convert@subjobname\sa@convert@quote\space
\sa@convert@quote\string\expandafter\string\def\string\csname\space
sa@internal@run\string\endcsname{1}\string\input{\sa@convert@mainfile}\sa@convert@quote}%
+ \def\sa@multi@numpages{0}%
\begingroup
\IfFileExists{\sa@convert@subjobname.aux}{\@tempswatrue}{\@tempswafalse}%
\if@tempswa
@@ -895,27 +900,25 @@
\immediate\closein\sa@read
\fi
\endgroup
- \setcounter{sapage}{\sa@multi@numpages}%
- \addtocounter{sapage}\sa@convert@pageoffset
- \ifnum\c@sapage=\z@
+ \@tempcnta\sa@multi@numpages\relax
+ \advance\@tempcnta\sa@convert@pageoffset\relax
+ \ifnum\@tempcnta=\z@
\def\sa@multi@pagemark{}%
\edef\sa@lastoutfile{\outfile}%
\else
- \@tempcnta\z@
- \loop\ifnum\value{sapage}>0
- \advance\@tempcnta\@ne
- \divide\c@sapage by 10\relax
+ \@tempcntb\z@
+ \loop\ifnum\@tempcnta>0
+ \advance\@tempcntb\@ne
+ \divide\@tempcnta by 10\relax
\repeat
- \edef\sa@multi@pagemark{-\percent0\the\@tempcnta d}%
+ \edef\sa@multi@pagemark{-\percent0\the\@tempcntb d}%
\begingroup
- \setcounter{sapage}{\sa@multi@numpages}%
- \addtocounter{sapage}\sa@convert@pageoffset
- \def\sa@multi@pagemark{-\arabic{sapage}}%
+ \def\sa@multi@pagemark{-\the\@tempcnta}%
\xdef\sa@lastoutfile{\outfile}%
\endgroup
\fi
\if@tempswa
- \edef\infile@filemodafter{\csname pdffilemoddate\endcsname{\infile}}%
+ \edef\infile@filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
\ifx\infile@filemodbefore\infile@filemodafter
\global\let\sa@convert@stop\relax
\fi
@@ -927,9 +930,9 @@
\ShellEscape{\sa@convert@command}%
\@tempswafalse
\IfFileExists{\sa@lastoutfile}{%
- \edef\filemodafter{\csname pdffilemoddate\endcsname{\sa@lastoutfile}}%
+ \edef\filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\sa@lastoutfile}}%
\ifx\filemodbefore\filemodafter
- \expandafter\ifx\csname pdffilemoddate\endcsname\relax\else
+ \expandafter\ifx\csname pdf\ifluatex @\fi filemoddate\endcsname\relax\else
\sa@convert@failuremsg{standalone}{#1}{}%
\fi
\else
@@ -954,26 +957,19 @@
\let\outfile\sa@convert@outfile
\let\percent\@percentchar
\let\quote\sa@convert@quote
-\ifcase0%
+\edef\sa@shellescape{%
+ \ifluatex
+ \directlua{tex.write(status.shell_escape or 2)}%
+ \else\ifxetex
+ \the\shellescape
+ \else
\expandafter\ifx\csname pdfshellescape\endcsname\relax
- \ifcase
- \ifx\pdfshellescape\@undefined
- \ifx\shellescape\@undefined
- \ifx\directlua\@undefined
- \z@
- \else
- \directlua{%
- tex.sprint((status.shell_escape or os.execute()) .. " ")}
- \fi
- \else
- \shellescape
- \fi
- \else
- \pdfshellescape
- \fi
- \else 3\fi
- \else\the\pdfshellescape\fi
-\relax% 0
+ 0%
+ \else
+ \the\pdfshellescape
+ \fi\fi\fi
+}%
+\ifcase\sa@shellescape\relax% 0
\sa@convert@failuremsg
{standalone}{Shell escape disabled! Cannot convert file '\infile'.}{}%
\global\let\sa@convert@stop\relax
@@ -982,7 +978,8 @@
There might be something wrong with your\MessageBreak
conversation software or the file permissions!}%
\else% 2 or 3
- \sa@convert{Conversion failed! Please ensure that shell escape\MessageBreak is enabled (e.g. use '-shell-escape').}%
+ \sa@convert{Conversion failed! Please ensure that shell escape\MessageBreak
+ is enabled (e.g. use '-shell-escape').}%
\fi
\endgroup
\expandafter\sa@convert@stop
diff --git a/Master/texmf-dist/tex/latex/standalone/standalone.sty b/Master/texmf-dist/tex/latex/standalone/standalone.sty
index 785289a87d2..b8c71028de4 100644
--- a/Master/texmf-dist/tex/latex/standalone/standalone.sty
+++ b/Master/texmf-dist/tex/latex/standalone/standalone.sty
@@ -19,8 +19,8 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{standalone}[%
- 2018/03/24
- v1.3
+ 2018/03/26
+ v1.3a
Package to include TeX sub-files with preambles]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\@ifundefined{ifstandalone}{%