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
22 #include "lyxtextclass.h"
23 #include "LaTeXFeatures.h"
27 #include "BranchList.h"
29 #include "insets/insetquotes.h"
31 #include <boost/array.hpp>
39 /** Buffer parameters.
40 This class contains all the parameters for this a buffer uses. Some
41 work needs to be done on this class to make it nice. Now everything
56 /// read a header token, if unrecognised, return it or an unknown class name
57 string const readToken(LyXLex & lex, string const & token);
60 void writeFile(std::ostream &) const;
62 /** \returns true if the babel package is used (interogates
63 the BufferParams and a LyXRC variable).
64 This returned value can then be passed to the insets...
66 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
72 void useClassDefaults();
75 bool hasClassDefaults() const;
78 VSpace const & getDefSkip() const { return defskip; }
81 void setDefSkip(VSpace const & vs) { defskip = vs; }
83 /** Wether paragraphs are separated by using a indent like in
84 articles or by using a little skip like in letters.
86 PARSEP paragraph_separation;
88 InsetQuotes::quote_language quotes_language;
90 InsetQuotes::quote_times quotes_times;
94 lyx::textclass_type textclass;
96 LyXTextClass const & getLyXTextClass() const;
98 /* this are for the PaperLayout */
99 /// the general papersize (papersize2 or paperpackage
100 PAPER_SIZE papersize;
101 /// the selected Geometry papersize
102 VMARGIN_PAPER_TYPE papersize2;
103 /// a special paperpackage .sty-file
104 PAPER_PACKAGES paperpackage;
106 PAPER_ORIENTATION orientation;
128 /* some LaTeX options */
129 /// The graphics driver
130 string graphicsDriver;
140 Language const * language;
142 BranchList branchlist;
150 string float_placement;
152 unsigned int columns;
154 LyXTextClass::PageSides sides;
158 boost::array<Bullet, 4> temp_bullets;
160 boost::array<Bullet, 4> user_defined_bullets;
162 void readPreamble(LyXLex &);
164 void readLanguage(LyXLex &);
166 void readGraphicsDriver(LyXLex &);
168 /// use AMS package, not, or auto
178 bool use_numerical_citations;
179 /// revision tracking for this buffer ?
180 bool tracking_changes;
181 /// Time ago we agreed that this was a buffer property [ale990407]
186 /// map of the file's author IDs to buffer author IDs
187 std::vector<int> author_map;
189 string const dvips_options() const;
191 string const paperSizeName() const;
195 AuthorList authorlist;
199 /** This is the amount of space used for paragraph_separation "skip",
200 and for detached paragraphs in "indented" documents.