repetitive navigational links
L-Soft  -  Home of  the  LISTSERV  mailing list  manager LISTSERV(R) 14.5
Skip repetitive navigational links
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (April 2004)Back to main IVRITEX pageJoin or leave IVRITEXReplyPost a new messageSearchProportional fontNon-proportional fontLog in
Date:         Tue, 20 Apr 2004 09:49:47 +0300
Reply-To:     Hebrew TeX list <[log in to unmask]>
Sender:       Hebrew TeX list <[log in to unmask]>
From:         Ron Artstein <[log in to unmask]>
Subject:      Re: shading theorems
In-Reply-To:  <[log in to unmask]>

Hi Rama, Well, it turns out the problem was fairly easy to take care of. I applied Tzafrir's method of correcting \textcolor in order to correct the behavior of \colorbox and \fcolorbox. I'm attaching a patch that will fix the problem. Instructions: - Use the attached file to patch the file hebrew.dtx in the IvriTeX distribution: in unix, copy the attached file to the latex/heblatex/ directory of IvriTeX, then run the command cat colorbox.patch | patch - latex hebrew.ins to generate the new rlbabel.ldf and put it in the appropriate place (replacing your old rlbabel.ldf). - latex hebrew.dtx to get the documentation. Tzafrir, will you be able to incorporate this into the distribution? In case you need a quick and dirty fix and don't want to mess around with patching and generating files, you can simply add the following code to your document in order to get the same effect. Add it to your preamble *after* loading the color or shadethm packages. \makeatletter \long\def\color@b@x#1#2#3{% \if@rl \beginL\leavevmode \setbox\z@\hbox{\kern\fboxsep{\set@color\beginR#3\endR}\kern\fboxsep}% \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}% \box\z@}}\endL% \else \leavevmode \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}% \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}% \box\z@}}% \fi } \makeatother -Ron. On Mon, 19 Apr 2004, Rama Porrat wrote: > I think a similar problem appeared here some time ago - but I > don't remember exactly. > > The following file displays a nice shaded theorem. Once Hebrew > is used (e.g. enable the \sethebrew before the theorem) the > outcome is bad - a totally black theorem. Can someone help > please? > > Thanks a lot -- Rama. The sty file is attached. > --------------------------------------------------------------- > \documentclass{article} % test of LaTeX package shadethm.sty > \usepackage{shadethm} > \usepackage[hebrew,english]{babel} > \newshadetheorem{theorem}{Theorem}[section] > \begin{document} > Document begins with some initial text. > \section{First Section} > Here is some initial text before the shaded box. > %\sethebrew % Activate this line - the outcome is bad. > \begin{theorem} > This is the text to be shaded. > \end{theorem} > \end{document}

--- hebrew.olddtx Sun Nov 2 18:31:17 2003 +++ hebrew.dtx Tue Apr 20 09:28:08 2004 @@ -245,6 +245,9 @@ % \changes{hebrew~2.3h}{2003/11/02}{ % Modified documentation to reflect new HE8 coding. % (by Ron Artstein)} +% \changes{hebrew~2.3i}{2004/04/20}{ +% Added support for RTL colorboxes in \pkg{rlbabel} +% (by Ron Artstein)} % \section{The Hebrew language}\label{sec:hebrew} % % The file \file{\filename}\footnote{The Hebrew language support @@ -2226,7 +2229,7 @@ % The following code will probably work at least with code that stays in the % same line: % \begin{macro}{@textcolor} -% \begin{macrocode} +% \begin{macrocode} \AtBeginDocument{% %I assume that \@textcolor is only defined by the package color \ifx\@textcolor\@undefined\else% @@ -2241,8 +2244,38 @@ }% \fi% } -% \end{macrocode} +% \end{macrocode} % \end{macro} +% \begin{macro}{\color@b@x} +% Added by Ron, 20 April 2004: A similar fix should be made to the +% command |\color@b@x|, which is used in the definitions of +% |\colorbox| and |\fcolorbox|. +% \begin{macrocode} +\AtBeginDocument{% + % Redefine with bidi support only if \color@b@x has been previously + % defined (presumably by the color package) + \ifx\color@b@x\@undefined\else% + \long\def\color@b@x#1#2#3{% + \if@rl + \beginL\leavevmode + \setbox\z@\hbox{\kern\fboxsep{\set@color\beginR#3\endR}\kern\fboxsep}% + \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ + {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}% + \box\z@}}\endL% + \else + \leavevmode + \setbox\z@\hbox{\kern\fboxsep{\set@color#3}\kern\fboxsep}% + \dimen@\ht\z@\advance\dimen@\fboxsep\ht\z@\dimen@ + \dimen@\dp\z@\advance\dimen@\fboxsep\dp\z@\dimen@ + {#1{#2\color@block{\wd\z@}{\ht\z@}{\dp\z@}% + \box\z@}}% + \fi + }% + \fi +} +% \end{macrocode} +% \end{macro} % \begin{macro}{\thetrueSlideCounter} % This macro probably needs to be overriden for when using |prosper|, % (waiting for feedback. Tzafrir)

Back to: Top of message | Previous page | Main IVRITEX page

LISTSERV.TAU.AC.IL CataList email list search Powered by LISTSERV email list manager