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.
32 bool Read(LyXLex &, LyXTextClass const &);
34 void readAlign(LyXLex &);
36 void readAlignPossible(LyXLex &);
38 void readLabelType(LyXLex &);
40 void readEndLabelType(LyXLex &);
42 void readMargin(LyXLex &);
44 void readLatexType(LyXLex &);
46 void readSpacing(LyXLex &);
48 std::string const & name() const;
50 void setName(std::string const & n);
52 std::string const & obsoleted_by() const;
54 std::string const & depends_on() const;
56 std::string const & latexname() const { return latexname_; }
58 std::string const & labelstring() const { return labelstring_; }
60 std::string const & endlabelstring() const { return endlabelstring_; }
62 std::string const & preamble() const { return preamble_; }
64 std::string const & latexparam() const { return latexparam_; }
66 std::string const & labelstring_appendix() const {
67 return labelstring_appendix_;
69 /** Default font for this layout/environment.
70 The main font for this kind of environment. If an attribute has
71 LyXFont::INHERITED_*, it means that the value is specified by
72 the defaultfont for the entire layout. If we are nested, the
73 font is inherited from the font in the environment one level
74 up until the font is resolved. The values LyXFont::IGNORE_*
75 and LyXFont::TOGGLE are illegal here.
79 /** Default font for labels.
80 Interpretation the same as for font above
84 /** Resolved version of the font for this layout/environment.
85 This is a resolved version the default font. The font is resolved
86 against the defaultfont of the entire layout.
90 /** Resolved version of the font used for labels.
91 This is a resolved version the label font. The font is resolved
92 against the defaultfont of the entire layout.
96 /// Text that dictates how wide the left margin is on the screen
97 std::string leftmargin;
98 /// Text that dictates how wide the right margin is on the screen
99 std::string rightmargin;
100 /// Text that dictates how much space to leave after a potential label
101 std::string labelsep;
102 /// Text that dictates how much space to leave before a potential label
103 std::string labelindent;
104 /// Text that dictates the width of the indentation of indented pars
105 std::string parindent;
115 float labelbottomsep;
123 LyXAlignment alignpossible;
125 LYX_LABEL_TYPES labeltype;
127 LYX_END_LABEL_TYPES endlabeltype;
129 LYX_MARGIN_TYPE margintype;
135 bool newline_allowed;
146 /// for new environment insets
147 std::string latexheader;
148 /// for new environment insets
149 std::string latexfooter;
150 /// for new environment insets
151 std::string latexparagraph;
153 /** true when the fragile commands in the paragraph need to be
156 /// true when empty paragraphs should be kept.
159 bool isParagraph() const {
160 return latextype == LATEX_PARAGRAPH;
163 bool isCommand() const {
164 return latextype == LATEX_COMMAND;
167 bool isEnvironment() const {
168 return (latextype == LATEX_ENVIRONMENT
169 || latextype == LATEX_BIB_ENVIRONMENT
170 || latextype == LATEX_ITEM_ENVIRONMENT
171 || latextype == LATEX_LIST_ENVIRONMENT);
173 /// Type of LaTeX object
174 LYX_LATEX_TYPES latextype;
175 /// Does this object belong in the title part of the document?
177 /// Does this layout allow for an optional parameter?
179 /// Which counter to step
183 /// Name of the layout/paragraph environment
186 /** Name of an layout that has replaced this layout.
187 This is used to rename a layout, while keeping backward
190 std::string obsoleted_by_;
192 /** Name of an layout which preamble must come before this one
193 This is used when the preamble snippet uses macros defined in
196 std::string depends_on_;
198 /// LaTeX name for environment
199 std::string latexname_;
200 /// Label string. "Abstract", "Reference", "Caption"...
201 std::string labelstring_;
203 std::string endlabelstring_;
204 /// Label string inside appendix. "Appendix", ...
205 std::string labelstring_appendix_;
206 /// LaTeX parameter for environment
207 std::string latexparam_;
208 /// Macro definitions needed for this layout
209 std::string preamble_;