texlive[47136] Master/texmf-dist: standalone (26mar18)

commits+karl at tug.org commits+karl at tug.org
Mon Mar 26 23:16:38 CEST 2018


Revision: 47136
          http://tug.org/svn/texlive?view=revision&revision=47136
Author:   karl
Date:     2018-03-26 23:16:38 +0200 (Mon, 26 Mar 2018)
Log Message:
-----------
standalone (26mar18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/standalone/standalone.pdf
    trunk/Master/texmf-dist/source/latex/standalone/standalone.dtx
    trunk/Master/texmf-dist/tex/latex/standalone/standalone.cfg
    trunk/Master/texmf-dist/tex/latex/standalone/standalone.cls
    trunk/Master/texmf-dist/tex/latex/standalone/standalone.sty

Modified: trunk/Master/texmf-dist/doc/latex/standalone/standalone.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/standalone/standalone.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/standalone/standalone.dtx	2018-03-26 21:16:23 UTC (rev 47135)
+++ trunk/Master/texmf-dist/source/latex/standalone/standalone.dtx	2018-03-26 21:16:38 UTC (rev 47136)
@@ -26,10 +26,10 @@
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{standalone.dtx}[%
 %<=*DATE>
-    2018/03/24
+    2018/03/26
 %<=/DATE>
 %<=*VERSION>
-    v1.3
+    v1.3a
 %<=/VERSION>
     DTX file of the standalone bundle]
 \documentclass[a4paper,11pt]{ydoc}
@@ -90,6 +90,10 @@
 % \changes{v1.1b}{2012/09/15}{Fixed issue with 'subpreambles' for Beamer documents.}
 % \changes{v1.2}{2012/12/31}{Fixed build issue with MiKTeX due to incorrect quoting character.}
 % \changes{v1.3}{2018/03/24}{Several fixes for new driver and LuaTeX versions. Other minor fixes in bundle and manual.}
+% \changes{v1.3a}{2018/03/26}{Improved shellescape code to ensure compatibility with all current LaTeX formats.
+% Added loading of LuaTeX compatibility packages.
+% Changed filemodedate code to support LuaTeX.
+% Fixes for option combination multi,convert.}
 %
 % \GetFileInfo{\jobname.dtx}
 %
@@ -208,7 +212,7 @@
 % \section{Bug reports, feature requests and other feedback}
 % Bug reports, feature requests and other feedback about the \cls{standalone} bundle can be sent to the author
 % either by email to \href{mailto:martin at scharrer-online.de?subject=standalone:%20}{martin at scharrer-online.de}
-% or using the issue tracker for the bundle under \href{https://bitbucket.org/martin_scharrer/standalone/issues}.
+% or using the issue tracker for the bundle under \url{https://bitbucket.org/martin_scharrer/standalone/issues}.
 % Bug reports should include the used version of \cls{standalone} as well as the used \LaTeX\ format (|pdflatex|, |latex|, |xelatex|, etc.) and distribution including its version.
 % Usually a minimal example which recreate the issue is immensely helpful in analysing and solving any bug.
 % Please look for existing related issue tickets first and check the FAQ/troubleshooting in \autoref{sec:classfaq} first.
@@ -2077,6 +2081,13 @@
 \fi
 %    \end{macrocode}
 %
+% Load Lua\LaTeX{} compatibility packages.
+%    \begin{macrocode}
+\ifluatex
+\RequirePackage{luatex85}
+\RequirePackage{pdftexcmds}
+\fi
+%    \end{macrocode}
 %
 % Set correct quoting character for conversion option if none was set.
 %    \begin{macrocode}
@@ -2597,16 +2608,16 @@
 %    \begin{macrocode}
 \def\sa at 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{}%
     }}}}%
@@ -2617,7 +2628,7 @@
     \@tempswafalse
     \ifx\@tempa\@tempb
         \@tempswatrue
-        \edef\infile at filemodbefore{\csname pdffilemoddate\endcsname{\infile}}%
+        \edef\infile at filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
     \else
         \global\let\sa at convert@stop\relax
     \fi
@@ -2626,6 +2637,7 @@
         \sa at convert@quote\string\expandafter\string\def\string\csname\space
         sa at internal@run\string\endcsname{1}\string\input{\sa at convert@mainfile}\sa at convert@quote}%
 %
+    \def\sa at multi@numpages{0}%
     \begingroup
     \IfFileExists{\sa at convert@subjobname.aux}{\@tempswatrue}{\@tempswafalse}%
     \if at tempswa
@@ -2646,28 +2658,26 @@
     \fi
     \endgroup
 %
-    \setcounter{sapage}{\sa at multi@numpages}%
-    \addtocounter{sapage}\sa at convert@pageoffset
-    \ifnum\c at sapage=\z@
+    \@tempcnta\sa at multi@numpages\relax
+    \advance\@tempcnta\sa at convert@pageoffset\relax
+    \ifnum\@tempcnta=\z@
         \def\sa at multi@pagemark{}%
         \edef\sa at lastoutfile{\outfile}%
     \else
-        \@tempcnta\z@
-        \loop\ifnum\value{sapage}>0
-            \advance\@tempcnta\@ne
-            \divide\c at sapage by 10\relax
+        \@tempcntb\z@
+        \loop\ifnum\@tempcnta>0
+            \advance\@tempcntb\@ne
+            \divide\@tempcnta by 10\relax
         \repeat
-        \edef\sa at multi@pagemark{-\percent0\the\@tempcnta d}%
+        \edef\sa at multi@pagemark{-\percent0\the\@tempcntb d}%
         \begingroup
-        \setcounter{sapage}{\sa at multi@numpages}%
-        \addtocounter{sapage}\sa at convert@pageoffset
-        \def\sa at multi@pagemark{-\arabic{sapage}}%
+        \def\sa at multi@pagemark{-\the\@tempcnta}%
         \xdef\sa at lastoutfile{\outfile}%
         \endgroup
     \fi
 %
     \if at tempswa
-        \edef\infile at filemodafter{\csname pdffilemoddate\endcsname{\infile}}%
+        \edef\infile at filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
         \ifx\infile at filemodbefore\infile at filemodafter
             \global\let\sa at convert@stop\relax
         \fi
@@ -2681,9 +2691,9 @@
     \ShellEscape{\sa at convert@command}%
     \@tempswafalse
     \IfFileExists{\sa at lastoutfile}{%
-        \edef\filemodafter{\csname pdffilemoddate\endcsname{\sa at lastoutfile}}%
+        \edef\filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\sa at lastoutfile}}%
         \ifx\filemodbefore\filemodafter
-            \expandafter\ifx\csname pdffilemoddate\endcsname\relax\else
+            \expandafter\ifx\csname pdf\ifluatex @\fi filemoddate\endcsname\relax\else
                 \sa at convert@failuremsg{standalone}{#1}{}%
             \fi
         \else
@@ -2717,26 +2727,19 @@
 %
 %
 %    \begin{macrocode}
-\ifcase0%
+\edef\sa at 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 at shellescape\relax% 0
     \sa at convert@failuremsg
         {standalone}{Shell escape disabled! Cannot convert file '\infile'.}{}%
     \global\let\sa at convert@stop\relax
@@ -2745,7 +2748,8 @@
                 There might be something wrong with your\MessageBreak
                 conversation software or the file permissions!}%
 \else% 2 or 3
-    \sa at convert{Conversion failed! Please ensure that shell escape\MessageBreak is enabled (e.g. use '-shell-escape').}%
+    \sa at convert{Conversion failed! Please ensure that shell escape\MessageBreak
+                is enabled (e.g. use '-shell-escape').}%
 \fi
 \endgroup
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/tex/latex/standalone/standalone.cfg
===================================================================
--- trunk/Master/texmf-dist/tex/latex/standalone/standalone.cfg	2018-03-26 21:16:23 UTC (rev 47135)
+++ trunk/Master/texmf-dist/tex/latex/standalone/standalone.cfg	2018-03-26 21:16:38 UTC (rev 47136)
@@ -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}{%

Modified: trunk/Master/texmf-dist/tex/latex/standalone/standalone.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/standalone/standalone.cls	2018-03-26 21:16:23 UTC (rev 47135)
+++ trunk/Master/texmf-dist/tex/latex/standalone/standalone.cls	2018-03-26 21:16:38 UTC (rev 47136)
@@ -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 at startignore
 }
 \fi
+\ifluatex
+\RequirePackage{luatex85}
+\RequirePackage{pdftexcmds}
+\fi
 \ifsa at convert
 \ifx\sa at convert@quote\relax
 \begingroup
@@ -848,16 +852,16 @@
 \let\on at line\@gobble
 \def\sa at 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 at filemodbefore{\csname pdffilemoddate\endcsname{\infile}}%
+        \edef\infile at filemodbefore{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
     \else
         \global\let\sa at convert@stop\relax
     \fi
@@ -876,6 +880,7 @@
         -jobname \sa at convert@quote\sa at convert@subjobname\sa at convert@quote\space
         \sa at convert@quote\string\expandafter\string\def\string\csname\space
         sa at internal@run\string\endcsname{1}\string\input{\sa at convert@mainfile}\sa at convert@quote}%
+    \def\sa at multi@numpages{0}%
     \begingroup
     \IfFileExists{\sa at convert@subjobname.aux}{\@tempswatrue}{\@tempswafalse}%
     \if at tempswa
@@ -895,27 +900,25 @@
       \immediate\closein\sa at read
     \fi
     \endgroup
-    \setcounter{sapage}{\sa at multi@numpages}%
-    \addtocounter{sapage}\sa at convert@pageoffset
-    \ifnum\c at sapage=\z@
+    \@tempcnta\sa at multi@numpages\relax
+    \advance\@tempcnta\sa at convert@pageoffset\relax
+    \ifnum\@tempcnta=\z@
         \def\sa at multi@pagemark{}%
         \edef\sa at lastoutfile{\outfile}%
     \else
-        \@tempcnta\z@
-        \loop\ifnum\value{sapage}>0
-            \advance\@tempcnta\@ne
-            \divide\c at sapage by 10\relax
+        \@tempcntb\z@
+        \loop\ifnum\@tempcnta>0
+            \advance\@tempcntb\@ne
+            \divide\@tempcnta by 10\relax
         \repeat
-        \edef\sa at multi@pagemark{-\percent0\the\@tempcnta d}%
+        \edef\sa at multi@pagemark{-\percent0\the\@tempcntb d}%
         \begingroup
-        \setcounter{sapage}{\sa at multi@numpages}%
-        \addtocounter{sapage}\sa at convert@pageoffset
-        \def\sa at multi@pagemark{-\arabic{sapage}}%
+        \def\sa at multi@pagemark{-\the\@tempcnta}%
         \xdef\sa at lastoutfile{\outfile}%
         \endgroup
     \fi
     \if at tempswa
-        \edef\infile at filemodafter{\csname pdffilemoddate\endcsname{\infile}}%
+        \edef\infile at filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\infile}}%
         \ifx\infile at filemodbefore\infile at filemodafter
             \global\let\sa at convert@stop\relax
         \fi
@@ -927,9 +930,9 @@
     \ShellEscape{\sa at convert@command}%
     \@tempswafalse
     \IfFileExists{\sa at lastoutfile}{%
-        \edef\filemodafter{\csname pdffilemoddate\endcsname{\sa at lastoutfile}}%
+        \edef\filemodafter{\csname pdf\ifluatex @\fi filemoddate\endcsname{\sa at lastoutfile}}%
         \ifx\filemodbefore\filemodafter
-            \expandafter\ifx\csname pdffilemoddate\endcsname\relax\else
+            \expandafter\ifx\csname pdf\ifluatex @\fi filemoddate\endcsname\relax\else
                 \sa at convert@failuremsg{standalone}{#1}{}%
             \fi
         \else
@@ -954,26 +957,19 @@
 \let\outfile\sa at convert@outfile
 \let\percent\@percentchar
 \let\quote\sa at convert@quote
-\ifcase0%
+\edef\sa at 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 at shellescape\relax% 0
     \sa at convert@failuremsg
         {standalone}{Shell escape disabled! Cannot convert file '\infile'.}{}%
     \global\let\sa at 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 at convert{Conversion failed! Please ensure that shell escape\MessageBreak is enabled (e.g. use '-shell-escape').}%
+    \sa at convert{Conversion failed! Please ensure that shell escape\MessageBreak
+                is enabled (e.g. use '-shell-escape').}%
 \fi
 \endgroup
 \expandafter\sa at convert@stop

Modified: trunk/Master/texmf-dist/tex/latex/standalone/standalone.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/standalone/standalone.sty	2018-03-26 21:16:23 UTC (rev 47135)
+++ trunk/Master/texmf-dist/tex/latex/standalone/standalone.sty	2018-03-26 21:16:38 UTC (rev 47136)
@@ -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}{%



More information about the tex-live-commits mailing list