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 "BranchList.h"
26 #include "insets/insetquotes.h"
28 #include <boost/array.hpp>
36 /** Buffer parameters.
37 This class contains all the parameters for this a buffer uses. Some
38 work needs to be done on this class to make it nice. Now everything
53 /// read a header token, if unrecognised, return it or an unknown class name
54 string const readToken(LyXLex & lex, string const & token);
57 void writeFile(std::ostream &) const;
59 /** \returns true if the babel package is used (interogates
60 the BufferParams and a LyXRC variable).
61 This returned value can then be passed to the insets...
63 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
69 void useClassDefaults();
72 bool hasClassDefaults() const;
75 VSpace const & getDefSkip() const { return defskip; }
78 void setDefSkip(VSpace const & vs) { defskip = vs; }
80 /** Wether paragraphs are separated by using a indent like in
81 articles or by using a little skip like in letters.
83 PARSEP paragraph_separation;
85 InsetQuotes::quote_language quotes_language;
87 InsetQuotes::quote_times quotes_times;
91 lyx::textclass_type textclass;
93 LyXTextClass const & getLyXTextClass() const;
95 /* this are for the PaperLayout */
96 /// the general papersize (papersize2 or paperpackage
98 /// the selected Geometry papersize
99 VMARGIN_PAPER_TYPE papersize2;
100 /// a special paperpackage .sty-file
101 PAPER_PACKAGES paperpackage;
103 PAPER_ORIENTATION orientation;
125 /* some LaTeX options */
126 /// The graphics driver
127 string graphicsDriver;
137 Language const * language;
139 BranchList branchlist;
147 string float_placement;
149 unsigned int columns;
151 LyXTextClass::PageSides sides;
155 boost::array<Bullet, 4> temp_bullets;
157 boost::array<Bullet, 4> user_defined_bullets;
159 void readPreamble(LyXLex &);
161 void readLanguage(LyXLex &);
163 void readGraphicsDriver(LyXLex &);
165 /// use AMS package, not, or auto
175 bool use_numerical_citations;
176 /// revision tracking for this buffer ?
177 bool tracking_changes;
178 /// Time ago we agreed that this was a buffer property [ale990407]
183 /// map of the file's author IDs to buffer author IDs
184 std::vector<int> author_map;
186 string const dvips_options() const;
188 string const paperSizeName() const;
192 AuthorList authorlist;
196 /** This is the amount of space used for paragraph_separation "skip",
197 and for detached paragraphs in "indented" documents.