doxygen  1.8.18
About: Doxygen is a source code documentation generator tool for C++, C, Objective-C, C#, PHP, Java, Python, IDL (diverse flavors), Fortran, VHDL, Tcl, and to some extent D. Different output formats are supported.
  Fossies Dox: doxygen-1.8.18.src.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

latexdocvisitor.cpp
Go to the documentation of this file.
1 
18 #include "htmlattrib.h"
19 #include <qfileinfo.h>
20 #include "latexdocvisitor.h"
21 #include "latexgen.h"
22 #include "docparser.h"
23 #include "language.h"
24 #include "doxygen.h"
25 #include "outputgen.h"
26 #include "dot.h"
27 #include "util.h"
28 #include "message.h"
29 #include "parserintf.h"
30 #include "msc.h"
31 #include "dia.h"
32 #include "cite.h"
33 #include "filedef.h"
34 #include "config.h"
35 #include "htmlentity.h"
36 #include "emoji.h"
37 #include "plantuml.h"
38 
39 const int maxLevels=5;
40 static const char *secLabels[maxLevels] =
41  { "doxysection","doxysubsection","doxysubsubsection","doxyparagraph","doxysubparagraph" };
42 
43 static const char *getSectionName(int level)
44 {
45  static bool compactLatex = Config_getBool(COMPACT_LATEX);
46  int l = level;
47  if (compactLatex) l++;
49  return secLabels[QMIN(maxLevels-1,l)];
50 }
51 
52 static void visitPreStart(FTextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage = FALSE)
53 {
54  if (inlineImage)
55  {
56  t << "\n\\begin{DoxyInlineImage}\n";
57  }
58  else
59  {
60  if (hasCaption)
61  {
62  t << "\n\\begin{DoxyImage}\n";
63  }
64  else
65  {
66  t << "\n\\begin{DoxyImageNoCaption}\n"
67  " \\mbox{";
68  }
69  }
70 
71  t << "\\includegraphics";
72  if (!width.isEmpty() || !height.isEmpty())
73  {
74  t << "[";
75  }
76  if (!width.isEmpty())
77  {
78  t << "width=" << width;
79  }
80  if (!width.isEmpty() && !height.isEmpty())
81  {
82  t << ",";
83  }
84  if (!height.isEmpty())
85  {
86  t << "height=" << height;
87  }
88  if (width.isEmpty() && height.isEmpty())
89  {
90  /* default setting */
91  if (inlineImage)
92  {
93  t << "[height=\\baselineskip,keepaspectratio=true]";
94  }
95  else
96  {
97  t << "[width=\\textwidth,height=\\textheight/2,keepaspectratio=true]";
98  }
99  }
100  else
101  {
102  t << "]";
103  }
104 
105  t << "{" << name << "}";
106 
107  if (hasCaption)
108  {
109  if (!inlineImage)
110  {
111  t << "\n\\doxyfigcaption{";
112  }
113  else
114  {
115  t << "%"; // to catch the caption
116  }
117  }
118 }
119 
120 
121 
122 static void visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage = FALSE)
123 {
124  if (inlineImage)
125  {
126  t << "\n\\end{DoxyInlineImage}\n";
127  }
128  else
129  {
130  t << "}\n"; // end mbox or caption
131  if (hasCaption)
132  {
133  t << "\\end{DoxyImage}\n";
134  }
135  else
136  {
137  t << "\\end{DoxyImageNoCaption}\n";
138  }
139  }
140 }
141 
142 
143 static void visitCaption(LatexDocVisitor *parent, QList<DocNode> children)
144 {
145  QListIterator<DocNode> cli(children);
146  DocNode *n;
147  for (cli.toFirst();(n=cli.current());++cli) n->accept(parent);
148 }
149 
151 {
152  QCString result;
153  const char *p=s;
154  char str[2]; str[1]=0;
155  char c;
156  if (p)
157  {
158  while ((c=*p++))
159  {
160  switch (c)
161  {
162  case '!': m_t << "\"!"; break;
163  case '"': m_t << "\"\""; break;
164  case '@': m_t << "\"@"; break;
165  case '|': m_t << "\\texttt{\"|}"; break;
166  case '[': m_t << "["; break;
167  case ']': m_t << "]"; break;
168  case '{': m_t << "\\lcurly{}"; break;
169  case '}': m_t << "\\rcurly{}"; break;
170  default: str[0]=c; filter(str); break;
171  }
172  }
173  }
174  return result;
175 }
176 
177 
179  const char *langExt,bool insideTabbing)
180  : DocVisitor(DocVisitor_Latex), m_t(t), m_ci(ci), m_insidePre(FALSE),
181  m_insideItem(FALSE), m_hide(FALSE), m_hideCaption(FALSE), m_insideTabbing(insideTabbing),
182  m_langExt(langExt)
183 {
184  m_tableStateStack.setAutoDelete(TRUE);
185 }
186 
187  //--------------------------------------
188  // visitor functions for leaf nodes
189  //--------------------------------------
190 
192 {
193  if (m_hide) return;
194  filter(w->word());
195 }
196 
198 {
199  if (m_hide) return;
200  startLink(w->ref(),w->file(),w->anchor());
201  filter(w->word());
202  endLink(w->ref(),w->file(),w->anchor());
203 }
204 
206 {
207  if (m_hide) return;
208  if (m_insidePre)
209  {
210  m_t << w->chars();
211  }
212  else
213  {
214  m_t << " ";
215  }
216 }
217 
219 {
220  if (m_hide) return;
221  const char *res = HtmlEntityMapper::instance()->latex(s->symbol());
222  if (res)
223  {
224  if (((s->symbol() == DocSymbol::Sym_lt) || (s->symbol() == DocSymbol::Sym_Less))&& (!m_insidePre))
225  {
226  m_t << "$<$";
227  }
228  else if (((s->symbol() == DocSymbol::Sym_gt) || (s->symbol() == DocSymbol::Sym_Greater)) && (!m_insidePre))
229  {
230  m_t << "$>$";
231  }
232  else
233  {
234  m_t << res;
235  }
236  }
237  else
238  {
239  err("LaTeX: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance()->html(s->symbol(),TRUE));
240  }
241 }
242 
244 {
245  if (m_hide) return;
246  QCString emojiName = EmojiEntityMapper::instance()->name(s->index());
247  if (!emojiName.isEmpty())
248  {
249  QCString imageName=emojiName.mid(1,emojiName.length()-2); // strip : at start and end
250  m_t << "\\doxygenemoji{";
251  filter(emojiName);
252  m_t << "}{" << imageName << "}";
253  }
254  else
255  {
256  m_t << s->name();
257  }
258 }
259 
261 {
262  if (m_hide) return;
263  if (Config_getBool(PDF_HYPERLINKS))
264  {
265  m_t << "\\href{";
266  if (u->isEmail()) m_t << "mailto:";
267  m_t << latexFilterURL(u->url()) << "}";
268  }
269  m_t << "{\\texttt{ ";
270  filter(u->url());
271  m_t << "}}";
272 }
273 
275 {
276  if (m_hide) return;
277  m_t << "~\\newline\n";
278 }
279 
281 {
282  if (m_hide) return;
283  if (insideTable())
284  m_t << "\\DoxyHorRuler{1}\n";
285  else
286  m_t << "\\DoxyHorRuler{0}\n";
287 }
288 
290 {
291  if (m_hide) return;
292  switch (s->style())
293  {
295  if (s->enable()) m_t << "{\\bfseries{"; else m_t << "}}";
296  break;
297  case DocStyleChange::S:
299  case DocStyleChange::Del:
300  if (s->enable()) m_t << "\\sout{"; else m_t << "}";
301  break;
303  case DocStyleChange::Ins:
304  if (s->enable()) m_t << "\\uline{"; else m_t << "}";
305  break;
307  if (s->enable()) m_t << "{\\itshape "; else m_t << "}";
308  break;
310  if (s->enable()) m_t << "{\\ttfamily "; else m_t << "}";
311  break;
313  if (s->enable()) m_t << "\\textsubscript{"; else m_t << "}";
314  break;
316  if (s->enable()) m_t << "\\textsuperscript{"; else m_t << "}";
317  break;
319  if (s->enable()) m_t << "\\begin{center}"; else m_t << "\\end{center} ";
320  break;
322  if (s->enable()) m_t << "\n\\footnotesize "; else m_t << "\n\\normalsize ";
323  break;
325  if (s->enable())
326  {
327  m_t << "\n\\begin{DoxyPre}";
329  }
330  else
331  {
333  m_t << "\\end{DoxyPre}\n";
334  }
335  break;
336  case DocStyleChange::Div: /* HTML only */ break;
337  case DocStyleChange::Span: /* HTML only */ break;
338  }
339 }
340 
342 {
343  if (m_hide) return;
344  QCString lang = m_langExt;
345  if (!s->language().isEmpty()) // explicit language setting
346  {
347  lang = s->language();
348  }
349  SrcLangExt langExt = getLanguageFromFileName(lang);
350  switch(s->type())
351  {
352  case DocVerbatim::Code:
353  {
354  m_t << "\n\\begin{DoxyCode}{" << usedTableLevels() << "}\n";
357  .parseCode(m_ci,s->context(),s->text(),langExt,
358  s->isExample(),s->exampleFile());
360  m_t << "\\end{DoxyCode}\n";
361  }
362  break;
363  case DocVerbatim::Verbatim:
364  m_t << "\\begin{DoxyVerb}";
365  m_t << s->text();
366  m_t << "\\end{DoxyVerb}\n";
367  break;
368  case DocVerbatim::HtmlOnly:
369  case DocVerbatim::XmlOnly:
370  case DocVerbatim::ManOnly:
373  /* nothing */
374  break;
376  m_t << s->text();
377  break;
378  case DocVerbatim::Dot:
379  {
380  static int dotindex = 1;
381  QCString fileName(4096);
382 
383  fileName.sprintf("%s%d%s",
384  (Config_getString(LATEX_OUTPUT)+"/inline_dotgraph_").data(),
385  dotindex++,
386  ".dot"
387  );
388  QFile file(fileName);
389  if (!file.open(IO_WriteOnly))
390  {
391  err("Could not open file %s for writing\n",fileName.data());
392  }
393  else
394  {
395  file.writeBlock( s->text(), s->text().length() );
396  file.close();
397 
398  startDotFile(fileName,s->width(),s->height(),s->hasCaption());
399  visitCaption(this, s->children());
400  endDotFile(s->hasCaption());
401 
402  if (Config_getBool(DOT_CLEANUP)) file.remove();
403  }
404  }
405  break;
406  case DocVerbatim::Msc:
407  {
408  static int mscindex = 1;
409  QCString baseName(4096);
410 
411  baseName.sprintf("%s%d",
412  (Config_getString(LATEX_OUTPUT)+"/inline_mscgraph_").data(),
413  mscindex++
414  );
415  QFile file(baseName+".msc");
416  if (!file.open(IO_WriteOnly))
417  {
418  err("Could not open file %s.msc for writing\n",baseName.data());
419  }
420  else
421  {
422  QCString text = "msc {";
423  text+=s->text();
424  text+="}";
425  file.writeBlock( text, text.length() );
426  file.close();
427 
428  writeMscFile(baseName, s);
429 
430  if (Config_getBool(DOT_CLEANUP)) file.remove();
431  }
432  }
433  break;
434  case DocVerbatim::PlantUML:
435  {
436  QCString latexOutput = Config_getString(LATEX_OUTPUT);
438 
439  writePlantUMLFile(baseName, s);
440  }
441  break;
442  }
443 }
444 
446 {
447  if (m_hide) return;
448  m_t << "\\label{" << stripPath(anc->file()) << "_" << anc->anchor() << "}%" << endl;
449  if (!anc->file().isEmpty() && Config_getBool(PDF_HYPERLINKS))
450  {
451  m_t << "\\Hypertarget{" << stripPath(anc->file()) << "_" << anc->anchor()
452  << "}%" << endl;
453  }
454 }
455 
457 {
458  if (m_hide) return;
459  SrcLangExt langExt = getLanguageFromFileName(inc->extension());
460  switch(inc->type())
461  {
463  {
464  m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
466  QFileInfo cfi( inc->file() );
467  FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
469  .parseCode(m_ci,inc->context(),
470  inc->text(),
471  langExt,
472  inc->isExample(),
473  inc->exampleFile(),
474  fd, // fileDef,
475  -1, // start line
476  -1, // end line
477  FALSE, // inline fragment
478  0, // memberDef
479  TRUE // show line numbers
480  );
481  delete fd;
483  m_t << "\\end{DoxyCodeInclude}" << endl;
484  }
485  break;
486  case DocInclude::Include:
487  m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
490  .parseCode(m_ci,inc->context(),
491  inc->text(),langExt,inc->isExample(),
492  inc->exampleFile(),
493  0, // fileDef
494  -1, // startLine
495  -1, // endLine
496  TRUE, // inlineFragment
497  0, // memberDef
498  FALSE
499  );
501  m_t << "\\end{DoxyCodeInclude}\n";
502  break;
510  break;
512  m_t << inc->text();
513  break;
515  m_t << "\n\\begin{DoxyVerbInclude}\n";
516  m_t << inc->text();
517  m_t << "\\end{DoxyVerbInclude}\n";
518  break;
519  case DocInclude::Snippet:
520  {
521  m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
524  .parseCode(m_ci,
525  inc->context(),
526  extractBlock(inc->text(),inc->blockId()),
527  langExt,
528  inc->isExample(),
529  inc->exampleFile()
530  );
532  m_t << "\\end{DoxyCodeInclude}" << endl;
533  }
534  break;
536  {
537  QFileInfo cfi( inc->file() );
538  FileDef *fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
539  m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
542  .parseCode(m_ci,
543  inc->context(),
544  extractBlock(inc->text(),inc->blockId()),
545  langExt,
546  inc->isExample(),
547  inc->exampleFile(),
548  fd,
549  lineBlock(inc->text(),inc->blockId()),
550  -1, // endLine
551  FALSE, // inlineFragment
552  0, // memberDef
553  TRUE // show line number
554  );
555  delete fd;
557  m_t << "\\end{DoxyCodeInclude}" << endl;
558  }
559  break;
562  err("Internal inconsistency: found switch SnippetDoc / IncludeDoc in file: %s"
563  "Please create a bug report\n",__FILE__);
564  break;
565  }
566 }
567 
569 {
570  //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
571  // op->type(),op->isFirst(),op->isLast(),op->text().data());
572  if (op->isFirst())
573  {
574  if (!m_hide) m_t << "\n\\begin{DoxyCodeInclude}{" << usedTableLevels() << "}\n";
576  pushEnabled();
577  m_hide = TRUE;
578  }
579  QCString locLangExt = getFileNameExtension(op->includeFileName());
580  if (locLangExt.isEmpty()) locLangExt = m_langExt;
581  SrcLangExt langExt = getLanguageFromFileName(locLangExt);
582  if (op->type()!=DocIncOperator::Skip)
583  {
584  popEnabled();
585  if (!m_hide)
586  {
587  FileDef *fd = 0;
588  if (!op->includeFileName().isEmpty())
589  {
590  QFileInfo cfi( op->includeFileName() );
591  fd = createFileDef( cfi.dirPath().utf8(), cfi.fileName().utf8() );
592  }
593 
595  .parseCode(m_ci,op->context(),op->text(),langExt,
596  op->isExample(),op->exampleFile(),
597  fd, // fileDef
598  op->line(), // startLine
599  -1, // endLine
600  FALSE, // inline fragment
601  0, // memberDef
602  op->showLineNo() // show line numbers
603  );
604  if (fd) delete fd;
605  }
606  pushEnabled();
607  m_hide=TRUE;
608  }
609  if (op->isLast())
610  {
611  popEnabled();
613  if (!m_hide) m_t << "\n\\end{DoxyCodeInclude}\n";
614  }
615  else
616  {
617  if (!m_hide) m_t << endl;
618  }
619 }
620 
622 {
623  if (m_hide) return;
624  const char *p=f->text();
625  char c;
626  if (p)
627  {
628  while ((c=*p++))
629  {
630  switch (c)
631  {
632  case '\'': m_t << "\\textnormal{\\textquotesingle}"; break;
633  default: m_t << c; break;
634  }
635  }
636  }
637 }
638 
640 {
641  if (m_hide) return;
642  m_t << "\\index{";
643  m_t << latexEscapeLabelName(i->entry());
644  m_t << "@{";
646  m_t << "}}";
647 }
648 
650 {
651 }
652 
654 {
655  if (m_hide) return;
656  if (!cite->file().isEmpty())
657  {
658  //startLink(cite->ref(),cite->file(),cite->anchor());
659  QCString anchor = cite->anchor();
661  anchor = anchor.mid(anchorPrefix.length()); // strip prefix
662  m_t << "\\cite{" << anchor << "}";
663  }
664  else
665  {
666  m_t << "{\\bfseries [";
667  filter(cite->text());
668  m_t << "]}";
669  }
670 }
671 
672 //--------------------------------------
673 // visitor functions for compound nodes
674 //--------------------------------------
675 
677 {
678  if (m_hide) return;
679  if (l->isEnumList())
680  {
681  m_t << "\n\\begin{DoxyEnumerate}";
682  }
683  else
684  {
685  m_t << "\n\\begin{DoxyItemize}";
686  }
687 }
688 
690 {
691  if (m_hide) return;
692  if (l->isEnumList())
693  {
694  m_t << "\n\\end{DoxyEnumerate}";
695  }
696  else
697  {
698  m_t << "\n\\end{DoxyItemize}";
699  }
700 }
701 
703 {
704  if (m_hide) return;
705  m_t << "\n\\item ";
706 }
707 
709 {
710 }
711 
713 {
714 }
715 
717 {
718  if (m_hide) return;
719  if (!p->isLast() && // omit <p> for last paragraph
720  !(p->parent() && // and for parameter sections
722  )
723  ) m_t << endl << endl;
724 }
725 
727 {
728 }
729 
731 {
732 }
733 
735 {
736  if (m_hide) return;
737  switch(s->type())
738  {
739  case DocSimpleSect::See:
740  m_t << "\\begin{DoxySeeAlso}{";
742  break;
744  m_t << "\\begin{DoxyReturn}{";
746  break;
748  m_t << "\\begin{DoxyAuthor}{";
750  break;
752  m_t << "\\begin{DoxyAuthor}{";
754  break;
756  m_t << "\\begin{DoxyVersion}{";
758  break;
760  m_t << "\\begin{DoxySince}{";
762  break;
763  case DocSimpleSect::Date:
764  m_t << "\\begin{DoxyDate}{";
766  break;
767  case DocSimpleSect::Note:
768  m_t << "\\begin{DoxyNote}{";
770  break;
772  m_t << "\\begin{DoxyWarning}{";
774  break;
775  case DocSimpleSect::Pre:
776  m_t << "\\begin{DoxyPrecond}{";
778  break;
779  case DocSimpleSect::Post:
780  m_t << "\\begin{DoxyPostcond}{";
782  break;
784  m_t << "\\begin{DoxyCopyright}{";
786  break;
788  m_t << "\\begin{DoxyInvariant}{";
790  break;
792  m_t << "\\begin{DoxyRemark}{";
794  break;
796  m_t << "\\begin{DoxyAttention}{";
798  break;
799  case DocSimpleSect::User:
800  m_t << "\\begin{DoxyParagraph}{";
801  break;
802  case DocSimpleSect::Rcs:
803  m_t << "\\begin{DoxyParagraph}{";
804  break;
805  case DocSimpleSect::Unknown: break;
806  }
807 
808  // special case 1: user defined title
809  if (s->type()!=DocSimpleSect::User && s->type()!=DocSimpleSect::Rcs)
810  {
811  m_t << "}\n";
812  }
813  else
814  {
816  }
817 }
818 
820 {
821  if (m_hide) return;
822  switch(s->type())
823  {
824  case DocSimpleSect::See:
825  m_t << "\n\\end{DoxySeeAlso}\n";
826  break;
828  m_t << "\n\\end{DoxyReturn}\n";
829  break;
831  m_t << "\n\\end{DoxyAuthor}\n";
832  break;
834  m_t << "\n\\end{DoxyAuthor}\n";
835  break;
837  m_t << "\n\\end{DoxyVersion}\n";
838  break;
840  m_t << "\n\\end{DoxySince}\n";
841  break;
842  case DocSimpleSect::Date:
843  m_t << "\n\\end{DoxyDate}\n";
844  break;
845  case DocSimpleSect::Note:
846  m_t << "\n\\end{DoxyNote}\n";
847  break;
849  m_t << "\n\\end{DoxyWarning}\n";
850  break;
851  case DocSimpleSect::Pre:
852  m_t << "\n\\end{DoxyPrecond}\n";
853  break;
854  case DocSimpleSect::Post:
855  m_t << "\n\\end{DoxyPostcond}\n";
856  break;
858  m_t << "\n\\end{DoxyCopyright}\n";
859  break;
861  m_t << "\n\\end{DoxyInvariant}\n";
862  break;
864  m_t << "\n\\end{DoxyRemark}\n";
865  break;
867  m_t << "\n\\end{DoxyAttention}\n";
868  break;
869  case DocSimpleSect::User:
870  m_t << "\n\\end{DoxyParagraph}\n";
871  break;
872  case DocSimpleSect::Rcs:
873  m_t << "\n\\end{DoxyParagraph}\n";
874  break;
875  default:
876  break;
877  }
878 }
879 
881 {
882 }
883 
885 {
886  if (m_hide) return;
888  m_t << "}\n";
889 }
890 
892 {
893  if (m_hide) return;
894  m_t << "\\begin{DoxyItemize}" << endl;
895 }
896 
898 {
899  if (m_hide) return;
900  m_t << "\\end{DoxyItemize}" << endl;
901 }
902 
904 {
905  if (m_hide) return;
906  m_t << "\\item ";
907 }
908 
910 {
911 }
912 
914 {
915  if (m_hide) return;
916  if (Config_getBool(PDF_HYPERLINKS))
917  {
918  m_t << "\\hypertarget{" << stripPath(s->file()) << "_" << s->anchor() << "}{}";
919  }
920  m_t << "\\" << getSectionName(s->level()) << "{";
922  m_t << "}\\label{" << stripPath(s->file()) << "_" << s->anchor() << "}" << endl;
923 }
924 
926 {
927 }
928 
930 {
931  if (m_hide) return;
932  if (s->type()==DocHtmlList::Ordered)
933  m_t << "\n\\begin{DoxyEnumerate}";
934  else
935  m_t << "\n\\begin{DoxyItemize}";
936 }
937 
939 {
940  if (m_hide) return;
941  if (s->type()==DocHtmlList::Ordered)
942  m_t << "\n\\end{DoxyEnumerate}";
943  else
944  m_t << "\n\\end{DoxyItemize}";
945 }
946 
948 {
949  if (m_hide) return;
950  m_t << "\n\\item ";
951 }
952 
954 {
955 }
956 
957 //void LatexDocVisitor::visitPre(DocHtmlPre *)
958 //{
959 // m_t << "\\small\\begin{alltt}";
960 // m_insidePre=TRUE;
961 //}
962 
963 //void LatexDocVisitor::visitPost(DocHtmlPre *)
964 //{
965 // m_insidePre=FALSE;
966 // m_t << "\\end{alltt}\\normalsize " << endl;
967 //}
968 
970 {
971  if (m_hide) return;
972  QCString val = dl->attribs().find("class");
973  if (val=="reflist")
974  {
975  m_t << "\n\\begin{DoxyRefList}";
976  }
977  else
978  {
979  m_t << "\n\\begin{DoxyDescription}";
980  }
981 }
982 
984 {
985  if (m_hide) return;
986  QCString val = dl->attribs().find("class");
987  if (val=="reflist")
988  {
989  m_t << "\n\\end{DoxyRefList}";
990  }
991  else
992  {
993  m_t << "\n\\end{DoxyDescription}";
994  }
995 }
996 
998 {
999  if (m_hide) return;
1000  m_t << "\n\\item[";
1002 }
1003 
1005 {
1006  if (m_hide) return;
1008  m_t << "]";
1009 }
1010 
1012 {
1013 }
1014 
1016 {
1017 }
1018 
1019 static bool tableIsNested(const DocNode *n)
1020 {
1021  bool isNested=FALSE;
1022  while (n && !isNested)
1023  {
1024  isNested = n->kind()==DocNode::Kind_HtmlTable || n->kind()==DocNode::Kind_ParamSect;
1025  n = n->parent();
1026  }
1027  return isNested;
1028 }
1029 
1030 static void writeStartTableCommand(FTextStream &t,const DocNode *n,int cols)
1031 {
1032  if (tableIsNested(n))
1033  {
1034  t << "{\\begin{tabularx}{\\linewidth}{|*{" << cols << "}{>{\\raggedright\\arraybackslash}X|}}";
1035  }
1036  else
1037  {
1038  t << "\\tabulinesep=1mm\n\\begin{longtabu}spread 0pt [c]{*{" << cols << "}{|X[-1]}|}\n";
1039  }
1040  //return isNested ? "TabularNC" : "TabularC";
1041 }
1042 
1043 static void writeEndTableCommand(FTextStream &t,const DocNode *n)
1044 {
1045  if (tableIsNested(n))
1046  {
1047  t << "\\end{tabularx}}\n";
1048  }
1049  else
1050  {
1051  t << "\\end{longtabu}\n";
1052  }
1053  //return isNested ? "TabularNC" : "TabularC";
1054 }
1055 
1057 {
1058  if (m_hide) return;
1059  pushTableState();
1060  if (t->hasCaption())
1061  {
1062  DocHtmlCaption *c = t->caption();
1063  static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1064  if (!c->file().isEmpty() && pdfHyperLinks)
1065  {
1066  m_t << "\\hypertarget{" << stripPath(c->file()) << "_" << c->anchor()
1067  << "}{}";
1068  }
1069  m_t << endl;
1070  }
1071 
1073 
1074  if (t->hasCaption())
1075  {
1076  DocHtmlCaption *c = t->caption();
1077  m_t << "\\caption{";
1078  visitCaption(this, c->children());
1079  m_t << "}";
1080  m_t << "\\label{" << stripPath(c->file()) << "_" << c->anchor() << "}";
1081  m_t << "\\\\\n";
1082  }
1083 
1084  setNumCols(t->numColumns());
1085  m_t << "\\hline\n";
1086 
1087  // check if first row is a heading and then render the row already here
1088  // and end it with \endfirsthead (triggered via m_firstRow==TRUE)
1089  // then repeat the row as normal and end it with \endhead (m_firstRow==FALSE)
1090  DocHtmlRow *firstRow = t->firstRow();
1091  if (firstRow && firstRow->isHeading())
1092  {
1093  setFirstRow(TRUE);
1094  DocNode *n = t->parent();
1095  if (!tableIsNested(n)) firstRow->accept(this);
1096  setFirstRow(FALSE);
1097  }
1098 }
1099 
1101 {
1102  if (m_hide) return;
1104  popTableState();
1105 }
1106 
1108 {
1110  m_hide = TRUE;
1111 }
1112 
1114 {
1116 }
1117 
1119 {
1120  setCurrentColumn(0);
1121 }
1122 
1124 {
1125  if (m_hide) return;
1126 
1127  DocNode *n = row->parent() ->parent();
1128 
1129  int c=currentColumn();
1130  while (c<=numCols()) // end of row while inside a row span?
1131  {
1132  uint i;
1133  for (i=0;i<rowSpans().count();i++)
1134  {
1135  ActiveRowSpan *span = rowSpans().at(i);
1136  //printf(" found row span: column=%d rs=%d cs=%d rowIdx=%d cell->rowIdx=%d i=%d c=%d\n",
1137  // span->column, span->rowSpan,span->colSpan,row->rowIndex(),span->cell->rowIndex(),i,c);
1138  if (span->rowSpan>0 && span->column==c && // we are at a cell in a row span
1139  row->rowIndex()>span->cell->rowIndex() // but not the row that started the span
1140  )
1141  {
1142  m_t << "&";
1143  if (span->colSpan>1) // row span is also part of a column span
1144  {
1145  m_t << "\\multicolumn{" << span->colSpan << "}{";
1146  m_t << "}|}{}";
1147  }
1148  else // solitary row span
1149  {
1150  m_t << "\\multicolumn{1}{c|}{}";
1151  }
1152  }
1153  }
1154  c++;
1155  }
1156 
1157  m_t << "\\\\";
1158 
1159  int col = 1;
1160  uint i;
1161  for (i=0;i<rowSpans().count();i++)
1162  {
1163  ActiveRowSpan *span = rowSpans().at(i);
1164  if (span->rowSpan>0) span->rowSpan--;
1165  if (span->rowSpan<=0)
1166  {
1167  // inactive span
1168  }
1169  else if (span->column>col)
1170  {
1171  m_t << "\\cline{" << col << "-" << (span->column-1) << "}";
1172  col = span->column+span->colSpan;
1173  }
1174  else
1175  {
1176  col = span->column+span->colSpan;
1177  }
1178  }
1179 
1180  if (col <= numCols())
1181  {
1182  m_t << "\\cline{" << col << "-" << numCols() << "}";
1183  }
1184 
1185  m_t << "\n";
1186 
1187 
1188  if (row->isHeading() && row->rowIndex()==1 && !tableIsNested(n))
1189  {
1190  if (firstRow())
1191  {
1192  m_t << "\\endfirsthead" << endl;
1193  m_t << "\\hline" << endl;
1194  m_t << "\\endfoot" << endl;
1195  m_t << "\\hline" << endl;
1196  }
1197  else
1198  {
1199  m_t << "\\endhead" << endl;
1200  }
1201  }
1202 }
1203 
1205 {
1206  if (m_hide) return;
1207 
1208  DocHtmlRow *row = 0;
1209  if (c->parent() && c->parent()->kind()==DocNode::Kind_HtmlRow)
1210  {
1211  row = (DocHtmlRow*)c->parent();
1212  }
1213 
1215 
1216  //Skip columns that span from above.
1217  uint i;
1218  for (i=0;i<rowSpans().count();i++)
1219  {
1220  ActiveRowSpan *span = rowSpans().at(i);
1221  if (span->rowSpan>0 && span->column==currentColumn())
1222  {
1223  if (row && span->colSpan>1)
1224  {
1225  m_t << "\\multicolumn{" << span->colSpan << "}{";
1226  if (currentColumn() /*c->columnIndex()*/==1) // add extra | for first column
1227  {
1228  m_t << "|";
1229  }
1230  m_t << "l|}{" << (c->isHeading()? "\\columncolor{\\tableheadbgcolor}" : "") << "}"; // alignment not relevant, empty column
1232  }
1233  else
1234  {
1236  }
1237  m_t << "&";
1238  }
1239  }
1240 
1241  int cs = c->colSpan();
1242  int a = c->alignment();
1243  if (cs>1 && row)
1244  {
1245  setInColSpan(TRUE);
1246  m_t << "\\multicolumn{" << cs << "}{";
1247  if (c->columnIndex()==1) // add extra | for first column
1248  {
1249  m_t << "|";
1250  }
1251  switch (a)
1252  {
1253  case DocHtmlCell::Right:
1254  m_t << "r|}{";
1255  break;
1256  case DocHtmlCell::Center:
1257  m_t << "c|}{";
1258  break;
1259  default:
1260  m_t << "l|}{";
1261  break;
1262  }
1263  }
1264  int rs = c->rowSpan();
1265  if (rs>0)
1266  {
1267  setInRowSpan(TRUE);
1268  //printf("adding row span: cell={r=%d c=%d rs=%d cs=%d} curCol=%d\n",
1269  // c->rowIndex(),c->columnIndex(),c->rowSpan(),c->colSpan(),
1270  // currentColumn());
1272  m_t << "\\multirow{" << rs << "}{*}{";
1273  }
1274  if (a==DocHtmlCell::Center)
1275  {
1276  m_t << "\\PBS\\centering ";
1277  }
1278  else if (a==DocHtmlCell::Right)
1279  {
1280  m_t << "\\PBS\\raggedleft ";
1281  }
1282  if (c->isHeading())
1283  {
1284  m_t << "\\cellcolor{\\tableheadbgcolor}\\textbf{ ";
1285  }
1286  if (cs>1)
1287  {
1289  }
1290 }
1291 
1293 {
1294  if (m_hide) return;
1295  if (c->isHeading())
1296  {
1297  m_t << "}";
1298  }
1299  if (inRowSpan())
1300  {
1302  m_t << "}";
1303  }
1304  if (inColSpan())
1305  {
1307  m_t << "}";
1308  }
1309  if (!c->isLast()) m_t << "&";
1310 }
1311 
1313 {
1314  if (m_hide) return;
1315  //m_t << "\\begin{DoxyInternal}{";
1316  //filter(theTranslator->trForInternalUseOnly());
1317  //m_t << "}\n";
1318 }
1319 
1321 {
1322  if (m_hide) return;
1323  //m_t << "\\end{DoxyInternal}" << endl;
1324 }
1325 
1327 {
1328  if (m_hide) return;
1329  if (Config_getBool(PDF_HYPERLINKS))
1330  {
1331  m_t << "\\href{";
1332  m_t << latexFilterURL(href->url());
1333  m_t << "}";
1334  }
1335  m_t << "{\\texttt{ ";
1336 }
1337 
1339 {
1340  if (m_hide) return;
1341  m_t << "}}";
1342 }
1343 
1345 {
1346  if (m_hide) return;
1347  m_t << "\\" << getSectionName(header->level()) << "*{";
1348 }
1349 
1351 {
1352  if (m_hide) return;
1353  m_t << "}";
1354 }
1356 {
1357  if (img->type()==DocImage::Latex)
1358  {
1359  if (m_hide) return;
1360  QCString gfxName = img->name();
1361  if (gfxName.right(4)==".eps" || gfxName.right(4)==".pdf")
1362  {
1363  gfxName=gfxName.left(gfxName.length()-4);
1364  }
1365 
1366  visitPreStart(m_t,img->hasCaption(), gfxName, img->width(), img->height(), img->isInlineImage());
1367  }
1368  else // other format -> skip
1369  {
1370  pushEnabled();
1371  m_hide=TRUE;
1372  }
1373 }
1374 
1376 {
1377  if (img->type()==DocImage::Latex)
1378  {
1379  if (m_hide) return;
1380  visitPostEnd(m_t,img->hasCaption(), img->isInlineImage());
1381  }
1382  else // other format
1383  {
1384  popEnabled();
1385  }
1386 }
1387 
1389 {
1390  if (m_hide) return;
1391  startDotFile(df->file(),df->width(),df->height(),df->hasCaption());
1392 }
1393 
1395 {
1396  if (m_hide) return;
1397  endDotFile(df->hasCaption());
1398 }
1400 {
1401  if (m_hide) return;
1402  startMscFile(df->file(),df->width(),df->height(),df->hasCaption());
1403 }
1404 
1406 {
1407  if (m_hide) return;
1408  endMscFile(df->hasCaption());
1409 }
1410 
1412 {
1413  if (m_hide) return;
1414  startDiaFile(df->file(),df->width(),df->height(),df->hasCaption());
1415 }
1416 
1418 {
1419  if (m_hide) return;
1420  endDiaFile(df->hasCaption());
1421 }
1423 {
1424  if (m_hide) return;
1425  startLink(lnk->ref(),lnk->file(),lnk->anchor());
1426 }
1427 
1429 {
1430  if (m_hide) return;
1431  endLink(lnk->ref(),lnk->file(),lnk->anchor());
1432 }
1433 
1435 {
1436  if (m_hide) return;
1437  // when ref->isSubPage()==TRUE we use ref->file() for HTML and
1438  // ref->anchor() for LaTeX/RTF
1439  if (ref->isSubPage())
1440  {
1441  startLink(ref->ref(),0,ref->anchor());
1442  }
1443  else
1444  {
1445  if (!ref->file().isEmpty()) startLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
1446  }
1447  if (!ref->hasLinkText()) filter(ref->targetTitle());
1448 }
1449 
1451 {
1452  if (m_hide) return;
1453  if (ref->isSubPage())
1454  {
1455  endLink(ref->ref(),0,ref->anchor());
1456  }
1457  else
1458  {
1459  if (!ref->file().isEmpty()) endLink(ref->ref(),ref->file(),ref->anchor(),ref->refToTable());
1460  }
1461 }
1462 
1464 {
1465  if (m_hide) return;
1466  m_t << "\\item \\contentsline{section}{";
1467  static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1468  if (pdfHyperlinks)
1469  {
1470  m_t << "\\mbox{\\hyperlink{" << ref->file() << "_" << ref->anchor() << "}{" ;
1471  }
1472 }
1473 
1475 {
1476  if (m_hide) return;
1477  static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1478  if (pdfHyperlinks)
1479  {
1480  m_t << "}}";
1481  }
1482  m_t << "}{\\ref{" << ref->file() << "_" << ref->anchor() << "}}{}" << endl;
1483 }
1484 
1486 {
1487  if (m_hide) return;
1488  m_t << "\\footnotesize" << endl;
1489  m_t << "\\begin{multicols}{2}" << endl;
1490  m_t << "\\begin{DoxyCompactList}" << endl;
1491 }
1492 
1494 {
1495  if (m_hide) return;
1496  m_t << "\\end{DoxyCompactList}" << endl;
1497  m_t << "\\end{multicols}" << endl;
1498  m_t << "\\normalsize" << endl;
1499 }
1500 
1502 {
1503  if (m_hide) return;
1504  bool hasInOutSpecs = s->hasInOutSpecifier();
1505  bool hasTypeSpecs = s->hasTypeSpecifier();
1507  switch(s->type())
1508  {
1509  case DocParamSect::Param:
1510  m_t << "\n\\begin{DoxyParams}";
1511  if (hasInOutSpecs && hasTypeSpecs) m_t << "[2]"; // 2 extra cols
1512  else if (hasInOutSpecs || hasTypeSpecs) m_t << "[1]"; // 1 extra col
1513  m_t << "{";
1515  break;
1516  case DocParamSect::RetVal:
1517  m_t << "\n\\begin{DoxyRetVals}{";
1519  break;
1521  m_t << "\n\\begin{DoxyExceptions}{";
1523  break;
1525  m_t << "\n\\begin{DoxyTemplParams}{";
1527  break;
1528  default:
1529  ASSERT(0);
1530  }
1531  m_t << "}\n";
1532 }
1533 
1535 {
1536  if (m_hide) return;
1538  switch(s->type())
1539  {
1540  case DocParamSect::Param:
1541  m_t << "\\end{DoxyParams}\n";
1542  break;
1543  case DocParamSect::RetVal:
1544  m_t << "\\end{DoxyRetVals}\n";
1545  break;
1547  m_t << "\\end{DoxyExceptions}\n";
1548  break;
1550  m_t << "\\end{DoxyTemplParams}\n";
1551  break;
1552  default:
1553  ASSERT(0);
1554  }
1555 }
1556 
1558 {
1559  if (m_hide) return;
1561  DocParamSect *sect = 0;
1562  if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
1563  {
1564  parentType = ((DocParamSect*)pl->parent())->type();
1565  sect=(DocParamSect*)pl->parent();
1566  }
1567  bool useTable = parentType==DocParamSect::Param ||
1568  parentType==DocParamSect::RetVal ||
1569  parentType==DocParamSect::Exception ||
1570  parentType==DocParamSect::TemplateParam;
1571  if (!useTable)
1572  {
1573  m_t << "\\item[";
1574  }
1575  if (sect && sect->hasInOutSpecifier())
1576  {
1578  {
1579  m_t << "\\mbox{\\texttt{ ";
1580  if (pl->direction()==DocParamSect::In)
1581  {
1582  m_t << "in";
1583  }
1584  else if (pl->direction()==DocParamSect::Out)
1585  {
1586  m_t << "out";
1587  }
1588  else if (pl->direction()==DocParamSect::InOut)
1589  {
1590  m_t << "in,out";
1591  }
1592  m_t << "}} ";
1593  }
1594  if (useTable) m_t << " & ";
1595  }
1596  if (sect && sect->hasTypeSpecifier())
1597  {
1599  DocNode *type;
1600  for (li.toFirst();(type=li.current());++li)
1601  {
1602  if (type->kind()==DocNode::Kind_Word)
1603  {
1604  visit((DocWord*)type);
1605  }
1606  else if (type->kind()==DocNode::Kind_LinkedWord)
1607  {
1608  visit((DocLinkedWord*)type);
1609  }
1610  else if (type->kind()==DocNode::Kind_Sep)
1611  {
1612  m_t << " " << ((DocSeparator *)type)->chars() << " ";
1613  }
1614  }
1615  if (useTable) m_t << " & ";
1616  }
1617  m_t << "{\\em ";
1618  //QStrListIterator li(pl->parameters());
1619  //const char *s;
1621  DocNode *param;
1622  bool first=TRUE;
1623  for (li.toFirst();(param=li.current());++li)
1624  {
1625  if (!first) m_t << ","; else first=FALSE;
1627  if (param->kind()==DocNode::Kind_Word)
1628  {
1629  visit((DocWord*)param);
1630  }
1631  else if (param->kind()==DocNode::Kind_LinkedWord)
1632  {
1633  visit((DocLinkedWord*)param);
1634  }
1636  }
1637  m_t << "}";
1638  if (useTable)
1639  {
1640  m_t << " & ";
1641  }
1642  else
1643  {
1644  m_t << "]";
1645  }
1646 }
1647 
1649 {
1650  if (m_hide) return;
1652  if (pl->parent() && pl->parent()->kind()==DocNode::Kind_ParamSect)
1653  {
1654  parentType = ((DocParamSect*)pl->parent())->type();
1655  }
1656  bool useTable = parentType==DocParamSect::Param ||
1657  parentType==DocParamSect::RetVal ||
1658  parentType==DocParamSect::Exception ||
1659  parentType==DocParamSect::TemplateParam;
1660  if (useTable)
1661  {
1662  m_t << "\\\\" << endl
1663  << "\\hline" << endl;
1664  }
1665 }
1666 
1668 {
1669  static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1670  if (m_hide) return;
1671  if (x->title().isEmpty()) return;
1672  m_t << "\\begin{DoxyRefDesc}{";
1673  filter(x->title());
1674  m_t << "}" << endl;
1675  bool anonymousEnum = x->file()=="@";
1676  m_t << "\\item[";
1677  if (pdfHyperlinks && !anonymousEnum)
1678  {
1679  m_t << "\\mbox{\\hyperlink{" << stripPath(x->file()) << "_" << x->anchor() << "}{";
1680  }
1681  else
1682  {
1683  m_t << "\\textbf{ ";
1684  }
1686  filter(x->title());
1688  if (pdfHyperlinks && !anonymousEnum)
1689  {
1690  m_t << "}";
1691  }
1692  m_t << "}]";
1693 }
1694 
1696 {
1697  if (m_hide) return;
1698  if (x->title().isEmpty()) return;
1699  m_t << "\\end{DoxyRefDesc}" << endl;
1700 }
1701 
1703 {
1704  if (m_hide) return;
1705  startLink(0,ref->file(),ref->anchor());
1706 }
1707 
1709 {
1710  if (m_hide) return;
1711  endLink(0,ref->file(),ref->anchor());
1712 }
1713 
1715 {
1716 }
1717 
1719 {
1720 }
1721 
1723 {
1724  if (m_hide) return;
1725  m_t << "\\begin{quote}" << endl;
1726 }
1727 
1729 {
1730  if (m_hide) return;
1731  m_t << "\\end{quote}" << endl;
1732 }
1733 
1735 {
1736  if (m_hide) return;
1737 }
1738 
1740 {
1741  if (m_hide) return;
1742 }
1743 
1745 {
1746  if (m_hide) return;
1747 }
1748 
1750 {
1751  if (m_hide) return;
1752 }
1753 
1754 void LatexDocVisitor::filter(const char *str)
1755 {
1757 }
1758 
1759 void LatexDocVisitor::startLink(const QCString &ref,const QCString &file,const QCString &anchor,bool refToTable)
1760 {
1761  static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1762  if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1763  {
1764  if (refToTable)
1765  {
1766  m_t << "\\doxytablelink{";
1767  }
1768  else
1769  {
1770  m_t << "\\mbox{\\hyperlink{";
1771  }
1772  if (!file.isEmpty()) m_t << stripPath(file);
1773  if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1774  if (!anchor.isEmpty()) m_t << anchor;
1775  m_t << "}{";
1776  }
1777  else if (ref.isEmpty() && refToTable)
1778  {
1779  m_t << "\\doxytableref{";
1780  }
1781  else if (ref.isEmpty()) // internal non-PDF link
1782  {
1783  m_t << "\\doxyref{";
1784  }
1785  else // external link
1786  {
1787  m_t << "\\textbf{ ";
1788  }
1789 }
1790 
1791 void LatexDocVisitor::endLink(const QCString &ref,const QCString &file,const QCString &anchor,bool refToTable)
1792 {
1793  m_t << "}";
1794  static bool pdfHyperLinks = Config_getBool(PDF_HYPERLINKS);
1795  if (ref.isEmpty() && !pdfHyperLinks)
1796  {
1797  m_t << "{";
1799  m_t << "}{" << file;
1800  if (!file.isEmpty() && !anchor.isEmpty()) m_t << "_";
1801  m_t << anchor << "}";
1802  }
1803  if (ref.isEmpty() && pdfHyperLinks) // internal PDF link
1804  {
1805  if (!refToTable)
1806  {
1807  m_t << "}";
1808  }
1809  }
1810 }
1811 
1813 {
1814  m_enabled.push(new bool(m_hide));
1815 }
1816 
1818 {
1819  bool *v=m_enabled.pop();
1820  ASSERT(v!=0);
1821  m_hide = *v;
1822  delete v;
1823 }
1824 
1826  const QCString &width,
1827  const QCString &height,
1828  bool hasCaption
1829  )
1830 {
1831  QCString baseName=fileName;
1832  int i;
1833  if ((i=baseName.findRev('/'))!=-1)
1834  {
1835  baseName=baseName.right(baseName.length()-i-1);
1836  }
1837  if ((i=baseName.find('.'))!=-1)
1838  {
1839  baseName=baseName.left(i);
1840  }
1841  baseName.prepend("dot_");
1842  QCString outDir = Config_getString(LATEX_OUTPUT);
1843  QCString name = fileName;
1844  writeDotGraphFromFile(name,outDir,baseName,GOF_EPS);
1845  visitPreStart(m_t,hasCaption, baseName, width, height);
1846 }
1847 
1848 void LatexDocVisitor::endDotFile(bool hasCaption)
1849 {
1850  if (m_hide) return;
1851  visitPostEnd(m_t,hasCaption);
1852 }
1853 
1855  const QCString &width,
1856  const QCString &height,
1857  bool hasCaption
1858  )
1859 {
1860  QCString baseName=fileName;
1861  int i;
1862  if ((i=baseName.findRev('/'))!=-1)
1863  {
1864  baseName=baseName.right(baseName.length()-i-1);
1865  }
1866  if ((i=baseName.find('.'))!=-1)
1867  {
1868  baseName=baseName.left(i);
1869  }
1870  baseName.prepend("msc_");
1871 
1872  QCString outDir = Config_getString(LATEX_OUTPUT);
1873  writeMscGraphFromFile(fileName,outDir,baseName,MSC_EPS);
1874  visitPreStart(m_t,hasCaption, baseName, width, height);
1875 }
1876 
1877 void LatexDocVisitor::endMscFile(bool hasCaption)
1878 {
1879  if (m_hide) return;
1880  visitPostEnd(m_t,hasCaption);
1881 }
1882 
1883 
1885 {
1886  QCString shortName = baseName;
1887  int i;
1888  if ((i=shortName.findRev('/'))!=-1)
1889  {
1890  shortName=shortName.right(shortName.length()-i-1);
1891  }
1892  QCString outDir = Config_getString(LATEX_OUTPUT);
1893  writeMscGraphFromFile(baseName+".msc",outDir,shortName,MSC_EPS);
1894  visitPreStart(m_t, s->hasCaption(), shortName, s->width(),s->height());
1895  visitCaption(this, s->children());
1896  visitPostEnd(m_t, s->hasCaption());
1897 }
1898 
1899 
1901  const QCString &width,
1902  const QCString &height,
1903  bool hasCaption
1904  )
1905 {
1906  QCString baseName=fileName;
1907  int i;
1908  if ((i=baseName.findRev('/'))!=-1)
1909  {
1910  baseName=baseName.right(baseName.length()-i-1);
1911  }
1912  if ((i=baseName.find('.'))!=-1)
1913  {
1914  baseName=baseName.left(i);
1915  }
1916  baseName.prepend("dia_");
1917 
1918  QCString outDir = Config_getString(LATEX_OUTPUT);
1919  writeDiaGraphFromFile(fileName,outDir,baseName,DIA_EPS);
1920  visitPreStart(m_t,hasCaption, baseName, width, height);
1921 }
1922 
1923 void LatexDocVisitor::endDiaFile(bool hasCaption)
1924 {
1925  if (m_hide) return;
1926  visitPostEnd(m_t,hasCaption);
1927 }
1928 
1929 
1931 {
1932  QCString shortName = baseName;
1933  int i;
1934  if ((i=shortName.findRev('/'))!=-1)
1935  {
1936  shortName=shortName.right(shortName.length()-i-1);
1937  }
1938  QCString outDir = Config_getString(LATEX_OUTPUT);
1939  writeDiaGraphFromFile(baseName+".dia",outDir,shortName,DIA_EPS);
1940  visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
1941  visitCaption(this, s->children());
1942  visitPostEnd(m_t, s->hasCaption());
1943 }
1944 
1946 {
1947  QCString shortName = baseName;
1948  int i;
1949  if ((i=shortName.findRev('/'))!=-1)
1950  {
1951  shortName=shortName.right(shortName.length()-i-1);
1952  }
1953  QCString outDir = Config_getString(LATEX_OUTPUT);
1955  visitPreStart(m_t, s->hasCaption(), shortName, s->width(), s->height());
1956  visitCaption(this, s->children());
1957  visitPostEnd(m_t, s->hasCaption());
1958 }
1959 
DocSymbol::Sym_gt
@ Sym_gt
Definition: docparser.h:461
DocStyleChange::style
Style style() const
Definition: docparser.h:396
latexEscapeIndexChars
QCString latexEscapeIndexChars(const char *s)
Definition: util.cpp:6456
DocParamSect::Unknown
@ Unknown
Definition: docparser.h:1172
DocHtmlList::Ordered
@ Ordered
Definition: docparser.h:1112
getLanguageFromFileName
SrcLangExt getLanguageFromFileName(const QCString &fileName)
Definition: util.cpp:6876
QList::at
type * at(uint i) const
Definition: qlist.h:94
DocInclude::blockId
QCString blockId() const
Definition: docparser.h:604
DocInclude::SnippetDoc
@ SnippetDoc
Definition: docparser.h:584
QFileInfo
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:52
LatexDocVisitor::startDiaFile
void startDiaFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
Definition: latexdocvisitor.cpp:1900
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition: qcstring.h:191
latexgen.h
LatexDocVisitor::setNumCols
void setNumCols(int num)
Definition: latexdocvisitor.h:231
LatexDocVisitor::ActiveRowSpan::rowSpan
int rowSpan
Definition: latexdocvisitor.h:147
DocParamSect::hasInOutSpecifier
bool hasInOutSpecifier() const
Definition: docparser.h:1184
DocInclude::exampleFile
QCString exampleFile() const
Definition: docparser.h:606
DocImage::height
QCString height() const
Definition: docparser.h:795
cite.h
lineBlock
int lineBlock(const QCString text, const QCString marker)
Returns the line number of the line following the line with the marker.
Definition: util.cpp:7875
LatexDocVisitor::writeMscFile
void writeMscFile(const QCString &fileName, DocVerbatim *s)
Definition: latexdocvisitor.cpp:1884
DocNode::kind
virtual Kind kind() const =0
DocHtmlRow::rowIndex
uint rowIndex() const
Definition: docparser.h:1412
DocAnchor::anchor
QCString anchor() const
Definition: docparser.h:336
LatexDocVisitor::endDiaFile
void endDiaFile(bool hasCaption)
Definition: latexdocvisitor.cpp:1923
DocURL::isEmail
bool isEmail() const
Definition: docparser.h:290
DocPara::isLast
bool isLast() const
Definition: docparser.h:1205
Translator::trRemarks
virtual QCString trRemarks()=0
Doxygen::parserManager
static ParserManager * parserManager
Definition: doxygen.h:130
stripPath
static QCString stripPath(const QCString &s)
Definition: tagreader.cpp:1299
uint
unsigned uint
Definition: qglobal.h:351
DocWord
Node representing a word.
Definition: docparser.h:240
DocInclude::SnipWithLines
@ SnipWithLines
Definition: docparser.h:584
DIA_EPS
@ DIA_EPS
Definition: dia.h:24
DocXRefItem::file
QCString file() const
Definition: docparser.h:767
DocInclude::extension
QCString extension() const
Definition: docparser.h:595
DocParamSect::type
Type type() const
Definition: docparser.h:1183
LatexDocVisitor::visitPre
void visitPre(DocAutoList *)
Definition: latexdocvisitor.cpp:676
DocVerbatim::children
const QList< DocNode > & children() const
Definition: docparser.h:558
DocSection::file
QCString file() const
Definition: docparser.h:1034
DocStyleChange::S
@ S
Definition: docparser.h:388
DocSimpleSect::Post
@ Post
Definition: docparser.h:1133
DocVerbatim::width
QCString width() const
Definition: docparser.h:556
DocAnchor::file
QCString file() const
Definition: docparser.h:337
DocHtmlCell
Node representing a HTML table cell.
Definition: docparser.h:1334
getSectionName
static const char * getSectionName(int level)
Definition: latexdocvisitor.cpp:43
DocVerbatim
Node representing a verbatim, unparsed text fragment.
Definition: docparser.h:539
QFileInfo::dirPath
QString dirPath(bool absPath=FALSE) const
Definition: qfileinfo_unix.cpp:358
LatexDocVisitor::m_hideCaption
bool m_hideCaption
Definition: latexdocvisitor.h:191
DocNode::accept
virtual void accept(DocVisitor *v)=0
DocHtmlRow::isHeading
bool isHeading() const
Definition: docparser.h:1397
DocNode::Kind_HtmlRow
@ Kind_HtmlRow
Definition: docparser.h:112
DocImage::width
QCString width() const
Definition: docparser.h:794
DocInclude::Snippet
@ Snippet
Definition: docparser.h:584
DocSecRefItem::anchor
QCString anchor() const
Definition: docparser.h:1054
QCString::findRev
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:97
LatexDocVisitor::m_insidePre
bool m_insidePre
Definition: latexdocvisitor.h:188
DocNode::Kind_Word
@ Kind_Word
Definition: docparser.h:91
DocParamSect::Out
@ Out
Definition: docparser.h:1176
DocRef::file
QCString file() const
Definition: docparser.h:921
FTextStream
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:12
PlantumlManager::generatePlantUMLOutput
void generatePlantUMLOutput(const char *baseName, const char *outDir, OutputFormat format)
Convert a PlantUML file to an image.
Definition: plantuml.cpp:85
DocSecRefItem
Node representing a reference to a section.
Definition: docparser.h:1047
incUsedTableLevels
void incUsedTableLevels()
Definition: util.cpp:8532
HtmlEntityMapper::latex
const char * latex(DocSymbol::SymType symb) const
Access routine to the LaTeX code of the HTML entity.
Definition: htmlentity.cpp:428
LatexDocVisitor::setCurrentColumn
void setCurrentColumn(int col)
Definition: latexdocvisitor.h:223
DocMscFile::file
QCString file() const
Definition: docparser.h:845
DocInternalRef
Node representing an internal reference to some item.
Definition: docparser.h:945
DocHRef
Node representing a Hypertext reference.
Definition: docparser.h:962
DocInclude::text
QCString text() const
Definition: docparser.h:602
LatexDocVisitor
Concrete visitor implementation for LaTeX output.
Definition: latexdocvisitor.h:32
LatexDocVisitor::endMscFile
void endMscFile(bool hasCaption)
Definition: latexdocvisitor.cpp:1877
LatexDocVisitor::m_ci
CodeOutputInterface & m_ci
Definition: latexdocvisitor.h:187
DocSection::title
QCString title() const
Definition: docparser.h:1031
DocSymbol::Sym_Greater
@ Sym_Greater
Definition: docparser.h:473
msc.h
QMIN
#define QMIN(a, b)
Definition: qglobal.h:393
Translator::trAttention
virtual QCString trAttention()=0
DocSymbol
Node representing a special symbol.
Definition: docparser.h:414
DocDotFile::width
QCString width() const
Definition: docparser.h:825
latexdocvisitor.h
DocHtmlTable::firstRow
DocHtmlRow * firstRow() const
Definition: docparser.h:1437
LatexDocVisitor::visit
void visit(DocWord *)
Definition: latexdocvisitor.cpp:191
DocParamSect::Type
Type
Definition: docparser.h:1171
SrcLangExt
SrcLangExt
Language as given by extension.
Definition: types.h:43
DocStyleChange::Subscript
@ Subscript
Definition: docparser.h:379
DocVerbatim::ManOnly
@ ManOnly
Definition: docparser.h:541
DocSymbol::Sym_Less
@ Sym_Less
Definition: docparser.h:473
htmlattrib.h
QListIterator
The QListIterator class provides an iterator for QList collections.
Definition: qlist.h:128
DocSimpleSectSep
Node representing a separator between two simple sections of the same type.
Definition: docparser.h:1156
DocEmoji::index
int index() const
Definition: docparser.h:502
DocRef
Node representing a reference to some item.
Definition: docparser.h:916
DocInclude::VerbInclude
@ VerbInclude
Definition: docparser.h:583
DocInclude::type
Type type() const
Definition: docparser.h:601
Translator::trExceptions
virtual QCString trExceptions()=0
data
const char *const void * data
Definition: iconv.h:120
Translator::trSince
virtual QCString trSince()=0
MSC_EPS
@ MSC_EPS
Definition: msc.h:24
DocParBlock
Node representing an block of paragraphs.
Definition: docparser.h:1087
DocInternalRef::file
QCString file() const
Definition: docparser.h:950
QCString::length
uint length() const
Returns the length of the string, excluding the 0-terminator.
Definition: qcstring.h:197
createFileDef
FileDef * createFileDef(const char *p, const char *n, const char *ref, const char *dn)
Definition: filedef.cpp:183
QFile::writeBlock
int writeBlock(const char *data, uint len)
Definition: qfile_unix.cpp:537
visitPreStart
static void visitPreStart(FTextStream &t, bool hasCaption, QCString name, QCString width, QCString height, bool inlineImage=FALSE)
Definition: latexdocvisitor.cpp:52
DocNode::Kind_LinkedWord
@ Kind_LinkedWord
Definition: docparser.h:132
DocHtmlListItem
Node representing a HTML list item.
Definition: docparser.h:1304
languages.l
l
Definition: languages.py:75
DocVerbatim::context
QCString context() const
Definition: docparser.h:548
EmojiEntityMapper::instance
static EmojiEntityMapper * instance()
Returns the one and only instance of the Emoji entity mapper.
Definition: emoji.cpp:1539
IO_WriteOnly
#define IO_WriteOnly
Definition: qiodevice.h:62
DocParamSect::In
@ In
Definition: docparser.h:1176
err
void err(const char *fmt,...)
Definition: message.cpp:238
DocDotFile::file
QCString file() const
Definition: docparser.h:822
DocSimpleSect::Since
@ Since
Definition: docparser.h:1132
DocInclude
Node representing an included text block from file.
Definition: docparser.h:581
LatexDocVisitor::addRowSpan
void addRowSpan(ActiveRowSpan *span)
Definition: latexdocvisitor.h:263
convertCharEntitiesToUTF8
QCString convertCharEntitiesToUTF8(const QCString &s)
Definition: util.cpp:5597
QList< DocNode >
DocSimpleList
Node representing a simple list.
Definition: docparser.h:1099
DocVerbatim::Dot
@ Dot
Definition: docparser.h:541
DocImage::type
Type type() const
Definition: docparser.h:791
LatexDocVisitor::startLink
void startLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=FALSE)
Definition: latexdocvisitor.cpp:1759
DocSimpleSect::Version
@ Version
Definition: docparser.h:1132
DocDiaFile::hasCaption
bool hasCaption() const
Definition: docparser.h:870
LatexDocVisitor::startDotFile
void startDotFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
Definition: latexdocvisitor.cpp:1825
LatexDocVisitor::m_insideTabbing
bool m_insideTabbing
Definition: latexdocvisitor.h:192
DocDotFile::hasCaption
bool hasCaption() const
Definition: docparser.h:824
DocDotFile
Node representing a dot file.
Definition: docparser.h:816
extractBlock
QCString extractBlock(const QCString text, const QCString marker)
Returns the section of text, in between a pair of markers.
Definition: util.cpp:7830
DocHtmlCell::Center
@ Center
Definition: docparser.h:1337
DocCite::anchor
QCString anchor() const
Definition: docparser.h:357
Translator::trReturns
virtual QCString trReturns()=0
config.h
DocIncOperator::context
QCString context() const
Definition: docparser.h:649
DocRef::anchor
QCString anchor() const
Definition: docparser.h:924
DocStyleChange::Div
@ Div
Definition: docparser.h:383
LatexDocVisitor::popTableState
void popTableState()
Definition: latexdocvisitor.h:215
DocImage
Node representing an image.
Definition: docparser.h:785
LatexDocVisitor::m_hide
bool m_hide
Definition: latexdocvisitor.h:190
DocIncOperator::isLast
bool isLast() const
Definition: docparser.h:652
DocStyleChange::Ins
@ Ins
Definition: docparser.h:387
DocVerbatim::PlantUML
@ PlantUML
Definition: docparser.h:541
DocVerbatim::XmlOnly
@ XmlOnly
Definition: docparser.h:541
DocHtmlTable
Node representing a HTML table.
Definition: docparser.h:1423
DocParamList::direction
DocParamSect::Direction direction() const
Definition: docparser.h:1256
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:134
DocHtmlRow
Node representing a HTML table row.
Definition: docparser.h:1387
DocHtmlTable::caption
DocHtmlCaption * caption() const
Definition: docparser.h:1436
DocIncOperator::isFirst
bool isFirst() const
Definition: docparser.h:651
DocLinkedWord::word
QCString word() const
Definition: docparser.h:261
DocWord::word
QCString word() const
Definition: docparser.h:243
DocSimpleSect::Rcs
@ Rcs
Definition: docparser.h:1133
DocSimpleSect::Invar
@ Invar
Definition: docparser.h:1133
DocNode
Abstract node interface with type information.
Definition: docparser.h:87
LatexDocVisitor::m_langExt
QCString m_langExt
Definition: latexdocvisitor.h:194
DocImage::hasCaption
bool hasCaption() const
Definition: docparser.h:793
DocVerbatim::type
Type type() const
Definition: docparser.h:546
DocInclude::LatexInclude
@ LatexInclude
Definition: docparser.h:583
FileDef
A model of a file symbol.
Definition: filedef.h:65
ParserManager::getCodeParser
CodeParserInterface & getCodeParser(const char *extension)
Gets the interface to the parser associated with given extension.
Definition: parserintf.h:227
DocInclude::file
QCString file() const
Definition: docparser.h:594
Config_getString
#define Config_getString(val)
Definition: config.h:34
DocImage::Latex
@ Latex
Definition: docparser.h:787
secLabels
static const char * secLabels[maxLevels]
Definition: latexdocvisitor.cpp:40
LatexDocVisitor::m_insideItem
bool m_insideItem
Definition: latexdocvisitor.h:189
qfileinfo.h
LatexDocVisitor::setInRowSpan
void setInRowSpan(bool b)
Definition: latexdocvisitor.h:239
Translator::trNote
virtual QCString trNote()=0
DocIncOperator::includeFileName
QCString includeFileName() const
Definition: docparser.h:657
LatexDocVisitor::writePlantUMLFile
void writePlantUMLFile(const QCString &fileName, DocVerbatim *s)
Definition: latexdocvisitor.cpp:1945
LatexDocVisitor::popEnabled
void popEnabled()
Definition: latexdocvisitor.cpp:1817
QCString::find
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:42
Translator::trReturnValues
virtual QCString trReturnValues()=0
getFileNameExtension
QCString getFileNameExtension(QCString fn)
Definition: util.cpp:6893
DocVerbatim::LatexOnly
@ LatexOnly
Definition: docparser.h:541
TRUE
@ TRUE
Definition: mscgen_bool.h:29
outputgen.h
DocVerbatim::hasCaption
bool hasCaption() const
Definition: docparser.h:555
FALSE
@ FALSE
Definition: mscgen_bool.h:28
dot.h
DocVerbatim::Verbatim
@ Verbatim
Definition: docparser.h:541
DocIncOperator::type
Type type() const
Definition: docparser.h:633
DocSimpleSect::Date
@ Date
Definition: docparser.h:1132
DocLinkedWord::ref
QCString ref() const
Definition: docparser.h:265
Translator::trInvariant
virtual QCString trInvariant()=0
writeEndTableCommand
static void writeEndTableCommand(FTextStream &t, const DocNode *n)
Definition: latexdocvisitor.cpp:1043
DocHtmlDescList::attribs
const HtmlAttribList & attribs() const
Definition: docparser.h:1016
DocIncOperator::line
int line() const
Definition: docparser.h:645
Translator::trCopyright
virtual QCString trCopyright()=0
QCString::mid
QCString mid(uint index, uint len=(uint) -1) const
Definition: qcstring.cpp:274
QString::utf8
QCString utf8() const
Definition: qstring.cpp:14558
DocStyleChange::Superscript
@ Superscript
Definition: docparser.h:380
DocStyleChange::Small
@ Small
Definition: docparser.h:378
LatexDocVisitor::m_enabled
QStack< bool > m_enabled
Definition: latexdocvisitor.h:193
message.h
DocDiaFile::file
QCString file() const
Definition: docparser.h:868
DocNode::Kind_ParamSect
@ Kind_ParamSect
Definition: docparser.h:133
usedTableLevels
int usedTableLevels()
Definition: util.cpp:8540
DocSimpleSect::type
Type type() const
Definition: docparser.h:1138
DocStyleChange::Italic
@ Italic
Definition: docparser.h:375
Translator::trWarning
virtual QCString trWarning()=0
DocTitle
Node representing a simple section title.
Definition: docparser.h:750
LatexCodeGenerator::setDoxyCodeOpen
static void setDoxyCodeOpen(bool val)
Definition: latexgen.cpp:261
DocVerbatim::Msc
@ Msc
Definition: docparser.h:541
DocParamSect
Node representing a parameter section.
Definition: docparser.h:1167
LatexDocVisitor::pushEnabled
void pushEnabled()
Definition: latexdocvisitor.cpp:1812
LatexDocVisitor::m_tableStateStack
QStack< TableState > m_tableStateStack
Definition: latexdocvisitor.h:208
DocXRefItem
Node representing an item of a cross-referenced list.
Definition: docparser.h:763
Translator::trDate
virtual QCString trDate()=0
CitationManager::instance
static CitationManager & instance()
Definition: cite.cpp:61
DocNode::Kind_HtmlTable
@ Kind_HtmlTable
Definition: docparser.h:111
DocHtmlList::type
Type type() const
Definition: docparser.h:1116
theTranslator
Translator * theTranslator
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: language.cpp:157
Translator::trTemplateParameters
virtual QCString trTemplateParameters()=0
DocSimpleSect::Unknown
@ Unknown
Definition: docparser.h:1132
DocVerbatim::RtfOnly
@ RtfOnly
Definition: docparser.h:541
DocCite::text
QCString text() const
Definition: docparser.h:358
DocAutoList
Node representing an auto List.
Definition: docparser.h:717
CodeParserInterface::parseCode
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, const MemberDef *memberDef=0, bool showLineNumbers=TRUE, const Definition *searchCtx=0, bool collectXRefs=TRUE)=0
Parses a source file or fragment with the goal to produce highlighted and cross-referenced output.
DocIncOperator
Node representing a include/dontinclude operator block.
Definition: docparser.h:624
doxygen.h
DocSimpleSect::Note
@ Note
Definition: docparser.h:1133
parserintf.h
DocParamList
Node representing a parameter list.
Definition: docparser.h:1242
DocVerbatim::exampleFile
QCString exampleFile() const
Definition: docparser.h:551
DocStyleChange::Center
@ Center
Definition: docparser.h:377
DocStyleChange::Underline
@ Underline
Definition: docparser.h:385
DocHtmlTable::hasCaption
bool hasCaption()
Definition: docparser.h:1430
language.h
writeDotGraphFromFile
void writeDotGraphFromFile(const char *inFile, const char *outDir, const char *outFile, GraphOutputFormat format)
Definition: dot.cpp:267
DocWhiteSpace
Node representing some amount of white space.
Definition: docparser.h:513
DocVisitor_Latex
const int DocVisitor_Latex
Definition: docvisitor.h:24
QFile::open
bool open(int)
Definition: qfile_unix.cpp:134
QList::count
uint count() const
Definition: qlist.h:66
DocHtmlCell::columnIndex
uint columnIndex() const
Definition: docparser.h:1350
QCString::right
QCString right(uint len) const
Definition: qcstring.cpp:259
QListIterator::current
type * current() const
Definition: qlist.h:147
DocURL::url
QCString url() const
Definition: docparser.h:287
DocDiaFile::height
QCString height() const
Definition: docparser.h:872
LatexDocVisitor::rowSpans
const RowSpanList & rowSpans()
Definition: latexdocvisitor.h:259
DocMscFile::hasCaption
bool hasCaption() const
Definition: docparser.h:847
DocHtmlDescList
Node representing a Html description list.
Definition: docparser.h:1011
DocSimpleSect::See
@ See
Definition: docparser.h:1132
DocSection
Node representing a normal section.
Definition: docparser.h:1025
DocIndexEntry::entry
QCString entry() const
Definition: docparser.h:704
QStack::push
void push(const type *d)
Definition: qstack.h:58
docparser.h
DocIncOperator::Skip
@ Skip
Definition: docparser.h:626
Translator::trParameters
virtual QCString trParameters()=0
DocInclude::DocbookInclude
@ DocbookInclude
Definition: docparser.h:585
DocSimpleSect::Remark
@ Remark
Definition: docparser.h:1133
DocNode::Kind_Sep
@ Kind_Sep
Definition: docparser.h:144
DocSimpleSect::Return
@ Return
Definition: docparser.h:1132
CodeOutputInterface
Output interface for code parser.
Definition: outputgen.h:60
DocXRefItem::anchor
QCString anchor() const
Definition: docparser.h:768
writeMscGraphFromFile
void writeMscGraphFromFile(const char *inFile, const char *outDir, const char *outFile, MscOutputFormat format)
Definition: msc.cpp:94
DocLinkedWord::file
QCString file() const
Definition: docparser.h:263
maxLevels
const int maxLevels
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: latexdocvisitor.cpp:39
DocInclude::IncludeDoc
@ IncludeDoc
Definition: docparser.h:584
DocStyleChange::Strike
@ Strike
Definition: docparser.h:384
filedef.h
DocHtmlCell::isHeading
bool isHeading() const
Definition: docparser.h:1340
LatexDocVisitor::ActiveRowSpan::column
int column
Definition: latexdocvisitor.h:149
QCString::left
QCString left(uint len) const
Definition: qcstring.cpp:241
dia.h
DocHtmlCell::alignment
Alignment alignment() const
Definition: docparser.cpp:3422
HtmlAttribList::find
QCString find(const QCString name) const
Definition: htmlattrib.h:41
DocHtmlList
Node representing a Html list.
Definition: docparser.h:1110
DocIncOperator::exampleFile
QCString exampleFile() const
Definition: docparser.h:656
DocStyleChange::Del
@ Del
Definition: docparser.h:386
DocHtmlHeader::level
int level() const
Definition: docparser.h:985
HtmlEntityMapper::instance
static HtmlEntityMapper * instance()
Returns the one and only instance of the HTML entity mapper.
Definition: htmlentity.cpp:343
Translator::trAuthor
virtual QCString trAuthor(bool first_capital, bool singular)=0
DocInclude::isExample
bool isExample() const
Definition: docparser.h:605
DocMscFile::width
QCString width() const
Definition: docparser.h:848
DocHtmlCell::colSpan
uint colSpan() const
Definition: docparser.cpp:3406
DocVerbatim::HtmlOnly
@ HtmlOnly
Definition: docparser.h:541
DocDiaFile
Node representing a dia file.
Definition: docparser.h:862
CompAccept::children
const QList< DocNode > & children() const
Definition: docparser.h:197
DocParamSect::hasTypeSpecifier
bool hasTypeSpecifier() const
Definition: docparser.h:1185
visitCaption
static void visitCaption(LatexDocVisitor *parent, QList< DocNode > children)
Definition: latexdocvisitor.cpp:143
DocStyleChange::Preformatted
@ Preformatted
Definition: docparser.h:381
DocSimpleSect
Node representing a simple section.
Definition: docparser.h:1128
DocStyleChange
Node representing a style change.
Definition: docparser.h:372
DocVerbatim::language
QCString language() const
Definition: docparser.h:553
DocStyleChange::Span
@ Span
Definition: docparser.h:382
DocCite::file
QCString file() const
Definition: docparser.h:354
Translator::trPostcondition
virtual QCString trPostcondition()=0
DocParamSect::TemplateParam
@ TemplateParam
Definition: docparser.h:1172
tableIsNested
static bool tableIsNested(const DocNode *n)
Definition: latexdocvisitor.cpp:1019
DocInclude::DontIncWithLines
@ DontIncWithLines
Definition: docparser.h:585
DocRef::isSubPage
bool isSubPage() const
Definition: docparser.h:930
visitPostEnd
static void visitPostEnd(FTextStream &t, bool hasCaption, bool inlineImage=FALSE)
Definition: latexdocvisitor.cpp:122
DocHtmlTable::numColumns
uint numColumns() const
Definition: docparser.h:1434
DocPara
Node representing a paragraph in the documentation tree.
Definition: docparser.h:1195
DocSection::level
int level() const
Definition: docparser.h:1030
DocSimpleSect::Pre
@ Pre
Definition: docparser.h:1133
DocStyleChange::Bold
@ Bold
Definition: docparser.h:374
DocHtmlCell::rowIndex
uint rowIndex() const
Definition: docparser.h:1349
QListIterator::toFirst
type * toFirst()
Definition: qlist.h:136
Translator::trPrecondition
virtual QCString trPrecondition()=0
Doxygen::insideMainPage
static bool insideMainPage
Definition: doxygen.h:99
CitationManager::anchorPrefix
const char * anchorPrefix() const
Definition: cite.cpp:106
LatexDocVisitor::ActiveRowSpan::colSpan
int colSpan
Definition: latexdocvisitor.h:148
DocImage::isInlineImage
bool isInlineImage() const
Definition: docparser.h:798
QFileInfo::fileName
QString fileName() const
Definition: qfileinfo_unix.cpp:387
LatexDocVisitor::LatexDocVisitor
LatexDocVisitor(FTextStream &t, CodeOutputInterface &ci, const char *langExt, bool insideTabbing)
Definition: latexdocvisitor.cpp:178
LatexDocVisitor::ActiveRowSpan::cell
DocHtmlCell * cell
Definition: latexdocvisitor.h:146
DocRef::ref
QCString ref() const
Definition: docparser.h:923
PlantumlManager::instance
static PlantumlManager * instance()
Definition: plantuml.cpp:119
filterLatexString
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
Definition: util.cpp:6275
LatexDocVisitor::insideTable
bool insideTable() const
Definition: latexdocvisitor.h:267
DocStyleChange::Code
@ Code
Definition: docparser.h:376
DocParamSect::Param
@ Param
Definition: docparser.h:1172
LatexDocVisitor::setInColSpan
void setInColSpan(bool b)
Definition: latexdocvisitor.h:247
DocLineBreak
Node representing a line break.
Definition: docparser.h:301
LatexDocVisitor::escapeMakeIndexChars
QCString escapeMakeIndexChars(const char *s)
Definition: latexdocvisitor.cpp:150
DocText
Root node of a text fragment.
Definition: docparser.h:1466
DocRef::refToTable
bool refToTable() const
Definition: docparser.h:929
DocSecRefItem::file
QCString file() const
Definition: docparser.h:1053
QCString::data
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition: qcstring.h:209
DocInclude::IncWithLines
@ IncWithLines
Definition: docparser.h:584
DocAnchor
Node representing an anchor.
Definition: docparser.h:332
LatexDocVisitor::inColSpan
bool inColSpan() const
Definition: latexdocvisitor.h:243
LatexDocVisitor::currentColumn
int currentColumn() const
Definition: latexdocvisitor.h:219
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.cpp:415
DocHtmlDescTitle
Node representing a Html description item.
Definition: docparser.h:997
DocSymbol::symbol
SymType symbol() const
Definition: docparser.h:487
DocSimpleSect::Authors
@ Authors
Definition: docparser.h:1132
DocHtmlCell::isLast
bool isLast() const
Definition: docparser.h:1342
PlantumlManager::PUML_EPS
@ PUML_EPS
Definition: plantuml.h:44
DocParamSect::Unspecified
@ Unspecified
Definition: docparser.h:1176
Translator::trVersion
virtual QCString trVersion()=0
DocVisitor
Abstract visitor that participates in the visitor pattern.
Definition: docvisitor.h:91
DocFormula::text
QCString text() const
Definition: docparser.h:681
EmojiEntityMapper::name
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition: emoji.cpp:1594
LatexDocVisitor::writeDiaFile
void writeDiaFile(const QCString &fileName, DocVerbatim *s)
Definition: latexdocvisitor.cpp:1930
LatexDocVisitor::endDotFile
void endDotFile(bool hasCaption)
Definition: latexdocvisitor.cpp:1848
DocMscFile::height
QCString height() const
Definition: docparser.h:849
decUsedTableLevels
void decUsedTableLevels()
Definition: util.cpp:8536
LatexDocVisitor::startMscFile
void startMscFile(const QCString &fileName, const QCString &width, const QCString &height, bool hasCaption)
Definition: latexdocvisitor.cpp:1854
DocWhiteSpace::chars
QCString chars() const
Definition: docparser.h:518
DocHorRuler
Node representing a horizontal ruler.
Definition: docparser.h:317
DocCite
Node representing a citation of some bibliographic reference.
Definition: docparser.h:350
DocEmoji
Node representing a n emoji.
Definition: docparser.h:498
latexEscapeLabelName
QCString latexEscapeLabelName(const char *s)
Definition: util.cpp:6418
DocLinkedWord
Node representing a word that can be linked to something.
Definition: docparser.h:256
LatexDocVisitor::setFirstRow
void setFirstRow(bool b)
Definition: latexdocvisitor.h:255
LatexDocVisitor::pushTableState
void pushTableState()
Definition: latexdocvisitor.h:211
DocIndexEntry
Node representing an entry in the index.
Definition: docparser.h:696
Config_getBool
#define Config_getBool(val)
Definition: config.h:35
DocHRef::url
QCString url() const
Definition: docparser.h:968
DocSymbol::Sym_lt
@ Sym_lt
Definition: docparser.h:461
DocHtmlCaption::anchor
QCString anchor() const
Definition: docparser.h:1376
DocEmoji::name
QCString name() const
Definition: docparser.h:501
DocInclude::DontInclude
@ DontInclude
Definition: docparser.h:583
DocParamList::paramTypes
const QList< DocNode > & paramTypes()
Definition: docparser.h:1254
DocInclude::HtmlInclude
@ HtmlInclude
Definition: docparser.h:583
LatexDocVisitor::numCols
int numCols() const
Definition: latexdocvisitor.h:227
DocHtmlDescData
Node representing a HTML description data.
Definition: docparser.h:1321
writeDiaGraphFromFile
void writeDiaGraphFromFile(const char *inFile, const char *outDir, const char *outFile, DiaOutputFormat format)
Definition: dia.cpp:28
emoji.h
QStack::pop
type * pop()
Definition: qstack.h:59
QFile::remove
bool remove()
Definition: qfile.cpp:205
DocParamSect::InOut
@ InOut
Definition: docparser.h:1176
DocInternal
Node representing an internal section of documentation.
Definition: docparser.h:1076
LatexDocVisitor::ActiveRowSpan
Definition: latexdocvisitor.h:143
DocIncOperator::isExample
bool isExample() const
Definition: docparser.h:655
plantuml.h
ASSERT
#define ASSERT(x)
Definition: qglobal.h:591
DocVerbatim::text
QCString text() const
Definition: docparser.h:547
DocSecRefList
Node representing a list of section references.
Definition: docparser.h:1065
writeStartTableCommand
static void writeStartTableCommand(FTextStream &t, const DocNode *n, int cols)
Definition: latexdocvisitor.cpp:1030
DocXRefItem::title
QCString title() const
Definition: docparser.h:769
DocParamList::parameters
const QList< DocNode > & parameters()
Definition: docparser.h:1253
DocInternalRef::anchor
QCString anchor() const
Definition: docparser.h:952
DocVerbatim::DocbookOnly
@ DocbookOnly
Definition: docparser.h:541
DocIncOperator::showLineNo
bool showLineNo() const
Definition: docparser.h:646
DocRoot
Root node of documentation tree.
Definition: docparser.h:1476
GOF_EPS
@ GOF_EPS
Definition: dotgraph.h:26
DocHtmlCaption
Node representing a HTML table caption.
Definition: docparser.h:1368
DocSimpleSect::Attention
@ Attention
Definition: docparser.h:1133
DocMscFile
Node representing a msc file.
Definition: docparser.h:839
endl
QTextStream & endl(QTextStream &s)
Definition: qtextstream.cpp:2030
DocDotFile::height
QCString height() const
Definition: docparser.h:826
DocInclude::XmlInclude
@ XmlInclude
Definition: docparser.h:585
cs
const char * cs
Definition: qtextcodec.cpp:1350
DocSimpleSect::Warning
@ Warning
Definition: docparser.h:1133
htmlentity.h
DocHtmlBlockQuote
Node representing an HTML blockquote.
Definition: docparser.h:1452
DocIncOperator::text
QCString text() const
Definition: docparser.h:647
DocVhdlFlow
Node representing a VHDL flow chart.
Definition: docparser.h:885
LatexDocVisitor::m_t
FTextStream & m_t
Definition: latexdocvisitor.h:186
DocNode::parent
DocNode * parent() const
Definition: docparser.h:156
PlantumlManager::writePlantUMLSource
QCString writePlantUMLSource(const QCString &outDir, const QCString &fileName, const QCString &content, OutputFormat format)
Write a PlantUML compatible file.
Definition: plantuml.cpp:30
LatexDocVisitor::endLink
void endLink(const QCString &ref, const QCString &file, const QCString &anchor, bool refToTable=FALSE)
Definition: latexdocvisitor.cpp:1791
DocHtmlCell::Right
@ Right
Definition: docparser.h:1337
DocInclude::ManInclude
@ ManInclude
Definition: docparser.h:585
util.h
Copyright (C) 1997-2015 by Dimitri van Heesch.
DocVerbatim::height
QCString height() const
Definition: docparser.h:557
latexFilterURL
QCString latexFilterURL(const char *s)
Definition: util.cpp:6520
DocSimpleSect::Copyright
@ Copyright
Definition: docparser.h:1133
DocVerbatim::isExample
bool isExample() const
Definition: docparser.h:550
DocLinkedWord::anchor
QCString anchor() const
Definition: docparser.h:266
DocParamSect::RetVal
@ RetVal
Definition: docparser.h:1172
DocHtmlCaption::file
QCString file() const
Definition: docparser.h:1375
DocImage::name
QCString name() const
Definition: docparser.h:792
DocInclude::RtfInclude
@ RtfInclude
Definition: docparser.h:585
DocParamSect::Exception
@ Exception
Definition: docparser.h:1172
LatexDocVisitor::filter
void filter(const char *str)
Definition: latexdocvisitor.cpp:1754
QFile::close
void close()
Definition: qfile_unix.cpp:614
LatexDocVisitor::visitPost
void visitPost(DocAutoList *)
Definition: latexdocvisitor.cpp:689
DocSimpleSect::Author
@ Author
Definition: docparser.h:1132
DocSimpleListItem
Node representing a simple list item.
Definition: docparser.h:1284
DocVerbatim::Code
@ Code
Definition: docparser.h:541
DocSeparator
Node representing a separator.
Definition: docparser.h:526
DocHtmlHeader
Node Html heading.
Definition: docparser.h:981
QCString::sprintf
QCString & sprintf(const char *format,...)
Copyright (C) 1997-2015 by Dimitri van Heesch.
Definition: qcstring.cpp:28
DocRef::targetTitle
QCString targetTitle() const
Definition: docparser.h:925
DocInclude::context
QCString context() const
Definition: docparser.h:603
DocHtmlCell::rowSpan
uint rowSpan() const
Definition: docparser.cpp:3390
DocURL
Node representing a URL (or email address)
Definition: docparser.h:283
QFile
The QFile class is an I/O device that operates on files.
Definition: qfile.h:51
DocSection::anchor
QCString anchor() const
Definition: docparser.h:1032
DocStyleChange::enable
bool enable() const
Definition: docparser.h:398
DocSimpleSect::User
@ User
Definition: docparser.h:1133
Translator::trSeeAlso
virtual QCString trSeeAlso()=0
DocAutoListItem
Node representing an item of a auto list.
Definition: docparser.h:734
DocInclude::Include
@ Include
Definition: docparser.h:583
LatexDocVisitor::firstRow
bool firstRow() const
Definition: latexdocvisitor.h:251
DocRef::hasLinkText
bool hasLinkText() const
Definition: docparser.h:926
Translator::trPageAbbreviation
virtual QCString trPageAbbreviation()=0
DocDiaFile::width
QCString width() const
Definition: docparser.h:871
LatexDocVisitor::inRowSpan
bool inRowSpan() const
Definition: latexdocvisitor.h:235
DocFormula
Node representing an item of a cross-referenced list.
Definition: docparser.h:676