From ef1fa4ebcad2e4cc26b133cd35427962269bd433 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 28 Jul 2019 18:57:17 +0200 Subject: issue #7126 Latex output format fixes Based on the discussion in the proposed pull requests #7126, remove the colon in case it is clear that we have to do with a heading. --- src/docbookvisitor.cpp | 60 +++++++++++++++++++++++++------------------------- src/mandocvisitor.cpp | 4 ++-- src/rtfdocvisitor.cpp | 2 -- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 937d268..1901454 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -636,152 +636,152 @@ DB_VIS_C case DocSimpleSect::See: if (m_insidePre) { - m_t << "" << theTranslator->trSeeAlso() << ": " << endl; + m_t << "" << theTranslator->trSeeAlso() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trSeeAlso()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trSeeAlso()) << "" << endl; } break; case DocSimpleSect::Return: if (m_insidePre) { - m_t << "" << theTranslator->trReturns()<< ": " << endl; + m_t << "" << theTranslator->trReturns()<< "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trReturns()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trReturns()) << "" << endl; } break; case DocSimpleSect::Author: if (m_insidePre) { - m_t << "" << theTranslator->trAuthor(TRUE, TRUE) << ": " << endl; + m_t << "" << theTranslator->trAuthor(TRUE, TRUE) << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trAuthor(TRUE, TRUE)) << "" << endl; } break; case DocSimpleSect::Authors: if (m_insidePre) { - m_t << "" << theTranslator->trAuthor(TRUE, FALSE) << ": " << endl; + m_t << "" << theTranslator->trAuthor(TRUE, FALSE) << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trAuthor(TRUE, FALSE)) << "" << endl; } break; case DocSimpleSect::Version: if (m_insidePre) { - m_t << "" << theTranslator->trVersion() << ": " << endl; + m_t << "" << theTranslator->trVersion() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trVersion()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trVersion()) << "" << endl; } break; case DocSimpleSect::Since: if (m_insidePre) { - m_t << "" << theTranslator->trSince() << ": " << endl; + m_t << "" << theTranslator->trSince() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trSince()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trSince()) << "" << endl; } break; case DocSimpleSect::Date: if (m_insidePre) { - m_t << "" << theTranslator->trDate() << ": " << endl; + m_t << "" << theTranslator->trDate() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trDate()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trDate()) << "" << endl; } break; case DocSimpleSect::Note: if (m_insidePre) { - m_t << "" << theTranslator->trNote() << ": " << endl; + m_t << "" << theTranslator->trNote() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trNote()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trNote()) << "" << endl; } break; case DocSimpleSect::Warning: if (m_insidePre) { - m_t << "" << theTranslator->trWarning() << ": " << endl; + m_t << "" << theTranslator->trWarning() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trWarning()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trWarning()) << "" << endl; } break; case DocSimpleSect::Pre: if (m_insidePre) { - m_t << "" << theTranslator->trPrecondition() << ": " << endl; + m_t << "" << theTranslator->trPrecondition() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trPrecondition()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trPrecondition()) << "" << endl; } break; case DocSimpleSect::Post: if (m_insidePre) { - m_t << "" << theTranslator->trPostcondition() << ": " << endl; + m_t << "" << theTranslator->trPostcondition() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trPostcondition()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trPostcondition()) << "" << endl; } break; case DocSimpleSect::Copyright: if (m_insidePre) { - m_t << "" << theTranslator->trCopyright() << ": " << endl; + m_t << "" << theTranslator->trCopyright() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trCopyright()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trCopyright()) << "" << endl; } break; case DocSimpleSect::Invar: if (m_insidePre) { - m_t << "" << theTranslator->trInvariant() << ": " << endl; + m_t << "" << theTranslator->trInvariant() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trInvariant()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trInvariant()) << "" << endl; } break; case DocSimpleSect::Remark: // is miising the possibility if (m_insidePre) { - m_t << "<formalpara><title>" << theTranslator->trRemarks() << ": " << endl; + m_t << "" << theTranslator->trRemarks() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trRemarks()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trRemarks()) << "" << endl; } break; case DocSimpleSect::Attention: if (m_insidePre) { - m_t << "" << theTranslator->trAttention() << ": " << endl; + m_t << "" << theTranslator->trAttention() << "" << endl; } else { - m_t << "" << convertToDocBook(theTranslator->trAttention()) << ": " << endl; + m_t << "" << convertToDocBook(theTranslator->trAttention()) << "" << endl; } break; case DocSimpleSect::User: diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index b13f7e4..9f5a45b 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -571,7 +571,7 @@ void ManDocVisitor::visitPre(DocSimpleSect *s) // special case 1: user defined title if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) { - m_t << ":\\fP" << endl; + m_t << "\\fP" << endl; m_t << ".RS 4" << endl; } } @@ -944,7 +944,7 @@ void ManDocVisitor::visitPre(DocParamSect *s) default: ASSERT(0); } - m_t << ":\\fP" << endl; + m_t << "\\fP" << endl; m_t << ".RS 4" << endl; } diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index c4bcf24..4e89193 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -784,7 +784,6 @@ void RTFDocVisitor::visitPre(DocSimpleSect *s) // special case 1: user defined title if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs) { - m_t << ":"; m_t << "\\par"; m_t << "}"; // end bold incIndentLevel(); @@ -1379,7 +1378,6 @@ void RTFDocVisitor::visitPre(DocParamSect *s) default: ASSERT(0); } - m_t << ":"; m_t << "\\par"; m_t << "}" << endl; bool useTable = s->type()==DocParamSect::Param || -- cgit v0.12