mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
* Use the package luainputenc if LuaTeX is used as output format _with_ tex fonts. With this, the UG compiles with LuaTeX if "Unse non-TeX fonts" is not selected.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@36559 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
7538a23c15
commit
3d1226b4f2
@ -277,6 +277,7 @@
|
|||||||
\TestPackage{listings}
|
\TestPackage{listings}
|
||||||
\TestPackage[lithuanian.ldf]{lithuanian}
|
\TestPackage[lithuanian.ldf]{lithuanian}
|
||||||
\TestPackage{longtable}
|
\TestPackage{longtable}
|
||||||
|
\TestPackage{luainputenc}
|
||||||
\TestPackage{mathdots}
|
\TestPackage{mathdots}
|
||||||
\TestPackage{mathrsfs}
|
\TestPackage{mathrsfs}
|
||||||
\TestPackage{mhchem}
|
\TestPackage{mhchem}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
|
#LyX 2.0.0svn created this file. For more info see http://www.lyx.org/
|
||||||
\lyxformat 408
|
\lyxformat 410
|
||||||
\begin_document
|
\begin_document
|
||||||
\begin_header
|
\begin_header
|
||||||
\textclass article
|
\textclass article
|
||||||
@ -12,7 +12,7 @@
|
|||||||
\font_sans default
|
\font_sans default
|
||||||
\font_typewriter default
|
\font_typewriter default
|
||||||
\font_default_family default
|
\font_default_family default
|
||||||
\use_xetex false
|
\use_non_tex_fonts false
|
||||||
\font_sc false
|
\font_sc false
|
||||||
\font_osf false
|
\font_osf false
|
||||||
\font_sf_scale 100
|
\font_sf_scale 100
|
||||||
@ -4824,6 +4824,36 @@ listings
|
|||||||
etc.
|
etc.
|
||||||
\end_layout
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Subsection
|
||||||
|
luainputenc
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
Found:
|
||||||
|
\begin_inset Info
|
||||||
|
type "package"
|
||||||
|
arg "luainputenc"
|
||||||
|
\end_inset
|
||||||
|
|
||||||
|
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
CTAN:
|
||||||
|
\family typewriter
|
||||||
|
macros/luatex/latex/luainputenc/
|
||||||
|
\end_layout
|
||||||
|
|
||||||
|
\begin_layout Description
|
||||||
|
Notes: The package
|
||||||
|
\family sans
|
||||||
|
luainputenc
|
||||||
|
\family default
|
||||||
|
\color none
|
||||||
|
reimplements input encoding features for LuaTeX.
|
||||||
|
It is needed if LuaTeX is used as output format with tex fonts.
|
||||||
|
\end_layout
|
||||||
|
|
||||||
\begin_layout Subsection
|
\begin_layout Subsection
|
||||||
mathrsfs
|
mathrsfs
|
||||||
\end_layout
|
\end_layout
|
||||||
|
@ -2459,9 +2459,18 @@ docstring BufferParams::getGraphicsDriver(string const & package) const
|
|||||||
void BufferParams::writeEncodingPreamble(odocstream & os,
|
void BufferParams::writeEncodingPreamble(odocstream & os,
|
||||||
LaTeXFeatures & features, TexRow & texrow) const
|
LaTeXFeatures & features, TexRow & texrow) const
|
||||||
{
|
{
|
||||||
// fully unicode-aware backends (such as XeTeX) do not need this
|
// XeTeX does not need this
|
||||||
if (features.runparams().isFullUnicode())
|
if (features.runparams().flavor == OutputParams::XETEX)
|
||||||
return;
|
return;
|
||||||
|
// LuaTeX neither, but with tex fonts, we need to load
|
||||||
|
// the luainputenc package.
|
||||||
|
if (features.runparams().flavor == OutputParams::LUATEX) {
|
||||||
|
if (!useNonTeXFonts) {
|
||||||
|
os << "\\usepackage[utf8]{luainputenc}\n";
|
||||||
|
texrow.newline();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (inputenc == "auto") {
|
if (inputenc == "auto") {
|
||||||
string const doc_encoding =
|
string const doc_encoding =
|
||||||
language->encoding()->latexName();
|
language->encoding()->latexName();
|
||||||
@ -2724,9 +2733,9 @@ string const BufferParams::loadFonts(string const & rm,
|
|||||||
Encoding const & BufferParams::encoding() const
|
Encoding const & BufferParams::encoding() const
|
||||||
{
|
{
|
||||||
// FIXME: actually, we should check for the flavor
|
// FIXME: actually, we should check for the flavor
|
||||||
// or runparams.isFullyUnicode() here.
|
// or runparams.isFullyUnicode() here:
|
||||||
// useNonTeXFonts happens to match the flavors, but
|
// This check will not work with XeTeX/LuaTeX and tex fonts.
|
||||||
// this may well likely change!
|
// Thus we have to reset the encoding in Buffer::makeLaTeXFile.
|
||||||
if (useNonTeXFonts)
|
if (useNonTeXFonts)
|
||||||
return *(encodings.fromLaTeXName("utf8-plain"));
|
return *(encodings.fromLaTeXName("utf8-plain"));
|
||||||
if (inputenc == "auto" || inputenc == "default")
|
if (inputenc == "auto" || inputenc == "default")
|
||||||
|
Loading…
Reference in New Issue
Block a user