X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fparagraph_pimpl.C;h=09feac95344b09d5e7e0bc9c718948d147b6d64d;hb=2af1fccc61b68e273bd690c506df85d4a2c8e30e;hp=86028d31aa3f7322205876e624513a95281c3617;hpb=8b0b3f290926baca9db0c55cf72343f077860147;p=lyx.git diff --git a/src/paragraph_pimpl.C b/src/paragraph_pimpl.C index 86028d31aa..09feac9534 100644 --- a/src/paragraph_pimpl.C +++ b/src/paragraph_pimpl.C @@ -62,6 +62,10 @@ size_t const phrases_nr = sizeof(special_phrases)/sizeof(special_phrase); bool isEncoding(BufferParams const & bparams, LyXFont const & font, string const & encoding) { + // We do ignore bparams.inputenc == "default" here because characters + // in this encoding could be treated by TeX as something different, + // e.g. if they are inside a CJK environment. See also + // http://bugzilla.lyx.org/show_bug.cgi?id=3043. return (bparams.inputenc == encoding || (bparams.inputenc == "auto" && font.language()->encoding()->latexName() == encoding)); @@ -386,7 +390,7 @@ void Paragraph::Pimpl::simpleTeXBlanks(odocstream & os, TexRow & texrow, if (style.pass_thru) return; - if (column > lyxrc.ascii_linelen + if (column > lyxrc.plaintext_linelen && i && getChar(i - 1) != ' ' && (i < size() - 1) @@ -483,7 +487,8 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, os << '\n'; } else { if (open_font) { - column += running_font.latexWriteEndChanges(os, basefont, basefont); + column += running_font.latexWriteEndChanges( + os, basefont, basefont, bparams); open_font = false; } basefont = owner_->getLayoutFont(bparams, outerfont); @@ -536,10 +541,8 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf, #endif // some insets cannot be inside a font change command if (open_font && inset->noFontChange()) { - column +=running_font. - latexWriteEndChanges(os, - basefont, - basefont); + column += running_font.latexWriteEndChanges( + os, basefont, basefont, bparams); open_font = false; basefont = owner_->getLayoutFont(bparams, outerfont); running_font = basefont;