2

I am a big fan of Lyx, but find that when I want to include a few Thai words within an English document, things start getting difficult.

There are many solutions posted online, not all of which are easy to follow for non-TeX-experts like myself. Some of the solutions appear not to work with Lyx.

What is the easiest way to insert Thai words into an English Lyx document?

2

After trying several methods, the most efficient way I have found is to do the following:

For all of the following you need to go be in Document Settings, which is in the "Document" menu.

  1. In the "LaTeX Preamble", add this:

    \usepackage{fontspec}
    \setmainfont{Norasi}
    \XeTeXlinebreaklocale ’th_TH’
    
  2. In the "Fonts" section, tick "Use non-TeX fonts (via XeTeX/LuaTeX)".

  3. In the "Output" section, Default Output format box, choose "PDF (XeTeX)".
  4. Press "OK".

When you click "view" or "update" document, you will now see a PDF which should show both Thai and English words correctly.

1

The same issue I had there and babel's \selectlanguage{thai} is easiest in my case.

  1. Go to Document --> Settings --> Language

    • Set Language to Thai.
    • Set Encoding to Other: Thai (TIS 620-0)
    • Set Language Package to Custom and enter \usepackage[main=english,thai]{babel}
  2. At any part of the document where Thai words should appear, insert TeX command (Press CTRL+L) and enter \selectlanguage{thai} and change the language back to English with \selectlanguage{english}, otherwise section headings will be in Thai.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.