diff options
Diffstat (limited to 'macros/latex/contrib/l3backend/l3backend-basics.dtx')
-rw-r--r-- | macros/latex/contrib/l3backend/l3backend-basics.dtx | 62 |
1 files changed, 35 insertions, 27 deletions
diff --git a/macros/latex/contrib/l3backend/l3backend-basics.dtx b/macros/latex/contrib/l3backend/l3backend-basics.dtx index cf4ad444ba..a6f7ea6d1c 100644 --- a/macros/latex/contrib/l3backend/l3backend-basics.dtx +++ b/macros/latex/contrib/l3backend/l3backend-basics.dtx @@ -43,7 +43,7 @@ % }^^A % } % -% \date{Released 2023-04-19} +% \date{Released 2023-10-10} % % \maketitle % @@ -70,27 +70,27 @@ % \begin{macrocode} \ProvidesExplFile %<*dvipdfmx> - {l3backend-dvipdfmx.def}{2023-04-19}{} + {l3backend-dvipdfmx.def}{2023-10-10}{} {L3 backend support: dvipdfmx} %</dvipdfmx> %<*dvips> - {l3backend-dvips.def}{2023-04-19}{} + {l3backend-dvips.def}{2023-10-10}{} {L3 backend support: dvips} %</dvips> %<*dvisvgm> - {l3backend-dvisvgm.def}{2023-04-19}{} + {l3backend-dvisvgm.def}{2023-10-10}{} {L3 backend support: dvisvgm} %</dvisvgm> %<*luatex> - {l3backend-luatex.def}{2023-04-19}{} + {l3backend-luatex.def}{2023-10-10}{} {L3 backend support: PDF output (LuaTeX)} %</luatex> %<*pdftex> - {l3backend-pdftex.def}{2023-04-19}{} + {l3backend-pdftex.def}{2023-10-10}{} {L3 backend support: PDF output (pdfTeX)} %</pdftex> %<*xetex> - {l3backend-xetex.def}{2023-04-19}{} + {l3backend-xetex.def}{2023-10-10}{} {L3 backend support: XeTeX} %</xetex> % \end{macrocode} @@ -137,8 +137,7 @@ % \begin{macro} % { % \__kernel_backend_literal:e, -% \__kernel_backend_literal:n, -% \__kernel_backend_literal:x +% \__kernel_backend_literal:n % } % The one shared function for all backends is access to the basic % \tn{special} primitive: it has slightly odd expansion behaviour @@ -147,7 +146,6 @@ \cs_new_eq:NN \__kernel_backend_literal:e \tex_special:D \cs_new_protected:Npn \__kernel_backend_literal:n #1 { \__kernel_backend_literal:e { \exp_not:n {#1} } } -\cs_generate_variant:Nn \__kernel_backend_literal:n { x } % \end{macrocode} % \end{macro} % @@ -175,7 +173,7 @@ % \end{macrocode} % % \begin{macro} -% {\__kernel_backend_literal_postscript:n, \__kernel_backend_literal_postscript:x} +% {\__kernel_backend_literal_postscript:n, \__kernel_backend_literal_postscript:e} % Literal PostScript can be included using a few low-level formats. Here, % we use the form with no positioning: this is overall more convenient as % a wrapper. Note that this does require that where position is important, @@ -183,18 +181,18 @@ % \begin{macrocode} \cs_new_protected:Npn \__kernel_backend_literal_postscript:n #1 { \__kernel_backend_literal:n { ps:: #1 } } -\cs_generate_variant:Nn \__kernel_backend_literal_postscript:n { x } +\cs_generate_variant:Nn \__kernel_backend_literal_postscript:n { e } % \end{macrocode} % \end{macro} % -% \begin{macro}{\__kernel_backend_postscript:n, \__kernel_backend_postscript:x} +% \begin{macro}{\__kernel_backend_postscript:n, \__kernel_backend_postscript:e} % PostScript data that does have positioning, and also applying % a shift to |SDict| (which is not done automatically by % |ps:| or |ps::|, in contrast to |!| or |"|). % \begin{macrocode} \cs_new_protected:Npn \__kernel_backend_postscript:n #1 { \__kernel_backend_literal:n { ps: SDict ~ begin ~ #1 ~ end } } -\cs_generate_variant:Nn \__kernel_backend_postscript:n { x } +\cs_generate_variant:Nn \__kernel_backend_postscript:n { e } % \end{macrocode} % \end{macro} % @@ -265,7 +263,7 @@ % to have more code in Lua means we create two independent files using % shared DocStrip code. % -% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x} +% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:e} % This is equivalent to \verb|\special{pdf:}| but the engine can % track it. Without the \texttt{direct} keyword everything is kept in % sync: the transformation matrix is set to the current point automatically. @@ -282,11 +280,11 @@ %</pdftex> { \exp_not:n {#1} } } -\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x } +\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { e } % \end{macrocode} % \end{macro} % -% \begin{macro}{\__kernel_backend_literal_page:n} +% \begin{macro}{\__kernel_backend_literal_page:n, \__kernel_backend_literal_page:e} % Page literals are pretty simple. To avoid an expansion, we write out % by hand. % \begin{macrocode} @@ -300,6 +298,16 @@ %</pdftex> page { \exp_not:n {#1} } } +\cs_new_protected:Npn \__kernel_backend_literal_page:e #1 + { +%<*luatex> + \tex_pdfextension:D literal ~ +%</luatex> +%<*pdftex> + \tex_pdfliteral:D +%</pdftex> + page {#1} + } % \end{macrocode} % \end{macro} % @@ -327,7 +335,7 @@ % \end{macrocode} % \end{macro} % -% \begin{macro}{\__kernel_backend_matrix:n, \__kernel_backend_matrix:x} +% \begin{macro}{\__kernel_backend_matrix:n, \__kernel_backend_matrix:e} % Here the appropriate function is set up to insert an affine matrix % 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. @@ -342,7 +350,7 @@ %</pdftex> { \exp_not:n {#1} } } -\cs_generate_variant:Nn \__kernel_backend_matrix:n { x } +\cs_generate_variant:Nn \__kernel_backend_matrix:n { e } % \end{macrocode} % \end{macro} % @@ -362,14 +370,14 @@ % for both backends, with some \texttt{clean up} for \XeTeX{} as % required. % -% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:x} +% \begin{macro}{\__kernel_backend_literal_pdf:n, \__kernel_backend_literal_pdf:e} % Undocumented but equivalent to \pdfTeX{}'s |literal| keyword. It's similar to % be not the same as the documented |contents| keyword as that adds a |q|/|Q| % pair. % \begin{macrocode} \cs_new_protected:Npn \__kernel_backend_literal_pdf:n #1 { \__kernel_backend_literal:n { pdf:literal~ #1 } } -\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { x } +\cs_generate_variant:Nn \__kernel_backend_literal_pdf:n { e } % \end{macrocode} % \end{macro} % @@ -404,7 +412,7 @@ %<*dvisvgm> % \end{macrocode} % -% \begin{macro}{\__kernel_backend_literal_svg:n, \__kernel_backend_literal_svg:x} +% \begin{macro}{\__kernel_backend_literal_svg:n, \__kernel_backend_literal_svg:e} % Unlike the other backends, the requirements for making SVG files mean % that we can't conveniently transform all operations to the current point. % That makes life a bit more tricky later as that needs to be accounted for. @@ -413,7 +421,7 @@ % \begin{macrocode} \cs_new_protected:Npn \__kernel_backend_literal_svg:n #1 { \__kernel_backend_literal:n { dvisvgm:raw~ #1 { ?nl } } } -\cs_generate_variant:Nn \__kernel_backend_literal_svg:n { x } +\cs_generate_variant:Nn \__kernel_backend_literal_svg:n { e } % \end{macrocode} % \end{macro} % @@ -427,8 +435,8 @@ % \end{variable} % % \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:} -% \begin{macro}{\__kernel_backend_scope_begin:n, \__kernel_backend_scope_begin:x} -% \begin{macro}{\__kernel_backend_scope:n, \__kernel_backend_scope:x} +% \begin{macro}{\__kernel_backend_scope_begin:n, \__kernel_backend_scope_begin:e} +% \begin{macro}{\__kernel_backend_scope:n, \__kernel_backend_scope:e} % In SVG, the need to attach concepts to a scope means we need to be sure we % will close all of the open scopes. That is easiest done if we only need % an outer \enquote{wrapper} \texttt{begin}/\texttt{end} pair, and within @@ -464,13 +472,13 @@ \group_begin: \int_gset:Nn \g__kernel_backend_scope_int { 1 } } -\cs_generate_variant:Nn \__kernel_backend_scope_begin:n { x } +\cs_generate_variant:Nn \__kernel_backend_scope_begin:n { e } \cs_new_protected:Npn \__kernel_backend_scope:n #1 { \__kernel_backend_literal_svg:n { <g ~ #1 > } \int_gincr:N \g__kernel_backend_scope_int } -\cs_generate_variant:Nn \__kernel_backend_scope:n { x } +\cs_generate_variant:Nn \__kernel_backend_scope:n { e } % \end{macrocode} % \end{macro} % \end{macro} |