16 #ifndef LATEXDOCVISITOR_H 17 #define LATEXDOCVISITOR_H 22 #include "docvisitor.h" 41 const QCString &langExt,
int hierarchyLevel = 0);
47 void operator()(
const DocWord &);
52 void operator()(
const DocURL &);
63 void operator()(
const DocCite &);
72 void operator()(
const DocPara &);
73 void operator()(
const DocRoot &);
89 void operator()(
const DocHRef &);
97 void operator()(
const DocLink &lnk);
98 void operator()(
const DocRef &ref);
105 void operator()(
const DocText &);
112 void visitChildren(
const T &t)
114 for (
const auto &child : t.children())
116 std::visit(*
this, child);
122 ActiveRowSpan(
const DocHtmlCell &c,
size_t rs,
size_t cs,
size_t col)
123 : cell(c), rowSpan(rs), colSpan(cs), column(col) {}
130 typedef std::vector<ActiveRowSpan> RowSpanList;
136 void filter(
const QCString &str,
const bool retainNewLine =
false);
138 const QCString &anchor,
bool refToTable=
false,
bool refToSection=
false);
140 const QCString &anchor,
bool refToTable=
false,
bool refToSection=
false,
SectionType sectionType = SectionType::Anchor);
141 QCString escapeMakeIndexChars(
const char *s);
143 const QCString &height,
bool hasCaption,
144 const QCString &srcFile,
int srcLine);
145 void endDotFile(
bool hasCaption);
148 const QCString &height,
bool hasCaption,
149 const QCString &srcFile,
int srcLine);
150 void endMscFile(
bool hasCaption);
154 const QCString &height,
bool hasCaption,
155 const QCString &srcFile,
int srcLine);
156 void endDiaFile(
bool hasCaption);
161 void incIndentLevel();
162 void decIndentLevel();
163 int indentLevel()
const;
164 const char *getSectionName(
int level)
const;
177 int m_hierarchyLevel;
178 TexOrPdf m_texOrPdf = TexOrPdf::NO;
182 RowSpanList rowSpans;
184 size_t currentColumn = 0;
185 bool inRowSpan =
false;
186 bool inColSpan =
false;
187 bool firstRow =
false;
189 std::stack<TableState> m_tableStateStack;
190 RowSpanList m_emptyRowSpanList;
192 static const int maxIndentLevels = 13;
193 int m_indentLevel = 0;
195 struct LatexListItemInfo
200 LatexListItemInfo m_listItemInfo[maxIndentLevels];
202 void pushTableState()
204 m_tableStateStack.emplace();
208 m_tableStateStack.pop();
210 size_t currentColumn()
const 212 return !m_tableStateStack.empty() ? m_tableStateStack.top().currentColumn : 0;
214 void setCurrentColumn(
size_t col)
216 if (!m_tableStateStack.empty()) m_tableStateStack.top().currentColumn = col;
218 size_t numCols()
const 220 return !m_tableStateStack.empty() ? m_tableStateStack.top().numCols : 0;
222 void setNumCols(
size_t num)
224 if (!m_tableStateStack.empty()) m_tableStateStack.top().numCols = num;
226 bool inRowSpan()
const 228 return !m_tableStateStack.empty() ? m_tableStateStack.top().inRowSpan : FALSE;
230 void setInRowSpan(
bool b)
232 if (!m_tableStateStack.empty()) m_tableStateStack.top().inRowSpan = b;
234 bool inColSpan()
const 236 return !m_tableStateStack.empty() ? m_tableStateStack.top().inColSpan : FALSE;
238 void setInColSpan(
bool b)
240 if (!m_tableStateStack.empty()) m_tableStateStack.top().inColSpan = b;
242 bool firstRow()
const 244 return !m_tableStateStack.empty() ? m_tableStateStack.top().firstRow : FALSE;
246 void setFirstRow(
bool b)
248 if (!m_tableStateStack.empty()) m_tableStateStack.top().firstRow = b;
250 RowSpanList &rowSpans()
252 return !m_tableStateStack.empty() ? m_tableStateStack.top().rowSpans : m_emptyRowSpanList;
254 void addRowSpan(ActiveRowSpan &&span)
256 if (!m_tableStateStack.empty()) m_tableStateStack.top().rowSpans.push_back(std::move(span));
258 bool insideTable()
const 260 return !m_tableStateStack.empty();
Node representing a separator.
Definition: docnode.h:343
Node representing an HTML blockquote.
Definition: docnode.h:1252
Node representing a URL (or email address)
Definition: docnode.h:185
Node representing a word.
Definition: docnode.h:150
Node representing some amount of white space.
Definition: docnode.h:332
Node representing a Hypertext reference.
Definition: docnode.h:784
Root node of a text fragment.
Definition: docnode.h:1265
Node representing a horizontal ruler.
Definition: docnode.h:213
Node representing a simple section title.
Definition: docnode.h:579
Node representing a reference to some item.
Definition: docnode.h:739
Node representing a style change.
Definition: docnode.h:262
Node representing an auto List.
Definition: docnode.h:542
Node representing an emoji.
Definition: docnode.h:319
Node representing a citation of some bibliographic reference.
Definition: docnode.h:242
Text streaming class that buffers data.
Definition: textstream.h:35
Node representing a HTML table caption.
Definition: docnode.h:1189
Root node of documentation tree.
Definition: docnode.h:1274
Node representing a HTML table cell.
Definition: docnode.h:1154
Node representing an entry in the index.
Definition: docnode.h:523
Node representing a simple section.
Definition: docnode.h:978
Node representing a paragraph in the documentation tree.
Definition: docnode.h:1041
Concrete visitor implementation for LaTeX output.
Definition: latexdocvisitor.h:37
Node representing a special symbol.
Definition: docnode.h:306
Helper base class for functionality shared by all visitors.
Definition: docvisitor.h:28
Node representing a link to some item.
Definition: docnode.h:720
Node Html details.
Definition: docnode.h:818
Node representing a VHDL flow chart.
Definition: docnode.h:710
Node representing a Html description list.
Definition: docnode.h:862
Node representing a HTML list item.
Definition: docnode.h:1126
Node representing a msc file.
Definition: docnode.h:692
Node representing a verbatim, unparsed text fragment.
Definition: docnode.h:354
Node representing a Html description item.
Definition: docnode.h:849
Node representing a HTML table.
Definition: docnode.h:1230
Node representing a dia file.
Definition: docnode.h:701
Node representing a HTML table row.
Definition: docnode.h:1207
Definition: docnode.h:116
Node representing a line break.
Definition: docnode.h:199
Generator for LaTeX code fragments.
Definition: latexgen.h:27
Node representing a list of section references.
Definition: docnode.h:920
Class representing a list of different code generators.
Definition: outputlist.h:199
Node representing a reference to a section.
Definition: docnode.h:896
Node representing a parameter section.
Definition: docnode.h:1014
Node representing an image.
Definition: docnode.h:612
Node representing a parameter list.
Definition: docnode.h:1086
Node representing a normal section.
Definition: docnode.h:875
Node representing a Html list.
Definition: docnode.h:961
Node representing an internal reference to some item.
Definition: docnode.h:768
Node representing an included text block from file.
Definition: docnode.h:413
Node representing an block of paragraphs.
Definition: docnode.h:940
Node representing an anchor.
Definition: docnode.h:226
Node representing a separator between two simple sections of the same type.
Definition: docnode.h:1005
Node representing a simple list item.
Definition: docnode.h:1114
Node representing a HTML description data.
Definition: docnode.h:1142
This is an alternative implementation of QCString.
Definition: qcstring.h:93
Node representing a word that can be linked to something.
Definition: docnode.h:162
Node representing a simple list.
Definition: docnode.h:951
Node representing a dot file.
Definition: docnode.h:683
Node representing an item of a auto list.
Definition: docnode.h:566
Node representing an internal section of documentation.
Definition: docnode.h:930
Node representing an item of a cross-referenced list.
Definition: docnode.h:591
Node representing a include/dontinclude operator block.
Definition: docnode.h:450
Node Html summary.
Definition: docnode.h:805