2004-06-03 13:08:50 +00:00
|
|
|
/**
|
2007-04-26 04:41:58 +00:00
|
|
|
* \file OutputParams.cpp
|
2004-06-03 13:08:50 +00:00
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
*
|
|
|
|
* \author Angus Leeming
|
|
|
|
*
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <config.h>
|
|
|
|
|
2007-04-26 04:41:58 +00:00
|
|
|
#include "OutputParams.h"
|
|
|
|
#include "Exporter.h"
|
2008-08-18 17:26:09 +00:00
|
|
|
#include "Encoding.h"
|
2004-06-03 13:08:50 +00:00
|
|
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
namespace lyx {
|
|
|
|
|
|
|
|
|
2007-03-18 10:59:16 +00:00
|
|
|
OutputParams::OutputParams(Encoding const * enc)
|
2012-10-03 08:41:07 +00:00
|
|
|
: flavor(LATEX), math_flavor(NotApplicable), nice(false), is_child(false),
|
2019-05-10 06:09:26 +00:00
|
|
|
moving_arg(false), intitle(false), inbranch(false), inulemcmd(0),
|
|
|
|
local_font(0),master_language(0), encoding(enc), free_spacing(false),
|
2019-03-13 10:31:25 +00:00
|
|
|
use_babel(false), use_polyglossia(false), use_CJK(false),
|
2009-04-16 07:29:01 +00:00
|
|
|
use_indices(false), use_japanese(false), linelen(0), depth(0),
|
2019-03-14 13:24:43 +00:00
|
|
|
exportdata(new ExportData), postpone_fragile_stuff(false), inDisplayMath(false),
|
|
|
|
wasDisplayMath(false), inComment(false), openbtUnit(false), only_childbibs(false),
|
2017-02-04 18:23:46 +00:00
|
|
|
inTableCell(NO), inFloat(NONFLOAT),
|
2012-03-09 09:05:13 +00:00
|
|
|
inIndexEntry(false), inIPA(false), inDeletedInset(0),
|
2019-12-28 12:43:17 +00:00
|
|
|
changeOfDeletedInset(Change::UNCHANGED), ctObject(CT_NORMAL),
|
2016-09-03 22:52:55 +00:00
|
|
|
par_begin(0), par_end(0), lastid(-1), lastpos(0), isLastPar(false),
|
2013-11-12 19:52:35 +00:00
|
|
|
dryrun(false), silent(false), pass_thru(false),
|
2009-11-19 22:31:52 +00:00
|
|
|
html_disable_captions(false), html_in_par(false),
|
2013-03-12 16:45:15 +00:00
|
|
|
html_make_pars(true), for_toc(false), for_tooltip(false),
|
2015-06-02 15:23:52 +00:00
|
|
|
for_search(false), for_preview(false), includeall(false)
|
2008-08-18 17:26:09 +00:00
|
|
|
{
|
|
|
|
// Note: in PreviewLoader::Impl::dumpPreamble
|
2013-11-12 19:52:35 +00:00
|
|
|
// OutputParams runparams(0);
|
2008-08-18 17:26:09 +00:00
|
|
|
if (enc && enc->package() == Encoding::japanese)
|
|
|
|
use_japanese = true;
|
2019-03-13 10:31:25 +00:00
|
|
|
if (enc && enc->package() == Encoding::CJK)
|
|
|
|
use_CJK = true;
|
2008-08-18 17:26:09 +00:00
|
|
|
}
|
2004-06-03 13:08:50 +00:00
|
|
|
|
|
|
|
|
|
|
|
OutputParams::~OutputParams()
|
|
|
|
{}
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
2010-03-31 18:57:20 +00:00
|
|
|
bool OutputParams::isLaTeX() const
|
|
|
|
{
|
2011-08-10 02:23:44 +00:00
|
|
|
return flavor == LATEX || flavor == LUATEX || flavor == DVILUATEX
|
2013-11-12 19:52:35 +00:00
|
|
|
|| flavor == PDFLATEX || flavor == XETEX;
|
2010-03-31 18:57:20 +00:00
|
|
|
}
|
|
|
|
|
2010-11-23 12:23:36 +00:00
|
|
|
|
|
|
|
bool OutputParams::isFullUnicode() const
|
|
|
|
{
|
2019-07-11 08:31:10 +00:00
|
|
|
return flavor == LUATEX || flavor == DVILUATEX || flavor == XETEX;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool OutputParams::useBidiPackage() const
|
|
|
|
{
|
|
|
|
return use_polyglossia && flavor == XETEX;
|
2010-11-23 12:23:36 +00:00
|
|
|
}
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|