diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx')
-rw-r--r-- | Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx b/Master/texmf-dist/source/latex/l3kernel/l3drivers.dtx index 4696adddd6f..4fded9b0079 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 4280 2012-11-07 07:13:51Z joseph $ +\GetIdInfo$Id: l3drivers.dtx 4505 2013-06-28 22:06:04Z joseph $ {L3 Experimental drivers} %</driver|package> %<*driver> @@ -227,14 +227,14 @@ { \tex_special:D { ps:gsave } } %</dvips> %<*dvipdfmx|xdvipdfmx> - { \tex_special:D { pdf:bcontent } } + { \tex_special:D { pdf:content~q } } %</dvipdfmx|xdvipdfmx> \cs_new_protected_nopar:Npn \@@_graphic_state_restore: %<*dvips> { \tex_special:D { ps:grestore } } %</dvips> %<*dvipdfmx|xdvipdfmx> - { \tex_special:D { pdf:econtent } } + { \tex_special:D { pdf:content~Q } } %</dvipdfmx|xdvipdfmx> %</!pdfmode> % \end{macrocode} @@ -353,10 +353,32 @@ } %</!dvips> % \end{macrocode} +% For \texttt{(x)dvipdfmx} the is a bit more to do yet. Using +% \texttt{pdf:bcontent}/\texttt{pdf:econtent} for scoping seems the easiest +% approach, but only works reliably when all of the specials used are +% \texttt{pdf:\ldots} ones. As (some) PostScript specials can also be used +% with \texttt{(x)dvipdfmx}, that is not safe and can give unexpected output. +% To get everything in the right place, what is required is that the +% insertion point for the clip and the \TeX{} box material are the same. That +% is done by flipping the axes twice with an additional scope level in +% between. The scoping level moves to the \enquote{current point}, which +% due to the axis inversion is the \emph{start} of the clip. The second +% inversion puts things back to normal, the \TeX{} material is inserted and +% then the extra scope is closed (below). +% \begin{macrocode} +%<*dvipdfmx|xdvipdfmx> + \@@_pdf_matrix:n { -1~0~0~-1 } + \@@_graphic_state_save: + \@@_pdf_matrix:n { -1~0~0~-1 } +%</dvipdfmx|xdvipdfmx> +% \end{macrocode} % Insert the material in a box of no width, restore the graphic state % and then insert the necessary width. % \begin{macrocode} \hbox_overlap_right:n { \box_use:N #1 } +%<*dvipdfmx|xdvipdfmx> + \@@_graphic_state_restore: +%</dvipdfmx|xdvipdfmx> \@@_graphic_state_restore: \skip_horizontal:n { \box_wd:N #1 } } |