Hello,

I checked the pdf export of the French version of the Custolization manual, and I discovered a number of extra spaces after constructs where a word remained in English inside a Flex inset, e.g.:

\begin_inset Flex Code
status collapsed

\begin_layout Plain Layout

\lang english
word
\end_layout

\end_inset

This exports as

\code{\selectlanguage{english}%
word\selectlanguage{french}
}

If I turn the word in English outside the Flex inset, the exported code is

 \foreignlanguage{english}{\code{word}}

and the extra space disappears.

So a correct export in the first case would be

\code{\foreignlanguage{english}{word}}

Attached is a simple example.

I checked with other Flex insets (emphasize and such), same behaviour.

Does this deserve a ticket ?

Note that if I reverse languages (main language English, foreign language French), I get also an extra space *before* the word, even with the corrected version, but the latter is anyway better than the former. This seems an issue with babel itself, so LyX should not try to correct it, but IMHO LyX must export the best latex construct, and \selectlanguage does not seem appropriate inside a sentence (does not work well on a single word outside a Flex inset).

--
Jean-Pierre

Attachment: test_foreign_in_Flex.lyx
Description: application/lyx

Reply via email to