I tried to use the fix by just copying the \def section before the \begin{document}
I got this error: ) (./introduction.tex [1] [2] Chapter 1. ! You can't use `\spacefactor' in vertical mode. [EMAIL PROTECTED]>\spacefactor [EMAIL PROTECTED] l.3 \label{Section:Introduction} Is there anything else I should include? I am using the hebtech documentclass with encoding enc8859-8. and basically the thesis.tex from the example in ivritex. (without the inputenc because it doesn't compile with it) Regards, tzahi. > -----Original Message----- > From: Tzafrir Cohen [mailto:[EMAIL PROTECTED] > Sent: Saturday, May 06, 2006 3:55 PM > To: Tzahi Fadida > Cc: linux-il@linux.org.il > Subject: Re: hebtech and elatex. > > Sorry for the delayed response. Just got back to reading email. > > Short summary: I have a lame workaround below. > > On Tue, May 02, 2006 at 12:32:46AM +0200, Tzahi Fadida wrote: > > There is a known issue in ivritex that > > when you put \ref in an equation environment or $ $ > > you get an error in the second run of elatex. > > That i, after references are expanded. > > > > > I use a lot something like this: > > \newcommand{\SFDPRE}{\ref{fig:alg:a}:\ref{fig:alg:b}} > > > > \begin{equation}% > > X_{\SFDPRE} = 2s% > > \end{equation}% > > > > What can I do to either solve it or circumvent it. When I look > > in the hebtech.cls I can't find something that changes the > equation environment. > > It is hebrew.ldf and the changes are generally around the > contents that > \label saves. > > > I have a hunch it is connected somehow to what they do to > the .aux file. It does not > > look like a regular .aux file and the error only happens on > the second run. > > I think they also mess with the \ref tag, as I see in > hebrew.dtx but I don't know where it finally > > goes. > > > > Maybe there is a way to do early binding of \SFDPRE to some > text variable and then put it in the > > equation?... > > > I wrote the following test document: > > \documentclass{article} > \usepackage{ucs} > \usepackage[utf8x]{inputenc} > \usepackage[english,hebrew]{babel} > \newcommand{\SFDPRE}{\ref{fig:alg:a}:\ref{fig:alg:b}} > \begin{document} > > \begin{figure}[h] > איור ראשון > \label{fig:alg:a} > \end{figure} > > \begin{figure}[h] > איור שני > \label{fig:alg:b} > \end{figure} > > \begin{equation} > X_{\SFDPRE} = 2s > \end{equation} > > \end{document} > > > There seem to be problems indeed. You're looking at slightly the wrong > place: the contents of the .aux file is written from the > command \label > at the first run. Indeed a simple workaround for the above file is: > > > Document with a workaround: > > \documentclass{article} > \usepackage{ucs} > \usepackage[utf8x]{inputenc} > \usepackage[english,hebrew]{babel} > \newcommand{\SFDPRE}{\ref{fig:alg:a}:\ref{fig:alg:b}} > \makeatletter > % \label is originally defined in latex.ltx. redefined in hebrew.ldf . > % [EMAIL PROTECTED] is defined/redefined in latex.ltx > [EMAIL PROTECTED] > [EMAIL PROTECTED] > [EMAIL PROTECTED]@enumii)\theenumii(}% > [EMAIL PROTECTED]@auxout{}% > % The change is here: replaced \beginR [EMAIL PROTECTED] \endR > % with: [EMAIL PROTECTED] > % - This made it pass latex, but numbers are not displayed. > [EMAIL PROTECTED] > % If we get rid of the label word itself the number shows up: > {\string\newlabel{#1}{{\thepage}}}% > \else > [EMAIL PROTECTED]@enumii(\theenumii)}% > [EMAIL PROTECTED]@auxout{}% > > [EMAIL PROTECTED] > \fi > [EMAIL PROTECTED] > \makeatother > \begin{document} > > \begin{figure}[h] > איור ראשון > \label{fig:alg:a} > \end{figure} > > \begin{figure}[h] > איור שני > \label{fig:alg:b} > \end{figure} > > \begin{equation} > X_{\SFDPRE} = 2s > \end{equation} > > \end{document} > > -- Tzafrir > > ================================================================To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]