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
10 * \author André Pönitz
12 * Full author contact details are available in file CREDITS.
15 #ifndef BUFFERPARAMS_H
16 #define BUFFERPARAMS_H
18 #include "support/std_string.h"
22 #include "lyxtextclass.h"
25 #include "BranchList.h"
27 #include "insets/insetquotes.h"
29 #include <boost/array.hpp>
37 /** Buffer parameters.
38 This class contains all the parameters for this a buffer uses. Some
39 work needs to be done on this class to make it nice. Now everything
54 /// read a header token, if unrecognised, return it or an unknown class name
55 string const readToken(LyXLex & lex, string const & token);
58 void writeFile(std::ostream &) const;
60 /** \returns true if the babel package is used (interogates
61 the BufferParams and a LyXRC variable).
62 This returned value can then be passed to the insets...
64 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
70 void useClassDefaults();
73 bool hasClassDefaults() const;
76 VSpace const & getDefSkip() const { return defskip; }
79 void setDefSkip(VSpace const & vs) { defskip = vs; }
81 /** Wether paragraphs are separated by using a indent like in
82 articles or by using a little skip like in letters.
84 PARSEP paragraph_separation;
86 InsetQuotes::quote_language quotes_language;
88 InsetQuotes::quote_times quotes_times;
92 lyx::textclass_type textclass;
94 LyXTextClass const & getLyXTextClass() const;
96 /* this are for the PaperLayout */
97 /// the general papersize (papersize2 or paperpackage
99 /// the selected Geometry papersize
100 VMARGIN_PAPER_TYPE papersize2;
101 /// a special paperpackage .sty-file
102 PAPER_PACKAGES paperpackage;
104 PAPER_ORIENTATION orientation;
126 /* some LaTeX options */
127 /// The graphics driver
128 string graphicsDriver;
138 Language const * language;
140 BranchList branchlist;
148 string float_placement;
150 unsigned int columns;
152 LyXTextClass::PageSides sides;
156 boost::array<Bullet, 4> temp_bullets;
158 boost::array<Bullet, 4> user_defined_bullets;
160 void readPreamble(LyXLex &);
162 void readLanguage(LyXLex &);
164 void readGraphicsDriver(LyXLex &);
166 /// use AMS package, not, or auto
176 bool use_numerical_citations;
177 /// revision tracking for this buffer ?
178 bool tracking_changes;
179 /// Time ago we agreed that this was a buffer property [ale990407]
184 /// map of the file's author IDs to buffer author IDs
185 std::vector<int> author_map;
187 string const dvips_options() const;
189 string const paperSizeName() const;
193 AuthorList authorlist;
197 /** This is the amount of space used for paragraph_separation "skip",
198 and for detached paragraphs in "indented" documents.