]> git.lyx.org Git - lyx.git/blob - src/outputparams.h
minimal effort implementation of:
[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 class LyXFont;
23
24
25 class OutputParams {
26 public:
27         enum FLAVOR {
28                 LATEX,
29                 PDFLATEX,
30                 XML
31         };
32
33         OutputParams();
34         ~OutputParams();
35
36         /** The latex that we export depends occasionally on what is to
37             compile the file.
38         */
39         FLAVOR flavor;
40
41         /** Are we to write a 'nice' LaTeX file or not.
42             This esentially seems to mean whether InsetInclude, InsetGraphics
43             and InsetExternal should add the absolute path to any external
44             files or not.
45         */
46         bool nice;
47
48         /** moving_arg == true means that the environment in which the inset
49             is typeset is a moving argument. The inset should take care about
50             fragile commands by preceding the latex with \\protect.
51         */
52         bool moving_arg;
53
54         /** intitle == true means that the environment in which the
55             inset is typeset is part of a title (before a \\maketitle).
56             Footnotes in such environments have moving arguments.
57         */
58         bool intitle;
59
60         /** the font at the point where the inset is
61          */
62         LyXFont const * local_font;
63
64         /** Document language babel name
65          */
66         mutable std::string document_language;
67
68         /** free_spacing == true means that the inset is in a free-spacing
69             paragraph.
70         */
71         bool free_spacing;
72
73         /** This var is set by the return value from BufferParams::writeLaTeX
74         */
75         bool use_babel;
76
77         /** Line length to use with plaintext export.
78         */
79         lyx::size_type linelen;
80
81         /** The depth of the current paragraph, set for plaintext
82          *  export and used by InsetTabular
83          */
84         int depth;
85
86         /** Export data filled in by the latex(), docbook() etc methods.
87             This is a hack: Make it possible to add stuff to constant
88             OutputParams instances.
89         */
90         boost::shared_ptr<ExportData> exportdata;
91
92         /** Whether we are inside a comment inset. Insets that are including
93          *  external files like InsetGraphics, InsetInclude and InsetExternal
94          *  may only write the usual output and must not attempt to do
95          *  something with the included files (e.g. copying, converting)
96          *  if this flag is true, since they may not exist.
97          */
98         bool inComment;
99
100         /** allow output of only part of the top-level paragraphs 
101          *  par_begin: beginning paragraph
102          */
103         lyx::pit_type par_begin;
104
105         /** allow output of only part of the top-level paragraphs 
106          *  par_end: par_end-1 is the ending paragraph
107          *  if par_begin=par_end, output all paragraphs
108          */
109         lyx::pit_type par_end;
110
111         /** whether or not do actual file copying and image conversion 
112          *  This mode will be used to preview the source code
113          */
114         bool dryrun;
115 };
116
117 #endif // NOT OUTPUTPARAMS_H