[latex3-commits] [git/LaTeX3-latex3-latex3] master: Support for BDC/EMC (35df1b2)

Joseph Wright joseph.wright at morningstar2.co.uk
Sun Jun 2 21:41:57 CEST 2019


Repository : https://github.com/latex3/latex3
On branch  : master
Link       : https://github.com/latex3/latex3/commit/35df1b2e029242c0de4c9a200310c04baba0f3d9

>---------------------------------------------------------------

commit 35df1b2e029242c0de4c9a200310c04baba0f3d9
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Sun Jun 2 20:41:57 2019 +0100

    Support for BDC/EMC


>---------------------------------------------------------------

35df1b2e029242c0de4c9a200310c04baba0f3d9
 l3kernel/l3backend-basics.dtx           |   24 ++++++++++++++
 l3kernel/l3backend-pdf.dtx              |   54 +++++++++++++++++++++++++++++++
 l3kernel/testfiles/m3expl001.luatex.tlg |    3 ++
 l3kernel/testfiles/m3expl001.ptex.tlg   |    3 ++
 l3kernel/testfiles/m3expl001.tlg        |    3 ++
 l3kernel/testfiles/m3expl001.uptex.tlg  |    3 ++
 l3kernel/testfiles/m3expl001.xetex.tlg  |    3 ++
 l3kernel/testfiles/m3expl003.luatex.tlg |    3 ++
 l3kernel/testfiles/m3expl003.ptex.tlg   |    3 ++
 l3kernel/testfiles/m3expl003.tlg        |    3 ++
 l3kernel/testfiles/m3expl003.uptex.tlg  |    3 ++
 l3kernel/testfiles/m3expl003.xetex.tlg  |    3 ++
 12 files changed, 108 insertions(+)

diff --git a/l3kernel/l3backend-basics.dtx b/l3kernel/l3backend-basics.dtx
index 7ab5c2d..528fa2a 100644
--- a/l3kernel/l3backend-basics.dtx
+++ b/l3kernel/l3backend-basics.dtx
@@ -246,6 +246,21 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\__kernel_backend_literal_page:n}
+%  Page literals are pretty simple. To avoid an expansion, we write out
+%  by hand.
+%    \begin{macrocode}
+\cs_new_protected:Npx \__kernel_backend_literal_page:n #1
+  {
+    \cs_if_exist:NTF \tex_pdfextension:D
+      { \tex_pdfextension:D literal ~ }
+      { \tex_pdfliteral:D }
+        page
+        { \exp_not:N \exp_not:n {#1} }
+  }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:}
 %  Higher-level interfaces for saving and restoring the graphic state.
 %    \begin{macrocode}
@@ -306,6 +321,15 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\__kernel_backend_literal_page:n}
+%  Whilst the manual says this is like |literal direct| in \pdfTeX{},
+%  it closes the |BT| block!
+%    \begin{macrocode}
+\cs_new_protected:Npn \__kernel_backend_literal_page:n #1
+  { \__kernel_backend_literal:n { pdf:literal~direct~ #1 } }
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\__kernel_backend_scope_begin:, \__kernel_backend_scope_end:}
 %   Scoping is done using the backend-specific specials.
 %    \begin{macrocode}
diff --git a/l3kernel/l3backend-pdf.dtx b/l3kernel/l3backend-pdf.dtx
index 68d1aff..8da681e 100644
--- a/l3kernel/l3backend-pdf.dtx
+++ b/l3kernel/l3backend-pdf.dtx
@@ -1231,6 +1231,20 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsubsection{Marked content}
+%
+% \begin{macro}{\@@_backend_bdc:nn}
+% \begin{macro}{\@@_backend_emc:}
+%   Simple wrappers.
+%   \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_bdc:nn #1#2
+  { \@@_backend_pdfmark:n { /#1 ~ #2 /BDC } }
+\cs_new_protected:Npn \@@_backend_emc:
+  { \@@_backend_pdfmark:n { /EMC } }
+%   \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</dvips>
 %    \end{macrocode}
@@ -1619,6 +1633,21 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsubsection{Marked content}
+%
+% \begin{macro}{\@@_backend_bdc:nn}
+% \begin{macro}{\@@_backend_emc:}
+%   Simple wrappers. May need refinement: see
+%   \url{https://chat.stackexchange.com/transcript/message/49970158#49970158}.
+%   \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_bdc:nn #1#2
+  { \__kernel_backend_literal_page:n { /#1 ~ #2 ~ BDC } }
+\cs_new_protected:Npn \@@_backend_emc:
+  { \__kernel_backend_literal_page:n { EMC } }
+%   \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</pdfmode>
 %    \end{macrocode}
@@ -1967,6 +1996,21 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \subsubsection{Marked content}
+%
+% \begin{macro}{\@@_backend_bdc:nn}
+% \begin{macro}{\@@_backend_emc:}
+%   Simple wrappers. May need refinement: see
+%   \url{https://chat.stackexchange.com/transcript/message/49970158#49970158}.
+%   \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_bdc:nn #1#2
+  { \__kernel_backend_literal_page:n { /#1 ~ #2 ~ BDC } }
+\cs_new_protected:Npn \@@_backend_emc:
+  { \__kernel_backend_literal_page:n { EMC } }
+%   \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</dvipdfmx|xdvipdfmx>
 %    \end{macrocode}
@@ -2039,6 +2083,16 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@@_backend_bdc:nn}
+% \begin{macro}{\@@_backend_emc:}
+%   More no-ops.
+%   \begin{macrocode}
+\cs_new_protected:Npn \@@_backend_bdc:nn #1#2 { }
+\cs_new_protected:Npn \@@_backend_emc: { }
+%   \end{macrocode}
+% \end{macro}
+% \end{macro}
+%
 %    \begin{macrocode}
 %</dvisvgm>
 %    \end{macrocode}
diff --git a/l3kernel/testfiles/m3expl001.luatex.tlg b/l3kernel/testfiles/m3expl001.luatex.tlg
index 0b47914..bbbdf93 100644
--- a/l3kernel/testfiles/m3expl001.luatex.tlg
+++ b/l3kernel/testfiles/m3expl001.luatex.tlg
@@ -6836,6 +6836,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
@@ -6946,6 +6947,8 @@ Defining \__pdf_backend_version_major_gset:n on line ..
 Defining \__pdf_backend_version_minor_gset:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl001.ptex.tlg b/l3kernel/testfiles/m3expl001.ptex.tlg
index f807247..61c0920 100644
--- a/l3kernel/testfiles/m3expl001.ptex.tlg
+++ b/l3kernel/testfiles/m3expl001.ptex.tlg
@@ -6833,6 +6833,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -6947,6 +6948,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl001.tlg b/l3kernel/testfiles/m3expl001.tlg
index dfd912a..49f9ba0 100644
--- a/l3kernel/testfiles/m3expl001.tlg
+++ b/l3kernel/testfiles/m3expl001.tlg
@@ -7133,6 +7133,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
@@ -7243,6 +7244,8 @@ Defining \__pdf_backend_version_major_gset:n on line ..
 Defining \__pdf_backend_version_minor_gset:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl001.uptex.tlg b/l3kernel/testfiles/m3expl001.uptex.tlg
index b8bcd81..add4915 100644
--- a/l3kernel/testfiles/m3expl001.uptex.tlg
+++ b/l3kernel/testfiles/m3expl001.uptex.tlg
@@ -7129,6 +7129,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -7243,6 +7244,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl001.xetex.tlg b/l3kernel/testfiles/m3expl001.xetex.tlg
index e215c18..5333c48 100644
--- a/l3kernel/testfiles/m3expl001.xetex.tlg
+++ b/l3kernel/testfiles/m3expl001.xetex.tlg
@@ -6834,6 +6834,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -6958,6 +6959,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl003.luatex.tlg b/l3kernel/testfiles/m3expl003.luatex.tlg
index 0b47914..bbbdf93 100644
--- a/l3kernel/testfiles/m3expl003.luatex.tlg
+++ b/l3kernel/testfiles/m3expl003.luatex.tlg
@@ -6836,6 +6836,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
@@ -6946,6 +6947,8 @@ Defining \__pdf_backend_version_major_gset:n on line ..
 Defining \__pdf_backend_version_minor_gset:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl003.ptex.tlg b/l3kernel/testfiles/m3expl003.ptex.tlg
index f807247..61c0920 100644
--- a/l3kernel/testfiles/m3expl003.ptex.tlg
+++ b/l3kernel/testfiles/m3expl003.ptex.tlg
@@ -6833,6 +6833,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -6947,6 +6948,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl003.tlg b/l3kernel/testfiles/m3expl003.tlg
index dfd912a..49f9ba0 100644
--- a/l3kernel/testfiles/m3expl003.tlg
+++ b/l3kernel/testfiles/m3expl003.tlg
@@ -7133,6 +7133,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__kernel_backend_matrix:n on line ...
@@ -7243,6 +7244,8 @@ Defining \__pdf_backend_version_major_gset:n on line ..
 Defining \__pdf_backend_version_minor_gset:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl003.uptex.tlg b/l3kernel/testfiles/m3expl003.uptex.tlg
index b8bcd81..add4915 100644
--- a/l3kernel/testfiles/m3expl003.uptex.tlg
+++ b/l3kernel/testfiles/m3expl003.uptex.tlg
@@ -7129,6 +7129,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -7243,6 +7244,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...
diff --git a/l3kernel/testfiles/m3expl003.xetex.tlg b/l3kernel/testfiles/m3expl003.xetex.tlg
index e215c18..5333c48 100644
--- a/l3kernel/testfiles/m3expl003.xetex.tlg
+++ b/l3kernel/testfiles/m3expl003.xetex.tlg
@@ -6834,6 +6834,7 @@ Defining \__kernel_backend_literal:n on line ...
 Defining \__kernel_backend_literal:x on line ...
 Defining \__kernel_backend_literal_pdf:n on line ...
 Defining \__kernel_backend_literal_pdf:x on line ...
+Defining \__kernel_backend_literal_page:n on line ...
 Defining \__kernel_backend_scope_begin: on line ...
 Defining \__kernel_backend_scope_end: on line ...
 Defining \__color_backend_pickup:N on line ...
@@ -6958,6 +6959,8 @@ Defining \__pdf_backend_version_major:n on line ...
 Defining \__pdf_backend_version_minor:n on line ...
 Defining \__pdf_backend_version_major: on line ...
 Defining \__pdf_backend_version_minor: on line ...
+Defining \__pdf_backend_bdc:nn on line ...
+Defining \__pdf_backend_emc: on line ...
 )
 Defining \__expl_status_pop:w on line ...
 Defining \l__expl_status_stack_tl on line ...





More information about the latex3-commits mailing list