diff options
author | Karl Berry <karl@freefriends.org> | 2015-11-05 00:01:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-11-05 00:01:25 +0000 |
commit | e6cb7eab17b3ef76d3f96c8e23782a91190102a8 (patch) | |
tree | 1d90b38b9c413bb2fc8c07c9cec8da785b30bb20 /Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx | |
parent | cffa5da405ae09ac7a50a8a46795ac83e5bc18dc (diff) |
latex3 (4nov15)
git-svn-id: svn://tug.org/texlive/trunk@38776 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx | 82 |
1 files changed, 23 insertions, 59 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index 747d2c33cb4..2d508e31a05 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/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 @@ -38,7 +38,7 @@ \documentclass[full]{l3doc} %</driver> %<*driver|package> -\GetIdInfo$Id: l3drivers.dtx 5435 2014-10-16 21:27:50Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 6213 2015-10-18 09:48:17Z joseph $ {L3 Experimental drivers} %</driver|package> %<*driver> @@ -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} |