LyXLanguage of headings changes when changing platform

Information and discussion about LyX, a WYSIWYM editor, available for Linux, Windows and Mac OS X systems.
Post Reply
gbz28
Posts: 2
Joined: Sun Dec 16, 2012 11:07 pm

Language of headings changes when changing platform

Post by gbz28 »

Hello,

I'm writing my PhD thesis in LyX. I recently installed Ubuntu on my computer, and opened my LyX document, previously created in LyX with MikTeX and Windows, on the Ubuntu computer. When compiling the .pdf document, suddenly the headings, (contents, chapters, etc.) are in French instead of English (i.e. it now says "Table de matières", "Chapitre premier", etc. instead of "Contents", "Chapter 1"). I do have French and German text in the document (marked as so), but the document language is still set to English.

Is there any solution to this, or do I need to go back to Windows to work on this document?

Thanks!

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Language of headings changes when changing platform

Post by Stefan Kottwitz »

Hi,

welcome to the board!

I guess it's caused by a LyX setting. For sure it can be fixed by a simple LyX setting or by a babel (package) command or option. Perhaps post a (reduced) LyX document example here as attachment, which shows the undesired behavior.

Stefan
LaTeX.org admin
User avatar
cgnieder
Site Moderator
Posts: 2000
Joined: Sat Apr 16, 2011 7:27 pm

Language of headings changes when changing platform

Post by cgnieder »

As Stefan suspects LyX has global language settings. You find it in the menu: Tools > Preferences:
language.png
language.png (31.63 KiB) Viewed 3684 times
Regards
site moderator & package author
gbz28
Posts: 2
Joined: Sun Dec 16, 2012 11:07 pm

Language of headings changes when changing platform

Post by gbz28 »

Thanks so much for your help! I tried changing the LyX settings, but that didn't work. In the end, I marked the opening text as "English, UK" rather than the default "English".

That generated a line in the LaTeX preamble which reads:

Code: Select all

\usepackage[british,french,german,english]{babel}
replacing the old one which read:

Code: Select all

\usepackage[french,german,english]{babel}
I think because French was listed first that was why the document headings were in French.

I hope this is useful to others too!
Last edited by cgnieder on Tue Feb 12, 2013 7:14 pm, edited 1 time in total.
Post Reply