2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2001 The LyX Team.
10 * ====================================================== */
12 #ifndef BUFFERPARAMS_H
13 #define BUFFERPARAMS_H
19 #include "lyxtextclass.h"
20 #include "LaTeXFeatures.h"
24 #include "insets/insetquotes.h"
26 #include <boost/array.hpp>
33 /** Buffer parameters.
34 This class contains all the parameters for this a buffer uses. Some
35 work needs to be done on this class to make it nice. Now everything
71 enum VMARGIN_PAPER_TYPE {
103 enum PAPER_ORIENTATION {
105 ORIENTATION_PORTRAIT,
107 ORIENTATION_LANDSCAPE
112 /// read a header token, if unrecognised, return it or an unknown class name
113 string const readToken(LyXLex & lex, string const & token);
116 void writeFile(std::ostream &) const;
119 void writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
122 void setPaperStuff();
125 void useClassDefaults();
128 bool hasClassDefaults() const;
131 VSpace const & getDefSkip() const { return defskip; }
134 void setDefSkip(VSpace const & vs) { defskip = vs; }
136 /** Wether paragraphs are separated by using a indent like in
137 articles or by using a little skip like in letters.
139 PARSEP paragraph_separation;
141 InsetQuotes::quote_language quotes_language;
143 InsetQuotes::quote_times quotes_times;
147 lyx::textclass_type textclass;
149 LyXTextClass const & getLyXTextClass() const;
151 /* this are for the PaperLayout */
152 /// the general papersize (papersize2 or paperpackage
153 char papersize; // add apprip. signedness
154 /// the selected Geometry papersize
155 char papersize2; // add approp. signedness
156 /// a special paperpackage .sty-file
157 char paperpackage; // add approp. signedness
159 PAPER_ORIENTATION orientation; // add approp. signedness
181 /* some LaTeX options */
182 /// The graphics driver
183 string graphicsDriver;
193 Language const * language;
201 string float_placement;
203 unsigned int columns;
205 LyXTextClass::PageSides sides;
209 boost::array<Bullet, 4> temp_bullets;
211 boost::array<Bullet, 4> user_defined_bullets;
213 void readPreamble(LyXLex &);
215 void readLanguage(LyXLex &);
217 void readGraphicsDriver(LyXLex &);
219 /// use AMS package, not, or auto
229 bool use_numerical_citations;
230 /// revision tracking for this buffer ?
231 bool tracking_changes;
232 /// Time ago we agreed that this was a buffer property [ale990407]
235 /// mapping of author IDs
236 std::vector<int> author_ids;
239 AuthorList authorlist;
243 /** This is the amount of space used for paragraph_separation "skip",
244 and for detached paragraphs in "indented" documents.