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)
|
2020-11-02 00:06:30 +00:00
|
|
|
: encoding(enc), exportdata(new ExportData)
|
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
|
|
|
|
{
|
2020-11-30 22:00:40 +00:00
|
|
|
return flavor == Flavor::LaTeX
|
|
|
|
|| flavor == Flavor::LuaTeX
|
|
|
|
|| flavor == Flavor::DviLuaTeX
|
|
|
|
|| flavor == Flavor::PdfLaTeX
|
|
|
|
|| flavor == Flavor::XeTeX;
|
2010-03-31 18:57:20 +00:00
|
|
|
}
|
|
|
|
|
2010-11-23 12:23:36 +00:00
|
|
|
|
|
|
|
bool OutputParams::isFullUnicode() const
|
|
|
|
{
|
2020-11-30 22:00:40 +00:00
|
|
|
return flavor == Flavor::LuaTeX
|
|
|
|
|| flavor == Flavor::DviLuaTeX
|
|
|
|
|| flavor == Flavor::XeTeX;
|
2019-07-11 08:31:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool OutputParams::useBidiPackage() const
|
|
|
|
{
|
2020-11-30 22:00:40 +00:00
|
|
|
return use_polyglossia && flavor == Flavor::XeTeX;
|
2010-11-23 12:23:36 +00:00
|
|
|
}
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
} // namespace lyx
|