[latex3-commits] [l3svn] branch master updated: Increase min. pdfTeX version to 1.40

noreply at latex-project.org noreply at latex-project.org
Sun Oct 18 11:49:24 CEST 2015


This is an automated email from the git hooks/post-receive script.

joseph pushed a commit to branch master
in repository l3svn.

The following commit(s) were added to refs/heads/master by this push:
       new  dcfa47e   Increase min. pdfTeX version to 1.40
dcfa47e is described below

commit dcfa47e9b43f8994ab75cd094394f288652f2eb4
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Oct 18 10:48:17 2015 +0100

    Increase min. pdfTeX version to 1.40
    
    As disucssed by the team, this is realistically going to be needed
    to keep on top of engine verson issues. Note that pdfTeX 1.40 has
    been available since 2007 so there is little real-world impact.
---
 l3kernel/README.md       |   10 +++---
 l3kernel/expl3.dtx       |    7 ++--
 l3kernel/l3bootstrap.dtx |   15 +++++++--
 l3kernel/l3drivers.dtx   |   80 +++++++++++++---------------------------------
 4 files changed, 43 insertions(+), 69 deletions(-)

diff --git a/l3kernel/README.md b/l3kernel/README.md
index 5247e20..5d2c4ca 100644
--- a/l3kernel/README.md
+++ b/l3kernel/README.md
@@ -28,15 +28,17 @@ Requirements
 ------------
 
 The `l3kernel` bundle requires the e-TeX extensions and the functionality
-of the `\pdfstrcmp` primitive. As a result, the bundle will only work
-with the following engines:
+of the `\pdfstrcmp` primitive. Any engine which defines `\pdfoutput`
+(_i.e._ allows direct production of a PDF file without a DVI intermediate) must
+also provide `\pdfcolorstack`, `\pdfliteral`, `\pdfmatrix`, `\pdfrestore` and
+`\pdfsave`. As a result, the bundle will only work with the following engines:
 
-* pdfTeX v1.30 or later
+* pdfTeX v1.40 or later
 * XeTeX v0.9994 or later
 * LuaTeX v0.40 or later
 * e-(u)pTeX from mid-2012 onward
 
-pdfTeX v1.30 was released in 2005, and so any recent TeX distribution
+pdfTeX v1.40 was released in 2007, and so any recent TeX distribution
 will support `l3kernel`. Both XeTeX and LuaTeX have developed more
 actively over the past few years, and for this reason only recent
 releases of these engines are supported.
diff --git a/l3kernel/expl3.dtx b/l3kernel/expl3.dtx
index 42ff1e3..001cd42 100644
--- a/l3kernel/expl3.dtx
+++ b/l3kernel/expl3.dtx
@@ -997,17 +997,16 @@
 %      |\pdfstrcmp|.
 % \end{itemize}
 % Any engine which defines |\pdfoutput| (\emph{i.e.}~allows direct production
-% of a PDF file without a DVI intermediate) must also provide |\pdfliteral|.
+% of a PDF file without a DVI intermediate) must also provide |\pdfcolorstack|,
+% |\pdfliteral|, |\pdfmatrix|, |\pdfrestore| and |\pdfsave|.
 %
 % Practically, these requirements are met by the engines
 % \begin{itemize}
-%    \item \pdfTeX{} v1.30 or later.
+%    \item \pdfTeX{} v1.40 or later.
 %    \item \XeTeX{} v0.9994 or later.
 %    \item \LuaTeX{} v0.40 or later.
 %    \item e-(u)p\TeX{} mid-2012 or later.
 % \end{itemize}
-% of which the first three engines are currently officially supported by
-% the team.
 %
 % Additional modules beyond the core of \pkg{expl3} may require additional
 % primitives. In particular, third-party authors may significantly
diff --git a/l3kernel/l3bootstrap.dtx b/l3kernel/l3bootstrap.dtx
index 8579cc8..6b9fde0 100644
--- a/l3kernel/l3bootstrap.dtx
+++ b/l3kernel/l3bootstrap.dtx
@@ -473,9 +473,11 @@
   \def\LongText%
     {%
       LaTeX3 requires the e-TeX primitives and \string\pdfstrcmp.\LineBreak
+      Direct PDF production also requires additional primitives listed in the
+      README.\LineBreak
       \LineBreak
       These are available in the engines\LineBreak
-      - pdfTeX v1.30\LineBreak
+      - pdfTeX v1.40\LineBreak
       - XeTeX v0.9994\LineBreak
       - LuaTeX v0.40\LineBreak
       - e-(u)pTeX mid-2012\LineBreak
@@ -483,10 +485,17 @@
       \LineBreak
     }%
   \ifnum0%
-    \expandafter\ifx\csname pdfstrcmp\endcsname\relax\else 1\fi
+    \expandafter\ifx\csname pdfstrcmp\endcsname\relax
+    \else
+      \expandafter\ifx\csname pdftexversion\endcsname\relax
+        1%
+      \else
+        \ifnum\pdftexversion<140 \else 1\fi
+      \fi
+    \fi
     \expandafter\ifx\csname directlua\endcsname\relax
     \else
-      \ifnum\luatexversion<36 \else 1\fi
+      \ifnum\luatexversion<40 \else 1\fi
     \fi
     =0 %
       \newlinechar`\^^J %
diff --git a/l3kernel/l3drivers.dtx b/l3kernel/l3drivers.dtx
index 3ac6bf2..844a56f 100644
--- a/l3kernel/l3drivers.dtx
+++ b/l3kernel/l3drivers.dtx
@@ -1,6 +1,6 @@
 % \iffalse meta-comment
 %
-%% File: l3drivers.dtx Copyright(C) 2011-2014 The LaTeX3 Project
+%% File: l3drivers.dtx Copyright(C) 2011-2015 The LaTeX3 Project
 %%
 %% It may be distributed and/or modified under the conditions of the
 %% LaTeX Project Public License (LPPL), either version 1.3c of this
@@ -225,9 +225,9 @@
 %   \texttt{(x)dvipdfmx} this is done using an appropriate special. Note
 %   that here and later, the \texttt{dvipdfmx} documentation does not cover
 %   the |literal| key word but that this appears to behave in the same way as
-%   \pdfTeX{}'s \tn{pdfliteral} (making life easier all-round).
+%   \pdfTeX{}'s \tn{pdfliteral} (making life easier all-round). For \pdfTeX{}
+%   and \LuaTeX{} giving direct PDF output there is a dedicated primitive.
 %    \begin{macrocode}
-%<*!pdfmode>
 \cs_new_protected_nopar:Npn \@@_state_save:
 %<*dvips>
   { \tex_special:D { ps:gsave } }
@@ -235,6 +235,9 @@
 %<*dvipdfmx|xdvipdfmx>
   { \tex_special:D { pdf:literal~q } }
 %</dvipdfmx|xdvipdfmx>
+%<*pdfmode>
+  { \pdftex_pdfsave:D }
+%</pdfmode>
 \cs_new_protected_nopar:Npn \@@_state_restore:
 %<*dvips>
   { \tex_special:D { ps:grestore } }
@@ -242,24 +245,8 @@
 %<*dvipdfmx|xdvipdfmx>
   { \tex_special:D { pdf:literal~Q } }
 %</dvipdfmx|xdvipdfmx>
-%</!pdfmode>
-%    \end{macrocode}
-%   For direct PDF output there is also a need to worry about the version
-%   of \pdfTeX{} in use: the \tn{pdfsave} primitive was only introduced
-%   in version~1.40.0.
-%    \begin{macrocode}
 %<*pdfmode>
-\cs_if_exist:NTF \pdftex_pdfsave:D
-  {
-    \cs_new_eq:NN \@@_state_save:    \pdftex_pdfsave:D
-    \cs_new_eq:NN \@@_state_restore: \pdftex_pdfrestore:D
-  }
-  {
-    \cs_new_protected_nopar:Npn \@@_state_save:
-      { \pdftex_pdfliteral:D { q } }
-    \cs_new_protected_nopar:Npn \@@_state_restore:
-      { \pdftex_pdfliteral:D { Q } }
-  }
+  { \pdftex_pdfrestore:D }
 %</pdfmode>
 %    \end{macrocode}
 % \end{macro}
@@ -341,27 +328,20 @@
 %
 % \begin{macro}[int]{\@@_matrix:n}
 %   Here the appropriate function is set up to insert an affine matrix
-%   into the PDF. With a new enough \pdfTeX{} (version~1.40.0 or later)
-%   there is a primitive for this, which only needs the rotation/scaling/skew
-%   part. With an older \pdfTeX{} or with \texttt{(x)dvipdfmx} the matrix
-%   also has to include a translation part: that is always zero and so is
-%   built in here.
+%   into the PDF. With \pdfTeX{} and \LuaTeX{} in direct PDF output mode there
+%   is a primitive for this, which only needs the rotation/scaling/skew part.
+%   With \texttt{(x)dvipdfmx} the matrix also has to include a translation
+%   part: that is always zero and so is built in here.
 %    \begin{macrocode}
+%<*!dvips>
+\cs_new_protected:Npn \@@_matrix:n #1
 %<*pdfmode>
-\cs_if_exist:NTF \pdftex_pdfsetmatrix:D
-  {
-    \cs_new_protected:Npn \@@_matrix:n #1
-      { \pdftex_pdfsetmatrix:D {#1} }
-  }
-  {
-    \cs_new_protected:Npn \@@_matrix:n #1
-      { \@@_literal:n { #1 \c_space_tl 0~0~cm } }
-  }
+  { \pdftex_pdfsetmatrix:D {#1} }
 %</pdfmode>
 %<*dvipdfmx|xdvipdfmx>
-\cs_new_protected:Npn \@@_matrix:n #1
   { \@@_literal:n { #1 \c_space_tl 0~0~cm } }
 %</dvipdfmx|xdvipdfmx>
+%</!dvips>
 %    \end{macrocode}
 % \end{macro}
 %
@@ -521,7 +501,7 @@
 % \end{variable}
 %
 % \begin{variable}{\l_@@_color_stack_int}
-%   \pdfTeX{} (version~1.40.0 or later) and \LuaTeX{} have multiple stacks
+%   \pdfTeX{} and \LuaTeX{} have multiple stacks
 %   available, and the color stack therefore needs a number when in PDF mode.
 %    \begin{macrocode}
 %<*pdfmode>
@@ -545,31 +525,15 @@
 \cs_new_protected_nopar:Npn \@@_color_reset:
   { \tex_special:D { color~pop } }
 %</dvipdfmx|dvips|xdvipdfmx>
-%    \end{macrocode}
-%   Once again there is a version switch for \pdfTeX{}, as the
-%   \tn{pdfcolorstack} primitive was introduced in version~1.40.0.
-%    \begin{macrocode}
 %<*pdfmode>
-\cs_if_exist:NTF \pdftex_pdfcolorstack:D
-  {
-    \cs_new_protected_nopar:Npn \@@_color_ensure_current:
-      {
-        \pdftex_pdfcolorstack:D \l_@@_color_stack_int push
-          { \l_@@_current_color_tl }
-        \group_insert_after:N \@@_color_reset:
-      }
-    \cs_new_protected_nopar:Npn \@@_color_reset:
-      { \pdftex_pdfcolorstack:D \l_@@_color_stack_int pop \scan_stop: }
-  }
+\cs_new_protected_nopar:Npn \@@_color_ensure_current:
   {
-    \cs_new_protected_nopar:Npn \@@_color_ensure_current:
-      {
-        \@@_literal:n { \l_@@_current_color_tl }
-        \group_insert_after:N \@@_color_reset:
-      }
-    \cs_new_protected_nopar:Npn \@@_color_reset:
-      { \@@_literal:n { \l_@@_current_color_tl } }
+    \pdftex_pdfcolorstack:D \l_@@_color_stack_int push
+      { \l_@@_current_color_tl }
+    \group_insert_after:N \@@_color_reset:
   }
+\cs_new_protected_nopar:Npn \@@_color_reset:
+  { \pdftex_pdfcolorstack:D \l_@@_color_stack_int pop \scan_stop: }
 %</pdfmode>
 %    \end{macrocode}
 % \end{macro}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the latex3-commits mailing list