For some reason I don't understand (and that I cannot reproduce), Lyx encloses some text with \textrm{} when using beamer. How can I change this? Changing Edit -> Text Style -> Customised won't do anything.

I cannot reproduce unfortunately how it happens, so cannot give steps on how to recreate it, a minimal file is available here, and this it the outcome, seen with the View Source:

% Preview source code from paragraph 36 to 38





  • What do you mean by not being able to reproduce? Meaning sometimes the same .lyx file produces textrm and sometimes it doesn't? Or meaning you don't know how to recreate a new .lyx file that does it? If you are able to post a minimal example .lyx file i could take a look. By the way, please always give the LyX version that you're using. – scottkosty May 22 '17 at 19:19
  • hi @scottkosty, yes I meant it's not clear how this happens. But I attached a minimal Lyx file then. Thanks! – Matifou May 23 '17 at 16:01
  • Thanks, although I can't answer how the textrm got in there (ping me if you can come up with a way to construct a .lyx file in a way that should not give textrm but does), I can at least answer how to get rid of it. – scottkosty May 24 '17 at 1:38

To remove the \textrm:

  1. Select the text starting with "The yield" and ending with the end of the math equation.

  2. Go to Edit > Text Style > Customized.

  3. In the dialog, change "Family" to "Reset".

This resets the family setting to the default.

| improve this answer | |

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.