diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2014-03-27 20:22:11 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2014-03-27 20:22:11 (GMT) |
commit | 1134237afe25f86fcf7c7e2a76a3542eee8acc79 (patch) | |
tree | 61693e55d7d19def20499b7a62795028b86f82d4 /src | |
parent | 904ad3fbdc5e1615fdb052ba8562fc9b1329cd81 (diff) | |
download | Doxygen-1134237afe25f86fcf7c7e2a76a3542eee8acc79.zip Doxygen-1134237afe25f86fcf7c7e2a76a3542eee8acc79.tar.gz Doxygen-1134237afe25f86fcf7c7e2a76a3542eee8acc79.tar.bz2 |
Added \latexinclude command (thanks to Juan Zaratiegui for the patch)
Diffstat (limited to 'src')
-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 |
13 files changed, 30 insertions, 3 deletions
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()); |