[XeTeX] Restoring text to the default English font in Latex/fontspec/Bidi

sjo sjo222 at gmail.com
Fri Sep 21 06:33:57 CEST 2007


Dear François:

Thanks for your advice which has been most helpful. I now have
footnotes working correctly (see below).

There are some further questions. The whole page is not centered (i.e.
equal left and right margins but is pushed over to the right). I don't
remember this as being standard for article style. See attached PDF.

There is also a space between the footnote number and the start of the
text of the footnote.

Also the English footnote number is indented while the Hebrew footnote
number is not.

Thanks for your help once more.

Jon

===
\documentclass[12pt]{article}
\usepackage{fontspec}
\usepackage{xunicode,xltxtra}
\usepackage{bidi}
\newfontfamily\ezra[Script=Hebrew]{Ezra SIL}
\newenvironment{Hebrew}{\setRL\ezra}{\unsetRL}

%Stuff for the footnote ruler
\makeatletter
\renewcommand{\footnoterule}{\kern-3\p@
\hrule width \textwidth \kern 2.6\p@}
\makeatother
%\renewcommand{\footnoterule}{\vspace{4mm}\rule{\textwidth}{.09mm}\vspace{1mm}}
\def\hfootnote#1{\footnote{\ezra #1}}

\begin{document}

Hello in English\footnote{This is an english footnote} including an
English footnote.

Let's try some Hebrew with a Hebrew footnote.

\begin{Hebrew}
תוכנת\footnote{\ezra
עולות אלפי שקלים, וכן קשה מ
}
\end{Hebrew}

We are now back in English mode and an english footnote\footnote{footnote 2}.

Let's try some more Hebrew with a second Hebrew footnote.

\begin{Hebrew}
תוכנת\hfootnote{
עולות אלפי שקלים, וכן קשה מ 2
}
\end{Hebrew}


\end{document}
===

On 9/18/07, François Charette <firmicus at ankabut.net> wrote:
> sjo a écrit :
> > Dear François:
> >
> > Thank you for your help. The Hebrew environment works well. Is there a
> > way to define a \newfontfamily for the standard CMR fonts so that we
> > can always reset it that way?
> >
> >
> I am not sure I understand your question, but perhaps Will does!
>
> > Also, I have discovered that there is a problem with footnotes in
> > Hebrew. The little file below shows the problem (PDF attached).
> >
> >
> This is because you have to specify the Hebrew font at the beginning of
> the footnote as well:
>
> \footnote{\ezra אלו עולות אלפי שקלים, וכן קשה מ}
>
>
>
> > ===
> >
> > \documentclass[12pt]{article}
> > \usepackage{fontspec}
> > \usepackage{xunicode,xltxtra}
> > \usepackage{bidi}
> > \newfontfamily\ezra[Script=Hebrew]{Ezra SIL}
> > \newenvironment{Hebrew}{\setRL\ezra}{\unsetRL}
> > \renewcommand{\footnoterule}{\vspace{4mm}\rule{\textwidth}{.09mm}\vspace{1mm}}
> >
> You must change the last line above to something like :
>
> \makeatletter
> \renewcommand{\footnoterule}{\kern-3\p@
> \hrule width \textwidth \kern 2.6\p@}
> \makeatother
>
> (this is taken from the TeXbook IIRC).
>
>
>
> _______________________________________________
> XeTeX mailing list
> postmaster at tug.org
> http://tug.org/mailman/listinfo/xetex
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xetex-footnote.pdf
Type: application/pdf
Size: 27664 bytes
Desc: not available
Url : http://tug.org/pipermail/xetex/attachments/20070921/176bc740/attachment-0001.pdf 


More information about the XeTeX mailing list