X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FOutputParams.h;h=9ae7c3721cdbee92ecb846eefc189a91a34f9be1;hb=f5123ccfa82215030c70561af881175d92244492;hp=4d4cae6cae242f92c2561917fb690828da2f5694;hpb=14c27bcea6108c872d263a757777da490e868141;p=lyx.git diff --git a/src/OutputParams.h b/src/OutputParams.h index 4d4cae6cae..9ae7c3721c 100644 --- a/src/OutputParams.h +++ b/src/OutputParams.h @@ -12,10 +12,8 @@ #ifndef OUTPUTPARAMS_H #define OUTPUTPARAMS_H -#include -#include "support/types.h" -#include +#include "support/shared_ptr.h" #include "Changes.h" @@ -25,7 +23,7 @@ namespace lyx { class Encoding; class ExportData; class Font; - +class Language; class OutputParams { public: @@ -33,7 +31,17 @@ public: LATEX, PDFLATEX, XETEX, - XML + XML, + HTML, + TEXT + }; + + enum MathFlavor { + NotApplicable, + MathAsMathML, + MathAsHTML, + MathAsImages, + MathAsLaTeX }; enum TableCell { @@ -51,11 +59,16 @@ public: OutputParams(Encoding const *); ~OutputParams(); - /** The latex that we export depends occasionally on what is to + /** The file that we export depends occasionally on what is to compile the file. */ FLAVOR flavor; - + /// is it some flavor of LaTeX? + bool isLaTeX() const; + + /// Same, but for math output, which only matter is XHTML output. + MathFlavor math_flavor; + /** Are we to write a 'nice' LaTeX file or not. This esentially seems to mean whether InsetInclude, InsetGraphics and InsetExternal should add the absolute path to any external @@ -91,6 +104,10 @@ public: */ mutable std::string document_language; + /** The master language. Non-null only for child documents. + */ + mutable Language const * master_language; + /** Current stream encoding. Only used for LaTeX. This must be set to the document encoding (via the constructor) before output starts. Afterwards it must be kept up to date for @@ -148,7 +165,7 @@ public: This is a hack: Make it possible to add stuff to constant OutputParams instances. */ - boost::shared_ptr exportdata; + shared_ptr exportdata; /** Whether we are inside a comment inset. Insets that are including * external files like InsetGraphics, InsetInclude and InsetExternal @@ -168,6 +185,11 @@ public: */ Float inFloat; + /** Whether we are inside an index inset. + * ERT needs to know this, due to the active chars. + */ + bool inIndexEntry; + /** Whether we are inside an inset that is logically deleted. * A value > 0 indicates a deleted inset. */ @@ -191,15 +213,30 @@ public: /// is this the last paragraph in the current buffer/inset? bool isLastPar; + /** whether or not do actual file copying and image conversion * This mode will be used to preview the source code */ bool dryrun; + /// Should we output verbatim or escape LaTeX's special chars? - bool verbatim; - /// Should we output captions? (Used in HTML output.) - bool disable_captions; + bool pass_thru; + + /// Should we output captions? + bool html_disable_captions; + + /// Are we already in a paragraph? + bool html_in_par; + + /// Does the present context even permit paragraphs? + bool html_make_pars; + + /// Are we generating this material for inclusion in a TOC-like entity? + bool for_toc; + + /// Include all children notwithstanding the use of \includeonly + bool includeall; };