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"
25 #include "insets/insetquotes.h"
27 #include <boost/array.hpp>
35 /** Buffer parameters.
36 This class contains all the parameters for this a buffer uses. Some
37 work needs to be done on this class to make it nice. Now everything
52 /// read a header token, if unrecognised, return it or an unknown class name
53 string const readToken(LyXLex & lex, string const & token);
56 void writeFile(std::ostream &) const;
58 /** \returns true if the babel package is used (interogates
59 the BufferParams and a LyXRC variable).
60 This returned value can then be passed to the insets...
62 bool writeLaTeX(std::ostream &, LaTeXFeatures &, TexRow &) const;
68 void useClassDefaults();
71 bool hasClassDefaults() const;
74 VSpace const & getDefSkip() const { return defskip; }
77 void setDefSkip(VSpace const & vs) { defskip = vs; }
79 /** Wether paragraphs are separated by using a indent like in
80 articles or by using a little skip like in letters.
82 PARSEP paragraph_separation;
84 InsetQuotes::quote_language quotes_language;
86 InsetQuotes::quote_times quotes_times;
90 lyx::textclass_type textclass;
92 LyXTextClass const & getLyXTextClass() const;
94 /* this are for the PaperLayout */
95 /// the general papersize (papersize2 or paperpackage
97 /// the selected Geometry papersize
98 VMARGIN_PAPER_TYPE papersize2;
99 /// a special paperpackage .sty-file
100 PAPER_PACKAGES paperpackage;
102 PAPER_ORIENTATION orientation;
124 /* some LaTeX options */
125 /// The graphics driver
126 string graphicsDriver;
136 Language const * language;
144 string float_placement;
146 unsigned int columns;
148 LyXTextClass::PageSides sides;
152 boost::array<Bullet, 4> temp_bullets;
154 boost::array<Bullet, 4> user_defined_bullets;
156 void readPreamble(LyXLex &);
158 void readLanguage(LyXLex &);
160 void readGraphicsDriver(LyXLex &);
162 /// use AMS package, not, or auto
172 bool use_numerical_citations;
173 /// revision tracking for this buffer ?
174 bool tracking_changes;
175 /// Time ago we agreed that this was a buffer property [ale990407]
180 /// map of the file's author IDs to buffer author IDs
181 std::vector<int> author_map;
183 string const dvips_options() const;
185 string const paperSizeName() const;
189 AuthorList authorlist;
193 /** This is the amount of space used for paragraph_separation "skip",
194 and for detached paragraphs in "indented" documents.