Permalink
Browse files

Include command show line number (e.g. LaTeX)

Based on the report of Luis Vega (http://doxygen.10944.n7.nabble.com/include-inserts-line-numbers-for-LaTeX-PDF-output-td7683.html)
The default setting for parseCode calls was not consistent between the different output formats, resulting in wrong settings of default options (e.g. show line numbers).
  • Loading branch information...
albert-github committed Aug 24, 2016
1 parent cd6a8d3 commit a4bde1e1e71a24d6c714377be4265e95deb1acf3
Showing with 64 additions and 8 deletions.
  1. +16 −2 src/latexdocvisitor.cpp
  2. +16 −2 src/mandocvisitor.cpp
  3. +16 −2 src/rtfdocvisitor.cpp
  4. +16 −2 src/xmldocvisitor.cpp
@@ -431,7 +431,14 @@ void LatexDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(), &fd);
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE // show line numbers
);
m_t << "\\end{DoxyCodeInclude}" << endl;
}
break;
@@ -440,7 +447,14 @@ void LatexDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
inc->exampleFile());
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE
);
m_t << "\\end{DoxyCodeInclude}\n";
break;
case DocInclude::DontInclude:
@@ -237,7 +237,14 @@ void ManDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(), &fd);
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
@@ -253,7 +260,14 @@ void ManDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile());
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE
);
if (!m_firstCol) m_t << endl;
m_t << ".fi" << endl;
m_t << ".PP" << endl;
@@ -386,7 +386,14 @@ void RTFDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(), &fd);
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE // show line numbers
);
m_t << "\\par";
m_t << "}" << endl;
}
@@ -398,7 +405,14 @@ void RTFDocVisitor::visit(DocInclude *inc)
Doxygen::parserManager->getParser(inc->extension())
->parseCode(m_ci,inc->context(),
inc->text(),langExt,inc->isExample(),
inc->exampleFile());
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE // show line numbers
);
m_t << "\\par";
m_t << "}" << endl;
break;
@@ -272,7 +272,14 @@ void XmlDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile(), &fd);
inc->exampleFile(),
&fd, // fileDef,
-1, // start line
-1, // end line
FALSE, // inline fragment
0, // memberDef
TRUE // show line numbers
);
m_t << "</programlisting>";
}
break;
@@ -283,7 +290,14 @@ void XmlDocVisitor::visit(DocInclude *inc)
inc->text(),
langExt,
inc->isExample(),
inc->exampleFile());
inc->exampleFile(),
0, // fileDef
-1, // startLine
-1, // endLine
TRUE, // inlineFragment
0, // memberDef
FALSE // show line numbers
);
m_t << "</programlisting>";
break;
case DocInclude::DontInclude:

0 comments on commit a4bde1e

Please sign in to comment.