]> git.lyx.org Git - lyx.git/blob - src/OutputParams.cpp
Center correctly top labels like Abstract.
[lyx.git] / src / OutputParams.cpp
1 /**
2  * \file OutputParams.cpp
3  * This file is part of LyX, the document processor.
4  * Licence details can be found in the file COPYING.
5  *
6  *  \author Angus Leeming
7  *
8  * Full author contact details are available in file CREDITS.
9  */
10
11 #include <config.h>
12
13 #include "OutputParams.h"
14 #include "Exporter.h"
15 #include "Encoding.h"
16
17
18 namespace lyx {
19
20
21 OutputParams::OutputParams(Encoding const * enc)
22         : flavor(LATEX), math_flavor(NotApplicable), nice(false), is_child(false),
23           moving_arg(false), intitle(false), need_maketitle(false), have_maketitle(false),
24           inbranch(false), inulemcmd(0), local_font(nullptr),master_language(nullptr),
25           encoding(enc), free_spacing(false), use_babel(false), use_polyglossia(false),
26           use_hyperref(false), use_CJK(false),
27           use_indices(false), use_japanese(false), linelen(0), depth(0),
28           exportdata(new ExportData), postpone_fragile_stuff(false), inDisplayMath(false),
29           wasDisplayMath(false), inComment(false), openbtUnit(false), only_childbibs(false),
30           inTableCell(NO), inFloat(NONFLOAT),
31           inIndexEntry(false), inIPA(false), inDeletedInset(0),
32           changeOfDeletedInset(Change::UNCHANGED), ctObject(CT_NORMAL),
33           par_begin(0), par_end(0), lastid(-1), lastpos(0), isLastPar(false),
34           dryrun(false), silent(false), pass_thru(false),
35           html_disable_captions(false), html_in_par(false),
36           html_make_pars(true), docbook_in_par(false), docbook_make_pars(true),
37           docbook_force_pars(false), docbook_anchors_to_ignore(std::set<docstring>()), docbook_in_float(false),
38           docbook_in_listing(false), docbook_in_table(false), for_toc(false), for_tooltip(false),
39           for_search(false), for_preview(false), includeall(false)
40 {
41         // Note: in PreviewLoader::Impl::dumpPreamble
42         // OutputParams runparams(0);
43         if (enc && enc->package() == Encoding::japanese)
44                 use_japanese = true;
45         if (enc && enc->package() == Encoding::CJK)
46                 use_CJK = true;
47 }
48
49
50 OutputParams::~OutputParams()
51 {}
52
53
54 bool OutputParams::isLaTeX() const
55 {
56         return flavor == LATEX || flavor == LUATEX || flavor == DVILUATEX
57                 || flavor == PDFLATEX || flavor == XETEX;
58 }
59
60
61 bool OutputParams::isFullUnicode() const
62 {
63         return flavor == LUATEX || flavor == DVILUATEX || flavor == XETEX;
64 }
65
66
67 bool OutputParams::useBidiPackage() const
68 {
69         return use_polyglossia && flavor == XETEX;
70 }
71
72 } // namespace lyx