summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2015-12-20 23:00:54 +0000
committerKarl Berry <karl@freefriends.org>2015-12-20 23:00:54 +0000
commitf4e67bebe6f832d21491cfa7ae1dfa9388899117 (patch)
tree3ecab4ba208e0c7ef72957758d26a48d8fc008b8 /Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
parent01185308aa1c1a77c8926a0432aeda02d7a240d9 (diff)
l3 (20dec15)
git-svn-id: svn://tug.org/texlive/trunk@39152 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.dtx112
1 files changed, 66 insertions, 46 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
index 2d508e31a05..a18533f82c7 100644
--- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
+++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx
@@ -38,7 +38,7 @@
\documentclass[full]{l3doc}
%</driver>
%<*driver|package>
-\GetIdInfo$Id: l3drivers.dtx 6213 2015-10-18 09:48:17Z joseph $
+\GetIdInfo$Id: l3drivers.dtx 6281 2015-11-17 07:11:52Z joseph $
{L3 Experimental drivers}
%</driver|package>
%<*driver>
@@ -206,13 +206,23 @@
% \begin{macrocode}
%<*initex>
%<*pdfmode>
-\pdftex_pdfhorigin:D = 1 true in \scan_stop:
-\pdftex_pdfvorigin:D = 1 true in \scan_stop:
-\pdftex_pdfdecimaldigits:D = 3 \scan_stop:
-\pdftex_pdfpkresolution:D = 600 \scan_stop:
-\pdftex_pdfminorversion:D = 5 \scan_stop:
-\pdftex_pdfcompresslevel:D = 9 \scan_stop:
-\pdftex_pdfobjcompresslevel:D = 2 \scan_stop:
+\group_begin:
+ \cs_set_proteced:Npx \@@_tmp:w #1 =
+ {
+ \tex_global:D
+ \cs_if_exist:NTF \luatex_pdfvariable:D
+ { \exp_not:N \luatex_pdfvariable:D #1 }
+ { \exp_not:c { pdftex_pdf #1 :D } }
+ =
+ }
+ \@@_tmp:w horigin = 1 true in \scan_stop:
+ \@@_tmp:w vorigin = 1 true in \scan_stop:
+ \@@_tmp:w decimaldigits = 3 \scan_stop:
+ \@@_tmp:w pkresolution = 600 \scan_stop:
+ \@@_tmp:w minorversion = 5 \scan_stop:
+ \@@_tmp:w compresslevel = 9 \scan_stop:
+ \@@_tmp:w objcompresslevel = 2 \scan_stop:
+\group_end:
%</pdfmode>
%</initex>
% \end{macrocode}
@@ -226,9 +236,10 @@
% 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). For \pdfTeX{}
-% and \LuaTeX{} giving direct PDF output there is a dedicated primitive.
+% in direct PDF output mode there is a dedicated primitive. \LuaTeX{} is
+% almost the same but with newer versions there is a compatibly step
% \begin{macrocode}
-\cs_new_protected_nopar:Npn \@@_state_save:
+\cs_new_protected_nopar:Npx \@@_state_save:
%<*dvips>
{ \tex_special:D { ps:gsave } }
%</dvips>
@@ -236,9 +247,13 @@
{ \tex_special:D { pdf:literal~q } }
%</dvipdfmx|xdvipdfmx>
%<*pdfmode>
- { \pdftex_pdfsave:D }
+ {
+ \cs_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D save \scan_stop: }
+ { \pdftex_pdfsave:D }
+ }
%</pdfmode>
-\cs_new_protected_nopar:Npn \@@_state_restore:
+\cs_new_protected_nopar:Npx \@@_state_restore:
%<*dvips>
{ \tex_special:D { ps:grestore } }
%</dvips>
@@ -246,7 +261,11 @@
{ \tex_special:D { pdf:literal~Q } }
%</dvipdfmx|xdvipdfmx>
%<*pdfmode>
- { \pdftex_pdfrestore:D }
+ {
+ \cs_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D restore \scan_stop: }
+ { \pdftex_pdfrestore:D }
+ }
%</pdfmode>
% \end{macrocode}
% \end{macro}
@@ -259,7 +278,7 @@
% be driver-specific. Note that these functions set the transformation matrix
% to the current position: contrast with \cs{@@_literal_direct:n}.
% \begin{macrocode}
-\cs_new_protected:Npn \@@_literal:n #1
+\cs_new_protected:Npx \@@_literal:n #1
%<*dvipdfmx|xdvipdfmx>
{ \tex_special:D { pdf:literal~ #1 } }
%</dvipdfmx|xdvipdfmx>
@@ -283,26 +302,12 @@
}
%</dvips>
%<*pdfmode>
- { \pdftex_pdfliteral:D {#1} }
-%</pdfmode>
-% \end{macrocode}
-% \end{macro}
-%
-% \begin{macro}[int]{\@@_literal_direct:n}
-% Even \enquote{lower level} than \cs{@@_literal:n}, these commands do
-% not set the transformation matrix but simply dump the driver code directly
-% into the output. In the \texttt{(x)dvipdfmx} case this two-part keyword
-% is documented (\emph{cf.}~|literal| alone).
-% \begin{macrocode}
-\cs_new_protected:Npn \@@_literal_direct:n #1
-%<*dvipdfmx|xdvipdfmx>
- { \tex_special:D { pdf:literal~direct~ #1 } }
-%</dvipdfmx|xdvipdfmx>
-%<*dvips>
- { \tex_special:D { ps:: #1 } }
-%</dvips>
-%<*pdfmode>
- { \pdftex_pdfliteral:D direct {#1} }
+ {
+ \cs_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D literal }
+ { \pdftex_pdfliteral:D }
+ {#1}
+ }
%</pdfmode>
% \end{macrocode}
% \end{macro}
@@ -334,9 +339,14 @@
% part: that is always zero and so is built in here.
% \begin{macrocode}
%<*!dvips>
-\cs_new_protected:Npn \@@_matrix:n #1
+\cs_new_protected:Npx \@@_matrix:n #1
%<*pdfmode>
- { \pdftex_pdfsetmatrix:D {#1} }
+ {
+ \cs_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D setmatrix }
+ { \pdftex_pdfsetmatrix:D }
+ {#1}
+ }
%</pdfmode>
%<*dvipdfmx|xdvipdfmx>
{ \@@_literal:n { #1 \c_space_tl 0~0~cm } }
@@ -516,24 +526,34 @@
% available. In all cases there is a need to reset the color after
% the current group.
% \begin{macrocode}
+\cs_new_protected_nopar:Npx \@@_color_ensure_current:
%<*dvipdfmx|dvips|xdvipdfmx>
-\cs_new_protected_nopar:Npn \@@_color_ensure_current:
{
- \tex_special:D { color~push~\l_@@_current_color_tl }
- \group_insert_after:N \@@_color_reset:
+ \tex_special:D { color~push~\exp_not:N \l_@@_current_color_tl }
+ \group_insert_after:N \exp_not:N \@@_color_reset:
}
-\cs_new_protected_nopar:Npn \@@_color_reset:
+%</dvipdfmx|dvips|xdvipdfmx>
+%<*pdfmode>
+ {
+ \cs_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D colorstack }
+ { \pdftex_pdfcolorstack:D }
+ \exp_not:N \l_@@_color_stack_int push
+ { \exp_not:N \l_@@_current_color_tl }
+ \group_insert_after:N \exp_not:N \@@_color_reset:
+ }
+%</pdfmode>
+\cs_new_protected_nopar:Npx \@@_color_reset:
+%<*dvipdfmx|dvips|xdvipdfmx>
{ \tex_special:D { color~pop } }
%</dvipdfmx|dvips|xdvipdfmx>
%<*pdfmode>
-\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_if_exist:NTF \luatex_pdfextension:D
+ { \luatex_pdfextension:D colorstack }
+ { \pdftex_pdfcolorstack:D }
+ \exp_not:N \l_@@_color_stack_int pop \scan_stop:
}
-\cs_new_protected_nopar:Npn \@@_color_reset:
- { \pdftex_pdfcolorstack:D \l_@@_color_stack_int pop \scan_stop: }
%</pdfmode>
% \end{macrocode}
% \end{macro}