texlive[43098] Master/texmf-dist: xsavebox (30jan17)
commits+karl at tug.org
commits+karl at tug.org
Tue Jan 31 00:32:21 CET 2017
Revision: 43098
http://tug.org/svn/texlive?view=revision&revision=43098
Author: karl
Date: 2017-01-31 00:32:20 +0100 (Tue, 31 Jan 2017)
Log Message:
-----------
xsavebox (30jan17)
Modified Paths:
--------------
trunk/Master/texmf-dist/doc/latex/xsavebox/ChangeLog
trunk/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf
trunk/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex
trunk/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty
Modified: trunk/Master/texmf-dist/doc/latex/xsavebox/ChangeLog
===================================================================
--- trunk/Master/texmf-dist/doc/latex/xsavebox/ChangeLog 2017-01-30 23:32:09 UTC (rev 43097)
+++ trunk/Master/texmf-dist/doc/latex/xsavebox/ChangeLog 2017-01-30 23:32:20 UTC (rev 43098)
@@ -1,3 +1,7 @@
+2017-01-30
+ * v0.3
+ * fix: usability in RTL typesetting context
+
2016-03-07
* v0.2
* new: package option `margin=<dimension>' added
Modified: trunk/Master/texmf-dist/doc/latex/xsavebox/xsavebox.pdf
===================================================================
(Binary files differ)
Modified: trunk/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex
===================================================================
--- trunk/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex 2017-01-30 23:32:09 UTC (rev 43097)
+++ trunk/Master/texmf-dist/source/latex/xsavebox/xsavebox.tex 2017-01-30 23:32:20 UTC (rev 43098)
@@ -132,6 +132,8 @@
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.
+
\subsection*{Referencing saved content}
Previously saved content can be inserted with\\[-1.6\baselineskip]
Modified: trunk/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty 2017-01-30 23:32:09 UTC (rev 43097)
+++ trunk/Master/texmf-dist/tex/latex/xsavebox/xsavebox.sty 2017-01-30 23:32:20 UTC (rev 43098)
@@ -1,4 +1,4 @@
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% xsavebox.sty
%
@@ -49,8 +49,8 @@
\RequirePackage{pdfbase} %everything with `pbs_' prefix
\RequirePackage{l3keys2e}
-\def\g at xsb@version at tl{0.2}
-\def\g at xsb@date at tl{2016/03/07}
+\def\g at xsb@version at tl{0.3}
+\def\g at xsb@date at tl{2017/01/30}
\ProvidesExplPackage{xsavebox}{\g at xsb@date at tl}{\g at xsb@version at tl}
{saveboxes for repeating content without code replication}
@@ -97,6 +97,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareDocumentCommand\xsavebox{smO{\width}O{c}m}{
\group_begin:
+ \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL}
\IfBooleanTF{#1}{
%later colour injection possible (pdfTeX, LuaTeX)
\hbox_set:Nn\l_xsb_raw_box{\color at begingroup#5\color at endgroup} %raw
@@ -132,6 +133,7 @@
}{
\xsb_process_box:nnnN{#2}{\width}{c}\l_xsb_box
}
+ \int_compare:nT{\TeXXeTstate>\c_zero}{\endL}
\group_end:
}
@@ -152,6 +154,7 @@
\cs_new_nopar:Nn\xsb_xlrbox:{
\group_begin:
+ \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL}
\hbox_set:Nn\l_xsb_box\bgroup\bgroup
\ignorespaces
}
@@ -161,11 +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}
\group_end:
}
\cs_new_nopar:Nn\xsb_xlrbox_star:{
\group_begin:
+ \int_compare:nT{\TeXXeTstate>\c_zero}{\beginL}
\hbox_set:Nn\l_xsb_box\bgroup\color at begingroup
\ignorespaces
}
@@ -174,6 +179,7 @@
\unskip
\color at endgroup\egroup
\xsb_process_box:nnnN{#1}{\width}{c}\l_xsb_box
+ \int_compare:nT{\TeXXeTstate>\c_zero}{\endL}
\group_end:
}
@@ -200,6 +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\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~
@@ -208,6 +215,7 @@
\exp_not:N\pbs_pdfrefxform:n{\pbs_pdflastxform:}\hss
}
}
+ \exp_not:N\int_compare:nT{\TeXXeTstate>\c_zero}{\endL}
}
}
More information about the tex-live-commits
mailing list