diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx | 76 |
1 files changed, 41 insertions, 35 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index 6d6f17a4910..4696adddd6f 100644 --- a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx +++ b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx @@ -36,7 +36,7 @@ % %<*driver|package> \RequirePackage{l3bootstrap} -\GetIdInfo$Id: l3drivers.dtx 4156 2012-08-29 11:10:09Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 4280 2012-11-07 07:13:51Z joseph $ {L3 Experimental drivers} %</driver|package> %<*driver> @@ -76,8 +76,10 @@ % \item \texttt{pdfmode}: The \enquote{driver} for direct PDF output by % \emph{both} \pdfTeX{} and \LuaTeX{} (no separate driver is used in this % case: the engine deals with PDF creation itself). -% \item \texttt{dvips}: The dvips program, which works in conjugation with -% \pdfTeX{} or \LuaTeX{} in DVI mode. +% \item \texttt{dvips}: The \texttt{dvips} program, which works in +% conjugation with \pdfTeX{} or \LuaTeX{} in DVI mode. +% \item \texttt{dvipdfmx}: The \texttt{dvipdfmx} program, which works in +% conjugation with \pdfTeX{} or \LuaTeX{} in DVI mode. % \item \texttt{xdvipdfmx}: The driver used by \XeTeX{}. % \end{itemize} % @@ -161,17 +163,21 @@ % \begin{macrocode} %<*package> \ProvidesExplFile +%<*dvipdfmx> + {l3dvidpfmx.def}{\ExplFileDate}{\ExplFileVersion} + {L3 Experimental driver: dvipdfmx} +%</dvipdfmx> %<*dvips> - {l3pdfmode.def}{\ExplFileDate}{\ExplFileVersion} - {L3~Experimental~driver:~dvips} + {l3dvips.def}{\ExplFileDate}{\ExplFileVersion} + {L3 Experimental driver: dvips} %</dvips> %<*pdfmode> {l3pdfmode.def}{\ExplFileDate}{\ExplFileVersion} - {L3~Experimental~driver:~PDF~mode} + {L3 Experimental driver: PDF mode} %</pdfmode> %<*xdvipdfmx> - {l3pdfmode.def}{\ExplFileDate}{\ExplFileVersion} - {L3~Experimental~driver:~xdvipdfmx} + {l3xdvidpfmx.def}{\ExplFileDate}{\ExplFileVersion} + {L3 Experimental driver: xdvipdfmx} %</xdvipdfmx> \__expl_package_check: %</package> @@ -213,24 +219,24 @@ % \begin{macro}{\@@_graphic_state_save:, \@@_graphic_state_restore:} % All of the drivers have a stack for saving the graphic state. These % have slightly different interfaces. For both \texttt{dvips} and -% \texttt{xdvipdfmx} this is done using an appropriate special. +% \texttt{(x)dvipdfmx} this is done using an appropriate special. % \begin{macrocode} -%<*dvips|xdvipdfmx> +%<*!pdfmode> \cs_new_protected_nopar:Npn \@@_graphic_state_save: %<*dvips> { \tex_special:D { ps:gsave } } %</dvips> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> { \tex_special:D { pdf:bcontent } } -%</xdvipdfmx> +%</dvipdfmx|xdvipdfmx> \cs_new_protected_nopar:Npn \@@_graphic_state_restore: %<*dvips> { \tex_special:D { ps:grestore } } %</dvips> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> { \tex_special:D { pdf:econtent } } -%</xdvipdfmx> -%</dvips|xdvipdfmx> +%</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 @@ -257,22 +263,22 @@ % special insertion. These are slightly different in the two cases. % The |direct| versions do not save the current matrix. % \begin{macrocode} -%<*pdfmode|xdvipdfmx> +%<*!dvips> \cs_new_protected:Npn \@@_pdf_literal:n #1 %<*pdfmode> { \pdftex_pdfliteral:D {#1} } %</pdfmode> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> { \tex_special:D { pdf:content~ #1 } } -%</xdvipdfmx> +%</dvipdfmx|xdvipdfmx> \cs_new_protected:Npn \@@_pdf_literal_direct:n #1 %<*pdfmode> { \pdftex_pdfliteral:D direct~{#1} } %</pdfmode> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> { \tex_special:D { pdf:literal~direct~ #1 } } -%</xdvipdfmx> -%</pdfmode|xdvipdfmx> +%</dvipdfmx|xdvipdfmx> +%</!dvips> % \end{macrocode} % \end{macro} % @@ -336,7 +342,7 @@ % as the driver deals with the relationship between the \TeX{} and graphics % locations automatically. % \begin{macrocode} -%<*pdfmode|xdvipdfmx> +%<*!dvips> \@@_pdf_literal_direct:n { 0 ~ @@ -345,7 +351,7 @@ \__dim_strip_bp:n { \box_ht:N #1 + \box_dp:N #1 } ~ re~W~n } -%</pdfmode|xdvipdfmx> +%</!dvips> % \end{macrocode} % Insert the material in a box of no width, restore the graphic state % and then insert the necessary width. @@ -385,14 +391,14 @@ { currentpoint~ currentpoint~translate~ - \fp_compare:nTnTF \l__box_angle_fp = \c_zero_fp + \fp_compare:nNnTF \l__box_angle_fp = \c_zero_fp { 0 } { \fp_eval:n { round ( - \l__box_angle_fp , 5 ) } } - ~rotate~ + \c_space_tl rotate~ neg~exch~neg~exch~translate } %</dvips> -%<*pdfmode|xdvipdfmx> +%<*!dvips> \box_set_wd:Nn \l__box_internal_box \c_zero_dim \fp_set:Nn \l__box_cos_fp { @@ -414,7 +420,7 @@ \c_space_tl \fp_use:N \l__box_cos_fp } -%</pdfmode|xdvipdfmx> +%</!dvips> } % \end{macrocode} % The end of a rotation means tidying up the output grouping. @@ -442,14 +448,14 @@ neg~exch~neg~exch~translate } %</dvips> -%<*pdfmode|xdvipdfmx> +%<*!dvips> \@@_pdf_matrix:n { \fp_use:N \l__box_scale_x_fp \c_space_tl 0~0~ \fp_use:N \l__box_scale_y_fp } -%</pdfmode|xdvipdfmx> +%</!dvips> } \cs_new_eq:NN \@@_box_scale_end: \@@_graphic_state_restore: % \end{macrocode} @@ -474,10 +480,10 @@ { \@@_pdf_literal:n { #1 \c_space_tl 0~0~cm } } } %</pdfmode> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> \cs_new_protected:Npn \@@_pdf_matrix:n #1 { \@@_pdf_literal_direct:n { #1 \c_space_tl 0~0~cm } } -%</xdvipdfmx> +%</dvipdfmx|xdvipdfmx> % \end{macrocode} % \end{macro} % @@ -494,9 +500,9 @@ %<*pdfmode> \tl_set:Nn \l_@@_current_color_tl { 0~g~0~G } %</pdfmode> -%<*xdvipdfmx> +%<*dvipdfmx|xdvipdfmx> \tl_set:Nn \l_@@_current_color_tl { gray~0 } -%</xdvipdfmx> +%</dvipdfmx|xdvipdfmx> % \end{macrocode} % \end{variable} % @@ -516,7 +522,7 @@ % available. In all cases there is a need to reset the color after % the current group. % \begin{macrocode} -%<*dvips|xdvipdfmx> +%<*!pdfmode> \cs_new_protected_nopar:Npn \@@_color_ensure_current: { \tex_special:D { color~push~\l_@@_current_color_tl } @@ -524,7 +530,7 @@ } \cs_new_protected_nopar:Npn \@@_color_reset: { \tex_special:D { color~pop } } -%</dvips|xdvipdfmx> +%</!pdfmode> % \end{macrocode} % Once again there is a version switch for \pdfTeX{}, as the % \tn{pdfcolorstack} primitive was introduced in version~1.40.0. |