I'm not sure, if I'm just overlooking a simple preference setting or if what I would like to achieve is possible at all...
Anyway, I recently created a LaTeX class file (it's based on scrbook from the KOMA-Script package, but that might be beside the point) that looks like that:
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{MyBook}[2016/06/03 My Book Class]
\LoadClass[
paper=17cm:22cm,
DIV=12,
twoside,
fontsize=9pt,
toc=flat
]{scrbook}
(...skipping a few more adjustments...)
I then created a LyX layout file by simply copying the contents of the original file scrbook.layout:
#% Do not delete the line below; configure depends on this
# \DeclareLaTeXClass{MyBook}
Format 35
Input scrclass.inc
Input numreport.inc
Sides 2
PageStyle Headings
NoStyle Abstract
Style Chapter
LabelString "\thechapter"
TocLevel 0
End
# Equations are numbered by chapter
Counter equation
Within chapter
LabelString "\thechapter.\arabic{equation}"
End
Style Bibliography
TopSep 4
LabelString "Bibliography"
LabelFont
Series Bold
Size Largest
EndFont
End
I put the files into the correct directories, reconfigured LyX and so far, everything is working perfectly.
...well, except for the fact that LyX seems to ignore both the paper size (set as 17cm:22cm) and the margins (defined by setting DIV=12). Instead LyX always uses A4 for the paper size and standard margins (not sure how big). I'm assuming that LyX takes these from its own set of preferences, instead of honoring the class settings.
I could, of course, define the paper size and the margins in the preferences of the LyX document itself. However, I would like to give the class definition to several authors, without them having to do any further adjustments in the preferences. So, I would really prefer to define the paper size and the margins in a more central place.
Is this possible? Any help would be much appreciated. Thanks in advance!
geometryby default. It will override stuff. – Johannes_B Jun 04 '16 at 13:12geometryisn't used. Not sure, if I checked all possible places, though.) – Marcus C. Jun 04 '16 at 13:22\PassOptionsToPackageto work, but the second one, using\KOMAoptionsworked well. Thanks again for your help. – Marcus C. Jun 04 '16 at 13:59