* de.po: sync with branch.
[lyx.git] / src / OutputParams.h
bloba368f9f81daabcf3c98054d89ffc5a5ef04b9443
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.
7 * \author Angus Leeming
9 * Full author contact details are available in file CREDITS.
12 #ifndef OUTPUTPARAMS_H
13 #define OUTPUTPARAMS_H
15 #include <string>
17 #include "support/types.h"
18 #include <boost/shared_ptr.hpp>
19 #include "Changes.h"
22 namespace lyx {
25 class Encoding;
26 class ExportData;
27 class Font;
30 class OutputParams {
31 public:
32 enum FLAVOR {
33 LATEX,
34 PDFLATEX,
35 XETEX,
36 XML
39 enum TableCell {
40 NO,
41 PLAIN,
42 ALIGNED
45 enum Float {
46 NONFLOAT,
47 MAINFLOAT,
48 SUBFLOAT
51 OutputParams(Encoding const *);
52 ~OutputParams();
54 /** The latex that we export depends occasionally on what is to
55 compile the file.
57 FLAVOR flavor;
59 /** Are we to write a 'nice' LaTeX file or not.
60 This esentially seems to mean whether InsetInclude, InsetGraphics
61 and InsetExternal should add the absolute path to any external
62 files or not.
64 bool nice;
66 /** moving_arg == true means that the environment in which the inset
67 is typeset is a moving argument. The inset should take care about
68 fragile commands by preceding the latex with \\protect.
70 bool moving_arg;
72 /** intitle == true means that the environment in which the
73 inset is typeset is part of a title (before a \\maketitle).
74 Footnotes in such environments have moving arguments.
76 bool intitle;
78 /** inulemcmd == true means that the environment in which the
79 inset is typeset is part of a ulem command (\uline, \uuline,
80 \uwave, or \sout). Insets that output latex commands relying
81 on local assignments (such as \cite) should enclose such
82 commands in \mbox{} in order to avoid breakage.
84 mutable bool inulemcmd;
86 /** the font at the point where the inset is
88 Font const * local_font;
90 /** Document language babel name
92 mutable std::string document_language;
94 /** Current stream encoding. Only used for LaTeX.
95 This must be set to the document encoding (via the constructor)
96 before output starts. Afterwards it must be kept up to date for
97 each single character (\sa Paragraph::latex).
98 This does also mean that you need to set it back if you use a
99 copy (e.g. in insets): \code
100 int InsetFoo::latex(..., OutputParams const & runparams_in) const
102 OutputParams runparams(runparams_in);
103 runparams.inComment = true;
105 InsetBla::latex(..., runparams);
107 runparams_in.encoding = runparams.encoding;
109 \endcode
111 mutable Encoding const * encoding;
113 /** free_spacing == true means that the inset is in a free-spacing
114 paragraph.
116 bool free_spacing;
118 /** This var is set by the return value from BufferParams::writeLaTeX
120 bool use_babel;
122 /** Are we generating multiple indices?
124 bool use_indices;
126 /** Are we using japanese (pLaTeX)?
128 bool use_japanese;
130 /** Customized bibtex_command
132 mutable std::string bibtex_command;
134 /** Customized index_command
136 mutable std::string index_command;
138 /** Line length to use with plaintext or LaTeX export.
140 size_type linelen;
142 /** The depth of the current paragraph, set for plaintext
143 * export and used by InsetTabular
145 int depth;
147 /** Export data filled in by the latex(), docbook() etc methods.
148 This is a hack: Make it possible to add stuff to constant
149 OutputParams instances.
151 boost::shared_ptr<ExportData> exportdata;
153 /** Whether we are inside a comment inset. Insets that are including
154 * external files like InsetGraphics, InsetInclude and InsetExternal
155 * may only write the usual output and must not attempt to do
156 * something with the included files (e.g. copying, converting)
157 * if this flag is true, since they may not exist.
159 bool inComment;
161 /** Whether we are in a table cell.
162 * For newline, it matters whether its content is aligned or not.
164 TableCell inTableCell;
166 /** Whether we are inside a float or subfloat.
167 * Needed for subfloat detection on the command line.
169 Float inFloat;
171 /** Whether we are inside an index inset.
172 * ERT needs to know this, due to the active chars.
174 bool inIndexEntry;
176 /** Whether we are inside an inset that is logically deleted.
177 * A value > 0 indicates a deleted inset.
179 int inDeletedInset;
181 /** The change information of the outermost logically deleted inset.
182 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
184 Change changeOfDeletedInset;
186 /** allow output of only part of the top-level paragraphs
187 * par_begin: beginning paragraph
189 pit_type par_begin;
191 /** allow output of only part of the top-level paragraphs
192 * par_end: par_end-1 is the ending paragraph
193 * if par_begin=par_end, output all paragraphs
195 pit_type par_end;
197 /// is this the last paragraph in the current buffer/inset?
198 bool isLastPar;
200 /** whether or not do actual file copying and image conversion
201 * This mode will be used to preview the source code
203 bool dryrun;
204 /// Should we output verbatim or escape LaTeX's special chars?
205 bool verbatim;
206 /// Should we output captions? (Used in HTML output.)
207 bool disable_captions;
211 } // namespace lyx
213 #endif // NOT OUTPUTPARAMS_H