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
17 #include "support/types.h"
18 #include <boost/shared_ptr.hpp>
51 OutputParams(Encoding const *);
54 /** The latex that we export depends occasionally on what is to
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
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.
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.
78 /** the font at the point where the inset is
80 Font const * local_font;
82 /** Document language babel name
84 mutable std::string document_language;
86 /** Current stream encoding. Only used for LaTeX.
87 This must be set to the document encoding (via the constructor)
88 before output starts. Afterwards it must be kept up to date for
89 each single character (\sa Paragraph::latex).
90 This does also mean that you need to set it back if you use a
91 copy (e.g. in insets): \code
92 int InsetFoo::latex(..., OutputParams const & runparams_in) const
94 OutputParams runparams(runparams_in);
95 runparams.inComment = true;
97 InsetBla::latex(..., runparams);
99 runparams_in.encoding = runparams.encoding;
103 mutable Encoding const * encoding;
105 /** free_spacing == true means that the inset is in a free-spacing
110 /** This var is set by the return value from BufferParams::writeLaTeX
114 /** Are we using japanese (pLaTeX)?
118 /** Line length to use with plaintext export.
122 /** The depth of the current paragraph, set for plaintext
123 * export and used by InsetTabular
127 /** Export data filled in by the latex(), docbook() etc methods.
128 This is a hack: Make it possible to add stuff to constant
129 OutputParams instances.
131 boost::shared_ptr<ExportData> exportdata;
133 /** Whether we are inside a comment inset. Insets that are including
134 * external files like InsetGraphics, InsetInclude and InsetExternal
135 * may only write the usual output and must not attempt to do
136 * something with the included files (e.g. copying, converting)
137 * if this flag is true, since they may not exist.
141 /** Whether we are in a table cell.
142 * For newline, it matters whether its content is aligned or not.
144 TableCell inTableCell;
146 /** Whether we are inside a float or subfloat.
147 * Needed for subfloat detection on the command line.
151 /** Whether we are inside an inset that is logically deleted.
152 * A value > 0 indicates a deleted inset.
156 /** The change information of the outermost logically deleted inset.
157 * changeOfDeletedInset shall only be evaluated if inDeletedInset > 0.
159 Change changeOfDeletedInset;
161 /** allow output of only part of the top-level paragraphs
162 * par_begin: beginning paragraph
166 /** allow output of only part of the top-level paragraphs
167 * par_end: par_end-1 is the ending paragraph
168 * if par_begin=par_end, output all paragraphs
172 /// is this the last paragraph in the current buffer/inset?
175 /** whether or not do actual file copying and image conversion
176 * This mode will be used to preview the source code
179 /// Should we output verbatim or escape LaTeX's special chars?
186 #endif // NOT OUTPUTPARAMS_H