4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Lars Gullik Bjønnes
8 * \author Jean-Marc Lasgouttes
11 * Full author contact details are available in file CREDITS.
31 bool Read(LyXLex &, LyXTextClass const &);
33 void readAlign(LyXLex &);
35 void readAlignPossible(LyXLex &);
37 void readLabelType(LyXLex &);
39 void readEndLabelType(LyXLex &);
41 void readMargin(LyXLex &);
43 void readLatexType(LyXLex &);
45 void readSpacing(LyXLex &);
47 string const & name() const;
49 void setName(string const & n);
51 string const & obsoleted_by() const;
53 string const & depends_on() const;
55 string const & latexname() const { return latexname_; }
57 string const & labelstring() const { return labelstring_; }
59 string const & endlabelstring() const { return endlabelstring_; }
61 string const & preamble() const { return preamble_; }
63 string const & latexparam() const { return latexparam_; }
65 string const & labelstring_appendix() const {
66 return labelstring_appendix_;
68 /** Default font for this layout/environment.
69 The main font for this kind of environment. If an attribute has
70 LyXFont::INHERITED_*, it means that the value is specified by
71 the defaultfont for the entire layout. If we are nested, the
72 font is inherited from the font in the environment one level
73 up until the font is resolved. The values LyXFont::IGNORE_*
74 and LyXFont::TOGGLE are illegal here.
78 /** Default font for labels.
79 Interpretation the same as for font above
83 /** Resolved version of the font for this layout/environment.
84 This is a resolved version the default font. The font is resolved
85 against the defaultfont of the entire layout.
89 /** Resolved version of the font used for labels.
90 This is a resolved version the label font. The font is resolved
91 against the defaultfont of the entire layout.
95 /// Text that dictates how wide the left margin is on the screen
97 /// Text that dictates how wide the right margin is on the screen
99 /// Text that dictates how much space to leave after a potential label
101 /// Text that dictates how much space to leave before a potential label
103 /// Text that dictates the width of the indentation of indented pars
114 float labelbottomsep;
122 LyXAlignment alignpossible;
124 LYX_LABEL_TYPES labeltype;
126 LYX_END_LABEL_TYPES endlabeltype;
128 LYX_MARGIN_TYPE margintype;
134 bool newline_allowed;
143 /// for new environment insets
145 /// for new environment insets
147 /// for new environment insets
148 string latexparagraph;
150 /** true when the fragile commands in the paragraph need to be
153 /// true when empty paragraphs should be kept.
156 bool isParagraph() const {
157 return latextype == LATEX_PARAGRAPH;
160 bool isCommand() const {
161 return latextype == LATEX_COMMAND;
164 bool isEnvironment() const {
165 return (latextype == LATEX_ENVIRONMENT
166 || latextype == LATEX_BIB_ENVIRONMENT
167 || latextype == LATEX_ITEM_ENVIRONMENT
168 || latextype == LATEX_LIST_ENVIRONMENT);
170 /// Type of LaTeX object
171 LYX_LATEX_TYPES latextype;
172 /// Does this object belong in the title part of the document?
174 /// Does this layout allow for an optional parameter?
178 /// Name of the layout/paragraph environment
181 /** Name of an layout that has replaced this layout.
182 This is used to rename a layout, while keeping backward
185 string obsoleted_by_;
187 /** Name of an layout which preamble must come before this one
188 This is used when the preamble snippet uses macros defined in
193 /// LaTeX name for environment
195 /// Label string. "Abstract", "Reference", "Caption"...
198 string endlabelstring_;
199 /// Label string inside appendix. "Appendix", ...
200 string labelstring_appendix_;
201 /// LaTeX parameter for environment
203 /// Macro definitions needed for this layout