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
16 #include "support/shared_ptr.h"
59 OutputParams(Encoding const *);
62 /** The file that we export depends occasionally on what is to
66 /// is it some flavor of LaTeX?
68 /// does this flavour support full unicode?
69 bool isFullUnicode() const;
71 /// Same, but for math output, which only matter is XHTML output.
72 MathFlavor math_flavor;
74 /** Are we to write a 'nice' LaTeX file or not.
75 This esentially seems to mean whether InsetInclude, InsetGraphics
76 and InsetExternal should add the absolute path to any external
81 /** moving_arg == true means that the environment in which the inset
82 is typeset is a moving argument. The inset should take care about
83 fragile commands by preceding the latex with \\protect.
87 /** intitle == true means that the environment in which the
88 inset is typeset is part of a title (before a \\maketitle).
89 Footnotes in such environments have moving arguments.
93 /** inulemcmd == true means that the environment in which the
94 inset is typeset is part of a ulem command (\uline, \uuline,
95 \uwave, or \sout). Insets that output latex commands relying
96 on local assignments (such as \cite) should enclose such
97 commands in \mbox{} in order to avoid breakage.
99 mutable bool inulemcmd;
101 /** the font at the point where the inset is
103 Font const * local_font;
105 /** Document language babel name
107 mutable std::string document_language;
109 /** The master language. Non-null only for child documents.
111 mutable Language const * master_language;
113 /** Current stream encoding. Only used for LaTeX.
114 This must be set to the document encoding (via the constructor)
115 before output starts. Afterwards it must be kept up to date for
116 each single character (\sa Paragraph::latex).
117 This does also mean that you need to set it back if you use a
118 copy (e.g. in insets): \code
119 int InsetFoo::latex(..., OutputParams const & runparams_in) const
121 OutputParams runparams(runparams_in);
122 runparams.inComment = true;
124 InsetBla::latex(..., runparams);
126 runparams_in.encoding = runparams.encoding;
130 mutable Encoding const * encoding;
132 /** free_spacing == true means that the inset is in a free-spacing
137 /** This var is set by the return value from BufferParams::writeLaTeX
141 /** Do we use polyglossia (instead of babel)?
143 bool use_polyglossia;
145 /** Are we generating multiple indices?
149 /** Are we using japanese (pLaTeX)?
153 /** Customized bibtex_command
155 mutable std::string bibtex_command;
157 /** Customized index_command
159 mutable std::string index_command;
161 /** Line length to use with plaintext or LaTeX export.
165 /** The depth of the current paragraph, set for plaintext
166 * export and used by InsetTabular
170 /** Export data filled in by the latex(), docbook() etc methods.
171 This is a hack: Make it possible to add stuff to constant
172 OutputParams instances.
174 shared_ptr<ExportData> exportdata;
176 /** Whether we are inside a comment inset. Insets that are including
177 * external files like InsetGraphics, InsetInclude and InsetExternal
178 * may only write the usual output and must not attempt to do
179 * something with the included files (e.g. copying, converting)
180 * if this flag is true, since they may not exist.
184 /** Whether we are in a table cell.
185 * For newline, it matters whether its content is aligned or not.
187 TableCell inTableCell;
189 /** Whether we are inside a float or subfloat.
190 * Needed for subfloat detection on the command line.
194 /** Whether we are inside an index inset.
195 * ERT needs to know this, due to the active chars.
199 /** Whether we are inside an inset that is logically deleted.
200 * A value > 0 indicates a deleted inset.
204 /** The change information of the outermost logically deleted inset.
205 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
207 Change changeOfDeletedInset;
209 /** allow output of only part of the top-level paragraphs
210 * par_begin: beginning paragraph
214 /** allow output of only part of the top-level paragraphs
215 * par_end: par_end-1 is the ending paragraph
216 * if par_begin=par_end, output all paragraphs
220 /// is this the last paragraph in the current buffer/inset?
224 /** whether or not do actual file copying and image conversion
225 * This mode will be used to preview the source code
229 /// Should we output verbatim or escape LaTeX's special chars?
232 /// Should we output captions?
233 bool html_disable_captions;
235 /// Are we already in a paragraph?
238 /// Does the present context even permit paragraphs?
241 /// Are we generating this material for inclusion in a TOC-like entity?
244 /// Include all children notwithstanding the use of \includeonly
251 #endif // NOT OUTPUTPARAMS_H