diff options
-rw-r--r-- | doc/commands.doc | 14 | ||||
-rw-r--r-- | src/cmdmapper.cpp | 1 | ||||
-rw-r--r-- | src/cmdmapper.h | 3 | ||||
-rw-r--r-- | src/commentscan.l | 3 | ||||
-rw-r--r-- | src/docbookvisitor.cpp | 2 | ||||
-rw-r--r-- | src/docparser.cpp | 6 | ||||
-rw-r--r-- | src/docparser.h | 2 | ||||
-rw-r--r-- | src/htmldocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/latexdocvisitor.cpp | 3 | ||||
-rw-r--r-- | src/mandocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/perlmodgen.cpp | 1 | ||||
-rw-r--r-- | src/printdocvisitor.h | 1 | ||||
-rw-r--r-- | src/rtfdocvisitor.cpp | 2 | ||||
-rw-r--r-- | src/xmldocvisitor.cpp | 5 | ||||
-rw-r--r-- | testing/056/indexpage.xml | 11 | ||||
-rw-r--r-- | testing/056_latexinclude.dox | 8 | ||||
-rw-r--r-- | testing/sample.tex | 1 |
17 files changed, 64 insertions, 3 deletions
diff --git a/doc/commands.doc b/doc/commands.doc index 5f7cb2e..93a388b 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -117,6 +117,7 @@ documentation: \refitem cmdinternal \\internal \refitem cmdinvariant \\invariant \refitem cmdinterface \\interface +\refitem cmdlatexinclude \\latexinclude \refitem cmdlatexonly \\latexonly \refitem cmdli \\li \refitem cmdline \\line @@ -2224,6 +2225,19 @@ Commands for displaying examples <hr> +\section cmdlatexinclude \\latexinclude <file-name> + + \addindex \\latexinclude + This command includes the file \<file-name\> as is in the LaTeX documentation. + The command is equivalent to pasting the file in the documentation and + placing \ref cmdlatexonly "\\latexonly" and \ref cmdendlatexonly "\\endlatexonly" + commands around it. + + Files or directories that doxygen should look for can be specified using the + \ref cfg_example_path "EXAMPLE_PATH" tag of doxygen's configuration file. + +<hr> + \htmlonly <center> \endhtmlonly <h2> \htmlonly --- \endhtmlonly diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index cbb0cb7..6320169 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -63,6 +63,7 @@ CommandMap cmdMap[] = { "internal", CMD_INTERNAL }, { "invariant", CMD_INVARIANT }, { "javalink", CMD_JAVALINK }, + { "latexinclude", CMD_LATEXINCLUDE }, { "latexonly", CMD_LATEXONLY }, { "li", CMD_LI }, { "line", CMD_LINE }, diff --git a/src/cmdmapper.h b/src/cmdmapper.h index adfd1a6..eafc77b 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -124,7 +124,8 @@ enum CommandType CMD_ENDINTERNAL = 94, CMD_PARBLOCK = 95, CMD_ENDPARBLOCK = 96, - CMD_DIAFILE = 97 + CMD_DIAFILE = 97, + CMD_LATEXINCLUDE = 98 }; enum HtmlTagType diff --git a/src/commentscan.l b/src/commentscan.l index 3cd8f5f..82afca5 100644 --- a/src/commentscan.l +++ b/src/commentscan.l @@ -234,6 +234,7 @@ static DocCmdMap docCmdMap[] = { "include", 0, TRUE }, { "includelineno", 0, TRUE }, { "invariant", 0, TRUE }, + { "latexinclude", 0, FALSE }, { "li", 0, TRUE }, { "line", 0, TRUE }, { "note", 0, TRUE }, @@ -879,7 +880,7 @@ DCMD1 ("arg"|"attention"|"author"|"cite"|"code") DCMD2 ("date"|"dot"|"msc"|"dotfile"|"example") DCMD3 ("htmlinclude"|"htmlonly"|"image"|"include") DCMD4 ("includelineno"|"internal"|"invariant") -DCMD5 ("latexonly"|"li"|"line"|"manonly"|"name") +DCMD5 ("latexinclude"|"latexonly"|"li"|"line"|"manonly"|"name") DCMD6 ("note"|"par"|"paragraph"|"param"|"post") DCMD7 ("pre"|"remarks"|(("relate"[sd])("also")?)) DCMD8 ("remarks"|("return"[s]?)|"retval"|"sa"|"section") diff --git a/src/docbookvisitor.cpp b/src/docbookvisitor.cpp index 526ed49..785219a 100644 --- a/src/docbookvisitor.cpp +++ b/src/docbookvisitor.cpp @@ -285,6 +285,8 @@ void DocbookDocVisitor::visit(DocInclude *inc) break; case DocInclude::HtmlInclude: break; + case DocInclude::LatexInclude: + break; case DocInclude::VerbInclude: m_t << "<verbatim>"; filter(inc->text()); diff --git a/src/docparser.cpp b/src/docparser.cpp index 927b3ee..8465039 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1777,6 +1777,9 @@ void DocInclude::parse() case HtmlInclude: readTextFileByName(m_file,m_text); break; + case LatexInclude: + readTextFileByName(m_file,m_text); + break; case Snippet: readTextFileByName(m_file,m_text); // check here for the existence of the blockId inside the file, so we @@ -5628,6 +5631,9 @@ int DocPara::handleCommand(const QCString &cmdName) case CMD_HTMLINCLUDE: handleInclude(cmdName,DocInclude::HtmlInclude); break; + case CMD_LATEXINCLUDE: + handleInclude(cmdName,DocInclude::LatexInclude); + break; case CMD_VERBINCLUDE: handleInclude(cmdName,DocInclude::VerbInclude); break; diff --git a/src/docparser.h b/src/docparser.h index 37c78cd..a6d9fc0 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -462,7 +462,7 @@ class DocVerbatim : public DocNode class DocInclude : public DocNode { public: - enum Type { Include, DontInclude, VerbInclude, HtmlInclude, IncWithLines, Snippet }; + enum Type { Include, DontInclude, VerbInclude, HtmlInclude, LatexInclude, IncWithLines, Snippet }; DocInclude(DocNode *parent,const QCString &file, const QCString context, Type t, bool isExample,const QCString exampleFile, diff --git a/src/htmldocvisitor.cpp b/src/htmldocvisitor.cpp index f6878b9..1760531 100644 --- a/src/htmldocvisitor.cpp +++ b/src/htmldocvisitor.cpp @@ -490,6 +490,8 @@ void HtmlDocVisitor::visit(DocInclude *inc) case DocInclude::HtmlInclude: m_t << inc->text(); break; + case DocInclude::LatexInclude: + break; case DocInclude::VerbInclude: forceEndParagraph(inc); m_t << /*PREFRAG_START <<*/ "<pre class=\"fragment\">"; diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index c9f2f91..0f9de25 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -362,6 +362,9 @@ void LatexDocVisitor::visit(DocInclude *inc) break; case DocInclude::HtmlInclude: break; + case DocInclude::LatexInclude: + m_t << inc->text(); + break; case DocInclude::VerbInclude: m_t << "\n\\begin{DoxyVerbInclude}\n"; m_t << inc->text(); diff --git a/src/mandocvisitor.cpp b/src/mandocvisitor.cpp index 1f8f77e..5403324 100644 --- a/src/mandocvisitor.cpp +++ b/src/mandocvisitor.cpp @@ -262,6 +262,8 @@ void ManDocVisitor::visit(DocInclude *inc) break; case DocInclude::HtmlInclude: break; + case DocInclude::LatexInclude: + break; case DocInclude::VerbInclude: if (!m_firstCol) m_t << endl; m_t << ".PP" << endl; diff --git a/src/perlmodgen.cpp b/src/perlmodgen.cpp index 1f8e713..948836b 100644 --- a/src/perlmodgen.cpp +++ b/src/perlmodgen.cpp @@ -704,6 +704,7 @@ void PerlModDocVisitor::visit(DocInclude *inc) return; case DocInclude::DontInclude: return; case DocInclude::HtmlInclude: type = "htmlonly"; break; + case DocInclude::LatexInclude: type = "latexonly"; break; case DocInclude::VerbInclude: type = "preformatted"; break; case DocInclude::Snippet: return; } diff --git a/src/printdocvisitor.h b/src/printdocvisitor.h index ee4104e..0381c93 100644 --- a/src/printdocvisitor.h +++ b/src/printdocvisitor.h @@ -165,6 +165,7 @@ class PrintDocVisitor : public DocVisitor case DocInclude::IncWithLines: printf("incwithlines"); break; case DocInclude::DontInclude: printf("dontinclude"); break; case DocInclude::HtmlInclude: printf("htmlinclude"); break; + case DocInclude::LatexInclude: printf("latexinclude"); break; case DocInclude::VerbInclude: printf("verbinclude"); break; case DocInclude::Snippet: printf("snippet"); break; } diff --git a/src/rtfdocvisitor.cpp b/src/rtfdocvisitor.cpp index 05c8247..67faf98 100644 --- a/src/rtfdocvisitor.cpp +++ b/src/rtfdocvisitor.cpp @@ -382,6 +382,8 @@ void RTFDocVisitor::visit(DocInclude *inc) break; case DocInclude::HtmlInclude: break; + case DocInclude::LatexInclude: + break; case DocInclude::VerbInclude: m_t << "{" << endl; m_t << "\\par" << endl; diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index b906fc1..cab4578 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -255,6 +255,11 @@ void XmlDocVisitor::visit(DocInclude *inc) filter(inc->text()); m_t << "</htmlonly>"; break; + case DocInclude::LatexInclude: + m_t << "<latexonly>"; + filter(inc->text()); + m_t << "</latexonly>"; + break; case DocInclude::VerbInclude: m_t << "<verbatim>"; filter(inc->text()); diff --git a/testing/056/indexpage.xml b/testing/056/indexpage.xml new file mode 100644 index 0000000..8376a74 --- /dev/null +++ b/testing/056/indexpage.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version=""> + <compounddef id="indexpage" kind="page"> + <compoundname>index</compoundname> + <title>My Project</title> + <detaileddescription> + <para>Some text. <latexonly>\section{Hello world} +</latexonly> More text. </para> + </detaileddescription> + </compounddef> +</doxygen> diff --git a/testing/056_latexinclude.dox b/testing/056_latexinclude.dox new file mode 100644 index 0000000..6a8052a --- /dev/null +++ b/testing/056_latexinclude.dox @@ -0,0 +1,8 @@ +// objective: test the \latexinclude command +// check: indexpage.xml +// config: EXAMPLE_PATH = . +/** \mainpage + * Some text. + * \latexinclude sample.tex + * More text. + */ diff --git a/testing/sample.tex b/testing/sample.tex new file mode 100644 index 0000000..9a1717e --- /dev/null +++ b/testing/sample.tex @@ -0,0 +1 @@ +\section{Hello world} |