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"
61 OutputParams(Encoding const *);
64 /** The file that we export depends occasionally on what is to
68 /// is it some flavor of LaTeX?
70 /// does this flavour support full unicode?
71 bool isFullUnicode() const;
73 /// Same, but for math output, which only matter is XHTML output.
74 MathFlavor math_flavor;
76 /** Are we to write a 'nice' LaTeX file or not.
77 This esentially seems to mean whether InsetInclude, InsetGraphics
78 and InsetExternal should add the absolute path to any external
83 /** moving_arg == true means that the environment in which the inset
84 is typeset is a moving argument. The inset should take care about
85 fragile commands by preceding the latex with \\protect.
89 /** intitle == true means that the environment in which the
90 inset is typeset is part of a title (before a \\maketitle).
91 Footnotes in such environments have moving arguments.
95 /** inulemcmd == true means that the environment in which the
96 inset is typeset is part of a ulem command (\uline, \uuline,
97 \uwave, or \sout). Insets that output latex commands relying
98 on local assignments (such as \cite) should enclose such
99 commands in \mbox{} in order to avoid breakage.
101 mutable bool inulemcmd;
103 /** the font at the point where the inset is
105 Font const * local_font;
107 /** Document language babel name
109 mutable std::string document_language;
111 /** The master language. Non-null only for child documents.
113 mutable Language const * master_language;
115 /** Current stream encoding. Only used for LaTeX.
116 This must be set to the document encoding (via the constructor)
117 before output starts. Afterwards it must be kept up to date for
118 each single character (\sa Paragraph::latex).
119 This does also mean that you need to set it back if you use a
120 copy (e.g. in insets): \code
121 int InsetFoo::latex(..., OutputParams const & runparams_in) const
123 OutputParams runparams(runparams_in);
124 runparams.inComment = true;
126 InsetBla::latex(..., runparams);
128 runparams_in.encoding = runparams.encoding;
132 mutable Encoding const * encoding;
134 /** free_spacing == true means that the inset is in a free-spacing
139 /** This var is set by the return value from BufferParams::writeLaTeX
143 /** Do we use polyglossia (instead of babel)?
145 bool use_polyglossia;
147 /** Are we generating multiple indices?
151 /** Are we using japanese (pLaTeX)?
155 /** Customized bibtex_command
157 mutable std::string bibtex_command;
159 /** Customized index_command
161 mutable std::string index_command;
163 /** Line length to use with plaintext or LaTeX export.
167 /** The depth of the current paragraph, set for plaintext
168 * export and used by InsetTabular
172 /** Export data filled in by the latex(), docbook() etc methods.
173 This is a hack: Make it possible to add stuff to constant
174 OutputParams instances.
176 shared_ptr<ExportData> exportdata;
178 /** Whether we are inside a comment inset. Insets that are including
179 * external files like InsetGraphics, InsetInclude and InsetExternal
180 * may only write the usual output and must not attempt to do
181 * something with the included files (e.g. copying, converting)
182 * if this flag is true, since they may not exist.
186 /** Whether we are in a table cell.
187 * For newline, it matters whether its content is aligned or not.
189 TableCell inTableCell;
191 /** Whether we are inside a float or subfloat.
192 * Needed for subfloat detection on the command line.
196 /** Whether we are inside an index inset.
197 * ERT needs to know this, due to the active chars.
201 /** Whether we are inside an IPA inset.
202 * Needed for proper IPA output.
206 /** Whether we are inside an inset that is logically deleted.
207 * A value > 0 indicates a deleted inset.
211 /** The change information of the outermost logically deleted inset.
212 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
214 Change changeOfDeletedInset;
216 /** allow output of only part of the top-level paragraphs
217 * par_begin: beginning paragraph
219 mutable pit_type par_begin;
221 /** allow output of only part of the top-level paragraphs
222 * par_end: par_end-1 is the ending paragraph
223 * if par_begin=par_end, output all paragraphs
225 mutable pit_type par_end;
227 /// Id of the last paragraph before an inset
230 /// Last position in the last paragraph before an inset
233 /// is this the last paragraph in the current buffer/inset?
237 /** whether or not do actual file copying and image conversion
238 * This mode will be used to preview the source code
242 /// Should we output verbatim or escape LaTeX's special chars?
245 /// Should we output captions?
246 bool html_disable_captions;
248 /// Are we already in a paragraph?
251 /// Does the present context even permit paragraphs?
254 /// Are we generating this material for inclusion in a TOC-like entity?
257 /// Include all children notwithstanding the use of \includeonly
260 /// Explicit output folder, if any is desired
261 std::string export_folder;
267 #endif // NOT OUTPUTPARAMS_H