Skip to content

Commit

Permalink
Include command show line number (e.g. LaTeX)
Browse files Browse the repository at this point in the history
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 a4bde1e
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 8 deletions.
18 changes: 16 additions & 2 deletions src/latexdocvisitor.cpp
Expand Up @@ -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;
Expand All @@ -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:
Expand Down
18 changes: 16 additions & 2 deletions src/mandocvisitor.cpp
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
18 changes: 16 additions & 2 deletions src/rtfdocvisitor.cpp
Expand Up @@ -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;
}
Expand All @@ -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;
Expand Down
18 changes: 16 additions & 2 deletions src/xmldocvisitor.cpp
Expand Up @@ -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;
Expand All @@ -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:
Expand Down

0 comments on commit a4bde1e

Please sign in to comment.