diff options
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/doc/latex/xsavebox/ChangeLog | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf | bin | 278824 -> 278085 bytes | |||
-rw-r--r-- | Master/texmf-dist/source/latex/xsavebox/xsavebox.tex | 2 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty | 32 |
4 files changed, 27 insertions, 11 deletions
diff --git a/Master/texmf-dist/doc/latex/xsavebox/ChangeLog b/Master/texmf-dist/doc/latex/xsavebox/ChangeLog index a82f7ef2ae0..04c16850796 100644 --- a/Master/texmf-dist/doc/latex/xsavebox/ChangeLog +++ b/Master/texmf-dist/doc/latex/xsavebox/ChangeLog @@ -1,3 +1,7 @@ +2017-02-03 + * v0.4 + * fix: RTL related (luaTeX) + 2017-01-30 * v0.3 * fix: usability in RTL typesetting context diff --git a/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf b/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf Binary files differindex c3c338561e6..4b5d5e0e74c 100644 --- a/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf +++ b/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf diff --git a/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex b/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex index 20e6f82e7ed..29915a78fcc 100644 --- a/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex +++ b/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex @@ -132,7 +132,7 @@ Verbatim content can only be saved using the `\verb+xlrbox[*]+' environment. With \LaTeX{} in DVI mode and \XeLaTeX, box \emph{saving} commands should not be placed on a line of their own with empty lines above and below. For technical reasons this will produce an empty paragraph. Always place them at the beginning or at the end of a paragraph in the input file. Also, box saving commands cannot be placed in the document preamble with \LaTeX{} (DVI) and \XeLaTeX{}. -In a right-to-left typesetting context (RTL), the \verb+<content>+ argument should be enclosed in a pair of \verb+\beginR+ and \verb+\endR+ commands for correctly typesetting RTL text. +In a right-to-left typesetting context (RTL) using the (pdf)\LaTeX{} or \XeLaTeX{} engines, the \verb+<content>+ argument should be enclosed in a pair of \verb+\beginR+ and \verb+\endR+ commands for correct typesetting results. \subsection*{Referencing saved content} Previously saved content can be inserted with\\[-1.6\baselineskip] diff --git a/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty b/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty index b79d15b222b..7d86868fb2d 100644 --- a/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty +++ b/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty @@ -49,8 +49,8 @@ \RequirePackage{pdfbase} %everything with `pbs_' prefix \RequirePackage{l3keys2e} -\def\g@xsb@version@tl{0.3} -\def\g@xsb@date@tl{2017/01/30} +\def\g@xsb@version@tl{0.4} +\def\g@xsb@date@tl{2017/02/03} \ProvidesExplPackage{xsavebox}{\g@xsb@date@tl}{\g@xsb@version@tl} {saveboxes for repeating content without code replication} @@ -97,7 +97,7 @@ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \DeclareDocumentCommand\xsavebox{smO{\width}O{c}m}{ \group_begin: - \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL} + \xsb_beginLTR: \IfBooleanTF{#1}{ %later colour injection possible (pdfTeX, LuaTeX) \hbox_set:Nn\l_xsb_raw_box{\color@begingroup#5\color@endgroup} %raw @@ -133,7 +133,7 @@ }{ \xsb_process_box:nnnN{#2}{\width}{c}\l_xsb_box } - \int_compare:nT{\TeXXeTstate>\c_zero}{\endL} + \xsb_endLTR: \group_end: } @@ -154,7 +154,7 @@ \cs_new_nopar:Nn\xsb_xlrbox:{ \group_begin: - \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL} + \xsb_beginLTR: \hbox_set:Nn\l_xsb_box\bgroup\bgroup \ignorespaces } @@ -164,13 +164,13 @@ \egroup\egroup \sbox\l_xsb_box{\hbox_unpack_clear:N\l_xsb_box} \xsb_process_box:nnnN{#1}{\width}{c}\l_xsb_box - \int_compare:nT{\TeXXeTstate>\c_zero}{\endL} + \xsb_endLTR: \group_end: } \cs_new_nopar:Nn\xsb_xlrbox_star:{ \group_begin: - \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL} + \xsb_beginLTR: \hbox_set:Nn\l_xsb_box\bgroup\color@begingroup \ignorespaces } @@ -179,7 +179,7 @@ \unskip \color@endgroup\egroup \xsb_process_box:nnnN{#1}{\width}{c}\l_xsb_box - \int_compare:nT{\TeXXeTstate>\c_zero}{\endL} + \xsb_endLTR: \group_end: } @@ -206,7 +206,7 @@ \pbs_pdfxform:nnn{1}{0}{#4} %define command for inserting the m-boxed XObject reference \tl_gset:cx{the#1}{ - \exp_not:N\int_compare:nT{\TeXXeTstate>\c_zero}{\beginL} + \exp_not:N\xsb_beginLTR: \exp_not:N\makebox[\l_xsb_new_wd_tl][#3]{ \exp_not:N\hbox_to_wd:nn{\l_xsb_wd_tl}{ \exp_not:N\vrule~width~\c_zero_dim~height~\l_xsb_ht_tl~ @@ -215,9 +215,21 @@ \exp_not:N\pbs_pdfrefxform:n{\pbs_pdflastxform:}\hss } } - \exp_not:N\int_compare:nT{\TeXXeTstate>\c_zero}{\endL} + \exp_not:N\xsb_endLTR: } } \box_new:N\l_xsb_box %for saving the re-aligned content \box_new:N\l_xsb_raw_box %for saving the raw content + +%environment for setting LTR typesetting direction with e-TeX based engines +\cs_new:Nn\xsb_beginLTR:{ + \cs_if_exist:NT\TeXXeTstate{ + \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL} + } +} +\cs_new:Nn\xsb_endLTR:{ + \cs_if_exist:NT\TeXXeTstate{ + \int_compare:nT{\TeXXeTstate>\c_zero}{\endL} + } +} |