diff options
author | Karl Berry <karl@freefriends.org> | 2015-07-07 22:16:24 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2015-07-07 22:16:24 +0000 |
commit | 736a3b87f3334f7693f8bcae8177084e3e9d5dec (patch) | |
tree | b7efbb43117d544a81f1e2c74a2a40d7136de829 | |
parent | f9261e1ad3983ad9cd7e29dc77c49eb245c2e724 (diff) |
bidihl (7jul15)
git-svn-id: svn://tug.org/texlive/trunk@37795 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/texmf-dist/doc/xelatex/bidihl/README | 4 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.pdf | bin | 25355 -> 24129 bytes | |||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.tex | 7 | ||||
-rw-r--r-- | Master/texmf-dist/doc/xelatex/bidihl/test-bidihl.pdf | bin | 27986 -> 28113 bytes | |||
-rw-r--r-- | Master/texmf-dist/tex/xelatex/bidihl/bidihl.sty | 37 |
5 files changed, 27 insertions, 21 deletions
diff --git a/Master/texmf-dist/doc/xelatex/bidihl/README b/Master/texmf-dist/doc/xelatex/bidihl/README index a7afebee805..ee42fec6389 100644 --- a/Master/texmf-dist/doc/xelatex/bidihl/README +++ b/Master/texmf-dist/doc/xelatex/bidihl/README @@ -1,6 +1,6 @@ _____________________ The bidihl package -v0.1b +v0.1c Experimental bidi-aware text highlighting @@ -12,7 +12,7 @@ loaded before `bidi' package. For more information, please see the documentation. -Current version release date: 2015/07/04 +Current version release date: 2015/07/07 ___________________ Vafa Khalighi diff --git a/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.pdf b/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.pdf Binary files differindex ddefb097240..75a45cc54de 100644 --- a/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.pdf +++ b/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.pdf diff --git a/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.tex b/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.tex index c95e6138de5..ebe84a90f28 100644 --- a/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.tex +++ b/Master/texmf-dist/doc/xelatex/bidihl/bidihl-doc.tex @@ -31,12 +31,5 @@ Highlights the text. The default highlighting box color is yellow; if a differen \definecolor{bidihlcolor}{rgb}{1,0.7,0} % orange \end{verbatim} -The default highlighting box height is 10pt; again if a different height is desired, then change the length of \cs{bidihlboxheight}; i.e. -\begin{verbatim} -\setlength{\bidihlboxheight}{8pt} -\end{verbatim} -The height of the highlighting box does not automatically change; you have to set its length manually. - - \end{document}
\ No newline at end of file diff --git a/Master/texmf-dist/doc/xelatex/bidihl/test-bidihl.pdf b/Master/texmf-dist/doc/xelatex/bidihl/test-bidihl.pdf Binary files differindex 48766a22af3..a53251101dd 100644 --- a/Master/texmf-dist/doc/xelatex/bidihl/test-bidihl.pdf +++ b/Master/texmf-dist/doc/xelatex/bidihl/test-bidihl.pdf diff --git a/Master/texmf-dist/tex/xelatex/bidihl/bidihl.sty b/Master/texmf-dist/tex/xelatex/bidihl/bidihl.sty index 1aaff637a8d..ec3f12afa94 100644 --- a/Master/texmf-dist/tex/xelatex/bidihl/bidihl.sty +++ b/Master/texmf-dist/tex/xelatex/bidihl/bidihl.sty @@ -13,7 +13,7 @@ %% %% \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{bidihl}[2015/07/04 v0.1b Experimental bidi-aware text highlighting] +\ProvidesPackage{bidihl}[2015/07/07 v0.1c Experimental bidi-aware text highlighting] %% Load color package and define highlighting color @@ -22,10 +22,7 @@ %% Register Declaration -\newdimen\bidihl@highlight@depth \bidihl@highlight@depth-\maxdimen -\newdimen\bidihl@highlight@thickness \bidihl@highlight@thickness.4pt - -\newdimen\bidihlboxheight \bidihlboxheight10pt +\newdimen\bidihl@line@thickness \bidihl@line@thickness.4pt \newdimen\bidihl@pixel \bidihl@pixel0.1pt @@ -37,21 +34,32 @@ %% User Interface and Initialization -\def\bidihl{\bidihl@highlight\bidihl@highlight@depth{-\bidihl@highlight@depth}{-\dp\strutbox}} +\def\bidihl{\bidihl@highlight{\dp\strutbox}{\ht\strutbox}} -\def\bidihl@highlight#1#2#3#4{\begingroup \let\\\bidihlnewline +\def\bidihl@line#1#2#3#4{\begingroup \let\\\bidihlnewline \ifdim#1<\z@ \bidihl@height#3\relax \else \bidihl@height#2\relax \fi \bidihl@depth-\bidihl@height - \ifdim\bidihl@height<\z@ \advance\bidihl@depth\bidihl@highlight@thickness - \else \advance\bidihl@height\bidihl@highlight@thickness \fi + \ifdim\bidihl@height<\z@ \advance\bidihl@depth\bidihl@line@thickness + \else \advance\bidihl@height\bidihl@line@thickness \fi \bidihl@nospacetrue \ifvmode\leavevmode\fi \bidihl@spacefactor\spacefactor \def\@tempa{#4 }\edef\@tempb{\noexpand\@nil\space}% \expandafter\expandafter\expandafter\bidihl@wordloop \expandafter\@tempa\@tempb \endgroup \bidihl@aftergroup} + + +\def\bidihl@highlight#1#2#3{\begingroup \let\\\bidihlnewline + \bidihl@depth#1\relax + \bidihl@height#2\relax + \bidihl@nospacetrue + \ifvmode\leavevmode\fi \bidihl@spacefactor\spacefactor + \def\@tempa{#3 }\edef\@tempb{\noexpand\@nil\space}% + \expandafter\expandafter\expandafter\bidihl@wordloop + \expandafter\@tempa\@tempb + \endgroup \bidihl@aftergroup} %% Processing Word Elements @@ -127,14 +135,19 @@ \@tempdima\wd\@tempboxa \if@RTL% \box\@tempboxa - {\color{bidihlcolor}\llap{\vrule\@height\bidihlboxheight\@depth\bidihl@depth\@width\@tempdima}}% + {\color{bidihlcolor}\llap{\vrule\@height\bidihl@height\@depth\bidihl@depth\@width\@tempdima}}% \else - {\color{bidihlcolor}\rlap{\vrule\@height\bidihlboxheight\@depth\bidihl@depth\@width\@tempdima}}% + {\color{bidihlcolor}\rlap{\vrule\@height\bidihl@height\@depth\bidihl@depth\@width\@tempdima}}% \box\@tempboxa \fi \def\bidihl@theword{}} \def\bidihl@skip#1{% - \leaders\hb@xt@\bidihl@pixel{\hss{\color{bidihlcolor}\vrule\@height\bidihlboxheight\@depth\bidihl@depth}\hss}\hskip#1\relax} + \if@RTL% + \leaders\hb@xt@\bidihl@pixel{\hss{\color{bidihlcolor}\vrule\@height\bidihl@height\@depth\bidihl@depth}\hss}% + \hskip#1\relax% + \else% + {\color{bidihlcolor}\leaders\hrule\@height\bidihl@height\@depth\bidihl@depth\hskip#1\relax}% + \fi} |