mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
6b49b6b129
This makes the defaults of Inset::inheritFont() and Inset::resetFontEdit() compatible. There is no user visible change except for the Chunk inset which does not produce invalid LaTeX after editing operations anymore. This is the safe version for 2.1.0, for later there are still open questions: - All insets with ResetsFont true should be audited: Is this really needed, or do they show similar editing problems as the Chunk inset? - Does inheritFont() need to be customizable in the layout file as well? - Is resetFontEdit() != !inheritFont() needed at all? I did not use change tracking for the docs, since I updated all existing translations.
139 lines
3.2 KiB
Plaintext
139 lines
3.2 KiB
Plaintext
#% Do not delete the line below; configure depends on this
|
|
# \DeclareLaTeXClass[scrbook]{Recipe Book}
|
|
# \DeclareCategory{Books}
|
|
# Recipe textclass definition file.
|
|
# Author: Sandor Szoke (alex@lyx.hu)
|
|
#
|
|
# The \part, \chapter, \section and \subsection commands
|
|
# work as usual; \subsubsection commands are used for
|
|
# ``recipes'' as units, and are not numbered but (by
|
|
# default) entered in the .toc file.
|
|
#
|
|
# The recipe (a.k.a. subsubsection header) is typeset in
|
|
# a style defined with the command \rechead; the default
|
|
# is Large, horizontally centered, bold sans-serif: and
|
|
# the user can change that setting with a suitable
|
|
# \renewcommand{\rechead} .
|
|
#
|
|
# If e.g. \section and \subsection commands are not used
|
|
# in the text, the large indentation of the \subsubsection
|
|
# items in the Table of Contents may be ugly; for that case,
|
|
# we redefine \l@subsubsection .
|
|
#
|
|
# A specific command \recipe{...} is defined as an alias
|
|
# for a \subsubsection{...} followed by two rules across
|
|
# the whole page and by a vertical space.
|
|
#
|
|
# Another command, \ingred{...}, is defined to typeset a
|
|
# list of ingredients.
|
|
|
|
Format 49
|
|
Input scrclass.inc
|
|
Input numreport.inc
|
|
|
|
# Global parameters.
|
|
SecNumDepth 2
|
|
TocDepth 3
|
|
PageStyle Headings
|
|
|
|
# There is no abstract environment in scrbook.cls
|
|
NoStyle Abstract
|
|
|
|
Style Chapter
|
|
LabelString "\thechapter"
|
|
TocLevel 0
|
|
End
|
|
|
|
Style Bibliography
|
|
TopSep 4
|
|
LabelString "Bibliography"
|
|
LabelFont
|
|
Series Bold
|
|
Size Largest
|
|
EndFont
|
|
End
|
|
|
|
Preamble
|
|
\newcommand{\rechead}
|
|
{\centering\normalfont\Large\sffamily\bfseries}
|
|
|
|
\renewcommand{\subsubsection}
|
|
{\@startsection{subsubsection}{3}{\z@}%
|
|
{-5ex\@plus -1ex \@minus -.2ex}%
|
|
{1.5ex \@plus .2ex}%
|
|
{\rechead}}
|
|
|
|
\newcommand{\recipe}[1]{\subsubsection{#1}%
|
|
\hrule height0.75pt width\hsize\vspace*{1\p@}%
|
|
\hrule height0.25pt width\hsize%
|
|
\nobreak
|
|
\vskip\parskip}
|
|
|
|
\newcommand{\inghead}[1][]{\large\textbf{Ingredients#1}:}
|
|
\newcommand{\ingred}[2][]
|
|
{{\list{}{\rightmargin 1em\leftmargin 1em}%
|
|
\item[]\textit{\inghead[#1]} #2\endlist}%
|
|
\hrule height0.25pt width\hsize}
|
|
EndPreamble
|
|
|
|
Style Recipe
|
|
LatexType Command
|
|
LatexName recipe
|
|
Margin Static
|
|
LeftMargin Ingredients_for_some:xx
|
|
LabelSep xx
|
|
LabelType Static
|
|
LabelString "Recipe:"
|
|
Align Center
|
|
LabelFont
|
|
Family Sans
|
|
Size Large
|
|
Series Bold
|
|
Shape Italic
|
|
Color red
|
|
EndFont
|
|
End
|
|
|
|
# Subsubsection style definition
|
|
Style Subsubsection
|
|
LatexType Command
|
|
LatexName subsubsection
|
|
ParSkip 0.4
|
|
TopSep 0.9
|
|
BottomSep 0.5
|
|
ParSep 0.5
|
|
Align Block
|
|
AlignPossible Block
|
|
Font
|
|
Size Small
|
|
EndFont
|
|
TocLevel 3
|
|
End
|
|
|
|
# Inghead style definition
|
|
Style Ingredients
|
|
LatexType Command
|
|
LatexName ingred
|
|
Argument 1
|
|
LabelString "Ingredients Header"
|
|
Tooltip "Specify an optional ingredients header"
|
|
EndArgument
|
|
Margin Static
|
|
LeftMargin Ingredients_for_some:xx
|
|
LabelSep xx
|
|
Align Left
|
|
AlignPossible Left, Block
|
|
LabelType Static
|
|
LabelString "Ingredients:"
|
|
LabelFont
|
|
Series Bold
|
|
Shape Italic
|
|
Color red
|
|
EndFont
|
|
Preamble
|
|
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3em}{0em}}
|
|
\setlength\parindent{0pt}
|
|
\setlength\parskip{2ex plus 0.5ex}
|
|
EndPreamble
|
|
End
|