On Sat, May 29, 2010 at 07:24:17PM +0300, Amir Rachum wrote:

> Hi all,
> 
> I'm writing a document of type article(hebrew) and some of the sections in
> it are in English.
> LyX's output pdf prints the section name ok in the document itself, but it
> prints it backwards in the table of contents.
> This seems like a bug and not user misuse, so I am posting this here.
> I'm attaching a minimally reproducing example and pdf (in case you don't
> have Hebrew fonts).
> 
> Also, I have never seen LyX's code, but I was going to try to get involved
> anyway,
> so if this is an easy fix and you can give me some pointers on how to fix
> this, I would be willing to patch this myself.

The problem here is that language changing commands cannot occur in
sections, so LyX is outputting \seleclanguage{english} outside of the
\section command and thus the toc entry turns out to be in hebrew.
Try forcing use of the \L macro, for example by inserting an empty ERT
in hebrew language inside the section. See attached example (I cannot
test it as I don't have the necessary fonts).

-- 
Enrico
#LyX 1.6.6.1 created this file. For more info see http://www.lyx.org/
\lyxformat 345
\begin_document
\begin_header
\textclass heb-article
\begin_preamble

\end_preamble
\use_default_options true
\language hebrew
\inputencoding cp1255
\font_roman default
\font_sans default
\font_typewriter default
\font_default_family default
\font_sc false
\font_osf false
\font_sf_scale 100
\font_tt_scale 100

\graphics default
\paperfontsize default
\spacing single
\use_hyperref false
\papersize default
\use_geometry true
\use_amsmath 1
\use_esint 1
\cite_engine basic
\use_bibtopic false
\paperorientation portrait
\leftmargin 2.5cm
\topmargin 2cm
\rightmargin 2.5cm
\bottommargin 5cm
\secnumdepth 3
\tocdepth 3
\paragraph_separation skip
\defskip medskip
\quotes_language english
\papercolumns 1
\papersides 1
\paperpagestyle default
\tracking_changes false
\output_changes false
\author "" 
\author "" 
\end_header

\begin_body

\begin_layout Standard
\begin_inset CommandInset toc
LatexCommand tableofcontents

\end_inset


\end_layout

\begin_layout Section
\begin_inset ERT
status collapsed

\begin_layout Plain Layout

\end_layout

\end_inset


\lang english
section title
\end_layout

\end_body
\end_document

Reply via email to