TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I have this LyX file in a language "a", and I picked a text from other file with language "b".

How can I copy the text and be able to have the same language? Because now the copied text have a blue underline, meaning it is from a foreign language. This can be confirmed looking at the source code which has a


Those underlines are very irritating... How can I remove them?

share|improve this question
Choose Edit-> Select All to select the complete document text and then Edit-> Text Style-> Customized.... In the dialog you can change the language of the selected text. Unfortunately, Select All does not really select all of the text (it misses to select some elements inside of floats, e.g., image captions and footnotes), so some manual afterwork is necessary. – Daniel May 18 '12 at 12:24
lool, so simple, yet, so hidden... -.- – J. C. Leitão May 18 '12 at 12:27
Please test if it works for you; I will then turn the comment into an answer. – Daniel May 18 '12 at 12:28
Yes it works. You can post an answer. – J. C. Leitão May 18 '12 at 12:34
up vote 2 down vote accepted

The LyX support for multiple languages is indeed an annoyance if one does not want to switch languages within the same document. I have not yet found a way to specify on the document leven how to have the whole document in just one language, regardless whatever on copy&pastes into it.

As a workaround, I usually proceed as follows:

  • Edit->Select All
  • Edit->Text Style->Customized...
  • In the text style dialog, you can change the language of the selected text.

Unfortunately, Edit->Select All does not really select all text. Float captions and footnotes are not automatically part of the selection. For these parts, some manual afterwork might be necessary.

share|improve this answer
Specifying that the document should just be in one language is a good feature request in my opinion. Please feel free to suggest it: lyx.org/trac. I suppose it would be implemented as a checkbox on Document Settings > Language – scottkosty Aug 5 '13 at 4:36

If you have many floats and superscripts/subscripts, as I had in one of my documents, these will require quite a lot of manual work afterwards. You can use the Linux 'sed' command to edit the Lyx file directly, e.g.:

cat originalFile.lyx | sed -e '/\lang english/d' > fileWithoutLanguage.lyx

You can replace '\lang english' as appropriate.

Obviously there is a clear risk that you might end up screwing your file if you mess around with it outside the editor, but when I tested this on my code it seemed to work. I'd always suggest writing to a different file as I've done here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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