Lyx-2.2.0, article template and newbie in LyX and LaTeX.

Planning to use LyX for office needs, like reports, letters, code listings etc. So I need to customize (create new template, based on default) 'article' template to make document view I need.

Many things can be set via GUI of Lyx. But some - I can't find where to and how to...

The thing I need to change is: all space between items in all lists, between end of paragraph and beginning of new one has to be of equal line spacing. No matter of type of text is: regular text, paragraphs, listings, code, ...

How can I customize template?

1 Answer 1


You can define your own LyX Layout file and place it in /usr/share/lyx/layouts
(respectively %APPDATA%\LyX*\resources\layouts for windows)

Creating this file is a mixture of LaTeX definitions and LyX configuration options. Currently you only want to redefine some global variables, but maybe you want to add your own custom styles later!

Find more about creating layouts in the LyX wiki.

Don't forget to run "Re-configure LyX" from the menu after installing a new Layout file. Select your new layout afterwards in the Document Settings.

Here is an example of a simple extension of the standard article class/layout file.

#% Do not delete the line below; configure depends on this
#  \DeclareLaTeXClass[article]{Your custom Layoutname}

Format 35

# important: include the default "article" layout, we want to extend it
Input article.layout

# global document settings in LaTeX preamble
    % remove indentation for paragraphs ?
    % \setlength{\parindent}{0mm}

    % set spacing between paragraphs

    % set spacing between items in lists

# Just in case you want to create a custom style:
Style My_Custom_Adress
    CopyStyle                Standard
    Align                    Left
    AlignPossible            Left
    # more M = more margin :-)
    LeftMargin               MMMMMMM
    ParSep                   1.2
    TopSep                   0.6
    BottomSep                0.6
    # we tell LyX that we use a custom LaTeX command
    LatexType                Command
    LatexName                myaddressindent
        % and define it in the LaTeX preamble for rendering
                #1 \par
  • 1
    Thanks a lot for information. Later, I'll briefly read about Lyx layouts, try layout example you've posted and will post layout I need to (in case somebody will need the same)
    – Someone
    Jul 30, 2016 at 11:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .