Lyx – How to Do Own Typesetting and Still Use Ctrl-M in Lyx

lyx

I'm a new Lyx user, and yes I've read the tutorial.

Lyx won't let you add two spaces or two blank lines when you want to. If you switch to Verbatim font, then you type as you please but ctrl-m is disabled so you have to use Insert->Inline Eqn which is slow and irritating. Is there any way defeat these irritating features, so that I can type what I want to type but also us ctrl-m?

EDIT: Either enabling spaces in Standard or storing ctrl-M in Verbatim would work. Or if there is some other setting that let's both work at the same time.

Best Answer

As you're not exporting to any other format, it's probably more OK to ignore the LaTeX side of things. In the case that PDF is a desired output, the LaTeX side should not be ignored, and see the old answer below.

Go to Document --> Settings --> Local Layout, and add the following:

Style Standard
    Category              MainText
    Margin                Static
    LatexType             Paragraph
    LatexName             dummy
    ParIndent             MM
    ParSkip               0.4
    Align                 Block
    AlignPossible         Block, Left, Right, Center
    LabelType             No_Label
    FreeSpacing           1
    KeepEmpty       1
End

This modifies the Standard style to allow multiple spaces (FreeSpacing 1) and empty paragraphs (KeepEmpty 1). This will allow you to add spaces and newlines as you will, while not disabling math mode.

I guess the Save as document defaults button will make this default for new documents as well.

Old answer

Well you can, but in general you probably shouldn't. There will probably be better ways of achieving what you're actually trying to do. That said:

  • Adding multiple spaces can be done with Ctrl + Space (the LaTeX equivalent is inserting a ~).
  • Adding multiple line breaks can be done with Ctrl + enter, with the caveat that it doesn't work in an empty paragraph (the LaTeX equivalent is adding a \\)
Related Question