]> git.lyx.org Git - lyx.git/blob - src/outputparams.h
speedup latex export a lot
[lyx.git] / src / outputparams.h
1 // -*- C++ -*-
2 /**
3  * \file outputparams.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  *  \author Angus Leeming
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef OUTPUTPARAMS_H
13 #define OUTPUTPARAMS_H
14
15 #include <string>
16
17 #include "support/types.h"
18 #include <boost/shared_ptr.hpp>
19
20
21 class ExportData;
22
23
24 struct OutputParams {
25         //
26         enum FLAVOR {
27                 LATEX,
28                 PDFLATEX,
29                 XML
30         };
31
32         OutputParams();
33         ~OutputParams();
34
35         /** The latex that we export depends occasionally on what is to
36             compile the file.
37         */
38         FLAVOR flavor;
39
40         /** Are we to write a 'nice' LaTeX file or not.
41             This esentially seems to mean whether InsetInclude, InsetGraphics
42             and InsetExternal should add the absolute path to any external
43             files or not.
44         */
45         bool nice;
46
47         /** moving_arg == true means that the environment in which the inset
48             is typeset is a moving argument. The inset should take care about
49             fragile commands by preceding the latex with \protect.
50         */
51         bool moving_arg;
52
53         /** intitle == true means that the environment in which the
54             inset is typeset is part of a title (before a \maketitle).
55             Footnotes in such environments have moving arguments.
56         */
57         bool intitle;
58
59         /** the babel name of the language at the point where the inset is
60          */
61         std::string lang;
62
63         /** free_spacing == true means that the inset is in a free-spacing
64             paragraph.
65         */
66         bool free_spacing;
67
68         /** This var is set by the return value from BufferParams::writeLaTeX
69         */
70         bool use_babel;
71
72         /** Used for docbook to see if inside a region of mixed content.
73             In that case all the white spaces are significant and cannot appear
74             at the begin or end.
75         */
76         bool mixed_content;
77
78         /** Line length to use with ascii export.
79         */
80         lyx::size_type linelen;
81
82         /** Export data filled in by the latex(), docbook() etc methods.
83             This is a hack: Make it possible to add stuff to constant
84             OutputParams instances.
85         */
86         boost::shared_ptr<ExportData> exportdata;
87 };
88
89 #endif // NOT OUTPUTPARAMS_H