mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Update comments after solving #9740.
This commit is contained in:
parent
62190855bf
commit
8021c0b0dc
@ -1651,7 +1651,7 @@ bool Buffer::makeLaTeXFile(FileName const & fname,
|
||||
OutputParams runparams = runparams_in;
|
||||
|
||||
// XeTeX with TeX fonts is only safe with ASCII encoding,
|
||||
// See #9740 and FIXME in BufferParams::encoding()
|
||||
// but the "flavor" is not known in BufferParams::encoding().
|
||||
if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX))
|
||||
runparams.encoding = encodings.fromLyXName("ascii");
|
||||
|
||||
@ -1738,12 +1738,12 @@ void Buffer::writeLaTeXSource(otexstream & os,
|
||||
OutputParams runparams = runparams_in;
|
||||
|
||||
// XeTeX with TeX fonts is only safe with ASCII encoding,
|
||||
// See #9740 and FIXME in BufferParams::encoding()
|
||||
// FIXME: when only the current paragraph is shown, this is ignored and
|
||||
// characters encodable in the current encoding are not converted
|
||||
// to ASCII-representation.
|
||||
// but the "flavor" is not known in BufferParams::encoding().
|
||||
if (!params().useNonTeXFonts && (runparams.flavor == OutputParams::XETEX))
|
||||
runparams.encoding = encodings.fromLyXName("ascii");
|
||||
// FIXME: when only the current paragraph is shown, this is ignored
|
||||
// (or not reached) and characters encodable in the current
|
||||
// encoding are not converted to ASCII-representation.
|
||||
|
||||
// If we are compiling a file standalone, even if this is the
|
||||
// child of some other buffer, let's cut the link here, so the
|
||||
|
@ -3141,14 +3141,13 @@ string const BufferParams::loadFonts(LaTeXFeatures & features) const
|
||||
|
||||
Encoding const & BufferParams::encoding() const
|
||||
{
|
||||
// FIXME: For export with XeTeX and TeX fonts,
|
||||
// this function returns the wrong value.
|
||||
// The combination of XeTeX and TeX-fonts requires ASCII (see #9740).
|
||||
// However, the flavor is no buffer parameter but only known once export started.
|
||||
// Currently, we set runparams.encoding to ASCII in Buffer::makeLaTeXFile
|
||||
// (for export) and Buffer::writeLaTeXSource (for preview)
|
||||
// and prevent overwriting it with another encoding in Paragraph::latex
|
||||
// and at four places in output_latex.cpp.
|
||||
// Main encoding for LaTeX output.
|
||||
//
|
||||
// Exception: XeTeX with 8-bit TeX fonts requires ASCII (see #9740).
|
||||
// As the "flavor" is only known once export started, this
|
||||
// cannot be handled here. Instead, runparams.encoding is set
|
||||
// to ASCII in Buffer::makeLaTeXFile (for export)
|
||||
// and Buffer::writeLaTeXSource (for preview).
|
||||
if (useNonTeXFonts)
|
||||
return *(encodings.fromLyXName("utf8-plain"));
|
||||
if (inputenc == "auto" || inputenc == "default")
|
||||
|
@ -314,6 +314,8 @@ public:
|
||||
std::string inputenc;
|
||||
/// The main encoding used by this buffer for LaTeX output.
|
||||
/// Individual pieces of text can use different encodings.
|
||||
/// Output for XeTeX with 8-bit TeX fonts uses ASCII (set at runtime)
|
||||
/// instead of the value returned by this function.
|
||||
Encoding const & encoding() const;
|
||||
///
|
||||
std::string origin;
|
||||
|
Loading…
Reference in New Issue
Block a user