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"
62 OutputParams(Encoding const *);
65 /** The file that we export depends occasionally on what is to
69 /// is it some flavor of LaTeX?
71 /// does this flavour support full unicode?
72 bool isFullUnicode() const;
74 /// Same, but for math output, which only matter is XHTML output.
75 MathFlavor math_flavor;
77 /** Are we to write a 'nice' LaTeX file or not.
78 This esentially seems to mean whether InsetInclude, InsetGraphics
79 and InsetExternal should add the absolute path to any external
84 /** Is this a real child (i.e., compiled as a child)?
85 This depends on wherefrom we export the buffer. Even children
86 that have a master can be compiled standalone.
88 mutable bool is_child;
90 /** moving_arg == true means that the environment in which the inset
91 is typeset is a moving argument. The inset should take care about
92 fragile commands by preceding the latex with \\protect.
96 /** intitle == true means that the environment in which the
97 inset is typeset is part of a title (before a \\maketitle).
98 Footnotes in such environments have moving arguments.
102 /** inulemcmd == true means that the environment in which the
103 inset is typeset is part of a ulem command (\uline, \uuline,
104 \uwave, or \sout). Insets that output latex commands relying
105 on local assignments (such as \cite) should enclose such
106 commands in \mbox{} in order to avoid breakage.
108 mutable bool inulemcmd;
110 /** the font at the point where the inset is
112 Font const * local_font;
114 /** Document language babel name
116 mutable std::string document_language;
118 /** The master language. Non-null only for child documents.
120 mutable Language const * master_language;
122 /** Current stream encoding. Only used for LaTeX.
123 This must be set to the document encoding (via the constructor)
124 before output starts. Afterwards it must be kept up to date for
125 each single character (\sa Paragraph::latex).
126 This does also mean that you need to set it back if you use a
127 copy (e.g. in insets): \code
128 int InsetFoo::latex(..., OutputParams const & runparams_in) const
130 OutputParams runparams(runparams_in);
131 runparams.inComment = true;
133 InsetBla::latex(..., runparams);
135 runparams_in.encoding = runparams.encoding;
139 mutable Encoding const * encoding;
141 /** free_spacing == true means that the inset is in a free-spacing
146 /** This var is set by the return value from BufferParams::writeLaTeX
150 /** Do we use polyglossia (instead of babel)?
152 bool use_polyglossia;
154 /** Are we generating multiple indices?
158 /** Are we using japanese (pLaTeX)?
162 /** Customized bibtex_command
164 mutable std::string bibtex_command;
166 /** Customized index_command
168 mutable std::string index_command;
170 /** Line length to use with plaintext or LaTeX export.
174 /** The depth of the current paragraph, set for plaintext
175 * export and used by InsetTabular
179 /** Export data filled in by the latex(), docbook() etc methods.
180 This is a hack: Make it possible to add stuff to constant
181 OutputParams instances.
183 shared_ptr<ExportData> exportdata;
185 /** Whether we are inside a comment inset. Insets that are including
186 * external files like InsetGraphics, InsetInclude and InsetExternal
187 * may only write the usual output and must not attempt to do
188 * something with the included files (e.g. copying, converting)
189 * if this flag is true, since they may not exist.
193 /** Whether we are in a table cell.
194 * For newline, it matters whether its content is aligned or not.
196 TableCell inTableCell;
198 /** Whether we are inside a float or subfloat.
199 * Needed for subfloat detection on the command line.
203 /** Whether we are inside an index inset.
204 * ERT needs to know this, due to the active chars.
208 /** Whether we are inside an IPA inset.
209 * Needed for proper IPA output.
213 /** Whether we are inside an inset that is logically deleted.
214 * A value > 0 indicates a deleted inset.
218 /** The change information of the outermost logically deleted inset.
219 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
221 Change changeOfDeletedInset;
223 /** allow output of only part of the top-level paragraphs
224 * par_begin: beginning paragraph
226 mutable pit_type par_begin;
228 /** allow output of only part of the top-level paragraphs
229 * par_end: par_end-1 is the ending paragraph
230 * if par_begin=par_end, output all paragraphs
232 mutable pit_type par_end;
234 /// Id of the last paragraph before an inset
237 /// Last position in the last paragraph before an inset
240 /// is this the last paragraph in the current buffer/inset?
244 /** whether or not do actual file copying and image conversion
245 * This mode will be used to preview the source code
249 /// Should we output verbatim or escape LaTeX's special chars?
252 /// Should we output captions?
253 bool html_disable_captions;
255 /// Are we already in a paragraph?
258 /// Does the present context even permit paragraphs?
261 /// Are we generating this material for inclusion in a TOC-like entity?
264 /// Are we generating this material for inclusion in a tooltip?
267 /// Are we generating this material for use by advanced search?
270 /// Include all children notwithstanding the use of \includeonly
273 /// Explicit output folder, if any is desired
274 std::string export_folder;
280 #endif // NOT OUTPUTPARAMS_H