48 case '%': result+=
"\\%";
break;
49 case '|': result+=
"\\texttt{\"|}";
break;
50 case '!': result+=
"\"!";
break;
51 case '{': result+=
"\\lcurly{}";
break;
52 case '}': result+=
"\\rcurly{}";
break;
53 case '~': result+=
"````~";
break;
63 {
"section",
"subsection",
"subsubsection",
"paragraph",
"subparagraph" };
69 if (compactLatex) l++;
78 t <<
"\n\\begin{DoxyImage}\n";
82 t <<
"\n\\begin{DoxyImageNoCaption}\n" 86 t <<
"\\includegraphics";
93 t <<
"width=" << width;
101 t <<
"height=" << height;
106 t <<
"[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]";
113 t <<
"{" << name <<
"}";
128 t <<
"\\end{DoxyImage}\n";
131 t <<
"\\end{DoxyImageNoCaption}\n";
147 char str[2]; str[1]=0;
155 case '!':
m_t <<
"\"!";
break;
156 case '"':
m_t <<
"\"\"";
break;
157 case '@':
m_t <<
"\"@";
break;
158 case '|':
m_t <<
"\\texttt{\"|}";
break;
159 case '[':
m_t <<
"[";
break;
160 case ']':
m_t <<
"]";
break;
161 case '{':
m_t <<
"\\lcurly{}";
break;
162 case '}':
m_t <<
"\\rcurly{}";
break;
163 default: str[0]=
c;
filter(str);
break;
172 const char *langExt,
bool insideTabbing)
253 m_t <<
"~\\newline\n";
268 if (s->
enable())
m_t <<
"{\\bfseries ";
else m_t <<
"}";
274 if (s->
enable())
m_t <<
"{\\ttfamily ";
else m_t <<
"}";
277 if (s->
enable())
m_t <<
"\\textsubscript{";
else m_t <<
"}";
280 if (s->
enable())
m_t <<
"\\textsuperscript{";
else m_t <<
"}";
283 if (s->
enable())
m_t <<
"\\begin{center}";
else m_t <<
"\\end{center} ";
286 if (s->
enable())
m_t <<
"\n\\footnotesize ";
else m_t <<
"\n\\normalsize ";
291 m_t <<
"\n\\begin{DoxyPre}";
297 m_t <<
"\\end{DoxyPre}\n";
318 m_t <<
"\n\\begin{DoxyCode}\n";
322 m_t <<
"\\end{DoxyCode}\n";
326 m_t <<
"\\begin{DoxyVerb}";
328 m_t <<
"\\end{DoxyVerb}\n";
342 static int dotindex = 1;
353 err(
"Could not open file %s for writing\n",fileName.
data());
370 static int mscindex = 1;
380 err(
"Could not open file %s.msc for writing\n",baseName.
data());
426 m_t <<
"\n\\begin{DoxyCodeInclude}\n";
428 FileDef fd( cfi.dirPath().utf8(), cfi.fileName().utf8() );
435 m_t <<
"\\end{DoxyCodeInclude}" <<
endl;
439 m_t <<
"\n\\begin{DoxyCodeInclude}\n";
444 m_t <<
"\\end{DoxyCodeInclude}\n";
454 m_t <<
"\n\\begin{DoxyVerbInclude}\n";
456 m_t <<
"\\end{DoxyVerbInclude}\n";
460 m_t <<
"\n\\begin{DoxyCodeInclude}\n";
469 m_t <<
"\\end{DoxyCodeInclude}" <<
endl;
481 if (!
m_hide)
m_t <<
"\n\\begin{DoxyCodeInclude}\n";
501 if (!
m_hide)
m_t <<
"\n\\end{DoxyCodeInclude}\n";
535 m_t <<
"\\cite{" << anchor <<
"}";
539 m_t <<
"{\\bfseries [";
554 m_t <<
"\n\\begin{DoxyEnumerate}";
558 m_t <<
"\n\\begin{DoxyItemize}";
567 m_t <<
"\n\\end{DoxyEnumerate}";
571 m_t <<
"\n\\end{DoxyItemize}";
613 m_t <<
"\\begin{DoxySeeAlso}{";
617 m_t <<
"\\begin{DoxyReturn}{";
621 m_t <<
"\\begin{DoxyAuthor}{";
625 m_t <<
"\\begin{DoxyAuthor}{";
629 m_t <<
"\\begin{DoxyVersion}{";
633 m_t <<
"\\begin{DoxySince}{";
637 m_t <<
"\\begin{DoxyDate}{";
641 m_t <<
"\\begin{DoxyNote}{";
645 m_t <<
"\\begin{DoxyWarning}{";
649 m_t <<
"\\begin{DoxyPrecond}{";
653 m_t <<
"\\begin{DoxyPostcond}{";
657 m_t <<
"\\begin{DoxyCopyright}{";
661 m_t <<
"\\begin{DoxyInvariant}{";
665 m_t <<
"\\begin{DoxyRemark}{";
669 m_t <<
"\\begin{DoxyAttention}{";
673 m_t <<
"\\begin{DoxyParagraph}{";
676 m_t <<
"\\begin{DoxyParagraph}{";
698 m_t <<
"\n\\end{DoxySeeAlso}\n";
701 m_t <<
"\n\\end{DoxyReturn}\n";
704 m_t <<
"\n\\end{DoxyAuthor}\n";
707 m_t <<
"\n\\end{DoxyAuthor}\n";
710 m_t <<
"\n\\end{DoxyVersion}\n";
713 m_t <<
"\n\\end{DoxySince}\n";
716 m_t <<
"\n\\end{DoxyDate}\n";
719 m_t <<
"\n\\end{DoxyNote}\n";
722 m_t <<
"\n\\end{DoxyWarning}\n";
725 m_t <<
"\n\\end{DoxyPrecond}\n";
728 m_t <<
"\n\\end{DoxyPostcond}\n";
731 m_t <<
"\n\\end{DoxyCopyright}\n";
734 m_t <<
"\n\\end{DoxyInvariant}\n";
737 m_t <<
"\n\\end{DoxyRemark}\n";
740 m_t <<
"\n\\end{DoxyAttention}\n";
743 m_t <<
"\n\\end{DoxyParagraph}\n";
746 m_t <<
"\n\\end{DoxyParagraph}\n";
767 m_t <<
"\\begin{DoxyItemize}" <<
endl;
773 m_t <<
"\\end{DoxyItemize}" <<
endl;
806 m_t <<
"\n\\begin{DoxyEnumerate}";
808 m_t <<
"\n\\begin{DoxyItemize}";
815 m_t <<
"\n\\end{DoxyEnumerate}";
817 m_t <<
"\n\\end{DoxyItemize}";
848 m_t <<
"\n\\begin{DoxyRefList}";
852 m_t <<
"\n\\begin{DoxyDescription}";
862 m_t <<
"\n\\end{DoxyRefList}";
866 m_t <<
"\n\\end{DoxyDescription}";
895 while (n && !isNested)
907 t <<
"\\begin{tabularx}{\\linewidth}{|*{" << cols <<
"}{>{\\raggedright\\arraybackslash}X|}}";
911 t <<
"\\tabulinesep=1mm\n\\begin{longtabu} spread 0pt [c]{*" << cols <<
"{|X[-1]}|}\n";
920 t <<
"\\end{tabularx}\n";
924 t <<
"\\end{longtabu}\n";
993 if (r->
isHeading())
m_t <<
"\\rowcolor{\\tableheadbgcolor}";
1016 m_t <<
"\\multicolumn{" << span->
colSpan <<
"}{";
1017 m_t <<
"p{(\\linewidth-\\tabcolsep*" 1018 <<
numCols() <<
"-\\arrayrulewidth*" 1024 m_t <<
"\\multicolumn{1}{c|}{}";
1043 else if (span->
column>col)
1045 m_t <<
"\\cline{" << col <<
"-" << (span->
column-1) <<
"}";
1056 m_t <<
"\\cline{" << col <<
"-" <<
numCols() <<
"}";
1065 m_t <<
"\\endfirsthead" <<
endl;
1098 m_t <<
"\\multicolumn{" << span->
colSpan <<
"}{";
1103 m_t <<
"p{(\\linewidth-\\tabcolsep*" 1104 <<
numCols() <<
"-\\arrayrulewidth*" 1121 m_t <<
"\\multicolumn{" << cs <<
"}{";
1126 m_t <<
"p{(\\linewidth-\\tabcolsep*" 1127 <<
numCols() <<
"-\\arrayrulewidth*" 1129 << cs <<
"/"<<
numCols() <<
"}|}{";
1130 if (c->
isHeading())
m_t <<
"\\cellcolor{\\tableheadbgcolor}";
1140 m_t <<
"\\multirow{" << rs <<
"}{\\linewidth}{";
1145 m_t <<
"\\PBS\\centering ";
1149 m_t <<
"\\PBS\\raggedleft ";
1230 if (gfxName.
right(4)==
".eps" || gfxName.
right(4)==
".pdf")
1335 m_t <<
"\\item \\contentsline{section}{";
1339 m_t <<
"\\hyperlink{" << ref->
file() <<
"_" << ref->
anchor() <<
"}{" ;
1357 m_t <<
"\\footnotesize" <<
endl;
1358 m_t <<
"\\begin{multicols}{2}" <<
endl;
1359 m_t <<
"\\begin{DoxyCompactList}" <<
endl;
1365 m_t <<
"\\end{DoxyCompactList}" <<
endl;
1366 m_t <<
"\\end{multicols}" <<
endl;
1367 m_t <<
"\\normalsize" <<
endl;
1378 m_t <<
"\n\\begin{DoxyParams}";
1379 if (hasInOutSpecs && hasTypeSpecs)
m_t <<
"[2]";
1380 else if (hasInOutSpecs || hasTypeSpecs)
m_t <<
"[1]";
1385 m_t <<
"\n\\begin{DoxyRetVals}{";
1389 m_t <<
"\n\\begin{DoxyExceptions}{";
1396 m_t <<
"\n\\begin{DoxyTemplParams}{";
1397 filter(
"Template Parameters");
1411 m_t <<
"\\end{DoxyParams}\n";
1414 m_t <<
"\\end{DoxyRetVals}\n";
1417 m_t <<
"\\end{DoxyExceptions}\n";
1420 m_t <<
"\\end{DoxyTemplParams}\n";
1449 m_t <<
"\\mbox{\\tt ";
1464 if (useTable)
m_t <<
" & ";
1471 for (li.toFirst();(type=li.
current());++li)
1473 if (!first)
m_t <<
" | ";
else first=
FALSE;
1483 if (useTable)
m_t <<
" & ";
1491 for (li.toFirst();(param=li.
current());++li)
1493 if (!first)
m_t <<
",";
else first=
FALSE;
1531 <<
"\\hline" <<
endl;
1539 m_t <<
"\\begin{DoxyRefDesc}{";
1542 bool anonymousEnum = x->
file()==
"@";
1562 m_t <<
"\\end{DoxyRefDesc}" <<
endl;
1596 m_t <<
"\\begin{quote}" <<
endl;
1602 m_t <<
"\\end{quote}" <<
endl;
1633 if (ref.
isEmpty() && pdfHyperLinks)
1637 m_t <<
"\\doxytablelink{";
1641 m_t <<
"\\hyperlink{";
1648 else if (ref.
isEmpty() && refToTable)
1650 m_t <<
"\\doxytableref{";
1654 m_t <<
"\\doxyref{";
1666 if (ref.
isEmpty() && !pdfHyperLinks)
1671 if (!file.isEmpty() && !anchor.
isEmpty())
m_t <<
"_";
1672 m_t << anchor <<
"}";
1697 if ((i=baseName.
findRev(
'/'))!=-1)
1701 if ((i=baseName.
find(
'.'))!=-1)
1703 baseName=baseName.
left(i);
1726 if ((i=baseName.
findRev(
'/'))!=-1)
1730 if ((i=baseName.
find(
'.'))!=-1)
1732 baseName=baseName.
left(i);
1752 if ((i=shortName.
findRev(
'/'))!=-1)
1754 shortName=shortName.
right(shortName.
length()-i-1);
1772 if ((i=baseName.
findRev(
'/'))!=-1)
1776 if ((i=baseName.
find(
'.'))!=-1)
1778 baseName=baseName.
left(i);
1798 if ((i=shortName.
findRev(
'/'))!=-1)
1800 shortName=shortName.
right(shortName.
length()-i-1);
1813 if ((i=shortName.
findRev(
'/'))!=-1)
1815 shortName=shortName.
right(shortName.
length()-i-1);
void writePlantUMLFile(const QCString &fileName, DocVerbatim *s)
QCString exampleFile() const
virtual QCString trPrecondition()=0
span(IterB &&b, IterE &&e, Adaptor &&adaptor) -> span< decltype(adaptor(std::forward< IterB >(b))), decltype(adaptor(std::forward< IterE >(e))) >
virtual QCString trSince()=0
ParserInterface * getParser(const char *extension)
void setInColSpan(bool b)
void endMscFile(bool hasCaption)
void writeMscGraphFromFile(const char *inFile, const char *outDir, const char *outFile, MscOutputFormat format)
const HtmlAttribList & attribs() const
virtual QCString trAttention()=0
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
DocHtmlCaption * caption() const
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
QCString convertCharEntitiesToUTF8(const QCString &s)
virtual QCString trInvariant()=0
void startLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=FALSE)
virtual QCString trPageAbbreviation()=0
LatexDocVisitor(FTextStream &t, CodeOutputInterface &ci, const char *langExt, bool insideTabbing)
virtual QCString trPostcondition()=0
virtual QCString trWarning()=0
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content)
static QCString stripPath(const QCString &s)
QCString left(uint len) const
virtual QCString trCopyright()=0
const QList< DocNode > & paramTypes()
static HtmlEntityMapper * instance()
Simplified and optimized version of QTextStream.
int find(char c, int index=0, bool cs=TRUE) const
virtual Kind kind() const =0
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity.
void accept(DocVisitor *v)
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
int findRev(char c, int index=-1, bool cs=TRUE) const
virtual QCString trReturns()=0
virtual QCString trDate()=0
Concrete visitor implementation for LaTeX output.
static void writeEndTableCommand(FTextStream &t, const DocNode *n)
virtual QCString trNote()=0
QCString exampleFile() const
static void visitPreStart(FTextStream &t, const bool hasCaption, QCString name, QCString width, QCString height)
QCString extractBlock(const QCString text, const QCString marker)
static bool insideMainPage
Abstract visitor that participates in the visitor pattern.
virtual QCString trExceptions()=0
const int DocVisitor_Latex
static ParserManager * parserManager
QCString targetTitle() const
void visitPre(DocAutoList *)
int writeBlock(const char *data, uint len)
CodeOutputInterface & m_ci
virtual QCString trParameters()=0
void visitPost(DocAutoList *)
int currentColumn() const
void writeDiaFile(const QCString &fileName, DocVerbatim *s)
void setInRowSpan(bool b)
QCString right(uint len) const
void endDotFile(bool hasCaption)
virtual QCString trAuthor(bool first_capital, bool singular)=0
static const char * secLabels[maxLevels]
virtual QCString trReturnValues()=0
void endDiaFile(bool hasCaption)
void endLink(const QCString &ref, const QCString &file, const QCString &anchor)
QCString & prepend(const char *s)
const QList< DocNode > & children() const
void writeDotGraphFromFile(const char *inFile, const char *outDir, const char *outFile, GraphOutputFormat format)
static void visitPostEnd(FTextStream &t, const bool hasCaption)
A bunch of utility functions.
const char * data() const
#define Config_getString(val)
virtual QCString trVersion()=0
QCString escapeMakeIndexChars(const char *s)
#define Config_getBool(val)
void generatePlantUMLOutput(const char *baseName, const char *outDir, PlantUMLOutputFormat format)
static QCString escapeLabelName(const char *s)
void err(const char *fmt,...)
static const char * getSectionName(int level)
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
QCString language() const
QCString mid(uint index, uint len=0xffffffff) const
The QFile class is an I/O device that operates on files.
static const QCString anchorPrefix
QCString & sprintf(const char *format,...)
DocParamSect::Direction direction() const
const RowSpanList & rowSpans()
Alignment alignment() const
bool hasInOutSpecifier() const
const QList< DocNode > & parameters()
void writeDiaGraphFromFile(const char *inFile, const char *outDir, const char *outFile, DiaOutputFormat format)
SrcLangExt getLanguageFromFileName(const QCString fileName)
void filter(const char *str)
bool hasTypeSpecifier() const
void setCurrentColumn(int col)
static void visitCaption(LatexDocVisitor *parent, QList< DocNode > children)
QCString find(const QCString name) const
static bool tableIsNested(const DocNode *n)
Translator * theTranslator
QCString exampleFile() const
virtual QCString trRemarks()=0
void writeMscFile(const QCString &fileName, DocVerbatim *s)
virtual QCString trSeeAlso()=0
DocHtmlRow * firstRow() const
QCString extension() const
The QFileInfo class provides system-independent file information.
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
virtual void accept(DocVisitor *v)=0
void startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
def parent(G, child, parent_type)
QTextStream & endl(QTextStream &s)
void addRowSpan(ActiveRowSpan *span)
QStack< TableState > m_tableStateStack
static void writeStartTableCommand(FTextStream &t, const DocNode *n, int cols)
const QList< DocNode > & children() const