diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/docparser.cpp | 16 | ||||
-rw-r--r-- | src/latexgen.cpp | 3 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp index 215439a..29c6ca7 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -5037,25 +5037,27 @@ void DocPara::handleIncludeOperator(const QCString &cmdName,DocIncOperator::Type void DocPara::handleImage(const QCString &cmdName) { + QCString saveCmdName = cmdName; + int tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", - qPrint(cmdName)); + qPrint(saveCmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WORD && tok!=TK_LNKWORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", - tokToString(tok),qPrint(cmdName)); + tokToString(tok),qPrint(saveCmdName)); return; } tok=doctokenizerYYlex(); if (tok!=TK_WHITESPACE) { warn_doc_error(g_fileName,doctokenizerYYlineno,"expected whitespace after %s command", - qPrint(cmdName)); + qPrint(saveCmdName)); return; } DocImage::Type t; @@ -5066,9 +5068,9 @@ void DocPara::handleImage(const QCString &cmdName) else if (imgType=="rtf") t=DocImage::Rtf; else { - warn_doc_error(g_fileName,doctokenizerYYlineno,"image type %s specified as the first argument of " - "%s is not valid", - qPrint(imgType),qPrint(cmdName)); + warn_doc_error(g_fileName,doctokenizerYYlineno,"output format %s specified as the first argument of " + "%s command is not valid", + qPrint(imgType),qPrint(saveCmdName)); return; } doctokenizerYYsetStateFile(); @@ -5077,7 +5079,7 @@ void DocPara::handleImage(const QCString &cmdName) if (tok!=TK_WORD) { warn_doc_error(g_fileName,doctokenizerYYlineno,"unexpected token %s as the argument of %s", - tokToString(tok),qPrint(cmdName)); + tokToString(tok),qPrint(saveCmdName)); return; } HtmlAttribList attrList; diff --git a/src/latexgen.cpp b/src/latexgen.cpp index 7d72974..00826e6 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -694,6 +694,9 @@ static void writeDefaultHeaderPart1(FTextStream &t) t << "\\usepackage{caption}\n" << "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n"; + // prevent numbers overlap the titles in toc + t << "\\renewcommand{\\numberline}[1]{#1~}\n"; + // End of preamble, now comes the document contents t << "%===== C O N T E N T S =====\n" "\n" |