4

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

\foreignlanguage{english}{...}

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

3

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.

  • 1
    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
1

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.

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.