49static const std::array<const char *,g_maxLevels>
g_secLabels =
53 "doxysubsubsubsection",
54 "doxysubsubsubsubsection",
55 "doxysubsubsubsubsubsection",
56 "doxysubsubsubsubsubsubsection"
66 if (compactLatex) l++;
97 static const reg::Ex re(R
"((\d+)%)");
98 std::string s = dimension.str();
106 t << percent/100.0 <<
"\\text" << orientationString;
117 t <<
"\n\\begin{DoxyInlineImage}%\n";
123 t <<
"\n\\begin{DoxyImage}%\n";
127 t <<
"\n\\begin{DoxyImageNoCaption}%\n"
132 t <<
"\\includegraphics";
156 t <<
"[height=\\baselineskip,keepaspectratio=true]";
160 t <<
"[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]";
168 t <<
"{" << name <<
"}";
176 t <<
"%\n\\doxyfigcaption{";
180 t <<
"%\n\\doxyfigcaptionnolink{";
196 t <<
"%\n\\end{DoxyInlineImage}\n";
203 t <<
"\\end{DoxyImage}\n";
207 t <<
"\\end{DoxyImageNoCaption}\n";
214 for (
const auto &n : children)
221 const DString &langExt,
int hierarchyLevel)
270 m_t <<
"\\texorpdfstring{$<$}{<}";
281 m_t <<
"\\texorpdfstring{$>$}{>}";
303 if (!emojiName.
empty())
339 m_t <<
"\\hspace{\\textwidth minus \\textwidth}\\mbox{}\\\\ ";
343 m_t <<
"~\\newline\n";
351 m_t <<
"\\DoxyHorRuler{1}\n";
353 m_t <<
"\\DoxyHorRuler{0}\n";
362 if (s.
enable())
m_t <<
"{\\bfseries{";
else m_t <<
"}}";
382 if (s.
enable())
m_t <<
"\\textsubscript{";
else m_t <<
"}";
385 if (s.
enable())
m_t <<
"\\textsuperscript{";
else m_t <<
"}";
388 if (s.
enable())
m_t <<
"\\begin{center}";
else m_t <<
"\\end{center} ";
391 if (s.
enable())
m_t <<
"\n\\footnotesize ";
else m_t <<
"\n\\normalsize ";
399 m_t <<
"\n\\begin{DoxyPre}";
405 m_t <<
"\\end{DoxyPre}\n";
437 m_t <<
"{\\ttfamily ";
444 m_t <<
"\\begin{DoxyCode}{0}";
446 m_t <<
"\\end{DoxyCode}\n";
450 m_t <<
"\\begin{DoxyVerb}";
452 m_t <<
"\\end{DoxyVerb}\n";
472 if (!fileName.empty())
485 "msc {"+s.
text()+
"}",
487 if (!fileName.empty())
501 for (
const auto &baseName: baseNameVector)
508 if (
Config_getBool(MERMAID_RENDER_MODE)!=MERMAID_RENDER_MODE_t::CLIENT_SIDE)
584 m_t <<
"\\begin{DoxyCode}{0}";
586 m_t <<
"\\end{DoxyCode}\n";
590 m_t <<
"\n\\begin{DoxyVerbInclude}\n";
592 m_t <<
"\\end{DoxyVerbInclude}\n";
631 std::unique_ptr<FileDef> fd;
665 const char *p = s.
data();
673 case '\'':
m_t <<
"\\textnormal{\\textquotesingle}";
break;
674 default:
m_t << c;
break;
703 if (!opt.noPar()) txt +=
"[";
705 if (!opt.noPar()) txt +=
"]";
707 m_t <<
"{\\bfseries ";
717 anchor = anchor.
mid(anchorPrefix.
length());
720 txt +=
"\\DoxyCite{" + anchor +
"}";
725 else if (opt.isShortAuthor())
727 txt +=
"{shortauthor}";
729 else if (opt.isYear())
733 if (!opt.noPar()) txt +=
"{1}";
738 m_t <<
"{\\bfseries ";
744 if (!opt.noPar()) txt +=
"[";
746 if (!opt.noPar()) txt +=
"]";
747 m_t <<
"{\\bfseries ";
764 m_t <<
"\n\\begin{DoxyEnumerate}";
770 m_t <<
"\n\\begin{DoxyItemize}";
775 m_t <<
"\n\\end{DoxyEnumerate}";
779 m_t <<
"\n\\end{DoxyItemize}";
789 m_t <<
"\n\\item[\\DoxyUnchecked] ";
793 m_t <<
"\n\\item[\\DoxyChecked] ";
810 std::get_if<DocParamSect>(p.
parent())
816 m_t <<
"~\\newline\n";
836 m_t <<
"\\begin{DoxySeeAlso}{";
840 m_t <<
"\\begin{DoxyReturn}{";
844 m_t <<
"\\begin{DoxyAuthor}{";
848 m_t <<
"\\begin{DoxyAuthor}{";
852 m_t <<
"\\begin{DoxyVersion}{";
856 m_t <<
"\\begin{DoxySince}{";
860 m_t <<
"\\begin{DoxyDate}{";
864 m_t <<
"\\begin{DoxyNote}{";
868 m_t <<
"\\begin{DoxyWarning}{";
872 m_t <<
"\\begin{DoxyPrecond}{";
876 m_t <<
"\\begin{DoxyPostcond}{";
880 m_t <<
"\\begin{DoxyCopyright}{";
884 m_t <<
"\\begin{DoxyInvariant}{";
888 m_t <<
"\\begin{DoxyRemark}{";
892 m_t <<
"\\begin{DoxyAttention}{";
896 m_t <<
"\\begin{DoxyImportant}{";
900 m_t <<
"\\begin{DoxyParagraph}{";
903 m_t <<
"\\begin{DoxyParagraph}{";
911 std::visit(*
this,*s.
title());
920 m_t <<
"\n\\end{DoxySeeAlso}\n";
923 m_t <<
"\n\\end{DoxyReturn}\n";
926 m_t <<
"\n\\end{DoxyAuthor}\n";
929 m_t <<
"\n\\end{DoxyAuthor}\n";
932 m_t <<
"\n\\end{DoxyVersion}\n";
935 m_t <<
"\n\\end{DoxySince}\n";
938 m_t <<
"\n\\end{DoxyDate}\n";
941 m_t <<
"\n\\end{DoxyNote}\n";
944 m_t <<
"\n\\end{DoxyWarning}\n";
947 m_t <<
"\n\\end{DoxyPrecond}\n";
950 m_t <<
"\n\\end{DoxyPostcond}\n";
953 m_t <<
"\n\\end{DoxyCopyright}\n";
956 m_t <<
"\n\\end{DoxyInvariant}\n";
959 m_t <<
"\n\\end{DoxyRemark}\n";
962 m_t <<
"\n\\end{DoxyAttention}\n";
965 m_t <<
"\n\\end{DoxyImportant}\n";
968 m_t <<
"\n\\end{DoxyParagraph}\n";
971 m_t <<
"\n\\end{DoxyParagraph}\n";
988 m_t <<
"\\begin{DoxyItemize}\n";
991 m_t <<
"\\end{DoxyItemize}\n";
1017 m_t <<
"\\texorpdfstring{";
1022 std::visit(*
this,*s.
title());
1031 std::visit(*
this,*s.
title());
1048 m_t <<
"\n\\begin{DoxyEnumerate}";
1049 for (
const auto &opt : s.
attribs())
1051 if (opt.name==
"type")
1055 m_t << (first ?
"[":
",");
1056 m_t <<
"label=\\arabic*";
1059 else if (opt.value==
"a")
1061 m_t << (first ?
"[":
",");
1062 m_t <<
"label=\\enumalphalphcnt*";
1065 else if (opt.value==
"A")
1067 m_t << (first ?
"[":
",");
1068 m_t <<
"label=\\enumAlphAlphcnt*";
1071 else if (opt.value==
"i")
1073 m_t << (first ?
"[":
",");
1074 m_t <<
"label=\\roman*";
1077 else if (opt.value==
"I")
1079 m_t << (first ?
"[":
",");
1080 m_t <<
"label=\\Roman*";
1084 else if (opt.name==
"start")
1086 m_t << (first ?
"[":
",");
1088 int val = opt.value.toInt(&ok);
1089 if (ok)
m_t <<
"start=" << val;
1093 if (!first)
m_t <<
"]\n";
1097 m_t <<
"\n\\begin{DoxyItemize}";
1102 m_t <<
"\n\\end{DoxyEnumerate}";
1104 m_t <<
"\n\\end{DoxyItemize}";
1112 for (
const auto &opt : l.
attribs())
1114 if (opt.name==
"value")
1117 int val = opt.value.toInt(&ok);
1135 auto it = std::find_if(attrs.begin(),attrs.end(),
1136 [](
const auto &att) { return att.name==
"class"; });
1137 if (it!=attrs.end() && it->value ==
"reflist")
return true;
1143 bool isNested=
false;
1145 while (n && !isNested)
1147 if (std::get_if<DocHtmlDescList>(n))
1162 m_t <<
"\n\\begin{DoxyRefList}";
1167 m_t <<
"\n\\begin{DoxyDescription}";
1172 m_t <<
"\n\\end{DoxyRefList}";
1176 m_t <<
"\n\\end{DoxyDescription}";
1183 m_t <<
"\n\\item[{\\parbox[t]{\\linewidth}{";
1202 while (n && !isNested)
1214 m_t <<
"\\begin{DoxyTableNested}{" << cols <<
"}";
1218 m_t <<
"\n\\begin{DoxyTable}{" << cols <<
"}";
1226 m_t <<
"\\end{DoxyTableNested}\n";
1230 m_t <<
"\\end{DoxyTable}\n";
1242 if (!c->
file().
empty() && pdfHyperLinks)
1258 std::visit(*
this, *t.
caption());
1299 if (span.rowSpan>0) span.rowSpan--;
1300 if (span.rowSpan<=0)
1304 else if (span.column>col)
1306 col = span.column+span.colSpan;
1310 col = span.column+span.colSpan;
1326 auto appendOpt = [&cellOpts](
const DString &s)
1328 if (!cellOpts.
empty()) cellOpts+=
",";
1331 auto appendSpec = [&cellSpec](
const DString &s)
1333 if (!cellSpec.
empty()) cellSpec+=
",";
1336 auto writeCell = [
this,&cellOpts,&cellSpec]()
1341 if (!cellOpts.
empty())
1343 m_t <<
"[" << cellOpts <<
"]";
1345 m_t <<
"{" << cellSpec <<
"}";
1350 for (
const auto &span :
rowSpans())
1359 for (
size_t i=0;i<span.colSpan;i++)
1385 appendOpt(
"r="+
DString().setNum(rs));
1395 appendOpt(
"c="+
DString().setNum(cs));
1399 appendSpec(
"bg=\\tableheadbgcolor");
1400 appendSpec(
"font=\\bfseries");
1418 for (
int i=0;i<cs-1;i++)
1441 m_t <<
"{\\texttt{";
1449 m_t <<
"{\\bfseries{";
1461 std::visit(*
this,*summary);
1462 m_t <<
"\\begin{adjustwidth}{1em}{0em}\n";
1467 m_t <<
"\\end{adjustwidth}\n";
1506 bool exists =
false;
1514 if (!fileName.empty())
1526 bool exists =
false;
1534 if (!fileName.empty())
1546 bool exists =
false;
1554 if (!fileName.empty())
1575 if (
Config_getBool(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLIENT_SIDE)
return;
1621 m_t <<
"\\item \\contentsline{section}{";
1652 m_t <<
"\\footnotesize\n";
1653 m_t <<
"\\begin{multicols}{2}\n";
1654 m_t <<
"\\begin{DoxyCompactList}\n";
1658 m_t <<
"\\end{DoxyCompactList}\n";
1659 m_t <<
"\\end{multicols}\n";
1660 m_t <<
"\\normalsize\n";
1672 m_t <<
"\n\\begin{DoxyParams}";
1673 if (hasInOutSpecs && hasTypeSpecs)
m_t <<
"[2]";
1674 else if (hasInOutSpecs || hasTypeSpecs)
m_t <<
"[1]";
1679 m_t <<
"\n\\begin{DoxyRetVals}{";
1683 m_t <<
"\n\\begin{DoxyExceptions}{";
1687 m_t <<
"\n\\begin{DoxyTemplParams}{";
1700 m_t <<
"\\end{DoxyParams}\n";
1703 m_t <<
"\\end{DoxyRetVals}\n";
1706 m_t <<
"\\end{DoxyExceptions}\n";
1709 m_t <<
"\\end{DoxyTemplParams}\n";
1729 parentType = sect->
type();
1743 m_t <<
"\\doxymbox{\\texttt{";
1758 if (useTable)
m_t <<
" & ";
1764 std::visit(*
this,type);
1766 if (useTable)
m_t <<
" & ";
1772 if (!first)
m_t <<
",";
else first=
false;
1774 std::visit(*
this,param);
1788 std::visit(*
this,par);
1803 m_t <<
"\\begin{DoxyRefDesc}{";
1806 bool anonymousEnum = x.
file()==
"@";
1808 if (pdfHyperlinks && !anonymousEnum)
1814 m_t <<
"\\textbf{ ";
1819 if (pdfHyperlinks && !anonymousEnum)
1827 m_t <<
"\\end{DoxyRefDesc}\n";
1847 m_t <<
"\\begin{quote}\n";
1850 m_t <<
"\\end{quote}\n";
1878 bool refToTable,
bool refToSection)
1881 if (ref.
empty() && pdfHyperLinks)
1885 m_t <<
"\\doxytablelink{";
1887 else if (refToSection)
1901 if (!anchor.
empty())
m_t << anchor;
1906 else if (ref.
empty() && refToSection)
1908 m_t <<
"\\doxysectref{";
1910 else if (ref.
empty() && refToTable)
1912 m_t <<
"\\doxytableref{";
1914 else if (ref.
empty())
1916 m_t <<
"\\doxyref{";
1920 m_t <<
"\\textbf{ ";
1928 if (ref.
empty() && !pdfHyperLinks)
1932 m_t <<
"}{" << file;
1933 if (!file.empty() && !anchor.
empty())
m_t <<
"_";
1934 m_t << anchor <<
"}";
1937 m_t <<
"{" << sectionType.
level() <<
"}";
1940 if (ref.
empty() && pdfHyperLinks)
1954 int srcLine,
bool newFile
1975 int srcLine,
bool newFile
2008 int srcLine,
bool newFile
2052 bool useBitmap = inBuf.find(
"@startditaa") != std::string::npos;
2056 DString(),srcFile,srcLine,
false);
2058 for (
const auto &bName: baseNameVector)
2082 if (
Config_getBool(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLIENT_SIDE)
return;
2088 if (shortName.find(
'.')==
DString::npos) shortName +=
"." + imgExt;
2103 if (
Config_getBool(MERMAID_RENDER_MODE)==MERMAID_RENDER_MODE_t::CLIENT_SIDE)
return;
2111 outDir,
DString(),inBuf,imageFormat,
2114 if (shortName.find(
'.')==
DString::npos) shortName +=
"." + imgExt;
2135 err(
"Maximum indent level ({}) exceeded while generating LaTeX output!\n",
maxIndentLevels-1);
static CitationManager & instance()
DString anchorPrefix() const
static CodeFragmentManager & instance()
void parseCodeFragment(OutputCodeList &codeOutList, const DString &fileName, const DString &blockId, const DString &scopeName, bool showLineNumbers, bool trimLeft, bool stripCodeComments)
virtual void parseCode(OutputCodeList &codeOutList, const DString &scopeName, const DString &input, SrcLangExt lang, bool stripCodeComments, const CodeParserOptions &options)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
DString mid(size_t index, size_t len=npos) const
bool empty() const
Returns true iff the string is empty (std::string compatible alias for isEmpty()).
static DString integerToRoman(int n, bool upper=true)
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
DString & prepend(const char *s)
size_t find(char c, size_t pos=0) const
int toInt(bool *ok=nullptr, int base=10) const
DString left(size_t len) const
const std::string & str() const
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
bool endsWith(const char *s) const
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Node representing an anchor.
Node representing an auto List.
Node representing an item of a auto list.
Node representing a citation of some bibliographic reference.
CiteInfoOption option() const
Node representing a dia file.
Node representing a dot file.
Node representing an emoji.
Node representing a Hypertext reference.
Node representing a horizontal ruler.
Node representing an HTML blockquote.
Node representing a HTML table caption.
Node representing a HTML table cell.
Valignment valignment() const
Alignment alignment() const
Node representing a HTML description data.
Node representing a Html description list.
const HtmlAttribList & attribs() const
Node representing a Html description item.
const DocNodeVariant * summary() const
Node representing a Html list.
const HtmlAttribList & attribs() const
Node representing a HTML list item.
const HtmlAttribList & attribs() const
Node representing a HTML table row.
Node representing a HTML table.
size_t numberHeaderRows() const
size_t numColumns() const
const DocNodeVariant * caption() const
Node representing an image.
bool isInlineImage() const
Node representing a include/dontinclude operator block.
bool stripCodeComments() const
DString exampleFile() const
DString includeFileName() const
Node representing an included text block from file.
bool stripCodeComments() const
DString exampleFile() const
DString extension() const
Node representing an entry in the index.
Node representing an internal section of documentation.
Node representing an internal reference to some item.
Node representing a line break.
Node representing a link to some item.
Node representing a word that can be linked to something.
Node representing a mermaid file.
Node representing a msc file.
DocNodeVariant * parent()
Node representing an block of paragraphs.
Node representing a paragraph in the documentation tree.
Node representing a parameter list.
const DocNodeList & parameters() const
const DocNodeList & paramTypes() const
DocParamSect::Direction direction() const
const DocNodeList & paragraphs() const
Node representing a parameter section.
bool hasInOutSpecifier() const
bool hasTypeSpecifier() const
Node representing a uml file.
Node representing a reference to some item.
SectionType sectionType() const
bool refToSection() const
DString targetTitle() const
Root node of documentation tree.
Node representing a reference to a section.
Node representing a list of section references.
Node representing a normal section.
const DocNodeVariant * title() const
Node representing a separator.
Node representing a simple list.
Node representing a simple list item.
const DocNodeVariant * paragraph() const
Node representing a simple section.
const DocNodeVariant * title() const
Node representing a separator between two simple sections of the same type.
Node representing a style change.
Node representing a special symbol.
HtmlEntityMapper::SymType symbol() const
Root node of a text fragment.
Node representing a simple section title.
Node representing a URL (or email address).
Node representing a verbatim, unparsed text fragment.
const DocNodeList & children() const
DString exampleFile() const
Node representing a VHDL flow chart.
void pushHidden(bool hide)
CodeParserInterface & getCodeParser(const DString &langExt)
Node representing some amount of white space.
Node representing a word.
Node representing an item of a cross-referenced list.
const char * name(int index) const
Access routine to the name of the Emoji entity.
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Minimal replacement for QFileInfo.
std::string fileName() const
std::string dirPath(bool absPath=true) const
Class representing a list of HTML attributes.
const char * latex(SymType symb) const
Access routine to the LaTeX code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
Generator for LaTeX code fragments.
int usedTableLevel() const
bool insideTabbing() const
void startPlantUmlFile(const DString &fileName, const DString &width, const DString &height, bool hasCaption, const DString &srcFile, int srcLine)
void startMscFile(const DString &fileName, const DString &width, const DString &height, bool hasCaption, const DString &srcFile, int srcLine, bool newFile=true)
void writePlantUMLFile(const DString &fileName, const DocVerbatim &s)
void setCurrentColumn(size_t col)
static const int maxIndentLevels
void endDotFile(bool hasCaption)
void operator()(const DocWord &)
void startLink(const DString &ref, const DString &file, const DString &anchor, bool refToTable=false, bool refToSection=false)
void visitCaption(const DocNodeList &children)
void startDotFile(const DString &fileName, const DString &width, const DString &height, bool hasCaption, const DString &srcFile, int srcLine, bool newFile=true)
void addRowSpan(ActiveRowSpan &&span)
void setNumCols(size_t num)
void writeStartTableCommand(const DocNodeVariant *n, size_t cols)
void writeEndTableCommand(const DocNodeVariant *n)
size_t currentColumn() const
LatexDocVisitor(TextStream &t, OutputCodeList &ci, LatexCodeGenerator &lcg, const DString &langExt, int hierarchyLevel=0)
void startMermaidFile(const DString &fileName, const DString &width, const DString &height, bool hasCaption, const DString &srcFile, int srcLine)
void endMscFile(bool hasCaption)
bool isTableNested(const DocNodeVariant *n) const
LatexListItemInfo m_listItemInfo[maxIndentLevels]
void writeMscFile(const DString &fileName, const DocVerbatim &s, bool newFile=true)
void endDiaFile(bool hasCaption)
void endMermaidFile(bool hasCaption)
const char * getSectionName(int level) const
void writeMermaidFile(const DString &baseName, const DocVerbatim &s)
void startDiaFile(const DString &fileName, const DString &width, const DString &height, bool hasCaption, const DString &srcFile, int srcLine, bool newFile=true)
void filter(const DString &str, const bool retainNewLine=false, const bool citeEntry=false)
void endLink(const DString &ref, const DString &file, const DString &anchor, bool refToTable=false, bool refToSection=false, SectionType sectionType=SectionType::Anchor)
void endPlantUmlFile(bool hasCaption)
void visitChildren(const T &t)
LatexCodeGenerator & m_lcg
static MermaidManager & instance()
static DString imageExtension(ImageFormat imageFormat)
static ImageFormat convertToImageFormat(OutputFormat outputFormat)
void generateMermaidOutput(const DString &baseName, const DString &outDir, ImageFormat format, bool toIndex)
Register a generated Mermaid image with the index.
DString writeMermaidSource(const DString &outDirArg, const DString &fileName, const DString &content, ImageFormat format, const DString &srcFile, int srcLine)
Write a Mermaid source file and register it for CLI rendering.
Class representing a list of different code generators.
void startCodeFragment(const DString &style)
void endCodeFragment(const DString &style)
void generatePlantUMLOutput(const DString &baseName, const DString &outDir, OutputFormat format, bool toIndex)
Convert a PlantUML file to an image.
StringVector writePlantUMLSource(const DString &outDirArg, const DString &fileName, const DString &content, OutputFormat format, const DString &engine, const DString &srcFile, int srcLine, bool inlineCode)
Write a PlantUML compatible file.
static PlantumlManager & instance()
constexpr int level() const
Text streaming class that buffers data.
virtual DString trExceptions()=0
virtual DString trReturns()=0
virtual DString trParameters()=0
virtual DString trCopyright()=0
virtual DString trWarning()=0
virtual DString trSince()=0
virtual DString trNote()=0
virtual DString trAuthor(bool first_capital, bool singular)=0
virtual DString trReturnValues()=0
virtual DString trVersion()=0
virtual DString trTemplateParameters()=0
virtual DString trImportant()=0
virtual DString trPrecondition()=0
virtual DString trAttention()=0
virtual DString trPageAbbreviation()=0
virtual DString trInvariant()=0
virtual DString trRemarks()=0
virtual DString trDate()=0
virtual DString trSeeAlso()=0
virtual DString trPostcondition()=0
Class representing a regular expression.
Object representing the matching results.
#define Config_getBool(name)
#define Config_getString(name)
void writeDiaGraphFromFile(const DString &inFile, const DString &outDir, const DString &outFile, DiaOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
constexpr bool holds_one_of_alternatives(const DocNodeVariant &v)
returns true iff v holds one of types passed as template parameters
std::variant< DocWord, DocLinkedWord, DocURL, DocLineBreak, DocHorRuler, DocAnchor, DocCite, DocStyleChange, DocSymbol, DocEmoji, DocWhiteSpace, DocSeparator, DocVerbatim, DocInclude, DocIncOperator, DocFormula, DocIndexEntry, DocAutoList, DocAutoListItem, DocTitle, DocXRefItem, DocImage, DocDotFile, DocMscFile, DocDiaFile, DocVhdlFlow, DocLink, DocRef, DocInternalRef, DocHRef, DocHtmlHeader, DocHtmlDescTitle, DocHtmlDescList, DocSection, DocSecRefItem, DocSecRefList, DocInternal, DocParBlock, DocSimpleList, DocHtmlList, DocSimpleSect, DocSimpleSectSep, DocParamSect, DocPara, DocParamList, DocSimpleListItem, DocHtmlListItem, DocHtmlDescData, DocHtmlCell, DocHtmlCaption, DocHtmlRow, DocHtmlTable, DocHtmlBlockQuote, DocText, DocRoot, DocHtmlDetails, DocHtmlSummary, DocPlantUmlFile, DocMermaidFile > DocNodeVariant
constexpr DocNodeVariant * parent(DocNodeVariant *n)
returns the parent node of a given node n or nullptr if the node has no parent.
void writeDotGraphFromFile(const DString &inFile, const DString &outDir, const DString &outFile, GraphOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
std::unique_ptr< FileDef > createFileDef(const DString &p, const DString &n, const DString &ref, const DString &dn)
Translator * theTranslator
static const char * g_subparagraphLabel
static const int g_maxLevels
static void visitPreStart(TextStream &t, bool hasCaption, DString name, DString width, DString height, bool inlineImage=false)
static void insertDimension(TextStream &t, DString dimension, const char *orientationString)
static const std::array< const char *, g_maxLevels > g_secLabels
static bool listIsNested(const DocHtmlDescList &dl)
static const char * g_paragraphLabel
static bool classEqualsReflist(const DocHtmlDescList &dl)
static void visitPostEnd(TextStream &t, bool hasCaption, bool inlineImage=false)
@ TEX
called through texorpdf as TeX (first) part
@ PDF
called through texorpdf as PDF (second) part
@ NO
not called through texorpdf
DString latexFilterURL(const DString &s)
void filterLatexString(TextStream &t, const DString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)
void latexWriteIndexItem(TextStream &m_t, const DString &s1, const DString &s2)
void writeMscGraphFromFile(const DString &inFile, const DString &outDir, const DString &outFile, MscOutputFormat format, const DString &srcFile, int srcLine, bool toIndex)
bool search(std::string_view str, Match &match, const Ex &re, size_t pos)
Search in a given string str starting at position pos for a match against regular expression re.
Portable versions of functions that are platform dependent.
Options to configure the code parser.
CodeParserOptions & setStartLine(int lineNr)
CodeParserOptions & setInlineFragment(bool enable)
CodeParserOptions & setShowLineNumbers(bool enable)
CodeParserOptions & setFileDef(const FileDef *fd)
DString writeInlineGraph(const DString &baseName, const DString &extension, const DString &content, bool &exists)
DString getFileNameExtension(const DString &fn)
bool readInputFile(const DString &fileName, std::string &contents, bool filter, bool isSourceCode)
read a file name fileName and optionally filter and transcode it
SrcLangExt getLanguageFromFileName(const DString &fileName, SrcLangExt defLang)
bool copyFile(const DString &src, const DString &dest)
Copies the contents of file with name src to the newly created file with name dest.
DString makeBaseName(const DString &name, const DString &ext)
DString stripPath(const DString &s)
SrcLangExt getLanguageFromCodeLang(DString &fileName)
Routine to handle the language attribute of the \code command.
A bunch of utility functions.