]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
Fix formatFPnumber with negative doubles.
[lyx.git] / src / Paragraph.cpp
index 3ce354cc940a03e3529f601604601b506eebeb25..a69169c41e3773f711297e982ac2949c2b8a4f16 100644 (file)
@@ -1139,7 +1139,9 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
        char_type const c = (runparams.use_polyglossia) ?
                owner_->getUChar(bparams, i) : text_[i];
 
-       if (style.pass_thru || runparams.pass_thru) {
+       if (style.pass_thru || runparams.pass_thru
+           || contains(style.pass_thru_chars, c)
+           || contains(runparams.pass_thru_chars, c)) {
                if (c != '\0') {
                        Encoding const * const enc = runparams.encoding;
                        if (enc && !enc->encodable(c))
@@ -1154,10 +1156,11 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
                return;
        // If T1 font encoding is used, use the special
        // characters it provides.
-       // NOTE: some languages reset the font encoding
-       // internally
+       // NOTE: Some languages reset the font encoding internally.
+       //       If we are using such a language, we do not output
+       //       special T1 chars.
        if (!runparams.inIPA && !running_font.language()->internalFontEncoding()
-           && lyxrc.fontenc == "T1" && latexSpecialT1(c, os, i, column))
+           && bparams.font_encoding() == "T1" && latexSpecialT1(c, os, i, column))
                return;
 
        // Otherwise, we use what LaTeX provides us.
@@ -2135,8 +2138,12 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams,
 {
        int column = 0;
 
-       if (params_.noindent() && !layout_->pass_thru
-           && (layout_->toggle_indent != ITOGGLE_NEVER)) {
+       bool canindent =
+               (bparams.paragraph_separation == BufferParams::ParagraphIndentSeparation) ?
+                       (layout_->toggle_indent != ITOGGLE_NEVER) :
+                       (layout_->toggle_indent == ITOGGLE_ALWAYS);
+
+       if (canindent && params_.noindent() && !layout_->pass_thru) {
                os << "\\noindent ";
                column += 10;
        }