Doxygen
latexgen.cpp
浏览该文件的文档.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 by Dimitri van Heesch.
6  *
7  * Permission to use, copy, modify, and distribute this software and its
8  * documentation under the terms of the GNU General Public License is hereby
9  * granted. No representations are made about the suitability of this software
10  * for any purpose. It is provided "as is" without express or implied warranty.
11  * See the GNU General Public License for more details.
12  *
13  * Documents produced by Doxygen are derivative works derived from the
14  * input used in their production; they are not affected by this license.
15  *
16  */
17 
18 #include <cstdlib>
19 #include <sstream>
20 
21 #include "latexgen.h"
22 #include "config.h"
23 #include "message.h"
24 #include "doxygen.h"
25 #include "util.h"
26 #include "diagram.h"
27 #include "language.h"
28 #include "version.h"
29 #include "dot.h"
30 #include "dotcallgraph.h"
31 #include "dotclassgraph.h"
32 #include "dotdirdeps.h"
33 #include "dotgroupcollaboration.h"
34 #include "dotincldepgraph.h"
35 #include "pagedef.h"
36 #include "docparser.h"
37 #include "latexdocvisitor.h"
38 #include "dirdef.h"
39 #include "cite.h"
40 #include "groupdef.h"
41 #include "classlist.h"
42 #include "namespacedef.h"
43 #include "filename.h"
44 #include "resourcemgr.h"
45 #include "portable.h"
46 #include "fileinfo.h"
47 #include "utf8.h"
48 
51 
52 LatexCodeGenerator::LatexCodeGenerator(TextStream &t,const QCString &relPath,const QCString &sourceFileName)
53  : m_t(t), m_relPath(relPath), m_sourceFileName(sourceFileName)
54 {
55 }
56 
58 {
59 }
60 
62 {
63  m_relPath = path;
64 }
65 
67 {
68  m_sourceFileName = name;
69 }
70 
72 {
73  if (!str.isEmpty())
74  {
75  const signed char *p=(const signed char*)str.data();
76  signed char c;
77  //char cs[5];
78  int spacesToNextTabStop;
79  int tabSize = Config_getInt(TAB_SIZE);
80  static THREAD_LOCAL signed char *result = NULL;
81  static THREAD_LOCAL int lresult = 0;
82  int i;
83  while ((c=*p))
84  {
85  switch(c)
86  {
87  case 0x0c: p++; // remove ^L
88  break;
89  case ' ': m_t <<" ";
90  m_col++;
91  p++;
92  break;
93  case '^': m_t <<"\\string^";
94  m_col++;
95  p++;
96  break;
97  case '\t': spacesToNextTabStop =
98  tabSize - (m_col%tabSize);
99  for (i = 0; i < spacesToNextTabStop; i++) m_t <<" ";
100  m_col+=spacesToNextTabStop;
101  p++;
102  break;
103  case '\n': m_t << '\n';
104  m_col=0;
105  p++;
106  break;
107  default:
108  i=0;
109 
110 #undef COPYCHAR
111 // helper macro to copy a single utf8 character, dealing with multibyte chars.
112 #define COPYCHAR() do { \
113  int bytes = getUTF8CharNumBytes(c); \
114  if (lresult < (i + bytes + 1)) \
115  { \
116  lresult += 512; \
117  result = (signed char *)realloc(result, lresult); \
118  } \
119  for (int j=0; j<bytes && *p; j++) \
120  { \
121  result[i++]=*p++; \
122  } \
123  m_col++; \
124  } while(0)
125 
126  // gather characters until we find whitespace or another special character
127  COPYCHAR();
128  while ((c=*p) &&
129  c!=0x0c && c!='\t' && c!='\n' && c!=' ' && c!='^'
130  )
131  {
132  COPYCHAR();
133  }
134  result[i]=0; // add terminator
135  filterLatexString(m_t,(const char *)result,
136  false, // insideTabbing
137  true, // insidePre
138  false, // insideItem
139  m_usedTableLevel>0, // insideTable
140  false // keepSpaces
141  );
142  break;
143  }
144  }
145  }
146 }
147 
148 
150  const QCString &ref,const QCString &f,
151  const QCString &anchor,const QCString &name,
152  const QCString &)
153 {
154  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
155  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
156  uint l = name.length();
157  if (ref.isEmpty() && usePDFLatex && pdfHyperlinks)
158  {
159  m_t << "\\mbox{\\hyperlink{";
160  if (!f.isEmpty()) m_t << stripPath(f);
161  if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
162  if (!anchor.isEmpty()) m_t << anchor;
163  m_t << "}{";
164  codify(name);
165  m_t << "}}";
166  }
167  else
168  {
169  codify(name);
170  }
171  m_col+=l;
172 }
173 
174 void LatexCodeGenerator::writeLineNumber(const QCString &ref,const QCString &fileName,const QCString &anchor,int l,bool writeLineAnchor)
175 {
176  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
177  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
178  if (!m_doxyCodeLineOpen)
179  {
180  m_t << "\\DoxyCodeLine{";
182  }
183  if (Config_getBool(SOURCE_BROWSER))
184  {
185  QCString lineNumber;
186  lineNumber.sprintf("%05d",l);
187 
188  QCString lineAnchor;
189  if (!m_sourceFileName.isEmpty())
190  {
191  lineAnchor.sprintf("_l%05d",l);
192  lineAnchor.prepend(stripExtensionGeneral(m_sourceFileName, ".tex"));
193  }
194  bool showTarget = usePDFLatex && pdfHyperlinks && !lineAnchor.isEmpty() && writeLineAnchor;
195  if (showTarget)
196  {
197  m_t << "\\Hypertarget{" << stripPath(lineAnchor) << "}";
198  }
199  if (!fileName.isEmpty())
200  {
201  writeCodeLink(CodeSymbolType::Default,ref,fileName,anchor,lineNumber,QCString());
202  }
203  else
204  {
205  codify(lineNumber);
206  }
207  m_t << " ";
208  }
209  else
210  {
211  m_t << l << " ";
212  }
213  m_col=0;
214 }
215 
216 
218 {
219  m_col=0;
220  if (!m_doxyCodeLineOpen)
221  {
222  m_t << "\\DoxyCodeLine{";
224  }
225 }
226 
228 {
229  if (m_doxyCodeLineOpen)
230  {
231  m_t << "}";
233  }
234  codify("\n");
235 }
236 
238 {
239  m_t << "\\textcolor{" << name << "}{";
240 }
241 
243 {
244  m_t << "}";
245 }
246 
248 {
249  m_t << "\n\\begin{" << style << "}{" << m_usedTableLevel << "}\n";
250 }
251 
253 {
254  //endCodeLine checks is there is still an open code line, if so closes it.
255  endCodeLine();
256 
257  m_t << "\\end{" << style << "}\n";
258 }
259 
260 
261 //-------------------------------
262 
264 {
265  //printf("LatexGenerator::LatexGenerator() m_insideTabbing=FALSE\n");
266 }
267 
269 {
270 }
271 
273 {
275  return *this;
276 }
277 
278 std::unique_ptr<OutputGenerator> LatexGenerator::clone() const
279 {
280  return std::make_unique<LatexGenerator>(*this);
281 }
282 
284 {
285 }
286 
287 static void writeLatexMakefile()
288 {
289  bool generateBib = !CitationManager::instance().isEmpty();
290  QCString fileName=Config_getString(LATEX_OUTPUT)+"/Makefile";
291  std::ofstream f(fileName.str(),std::ofstream::out | std::ofstream::binary);
292  if (!f.is_open())
293  {
294  term("Could not open file %s for writing\n",qPrint(fileName));
295  }
296  TextStream t(&f);
297  // inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
298  QCString latex_command = theTranslator->latexCommandName();
299  QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
300  // end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
301  if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
302  {
303  t << "LATEX_CMD=" << latex_command << "\n"
304  << "\n"
305  << "all: refman.dvi\n"
306  << "\n"
307  << "ps: refman.ps\n"
308  << "\n"
309  << "pdf: refman.pdf\n"
310  << "\n"
311  << "ps_2on1: refman_2on1.ps\n"
312  << "\n"
313  << "pdf_2on1: refman_2on1.pdf\n"
314  << "\n"
315  << "refman.ps: refman.dvi\n"
316  << "\tdvips -o refman.ps refman.dvi\n"
317  << "\n";
318  t << "refman.pdf: refman.ps\n";
319  t << "\tps2pdf refman.ps refman.pdf\n\n";
320  t << "refman.dvi: clean refman.tex doxygen.sty\n"
321  << "\techo \"Running latex...\"\n"
322  << "\t$(LATEX_CMD) refman.tex\n"
323  << "\techo \"Running makeindex...\"\n"
324  << "\t" << mkidx_command << " refman.idx\n";
325  if (generateBib)
326  {
327  t << "\techo \"Running bibtex...\"\n";
328  t << "\tbibtex refman\n";
329  t << "\techo \"Rerunning latex....\"\n";
330  t << "\t$(LATEX_CMD) refman.tex\n";
331  }
332  t << "\techo \"Rerunning latex....\"\n"
333  << "\t$(LATEX_CMD) refman.tex\n"
334  << "\tlatex_count=8 ; \\\n"
335  << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
336  << "\t do \\\n"
337  << "\t echo \"Rerunning latex....\" ;\\\n"
338  << "\t $(LATEX_CMD) refman.tex ; \\\n"
339  << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
340  << "\t done\n"
341  << "\t" << mkidx_command << " refman.idx\n"
342  << "\t$(LATEX_CMD) refman.tex\n\n"
343  << "refman_2on1.ps: refman.ps\n"
344  << "\tpsnup -2 refman.ps >refman_2on1.ps\n"
345  << "\n"
346  << "refman_2on1.pdf: refman_2on1.ps\n"
347  << "\tps2pdf refman_2on1.ps refman_2on1.pdf\n";
348  }
349  else // use pdflatex for higher quality output
350  {
351  t << "LATEX_CMD=" << latex_command << "\n"
352  << "\n";
353  t << "all: refman.pdf\n\n"
354  << "pdf: refman.pdf\n\n";
355  t << "refman.pdf: clean refman.tex\n";
356  t << "\t$(LATEX_CMD) refman\n";
357  t << "\t" << mkidx_command << " refman.idx\n";
358  if (generateBib)
359  {
360  t << "\tbibtex refman\n";
361  t << "\t$(LATEX_CMD) refman\n";
362  }
363  t << "\t$(LATEX_CMD) refman\n"
364  << "\tlatex_count=8 ; \\\n"
365  << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\\n"
366  << "\t do \\\n"
367  << "\t echo \"Rerunning latex....\" ;\\\n"
368  << "\t $(LATEX_CMD) refman ;\\\n"
369  << "\t latex_count=`expr $$latex_count - 1` ;\\\n"
370  << "\t done\n"
371  << "\t" << mkidx_command << " refman.idx\n"
372  << "\t$(LATEX_CMD) refman\n\n";
373  }
374 
375  t << "\n"
376  << "clean:\n"
377  << "\trm -f "
378  << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n";
379 }
380 
381 static void writeMakeBat()
382 {
383 #if defined(_MSC_VER)
384  QCString dir=Config_getString(LATEX_OUTPUT);
385  QCString fileName=dir+"/make.bat";
386  QCString latex_command = theTranslator->latexCommandName();
387  QCString mkidx_command = Config_getString(MAKEINDEX_CMD_NAME);
388  bool generateBib = !CitationManager::instance().isEmpty();
389  std::ofstream t(fileName.str(),std::ofstream::out | std::ofstream::binary);
390  if (!t.is_open())
391  {
392  term("Could not open file %s for writing\n",qPrint(fileName));
393  }
394  t << "set Dir_Old=%cd%\r\n";
395  t << "cd /D %~dp0\r\n\r\n";
396  t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\r\n\r\n";
397  if (!Config_getBool(USE_PDFLATEX)) // use plain old latex
398  {
399  t << "set LATEX_CMD=" << latex_command << "\r\n";
400  t << "%LATEX_CMD% refman.tex\r\n";
401  t << "echo ----\r\n";
402  t << mkidx_command << " refman.idx\r\n";
403  if (generateBib)
404  {
405  t << "bibtex refman\r\n";
406  t << "echo ----\r\n";
407  t << "\t%LATEX_CMD% refman.tex\r\n";
408  }
409  t << "setlocal enabledelayedexpansion\r\n";
410  t << "set count=8\r\n";
411  t << ":repeat\r\n";
412  t << "set content=X\r\n";
413  t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
414  t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
415  t << "if !content! == X goto :skip\r\n";
416  t << "set /a count-=1\r\n";
417  t << "if !count! EQU 0 goto :skip\r\n\r\n";
418  t << "echo ----\r\n";
419  t << "%LATEX_CMD% refman.tex\r\n";
420  t << "goto :repeat\r\n";
421  t << ":skip\r\n";
422  t << "endlocal\r\n";
423  t << mkidx_command << " refman.idx\r\n";
424  t << "%LATEX_CMD% refman.tex\r\n";
425  t << "dvips -o refman.ps refman.dvi\r\n";
427  t << " -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
428  "-sOutputFile=refman.pdf -c save pop -f refman.ps\r\n";
429  }
430  else // use pdflatex
431  {
432  t << "set LATEX_CMD=" << latex_command << "\r\n";
433  t << "%LATEX_CMD% refman\r\n";
434  t << "echo ----\r\n";
435  t << mkidx_command << " refman.idx\r\n";
436  if (generateBib)
437  {
438  t << "bibtex refman\r\n";
439  t << "%LATEX_CMD% refman\r\n";
440  }
441  t << "echo ----\r\n";
442  t << "%LATEX_CMD% refman\r\n\r\n";
443  t << "setlocal enabledelayedexpansion\r\n";
444  t << "set count=8\r\n";
445  t << ":repeat\r\n";
446  t << "set content=X\r\n";
447  t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\r\n";
448  t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\r\n";
449  t << "if !content! == X goto :skip\r\n";
450  t << "set /a count-=1\r\n";
451  t << "if !count! EQU 0 goto :skip\r\n\r\n";
452  t << "echo ----\r\n";
453  t << "%LATEX_CMD% refman\r\n";
454  t << "goto :repeat\r\n";
455  t << ":skip\r\n";
456  t << "endlocal\r\n";
457  t << mkidx_command << " refman.idx\r\n";
458  t << "%LATEX_CMD% refman\r\n";
459  t << "cd /D %Dir_Old%\r\n";
460  t << "set Dir_Old=\r\n";
461  }
462 #endif
463 }
464 
466 {
467  QCString dname = Config_getString(LATEX_OUTPUT);
468  Dir d(dname.str());
469  if (!d.exists() && !d.mkdir(dname.str()))
470  {
471  term("Could not create output directory %s\n",qPrint(dname));
472  }
473 
474  if (!Config_getString(LATEX_HEADER).isEmpty())
475  {
476  g_header=fileToString(Config_getString(LATEX_HEADER));
477  //printf("g_header='%s'\n",qPrint(g_header));
478  }
479  else
480  {
481  g_header = ResourceMgr::instance().getAsString("header.tex");
482  }
483  if (!Config_getString(LATEX_FOOTER).isEmpty())
484  {
485  g_footer=fileToString(Config_getString(LATEX_FOOTER));
486  //printf("g_footer='%s'\n",qPrint(g_footer));
487  }
488  else
489  {
490  g_footer = ResourceMgr::instance().getAsString("footer.tex");
491  }
492 
494  writeMakeBat();
495 
496  createSubDirs(d);
497 }
498 
500 {
501  QCString dname = Config_getString(LATEX_OUTPUT);
502  Dir d(dname.str());
503  clearSubDirs(d);
504 }
505 
507 {
508  t << ResourceMgr::instance().getAsString("doxygen.sty");
509 }
510 
512 {
513  t << "% Latex header for doxygen " << getDoxygenVersion() << "\n";
514  t << ResourceMgr::instance().getAsString("header.tex");
515 }
516 
518 {
519  t << "% Latex footer for doxygen " << getDoxygenVersion() << "\n";
520  t << ResourceMgr::instance().getAsString("footer.tex");
521 }
522 
524 {
525  t << "% stylesheet for doxygen " << getDoxygenVersion() << "\n";
527 }
528 
529 void LatexGenerator::startFile(const QCString &name,const QCString &,const QCString &,int)
530 {
531 #if 0
532  setEncoding(Config_getString(LATEX_OUTPUT_ENCODING));
533 #endif
534  QCString fileName=name;
536  if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
540 }
541 
543 {
544  endPlainFile();
546 }
547 
548 //void LatexGenerator::writeIndex()
549 //{
550 // startFile("refman.tex");
551 //}
552 
554 {
555  m_t << "\\\\[1ex]\\large ";
556 }
557 
559 {
560  QCString result;
561  const StringVector &extraLatexStyles = Config_getList(LATEX_EXTRA_STYLESHEET);
562  for (const auto &fileName : extraLatexStyles)
563  {
564  if (!fileName.empty())
565  {
566  FileInfo fi(fileName);
567  if (fi.exists())
568  {
569  result += "\\usepackage{";
570  if (checkExtension(fi.fileName().c_str(), LATEX_STYLE_EXTENSION))
571  {
572  // strip the extension, it will be added by the usepackage in the tex conversion process
573  result += stripExtensionGeneral(fi.fileName().c_str(), LATEX_STYLE_EXTENSION);
574  }
575  else
576  {
577  result += fi.fileName();
578  }
579  result += "}\n";
580  }
581  }
582  }
583  return result;
584 }
585 
587 {
588  QCString result;
589  QCString latex_mkidx_command = Config_getString(LATEX_MAKEINDEX_CMD);
590  if (!latex_mkidx_command.isEmpty())
591  {
592  if (latex_mkidx_command[0] == '\\')
593  result += latex_mkidx_command;
594  else
595  result += "\\"+latex_mkidx_command;
596  }
597  else
598  {
599  result += "\\makeindex";
600  }
601  return result;
602 }
603 
605  const QCString &title)
606 {
607  bool compactLatex = Config_getBool(COMPACT_LATEX);
608  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
609  bool usePdfLatex = Config_getBool(USE_PDFLATEX);
610  bool latexBatchmode = Config_getBool(LATEX_BATCHMODE);
611  QCString paperType = Config_getEnumAsString(PAPER_TYPE);
612 
613  QCString style = Config_getString(LATEX_BIB_STYLE);
614  if (style.isEmpty())
615  {
616  style="plain";
617  }
618 
619  TextStream tg;
620  bool timeStamp = Config_getBool(LATEX_TIMESTAMP);
621  QCString generatedBy;
622  if (timeStamp)
623  {
624  generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE).data(),
625  Config_getString(PROJECT_NAME).data());
626  }
627  else
628  {
629  generatedBy = theTranslator->trGeneratedBy();
630  }
631  filterLatexString(tg, generatedBy,
632  false, // insideTabbing
633  false, // insidePre
634  false, // insideItem
635  false, // insideTable
636  false // keepSpaces
637  );
638  generatedBy = tg.str();
639 
640  QCString latexFontenc = theTranslator->latexFontenc();
641 
642  QCString latexEmojiDirectory = Config_getString(LATEX_EMOJI_DIRECTORY);
643  if (latexEmojiDirectory.isEmpty()) latexEmojiDirectory = ".";
644  latexEmojiDirectory = substitute(latexEmojiDirectory,"\\","/");
645 
646  TextStream tg1;
648  QCString extraLatexPackages = tg1.str();
649 
650  TextStream tg2;
652  QCString latexSpecialFormulaChars = tg2.str();
653 
654  QCString formulaMacrofile = Config_getString(FORMULA_MACROFILE);
655  if (!formulaMacrofile.isEmpty())
656  {
657  FileInfo fi(formulaMacrofile.str());
658  formulaMacrofile=fi.absFilePath();
659  QCString stripMacroFile = fi.fileName();
660  copyFile(formulaMacrofile,Config_getString(LATEX_OUTPUT) + "/" + stripMacroFile);
661  }
662 
663  // first substitute generic keywords
664  QCString result = substituteKeywords(str,title,
665  convertToLaTeX(Config_getString(PROJECT_NAME)),
666  convertToLaTeX(Config_getString(PROJECT_NUMBER)),
667  convertToLaTeX(Config_getString(PROJECT_BRIEF)));
668 
669  // additional LaTeX only keywords
670  result = substitute(result,"$latexdocumentpre",theTranslator->latexDocumentPre());
671  result = substitute(result,"$latexdocumentpost",theTranslator->latexDocumentPost());
672  result = substitute(result,"$generatedby",generatedBy);
673  result = substitute(result,"$latexbibstyle",style);
674  result = substitute(result,"$latexcitereference",theTranslator->trCiteReferences());
675  result = substitute(result,"$latexbibfiles",CitationManager::instance().latexBibFiles());
676  result = substitute(result,"$papertype",paperType+"paper");
677  result = substitute(result,"$extralatexstylesheet",extraLatexStyleSheet());
678  result = substitute(result,"$languagesupport",theTranslator->latexLanguageSupportCommand());
679  result = substitute(result,"$latexfontenc",latexFontenc);
680  result = substitute(result,"$latexfont",theTranslator->latexFont());
681  result = substitute(result,"$latexemojidirectory",latexEmojiDirectory);
682  result = substitute(result,"$makeindex",makeIndex());
683  result = substitute(result,"$extralatexpackages",extraLatexPackages);
684  result = substitute(result,"$latexspecialformulachars",latexSpecialFormulaChars);
685  result = substitute(result,"$formulamacrofile",formulaMacrofile);
686 
687  // additional LaTeX only conditional blocks
688  result = selectBlock(result,"CITATIONS_PRESENT", !CitationManager::instance().isEmpty(),OutputGenerator::Latex);
689  result = selectBlock(result,"COMPACT_LATEX",compactLatex,OutputGenerator::Latex);
690  result = selectBlock(result,"PDF_HYPERLINKS",pdfHyperlinks,OutputGenerator::Latex);
691  result = selectBlock(result,"USE_PDFLATEX",usePdfLatex,OutputGenerator::Latex);
692  result = selectBlock(result,"LATEX_TIMESTAMP",timeStamp,OutputGenerator::Latex);
693  result = selectBlock(result,"LATEX_BATCHMODE",latexBatchmode,OutputGenerator::Latex);
694  result = selectBlock(result,"LATEX_FONTENC",!latexFontenc.isEmpty(),OutputGenerator::Latex);
695  result = selectBlock(result,"FORMULA_MACROFILE",!formulaMacrofile.isEmpty(),OutputGenerator::Latex);
696 
697  result = removeEmptyLines(result);
698 
699  return result;
700 }
701 
703 {
704  bool compactLatex = Config_getBool(COMPACT_LATEX);
705  switch (is)
706  {
707  case isTitlePageStart:
709  break;
710  case isTitlePageAuthor:
711  break;
712  case isMainPage:
713  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
714  m_t << "{"; //Introduction}\n"
715  break;
716  //case isPackageIndex:
717  // if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
718  // m_t << "{"; //Package Index}\n"
719  // break;
720  case isModuleIndex:
721  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
722  m_t << "{"; //Module Index}\n"
723  break;
724  case isDirIndex:
725  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
726  m_t << "{"; //Directory Index}\n"
727  break;
728  case isNamespaceIndex:
729  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
730  m_t << "{"; //Namespace Index}\n"
731  break;
732  case isConceptIndex:
733  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
734  m_t << "{"; //Concept Index}\n"
735  break;
737  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
738  m_t << "{"; //Hierarchical Index}\n"
739  break;
740  case isCompoundIndex:
741  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
742  m_t << "{"; //Annotated Compound Index}\n"
743  break;
744  case isFileIndex:
745  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
746  m_t << "{"; //Annotated File Index}\n"
747  break;
748  case isPageIndex:
749  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
750  m_t << "{"; //Annotated Page Index}\n"
751  break;
753  {
754  for (const auto &gd : *Doxygen::groupLinkedMap)
755  {
756  if (!gd->isReference())
757  {
758  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
759  m_t << "{"; //Module Documentation}\n";
760  break;
761  }
762  }
763  }
764  break;
765  case isDirDocumentation:
766  {
767  for (const auto &dd : *Doxygen::dirLinkedMap)
768  {
769  if (dd->isLinkableInProject())
770  {
771  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
772  m_t << "{"; //Module Documentation}\n";
773  break;
774  }
775  }
776  }
777  break;
779  {
780  for (const auto &nd : *Doxygen::namespaceLinkedMap)
781  {
782  if (nd->isLinkableInProject() && !nd->isAlias())
783  {
784  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
785  m_t << "{"; // Namespace Documentation}\n":
786  break;
787  }
788  }
789  }
790  break;
792  {
793  for (const auto &cd : *Doxygen::conceptLinkedMap)
794  {
795  if (cd->isLinkableInProject() && !cd->isAlias())
796  {
797  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
798  m_t << "{"; // Concept Documentation}\n":
799  break;
800  }
801  }
802  }
803  break;
805  {
806  for (const auto &cd : *Doxygen::classLinkedMap)
807  {
808  if (cd->isLinkableInProject() &&
809  cd->templateMaster()==0 &&
810  !cd->isEmbeddedInOuterScope() &&
811  !cd->isAlias()
812  )
813  {
814  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
815  m_t << "{"; //Compound Documentation}\n";
816  break;
817  }
818  }
819  }
820  break;
821  case isFileDocumentation:
822  {
823  bool isFirst=TRUE;
824  for (const auto &fn : *Doxygen::inputNameLinkedMap)
825  {
826  for (const auto &fd : *fn)
827  {
828  if (fd->isLinkableInProject() || fd->generateSourceFile())
829  {
830  if (isFirst)
831  {
832  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
833  m_t << "{"; //File Documentation}\n";
834  isFirst=FALSE;
835  break;
836  }
837  }
838  }
839  }
840  }
841  break;
843  {
844  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
845  m_t << "{"; //Example Documentation}\n";
846  }
847  break;
848  case isPageDocumentation:
849  {
850  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
851  m_t << "{"; //Page Documentation}\n";
852  }
853  break;
855  break;
856  case isEndIndex:
857  break;
858  }
859 }
860 
862 {
863  switch (is)
864  {
865  case isTitlePageStart:
866  break;
867  case isTitlePageAuthor:
868  break;
869  case isMainPage:
870  {
871  //QCString indexName=Config_getBool(GENERATE_TREEVIEW)?"main":"index";
872  QCString indexName="index";
873  m_t << "}\n\\label{index}";
874  if (Config_getBool(PDF_HYPERLINKS)) m_t << "\\hypertarget{index}{}";
875  m_t << "\\input{" << indexName << "}\n";
876  }
877  break;
878  case isModuleIndex:
879  m_t << "}\n\\input{modules}\n";
880  break;
881  case isDirIndex:
882  m_t << "}\n\\input{dirs}\n";
883  break;
884  case isNamespaceIndex:
885  m_t << "}\n\\input{namespaces}\n";
886  break;
887  case isConceptIndex:
888  m_t << "}\n\\input{concepts}\n";
889  break;
891  m_t << "}\n\\input{hierarchy}\n";
892  break;
893  case isCompoundIndex:
894  m_t << "}\n\\input{annotated}\n";
895  break;
896  case isFileIndex:
897  m_t << "}\n\\input{files}\n";
898  break;
899  case isPageIndex:
900  m_t << "}\n\\input{pages}\n";
901  break;
903  {
904  bool found=FALSE;
905  for (const auto &gd : *Doxygen::groupLinkedMap)
906  {
907  if (!gd->isReference())
908  {
909  if (!found)
910  {
911  m_t << "}\n";
912  found=TRUE;
913  }
914  m_t << "\\input{" << gd->getOutputFileBase() << "}\n";
915  }
916  }
917  }
918  break;
919  case isDirDocumentation:
920  {
921  bool found=FALSE;
922  for (const auto &dd : *Doxygen::dirLinkedMap)
923  {
924  if (dd->isLinkableInProject())
925  {
926  if (!found)
927  {
928  m_t << "}\n";
929  found = TRUE;
930  }
931  m_t << "\\input{" << dd->getOutputFileBase() << "}\n";
932  }
933  }
934  }
935  break;
937  {
938  bool found=FALSE;
939  for (const auto &nd : *Doxygen::namespaceLinkedMap)
940  {
941  if (nd->isLinkableInProject() && !nd->isAlias())
942  {
943  if (!found)
944  {
945  m_t << "}\n";
946  found=true;
947  }
948  m_t << "\\input{" << nd->getOutputFileBase() << "}\n";
949  }
950  }
951  }
952  break;
954  {
955  bool found=FALSE;
956  for (const auto &cd : *Doxygen::conceptLinkedMap)
957  {
958  if (cd->isLinkableInProject() && !cd->isAlias())
959  {
960  if (!found)
961  {
962  m_t << "}\n";
963  found=true;
964  }
965  m_t << "\\input{" << cd->getOutputFileBase() << "}\n";
966  }
967  }
968  }
969  break;
971  {
972  bool found=FALSE;
973  for (const auto &cd : *Doxygen::classLinkedMap)
974  {
975  if (cd->isLinkableInProject() &&
976  cd->templateMaster()==0 &&
977  !cd->isEmbeddedInOuterScope() &&
978  !cd->isAlias()
979  )
980  {
981  if (!found)
982  {
983  m_t << "}\n"; // end doxysection or chapter title
984  found=TRUE;
985  }
986  m_t << "\\input{" << cd->getOutputFileBase() << "}\n";
987  }
988  }
989  }
990  break;
991  case isFileDocumentation:
992  {
993  bool isFirst=TRUE;
994  for (const auto &fn : *Doxygen::inputNameLinkedMap)
995  {
996  for (const auto &fd : *fn)
997  {
998  if (fd->isLinkableInProject())
999  {
1000  if (isFirst)
1001  {
1002  m_t << "}\n"; // end doxysection or chapter title
1003  }
1004  isFirst=FALSE;
1005  m_t << "\\input{" << fd->getOutputFileBase() << "}\n";
1006  }
1007  if (fd->generateSourceFile())
1008  {
1009  if (isFirst)
1010  {
1011  m_t << "}\n"; // end doxysection or chapter title
1012  }
1013  isFirst=FALSE;
1014  m_t << "\\input{" << fd->getSourceFileBase() << "}\n";
1015  }
1016  }
1017  }
1018  }
1019  break;
1021  {
1022  m_t << "}\n";
1023  for (const auto &pd : *Doxygen::exampleLinkedMap)
1024  {
1025  m_t << "\\input{" << pd->getOutputFileBase() << "}\n";
1026  }
1027  }
1028  break;
1029  case isPageDocumentation:
1030  {
1031  m_t << "}\n";
1032 #if 0
1033  bool first=TRUE;
1034  for (const auto *pd : Doxygen::pageLinkedMap)
1035  {
1036  if (!pd->getGroupDef() && !pd->isReference())
1037  {
1038  if (compactLatex) m_t << "\\doxysection"; else m_t << "\\chapter";
1039  m_t << "{" << pd->title();
1040  m_t << "}\n";
1041 
1042  if (compactLatex || first) m_t << "\\input" ; else m_t << "\\include";
1043  m_t << "{" << pd->getOutputFileBase() << "}\n";
1044  first=FALSE;
1045  }
1046  }
1047 #endif
1048  }
1049  break;
1050  case isPageDocumentation2:
1051  break;
1052  case isEndIndex:
1054  break;
1055  }
1056 }
1057 
1058 void LatexGenerator::writePageLink(const QCString &name, bool /*first*/)
1059 {
1060  //bool &compactLatex = Config_getBool(COMPACT_LATEX);
1061  // next is remove for bug615957
1062  //if (compactLatex || first) m_t << "\\input" ; else m_t << "\\include";
1063  m_t << "\\input" ;
1064  m_t << "{" << name << "}\n";
1065 }
1066 
1067 
1069 {
1070  if (part > 0)
1071  return;
1072 
1073  startPlainFile("doxygen.sty");
1075  endPlainFile();
1076 
1077  // workaround for the problem caused by change in LaTeX in version 2019
1078  // in the unmaintained tabu package
1079  startPlainFile("tabu_doxygen.sty");
1080  m_t << ResourceMgr::instance().getAsString("tabu_doxygen.sty");
1081  endPlainFile();
1082  startPlainFile("longtable_doxygen.sty");
1083  m_t << ResourceMgr::instance().getAsString("longtable_doxygen.sty");
1084  endPlainFile();
1085 }
1086 
1088 {
1089  m_t << "\n" << "\n";
1090 }
1091 
1093 {
1094  m_t << "\n" << "\n";
1095 }
1096 
1098 {
1099  m_t << "\n" << "\n";
1100 }
1101 
1103 {
1104  m_t << text;
1105 }
1106 
1108 {
1109  m_t << "\\item ";
1110  if (ref.isEmpty() && !fn.isEmpty())
1111  {
1112  m_t << "\\contentsline{section}{";
1113  }
1114 }
1115 
1117 {
1118  if (ref.isEmpty() && !fn.isEmpty())
1119  {
1120  m_t << "}{\\pageref{" << stripPath(fn) << "}}{}\n";
1121  }
1122 }
1123 
1124 //void LatexGenerator::writeIndexFileItem(const QCString &,const QCString &text)
1125 //{
1126 // m_t << "\\item\\contentsline{section}{";
1127 // docify(text);
1128 // m_t << "}{\\pageref{" << stripPath(text) << "}}\n";
1129 //}
1130 
1131 
1133 {
1134  if (Config_getBool(PDF_HYPERLINKS))
1135  {
1136  m_t << "\\href{";
1137  m_t << latexFilterURL(url);
1138  m_t << "}";
1139  }
1140  m_t << "{\\texttt{ ";
1141 }
1142 
1144 {
1145  m_t << "}}";
1146 }
1147 
1148 //void LatexGenerator::writeMailLink(const QCString &url)
1149 //{
1150 // if (Config_getBool(PDF_HYPERLINKS))
1151 // {
1152 // m_t << "\\href{mailto:";
1153 // m_t << url;
1154 // m_t << "}";
1155 // }
1156 // m_t << "\\texttt{ ";
1157 // docify(url);
1158 // m_t << "}";
1159 //}
1160 
1162  const QCString &path,const QCString &name)
1163 {
1164  m_t << "\\item\\contentsline{section}\\textbf{ ";
1165  if (!path.isEmpty()) docify(path);
1166  docify(name);
1167  m_t << "} ";
1168 }
1169 
1171 {
1172  m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
1173 }
1174 
1176 {
1177  m_t << "\\item\\contentsline{section}{";
1178 }
1179 
1181 {
1182 }
1183 
1185 {
1186  m_t << " ";
1187  if (hasBrief) m_t << "\\\\*";
1188 }
1189 
1190 void LatexGenerator::endIndexValue(const QCString &name,bool /*hasBrief*/)
1191 {
1192  //if (hasBrief) m_t << ")";
1193  m_t << "}{\\pageref{" << stripPath(name) << "}}{}\n";
1194 }
1195 
1196 //void LatexGenerator::writeClassLink(const QCString &,const QCString &,
1197 // const QCString &,const QCString &name)
1198 //{
1199 // m_t << "\\textbf{ ";
1200 // docify(name);
1201 // m_t << "}";
1202 //}
1203 
1205 {
1206  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1207  if (!m_disableLinks && pdfHyperlinks)
1208  {
1209  m_t << "\\mbox{\\hyperlink{";
1210  if (!f.isEmpty()) m_t << stripPath(f);
1211  if (!anchor.isEmpty()) m_t << "_" << anchor;
1212  m_t << "}{";
1213  }
1214  else
1215  {
1216  m_t << "\\textbf{ ";
1217  }
1218 }
1219 
1221 {
1222  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1223  if (!m_disableLinks && pdfHyperlinks)
1224  {
1225  m_t << "}";
1226  }
1227  m_t << "}";
1228 }
1229 
1231  const QCString &anchor, const QCString &text)
1232 {
1233  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1234  if (!m_disableLinks && ref.isEmpty() && pdfHyperlinks)
1235  {
1236  m_t << "\\mbox{\\hyperlink{";
1237  if (!f.isEmpty()) m_t << stripPath(f);
1238  if (!f.isEmpty() && !anchor.isEmpty()) m_t << "_";
1239  if (!anchor.isEmpty()) m_t << anchor;
1240  m_t << "}{";
1241  docify(text);
1242  m_t << "}}";
1243  }
1244  else
1245  {
1246  m_t << "\\textbf{ ";
1247  docify(text);
1248  m_t << "}";
1249  }
1250 }
1251 
1253 {
1254  m_t << " \\doxyref{}{";
1255 }
1256 
1257 void LatexGenerator::endPageRef(const QCString &clname, const QCString &anchor)
1258 {
1259  m_t << "}{";
1260  if (!clname.isEmpty()) m_t << clname;
1261  if (!anchor.isEmpty()) m_t << "_" << anchor;
1262  m_t << "}";
1263 }
1264 
1265 
1267 {
1268  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1269  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
1270  if (usePDFLatex && pdfHyperlinks && !fileName.isEmpty())
1271  {
1272  m_t << "\\hypertarget{" << stripPath(fileName) << "}{}";
1273  }
1274  if (Config_getBool(COMPACT_LATEX))
1275  {
1276  m_t << "\\doxysubsection{";
1277  }
1278  else
1279  {
1280  m_t << "\\doxysection{";
1281  }
1282 }
1283 
1284 void LatexGenerator::endTitleHead(const QCString &fileName,const QCString &name)
1285 {
1286  m_t << "}\n";
1287  if (!name.isEmpty())
1288  {
1289  m_t << "\\label{" << stripPath(fileName) << "}\\index{";
1290  m_t << latexEscapeLabelName(name);
1291  m_t << "@{";
1292  m_t << latexEscapeIndexChars(name);
1293  m_t << "}}\n";
1294  }
1295 }
1296 
1298 {
1299  if (Config_getBool(COMPACT_LATEX))
1300  {
1301  m_t << "\\doxysubsection{";
1302  }
1303  else
1304  {
1305  m_t << "\\doxysection{";
1306  }
1307 }
1308 
1309 void LatexGenerator::startGroupHeader(int extraIndentLevel)
1310 {
1311  if (Config_getBool(COMPACT_LATEX))
1312  {
1313  extraIndentLevel++;
1314  }
1315 
1316  if (extraIndentLevel==3)
1317  {
1318  m_t << "\\doxysubparagraph*{";
1319  }
1320  else if (extraIndentLevel==2)
1321  {
1322  m_t << "\\doxyparagraph{";
1323  }
1324  else if (extraIndentLevel==1)
1325  {
1326  m_t << "\\doxysubsubsection{";
1327  }
1328  else // extraIndentLevel==0
1329  {
1330  m_t << "\\doxysubsection{";
1331  }
1333 }
1334 
1336 {
1338  m_t << "}\n";
1339 }
1340 
1342 {
1343  if (Config_getBool(COMPACT_LATEX))
1344  {
1345  m_t << "\\doxysubsubsection*{";
1346  }
1347  else
1348  {
1349  m_t << "\\doxysubsection*{";
1350  }
1352 }
1353 
1355 {
1357  m_t << "}\n";
1358 }
1359 
1361  const QCString &memname,
1362  const QCString &,
1363  const QCString &title,
1364  int memCount,
1365  int memTotal,
1366  bool showInline)
1367 {
1368  if (!memname.isEmpty() && memname[0]!='@')
1369  {
1370  m_t << "\\index{";
1371  if (!clname.isEmpty())
1372  {
1373  m_t << latexEscapeLabelName(clname);
1374  m_t << "@{";
1375  m_t << latexEscapeIndexChars(clname);
1376  m_t << "}!";
1377  }
1378  m_t << latexEscapeLabelName(memname);
1379  m_t << "@{";
1380  m_t << latexEscapeIndexChars(memname);
1381  m_t << "}}\n";
1382 
1383  m_t << "\\index{";
1384  m_t << latexEscapeLabelName(memname);
1385  m_t << "@{";
1386  m_t << latexEscapeIndexChars(memname);
1387  m_t << "}";
1388  if (!clname.isEmpty())
1389  {
1390  m_t << "!";
1391  m_t << latexEscapeLabelName(clname);
1392  m_t << "@{";
1393  m_t << latexEscapeIndexChars(clname);
1394  m_t << "}";
1395  }
1396  m_t << "}\n";
1397  }
1398  static const char *levelLab[] = { "doxysubsubsection","doxyparagraph","doxysubparagraph", "doxysubparagraph" };
1399  bool compactLatex = Config_getBool(COMPACT_LATEX);
1400  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1401  int level=0;
1402  if (showInline) level+=2;
1403  if (compactLatex) level++;
1404  m_t << "\\" << levelLab[level];
1405 
1406  m_t << "{";
1407  if (pdfHyperlinks)
1408  {
1409  m_t << "\\texorpdfstring{";
1410  }
1411  m_t << latexEscapeIndexChars(title);
1412  if (pdfHyperlinks)
1413  {
1414  m_t << "}{" << latexEscapePDFString(title) << "}";
1415  }
1416  if (memTotal>1)
1417  {
1418  m_t << "\\hspace{0.1cm}{\\footnotesize\\ttfamily [" << memCount << "/" << memTotal << "]}";
1419  }
1420  m_t << "}";
1421  m_t << "\n{\\footnotesize\\ttfamily ";
1422  //m_disableLinks=TRUE;
1423 }
1424 
1426 {
1428  m_t << "}\n\n";
1429  //if (Config_getBool(COMPACT_LATEX)) m_t << "\\hfill";
1430 }
1431 
1433  const QCString &anchor, const QCString &,
1434  const QCString &)
1435 {
1436  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1437  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
1438  m_t << "\\mbox{";
1439  if (usePDFLatex && pdfHyperlinks)
1440  {
1441  m_t << "\\Hypertarget{";
1442  if (!fName.isEmpty()) m_t << stripPath(fName);
1443  if (!anchor.isEmpty()) m_t << "_" << anchor;
1444  m_t << "}";
1445  }
1446  m_t << "\\label{";
1447  if (!fName.isEmpty()) m_t << stripPath(fName);
1448  if (!anchor.isEmpty()) m_t << "_" << anchor;
1449  m_t << "}} \n";
1450 }
1451 
1452 void LatexGenerator::endDoxyAnchor(const QCString &fName,const QCString &anchor)
1453 {
1454 }
1455 
1456 void LatexGenerator::writeAnchor(const QCString &fName,const QCString &name)
1457 {
1458  //printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
1459  m_t << "\\label{" << stripPath(name) << "}\n";
1460  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1461  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
1462  if (usePDFLatex && pdfHyperlinks)
1463  {
1464  if (!fName.isEmpty())
1465  {
1466  m_t << "\\Hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}\n";
1467  }
1468  else
1469  {
1470  m_t << "\\Hypertarget{" << stripPath(name) << "}\n";
1471  }
1472  }
1473 }
1474 
1475 
1476 //void LatexGenerator::writeLatexLabel(const QCString &clName,const QCString &anchor)
1477 //{
1478 // writeDoxyAnchor(0,clName,anchor,0);
1479 //}
1480 
1482 {
1483  if (!s1.isEmpty())
1484  {
1485  m_t << "\\index{";
1486  m_t << latexEscapeLabelName(s1);
1487  m_t << "@{";
1488  m_t << latexEscapeIndexChars(s1);
1489  m_t << "}";
1490  if (!s2.isEmpty())
1491  {
1492  m_t << "!";
1493  m_t << latexEscapeLabelName(s2);
1494  m_t << "@{";
1495  m_t << latexEscapeIndexChars(s2);
1496  m_t << "}";
1497  }
1498  m_t << "}";
1499  }
1500 }
1501 
1502 
1504 {
1505  bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS);
1506  bool usePDFLatex = Config_getBool(USE_PDFLATEX);
1507  if (usePDFLatex && pdfHyperlinks)
1508  {
1509  m_t << "\\hypertarget{" << stripPath(lab) << "}{}";
1510  }
1511  m_t << "\\";
1512  if (Config_getBool(COMPACT_LATEX))
1513  {
1514  switch(type)
1515  {
1516  case SectionType::Page: m_t << "doxysubsection"; break;
1517  case SectionType::Section: m_t << "doxysubsubsection"; break;
1518  case SectionType::Subsection: m_t << "doxyparagraph"; break;
1519  case SectionType::Subsubsection: m_t << "doxysubparagraph"; break;
1520  case SectionType::Paragraph: m_t << "doxysubparagraph"; break;
1521  default: ASSERT(0); break;
1522  }
1523  m_t << "{";
1524  }
1525  else
1526  {
1527  switch(type)
1528  {
1529  case SectionType::Page: m_t << "doxysection"; break;
1530  case SectionType::Section: m_t << "doxysubsection"; break;
1531  case SectionType::Subsection: m_t << "doxysubsubsection"; break;
1532  case SectionType::Subsubsection: m_t << "doxyparagraph"; break;
1533  case SectionType::Paragraph: m_t << "doxysubparagraph"; break;
1534  default: ASSERT(0); break;
1535  }
1536  m_t << "{";
1537  }
1538 }
1539 
1541 {
1542  m_t << "}\\label{" << lab << "}\n";
1543 }
1544 
1545 
1547 {
1548  filterLatexString(m_t,str,
1549  m_insideTabbing, // insideTabbing
1550  false, // insidePre
1551  false, // insideItem
1552  m_codeGen.usedTableLevel()>0, // insideTable
1553  false // keepSpaces
1554  );
1555 }
1556 
1558 {
1559  char cs[2];
1560  cs[0]=c;
1561  cs[1]=0;
1562  docify(cs);
1563 }
1564 
1566 {
1567  //if (Config_getBool(COMPACT_LATEX)) m_t << "\\doxysubsubsection"; else m_t << "\\doxysubsection";
1568  //m_t << "{";
1569 }
1570 
1572  const QCString &fileName,const QCString &)
1573 {
1574  d.writeFigure(m_t,dir(),fileName);
1575 }
1576 
1577 
1579 {
1580  if (indent==0)
1581  {
1582  m_t << "\\begin{tabbing}\n";
1583  m_t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill\n";
1585  }
1586  m_indent=indent;
1587 }
1588 
1590 {
1591  if (indent==0)
1592  {
1593  m_t << "\n" << "\\end{tabbing}";
1595  }
1596  m_indent=indent;
1597 }
1598 
1600 {
1601  if (templateMemberItem)
1602  {
1603  m_t << "{\\footnotesize ";
1604  }
1605 }
1606 
1608 {
1609  if (templateMemberItem)
1610  {
1611  m_t << "}\\\\";
1612  }
1613 }
1614 
1615 void LatexGenerator::startMemberItem(const QCString &,int annoType,const QCString &)
1616 {
1617  //printf("LatexGenerator::startMemberItem(%d)\n",annType);
1618  if (!m_insideTabbing)
1619  {
1620  m_t << "\\item \n";
1621  templateMemberItem = (annoType == 3);
1622  }
1623 }
1624 
1626 {
1627  if (m_insideTabbing)
1628  {
1629  m_t << "\\\\";
1630  }
1632  m_t << "\n";
1633 }
1634 
1636 {
1637  if (!m_insideTabbing)
1638  {
1639  m_t << "\\begin{DoxyCompactList}\\small\\item\\em ";
1640  }
1641  else
1642  {
1643  for (int i=0;i<m_indent+2;i++) m_t << "\\>";
1644  m_t << "{\\em ";
1645  }
1646 }
1647 
1649 {
1650  if (!m_insideTabbing)
1651  {
1652  //m_t << "\\item\\end{DoxyCompactList}";
1653  m_t << "\\end{DoxyCompactList}";
1654  }
1655  else
1656  {
1657  m_t << "}\\\\\n";
1658  }
1659 }
1660 
1661 
1663 {
1664  //printf("writeNonBreakableSpace()\n");
1665  if (m_insideTabbing)
1666  {
1667  m_t << "\\>";
1668  }
1669  else
1670  {
1671  m_t << "~";
1672  }
1673 }
1674 
1675 // ----------------------------------------------
1676 // nesting of functions below:
1677 // startDescTable()
1678 // - startDescTableRow()
1679 // - startDescTableTitle()
1680 // - endDescTableTitle()
1681 // - startDescTableData()
1682 // - endDescTableData()
1683 // - endDescTableRow()
1684 // - startDescTableRow()
1685 // - ...
1686 // - endDescTableRow()
1687 // endDescTable()
1688 
1690 {
1692  m_t << "\\begin{DoxyEnumFields}{" << title << "}\n";
1693 }
1694 
1696 {
1698  m_t << "\\end{DoxyEnumFields}\n";
1699 }
1700 
1702 {
1703  // this is needed to prevent the \hypertarget, \label, and \index commands from messing up
1704  // the row height (based on http://tex.stackexchange.com/a/186102)
1705  m_t << "\\raisebox{\\heightof{T}}[0pt][0pt]{";
1706 }
1707 
1709 {
1710 }
1711 
1713 {
1714  m_t << "}";
1715 }
1716 
1718 {
1719 }
1720 
1722 {
1723  m_t << "&";
1724 }
1725 
1727 {
1728  m_t << "\\\\\n\\hline\n\n";
1729 }
1730 
1732 {
1733 }
1734 
1735 
1737 {
1738  if (!m_insideTabbing)
1739  {
1740  m_t << "\\begin{DoxyCompactItemize}\n";
1741  }
1742 }
1743 
1745 {
1746  //printf("LatexGenerator::endMemberList(%d)\n",m_insideTabbing);
1747  if (!m_insideTabbing)
1748  {
1749  m_t << "\\end{DoxyCompactItemize}\n";
1750  }
1751 }
1752 
1753 
1755 {
1756  if (hasHeader) m_t << "\\begin{Indent}";
1757  m_t << "\\textbf{ ";
1758  // changed back to rev 756 due to bug 660501
1759  //if (Config_getBool(COMPACT_LATEX))
1760  //{
1761  // m_t << "\\doxysubparagraph*{";
1762  //}
1763  //else
1764  //{
1765  // m_t << "\\doxyparagraph*{";
1766  //}
1767 }
1768 
1770 {
1771  // changed back to rev 756 due to bug 660501
1772  m_t << "}\\par\n";
1773  //m_t << "}\n";
1774 }
1775 
1777 {
1778  m_t << "{\\em ";
1779 }
1780 
1782 {
1783  m_t << "}";
1784 }
1785 
1787 {
1788 }
1789 
1791 {
1792  if (hasHeader)m_t << "\\end{Indent}";
1793  m_t << "\n";
1794 }
1795 
1797 {
1798  newParagraph();
1799 }
1800 
1802 {
1804 }
1805 
1807 {
1808 }
1809 
1811 {
1813 }
1814 
1816 {
1817 }
1818 
1820 {
1822 }
1823 
1825 {
1826 }
1827 
1829 {
1831 }
1832 
1834 {
1835 }
1836 
1838 {
1840 }
1841 
1843 {
1844  m_t << "\\begin{description}\n";
1845 }
1846 
1848 {
1849  m_t << "\\end{description}\n";
1851 }
1852 
1854 {
1856  m_t << "\\item[";
1857 }
1858 
1860 {
1861  if (m_firstDescItem)
1862  {
1863  m_t << "]\n";
1865  }
1866  else
1867  {
1868  lineBreak();
1869  }
1870 }
1871 
1873 {
1874  m_t << "\\begin{Desc}\n\\item[";
1876  m_t << "]";
1877 }
1878 
1880 {
1881  m_t << "\\end{Desc}\n";
1882 }
1883 
1885 {
1886  m_t << "\\begin{Desc}\n\\item[";
1887  docify(title);
1888  m_t << "]";
1889 }
1890 
1892 {
1893  m_t << "\\end{Desc}\n";
1894 }
1895 
1897 {
1898  /* start of ParameterType ParameterName list */
1899  if (openBracket) m_t << "(";
1900  m_t << "\\begin{DoxyParamCaption}";
1901 }
1902 
1904 {
1905 }
1906 
1908 {
1909  m_t << "\\item[{";
1910  if (!first && !key.isEmpty()) docify(key);
1911 }
1912 
1914 {
1915  m_t << "}]";
1916 }
1917 
1918 void LatexGenerator::startParameterName(bool /*oneArgOnly*/)
1919 {
1920  m_t << "{";
1921 }
1922 
1923 void LatexGenerator::endParameterName(bool last,bool /*emptyList*/,bool closeBracket)
1924 {
1925  m_t << " }";
1926  if (last)
1927  {
1928  m_t << "\\end{DoxyParamCaption}";
1929  if (closeBracket) m_t << ")";
1930  }
1931 }
1932 
1933 void LatexGenerator::exceptionEntry(const QCString &prefix,bool closeBracket)
1934 {
1935  if (!prefix.isEmpty())
1936  {
1937  m_t << " " << prefix << "(";
1938  }
1939  else if (closeBracket)
1940  {
1941  m_t << ")";
1942  }
1943  m_t << " ";
1944 }
1945 
1946 void LatexGenerator::writeDoc(DocNode *n,const Definition *ctx,const MemberDef *,int)
1947 {
1948  LatexDocVisitor *visitor =
1950  n->accept(visitor);
1951  delete visitor;
1952 }
1953 
1955 {
1956  m_t << "\\begin{Desc}\n\\item[";
1957  docify(header);
1958  m_t << "]";
1959  m_t << "\\begin{description}\n";
1960 }
1961 
1963 {
1964  m_t << "\\item[{\\em ";
1965 }
1966 
1968 {
1969 }
1970 
1972 {
1973  m_t << "} : {\\em ";
1974 }
1975 
1977 {
1978  m_t << "}]";
1979 }
1980 
1982 {
1983 }
1984 
1986 {
1987 }
1988 
1990 {
1991  m_t << "\\end{description}\n";
1992  m_t << "\\end{Desc}\n";
1993 }
1994 
1996 {
1997  if (Config_getBool(COMPACT_LATEX))
1998  {
1999  m_t << "\\doxyparagraph*{";
2000  }
2001  else
2002  {
2003  m_t << "\\doxysubsubsection*{";
2004  }
2005 }
2006 
2008 {
2009  m_t << "}\n";
2010 }
2011 
2013 {
2014  if (m_insideTabbing)
2015  {
2016  m_t << "\\\\\n";
2017  }
2018  else
2019  {
2020  m_t << "\\newline\n";
2021  }
2022 }
2023 
2025 {
2027  if (isEnum)
2028  {
2029  m_t << "\\begin{DoxyEnumFields}{";
2031  }
2032  else
2033  {
2034  m_t << "\\begin{DoxyFields}{";
2036  }
2037  m_t << "}\n";
2038 }
2039 
2041 {
2043  if (isEnum)
2044  {
2045  m_t << "\\end{DoxyEnumFields}\n";
2046  }
2047  else
2048  {
2049  m_t << "\\end{DoxyFields}\n";
2050  }
2051 }
2052 
2054 {
2055  m_insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks
2056 }
2057 
2059 {
2060  m_t << "&\n";
2062 }
2063 
2065 {
2066  m_insideTabbing = TRUE; // to prevent \+ from causing unwanted breaks
2067 }
2068 
2070 {
2071  m_t << "&\n";
2073 }
2074 
2076 {
2077 }
2078 
2080 {
2081  m_t << "\\\\\n\\hline\n\n";
2082 }
2083 
2085 {
2086  m_t << "\\hspace{0.3cm}";
2087 }
2088 
2089 void LatexGenerator::writeLabel(const QCString &l,bool isLast)
2090 {
2091  m_t << "{\\ttfamily [" << l << "]}";
2092  if (!isLast) m_t << ", ";
2093 }
2094 
2096 {
2097 }
selectBlock
QCString selectBlock(const QCString &s, const QCString &name, bool enable, OutputGenerator::OutputType o)
Definition: util.cpp:7209
Definition::getDefFileExtension
virtual QCString getDefFileExtension() const =0
StringVector
std::vector< std::string > StringVector
Definition: containers.h:32
LatexGenerator::startIndexKey
void startIndexKey()
Definition: latexgen.cpp:1175
OutputGenerator::fileName
QCString fileName() const
Definition: outputgen.cpp:85
LatexGenerator::endPageRef
void endPageRef(const QCString &, const QCString &)
Definition: latexgen.cpp:1257
LatexGenerator::endParameterType
void endParameterType()
Definition: latexgen.cpp:1913
SectionType::Paragraph
@ Paragraph
LatexGenerator::endMemberGroup
void endMemberGroup(bool)
Definition: latexgen.cpp:1790
isExampleDocumentation
@ isExampleDocumentation
Definition: index.h:134
LatexGenerator::startGroupCollaboration
void startGroupCollaboration()
Definition: latexgen.cpp:1815
dotincldepgraph.h
LatexGenerator::addIndexItem
void addIndexItem(const QCString &, const QCString &)
Definition: latexgen.cpp:1481
LatexGenerator::startMemberHeader
void startMemberHeader(const QCString &, int)
Definition: latexgen.cpp:1341
ResourceMgr::instance
static ResourceMgr & instance()
Returns the one and only instance of this class
Definition: resourcemgr.cpp:32
LatexCodeGenerator::m_doxyCodeLineOpen
bool m_doxyCodeLineOpen
Definition: latexgen.h:74
LatexGenerator::startDescTableRow
void startDescTableRow()
Definition: latexgen.cpp:1701
isDirDocumentation
@ isDirDocumentation
Definition: index.h:129
fileinfo.h
LatexGenerator::endDescTableTitle
void endDescTableTitle()
Definition: latexgen.cpp:1717
LatexGenerator::startDescTableTitle
void startDescTableTitle()
Definition: latexgen.cpp:1712
latexgen.h
Translator::trCompoundMembers
virtual QCString trCompoundMembers()=0
LatexGenerator::startClassDiagram
void startClassDiagram()
Definition: latexgen.cpp:1565
latexFilterURL
QCString latexFilterURL(const QCString &s)
Definition: util.cpp:5197
Translator::trGeneratedBy
virtual QCString trGeneratedBy()=0
cite.h
THREAD_LOCAL
#define THREAD_LOCAL
Definition: doxygen.h:27
Translator::latexFontenc
virtual QCString latexFontenc()
Definition: translator.h:66
isNamespaceIndex
@ isNamespaceIndex
Definition: index.h:122
stripExtensionGeneral
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
Definition: util.cpp:5285
DotDirDeps
Representation of an directory dependency graph
Definition: dotdirdeps.h:25
LatexGenerator::endInlineMemberType
void endInlineMemberType()
Definition: latexgen.cpp:2058
LatexGenerator::startDescTable
void startDescTable(const QCString &title)
Definition: latexgen.cpp:1689
ResourceMgr::getAsString
QCString getAsString(const QCString &name) const
Gets the resource data as a C string
Definition: resourcemgr.cpp:192
Definition
The common base class of all entity definitions found in the sources.
Definition: definition.h:76
LatexGenerator::endSection
void endSection(const QCString &, SectionType)
Definition: latexgen.cpp:1540
relativePathToRoot
QCString relativePathToRoot(const QCString &name)
Definition: util.cpp:3656
BaseOutputDocInterface::ParamListTypes
ParamListTypes
Definition: outputgen.h:165
Dir
Class representing a directory in the file system
Definition: dir.h:68
LatexGenerator::startIndexValue
void startIndexValue(bool)
Definition: latexgen.cpp:1184
LatexGenerator::startInlineMemberDoc
void startInlineMemberDoc()
Definition: latexgen.cpp:2075
LatexCodeGenerator::startCodeFragment
void startCodeFragment(const QCString &style) override
Definition: latexgen.cpp:247
LatexCodeGenerator::m_col
int m_col
Definition: latexgen.h:73
LatexGenerator::writeChar
void writeChar(char c)
Definition: latexgen.cpp:1557
pagedef.h
LatexCodeGenerator::m_usedTableLevel
int m_usedTableLevel
Definition: latexgen.h:75
isFileIndex
@ isFileIndex
Definition: index.h:126
QCString::length
uint length() const
Returns the length of the string, not counting the 0-terminator.
Definition: qcstring.h:147
LatexGenerator::startParameterName
void startParameterName(bool)
Definition: latexgen.cpp:1918
isCompoundIndex
@ isCompoundIndex
Definition: index.h:125
LatexGenerator::startSection
void startSection(const QCString &, const QCString &, SectionType)
Definition: latexgen.cpp:1503
Translator::latexCommandName
virtual QCString latexCommandName()
Definition: translator.h:85
Doxygen::conceptLinkedMap
static ConceptLinkedMap * conceptLinkedMap
Definition: doxygen.h:80
isTitlePageStart
@ isTitlePageStart
Definition: index.h:117
LatexGenerator::endMemberDescription
void endMemberDescription()
Definition: latexgen.cpp:1648
QCString::isEmpty
bool isEmpty() const
Returns TRUE iff the string is empty
Definition: qcstring.h:144
LatexGenerator::startDescription
void startDescription()
Definition: latexgen.cpp:1842
DocNode
Abstract node interface with type information.
Definition: docparser.h:96
isPageIndex
@ isPageIndex
Definition: index.h:127
Doxygen::pageLinkedMap
static PageLinkedMap * pageLinkedMap
Definition: doxygen.h:82
LatexCodeGenerator::writeLineNumber
void writeLineNumber(const QCString &, const QCString &, const QCString &, int, bool) override
Definition: latexgen.cpp:174
LatexGenerator::endDoxyAnchor
void endDoxyAnchor(const QCString &, const QCString &)
Definition: latexgen.cpp:1452
namespacedef.h
LatexGenerator::writeNonBreakableSpace
void writeNonBreakableSpace(int)
Definition: latexgen.cpp:1662
LatexGenerator::startMemberDoc
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool)
Definition: latexgen.cpp:1360
dotdirdeps.h
LatexGenerator::startMemberItem
void startMemberItem(const QCString &, int, const QCString &)
Definition: latexgen.cpp:1615
LatexGenerator::writeLabel
void writeLabel(const QCString &l, bool isLast)
Definition: latexgen.cpp:2089
copyFile
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
Definition: util.cpp:6439
LatexGenerator::endConstraintDocs
void endConstraintDocs()
Definition: latexgen.cpp:1985
LatexGenerator::endParameterName
void endParameterName(bool, bool, bool)
Definition: latexgen.cpp:1923
LatexGenerator::~LatexGenerator
virtual ~LatexGenerator()
Definition: latexgen.cpp:283
LatexGenerator::endMemberHeader
void endMemberHeader()
Definition: latexgen.cpp:1354
latexdocvisitor.h
LatexGenerator::writeEndAnnoItem
void writeEndAnnoItem(const QCString &name)
Definition: latexgen.cpp:1170
DotGroupCollaboration::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Definition: dotgroupcollaboration.cpp:242
writeMakeBat
static void writeMakeBat()
Definition: latexgen.cpp:381
LatexGenerator::startParamList
void startParamList(ParamListTypes, const QCString &title)
Definition: latexgen.cpp:1884
QCString::str
std::string str() const
Definition: qcstring.h:442
LatexCodeGenerator::endFontClass
void endFontClass() override
Definition: latexgen.cpp:242
DotClassGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1)
Definition: dotclassgraph.cpp:447
isClassDocumentation
@ isClassDocumentation
Definition: index.h:131
isModuleDocumentation
@ isModuleDocumentation
Definition: index.h:128
LatexCodeGenerator::decUsedTableLevel
void decUsedTableLevel()
Definition: latexgen.h:60
isConceptIndex
@ isConceptIndex
Definition: index.h:123
Translator::trEnumerationValues
virtual QCString trEnumerationValues()=0
LatexGenerator::m_relPath
QCString m_relPath
Definition: latexgen.h:340
LatexCodeGenerator::startFontClass
void startFontClass(const QCString &) override
Definition: latexgen.cpp:237
LatexGenerator::clone
virtual std::unique_ptr< OutputGenerator > clone() const
Definition: latexgen.cpp:278
LatexGenerator::startGroupHeader
void startGroupHeader(int)
Definition: latexgen.cpp:1309
LatexGenerator::endMemberDoc
void endMemberDoc(bool)
Definition: latexgen.cpp:1425
LatexGenerator::endMemberItem
void endMemberItem()
Definition: latexgen.cpp:1625
LatexGenerator::startParameterType
void startParameterType(bool, const QCString &)
Definition: latexgen.cpp:1907
TextStream
Text streaming class that buffers data.
Definition: textstream.h:33
Doxygen::dirLinkedMap
static DirLinkedMap * dirLinkedMap
Definition: doxygen.h:109
LatexGenerator::endDescTableRow
void endDescTableRow()
Definition: latexgen.cpp:1708
LatexCodeGenerator::endCodeLine
void endCodeLine() override
Definition: latexgen.cpp:227
CitationManager::instance
static CitationManager & instance()
Definition: cite.cpp:56
LatexGenerator::exceptionEntry
void exceptionEntry(const QCString &, bool)
Definition: latexgen.cpp:1933
LatexGenerator::endIndexKey
void endIndexKey()
Definition: latexgen.cpp:1180
filename.h
LatexGenerator::endParagraph
void endParagraph()
Definition: latexgen.cpp:1097
DotDirDeps::writeGraph
QCString writeGraph(TextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE)
Definition: dotdirdeps.cpp:432
SectionType
SectionType
enum representing the various types of sections and entities that can be referred to.
Definition: section.h:28
LatexGenerator::endDotGraph
void endDotGraph(DotClassGraph &)
Definition: latexgen.cpp:1801
convertToLaTeX
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
Definition: util.cpp:4161
LatexGenerator::startIndexItem
void startIndexItem(const QCString &ref, const QCString &file)
Definition: latexgen.cpp:1107
EOF_LaTeX
@ EOF_LaTeX
Definition: dotgraph.h:28
LatexGenerator::startParagraph
void startParagraph(const QCString &classDef)
Definition: latexgen.cpp:1092
LatexCodeGenerator::LatexCodeGenerator
LatexCodeGenerator(TextStream &t, const QCString &relPath, const QCString &sourceFile)
Definition: latexgen.cpp:52
LatexGenerator::docify
void docify(const QCString &text)
Definition: latexgen.cpp:1546
LatexGenerator::startInlineMemberName
void startInlineMemberName()
Definition: latexgen.cpp:2064
LatexGenerator::writeString
void writeString(const QCString &text)
Definition: latexgen.cpp:1102
LatexGenerator::writeStyleSheetFile
static void writeStyleSheetFile(TextStream &t)
Definition: latexgen.cpp:523
Doxygen::inputNameLinkedMap
static FileNameLinkedMap * inputNameLinkedMap
Definition: doxygen.h:88
Translator::trGeneratedAt
virtual QCString trGeneratedAt(const QCString &date, const QCString &projName)=0
g_footer
static QCString g_footer
Definition: latexgen.cpp:50
uint
unsigned uint
Definition: qcstring.h:40
LatexGenerator::lastIndexPage
void lastIndexPage()
Definition: latexgen.cpp:1731
Translator::latexFont
virtual QCString latexFont()
Definition: translator.h:67
OutputGenerator::m_t
TextStream m_t
Definition: outputgen.h:511
LatexGenerator::startCallGraph
void startCallGraph()
Definition: latexgen.cpp:1824
LatexGenerator::startDoxyAnchor
void startDoxyAnchor(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &)
Definition: latexgen.cpp:1432
dot.h
DotInclDepGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Definition: dotincldepgraph.cpp:184
MemberDef
A model of a class/file/namespace member symbol.
Definition: memberdef.h:45
dateToString
QCString dateToString(bool includeTime)
Definition: util.cpp:1470
removeEmptyLines
QCString removeEmptyLines(const QCString &s)
Definition: util.cpp:7251
LatexGenerator::m_indent
int m_indent
Definition: latexgen.h:341
OutputGenerator::Latex
@ Latex
Definition: outputgen.h:333
isNamespaceDocumentation
@ isNamespaceDocumentation
Definition: index.h:130
classlist.h
LatexGenerator::startMemberGroup
void startMemberGroup()
Definition: latexgen.cpp:1786
Config_getInt
#define Config_getInt(name)
Definition: config.h:34
isDirIndex
@ isDirIndex
Definition: index.h:121
FileInfo::exists
bool exists() const
Definition: fileinfo.cpp:30
LatexGenerator::writeHeaderFile
static void writeHeaderFile(TextStream &t)
Definition: latexgen.cpp:511
message.h
LatexGenerator::endMemberList
void endMemberList()
Definition: latexgen.cpp:1744
SectionType::Subsubsection
@ Subsubsection
Portable::ghostScriptCommand
const char * ghostScriptCommand()
Definition: portable.cpp:410
LatexGenerator::type
virtual OutputType type() const
Definition: latexgen.h:94
isEndIndex
@ isEndIndex
Definition: index.h:137
dotgroupcollaboration.h
LatexGenerator::m_disableLinks
bool m_disableLinks
Definition: latexgen.h:339
LatexGenerator::startIndexSection
void startIndexSection(IndexSections)
Definition: latexgen.cpp:702
LatexGenerator::endMemberGroupHeader
void endMemberGroupHeader()
Definition: latexgen.cpp:1769
LatexGenerator::init
static void init()
Definition: latexgen.cpp:465
DotCallGraph
Representation of an call graph
Definition: dotcallgraph.h:26
LatexGenerator::endMemberDocSimple
void endMemberDocSimple(bool)
Definition: latexgen.cpp:2040
LatexGenerator::endTitleHead
void endTitleHead(const QCString &, const QCString &name)
Definition: latexgen.cpp:1284
LatexGenerator::startDescTableData
void startDescTableData()
Definition: latexgen.cpp:1721
makeIndex
static QCString makeIndex()
Definition: latexgen.cpp:586
LatexGenerator::startAnonTypeScope
void startAnonTypeScope(int)
Definition: latexgen.cpp:1578
LatexGenerator::writeFooterFile
static void writeFooterFile(TextStream &t)
Definition: latexgen.cpp:517
LatexGenerator::endFile
void endFile()
Definition: latexgen.cpp:542
theTranslator
Translator * theTranslator
Definition: language.cpp:156
LatexGenerator::endDescItem
void endDescItem()
Definition: latexgen.cpp:1859
LatexGenerator::endExamples
void endExamples()
Definition: latexgen.cpp:1879
resourcemgr.h
LatexGenerator::endMemberGroupDocs
void endMemberGroupDocs()
Definition: latexgen.cpp:1781
LatexGenerator::startInlineHeader
void startInlineHeader()
Definition: latexgen.cpp:1995
Doxygen::groupLinkedMap
static GroupLinkedMap * groupLinkedMap
Definition: doxygen.h:96
doxygen.h
Config_getEnumAsString
#define Config_getEnumAsString(name)
Definition: config.h:36
LatexGenerator::startDotGraph
void startDotGraph()
Definition: latexgen.cpp:1796
LatexGenerator::startConstraintParam
void startConstraintParam()
Definition: latexgen.cpp:1962
CitationManager::isEmpty
bool isEmpty() const
return TRUE if there are no citations.
Definition: cite.cpp:90
language.h
stripPath
QCString stripPath(const QCString &s)
Definition: util.cpp:5318
LatexDocVisitor
Concrete visitor implementation for LaTeX output.
Definition: latexdocvisitor.h:29
LatexGenerator::startConstraintDocs
void startConstraintDocs()
Definition: latexgen.cpp:1981
latexEscapeLabelName
QCString latexEscapeLabelName(const QCString &s)
Definition: util.cpp:5086
OutputGenerator::dir
QCString dir() const
Definition: outputgen.cpp:80
LatexCodeGenerator::usedTableLevel
int usedTableLevel() const
Definition: latexgen.h:61
LatexGenerator::m_firstDescItem
bool m_firstDescItem
Definition: latexgen.h:338
fileToString
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
Definition: util.cpp:1394
docparser.h
LatexGenerator::startLabels
void startLabels()
Definition: latexgen.cpp:2084
LATEX_STYLE_EXTENSION
#define LATEX_STYLE_EXTENSION
Definition: latexgen.h:24
LatexGenerator::startMemberTemplateParams
void startMemberTemplateParams()
Definition: latexgen.cpp:1599
TRUE
#define TRUE
Definition: qcstring.h:36
LatexGenerator::m_insideTabbing
bool m_insideTabbing
Definition: latexgen.h:337
LatexGenerator::newParagraph
void newParagraph()
Definition: latexgen.cpp:1087
LatexCodeGenerator::setSourceFileName
void setSourceFileName(const QCString &sourceFileName)
Definition: latexgen.cpp:66
isModuleIndex
@ isModuleIndex
Definition: index.h:120
TextStream::str
std::string str() const
Return the contents of the buffer as a std::string object
Definition: textstream.h:208
LatexGenerator::startMemberDescription
void startMemberDescription(const QCString &, const QCString &, bool)
Definition: latexgen.cpp:1635
SectionType::Page
@ Page
isClassHierarchyIndex
@ isClassHierarchyIndex
Definition: index.h:124
writeDefaultStyleSheet
static void writeDefaultStyleSheet(TextStream &t)
Definition: latexgen.cpp:506
LatexGenerator::endIndexValue
void endIndexValue(const QCString &, bool)
Definition: latexgen.cpp:1190
LatexGenerator::writeStyleInfo
void writeStyleInfo(int part)
Definition: latexgen.cpp:1068
writeLatexSpecialFormulaChars
void writeLatexSpecialFormulaChars(TextStream &t)
Definition: util.cpp:7084
LatexGenerator::endParamList
void endParamList()
Definition: latexgen.cpp:1891
ClassDiagram
Class representing a built-in class diagram.
Definition: diagram.h:29
LatexGenerator::cleanup
void cleanup()
Definition: latexgen.cpp:499
SectionType::Subsection
@ Subsection
DotClassGraph
Representation of a class inheritance or dependency graph
Definition: dotclassgraph.h:28
LatexGenerator::endDirDepGraph
void endDirDepGraph(DotDirDeps &g)
Definition: latexgen.cpp:1837
LatexCodeGenerator::m_sourceFileName
QCString m_sourceFileName
Definition: latexgen.h:72
dirdef.h
dotclassgraph.h
LatexGenerator::endDescTable
void endDescTable()
Definition: latexgen.cpp:1695
LatexGenerator::endClassDiagram
void endClassDiagram(const ClassDiagram &, const QCString &, const QCString &)
Definition: latexgen.cpp:1571
clearSubDirs
void clearSubDirs(const Dir &d)
Definition: util.cpp:3704
LatexGenerator::startParameterList
void startParameterList(bool)
Definition: latexgen.cpp:1896
LatexCodeGenerator::endCodeFragment
void endCodeFragment(const QCString &style) override
Definition: latexgen.cpp:252
utf8.h
Various UTF8 related helper functions.
writeExtraLatexPackages
void writeExtraLatexPackages(TextStream &t)
Definition: util.cpp:7066
LatexCodeGenerator::setRelativePath
void setRelativePath(const QCString &path)
Definition: latexgen.cpp:61
LatexGenerator::startMemberDocSimple
void startMemberDocSimple(bool)
Definition: latexgen.cpp:2024
LatexGenerator::startConstraintList
void startConstraintList(const QCString &)
Definition: latexgen.cpp:1954
LatexGenerator::writeAnchor
void writeAnchor(const QCString &fileName, const QCString &name)
Definition: latexgen.cpp:1456
LatexGenerator::templateMemberItem
bool templateMemberItem
Definition: latexgen.h:342
LatexGenerator::endHtmlLink
void endHtmlLink()
Definition: latexgen.cpp:1143
LatexCodeGenerator::codify
void codify(const QCString &text) override
Definition: latexgen.cpp:71
OutputGenerator
Abstract output generator.
Definition: outputgen.h:330
LatexGenerator::endCallGraph
void endCallGraph(DotCallGraph &)
Definition: latexgen.cpp:1828
isTitlePageAuthor
@ isTitlePageAuthor
Definition: index.h:118
substitute
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: qcstring.cpp:465
LatexGenerator::endIndexSection
void endIndexSection(IndexSections)
Definition: latexgen.cpp:861
LatexGenerator::startExamples
void startExamples()
Definition: latexgen.cpp:1872
LatexCodeGenerator::incUsedTableLevel
void incUsedTableLevel()
Definition: latexgen.h:59
dotcallgraph.h
Translator::latexLanguageSupportCommand
virtual QCString latexLanguageSupportCommand()=0
LatexGenerator::endLabels
void endLabels()
Definition: latexgen.cpp:2095
LatexGenerator::startMemberGroupDocs
void startMemberGroupDocs()
Definition: latexgen.cpp:1776
isFileDocumentation
@ isFileDocumentation
Definition: index.h:133
Translator::trCiteReferences
virtual QCString trCiteReferences()=0
substituteKeywords
QCString substituteKeywords(const QCString &s, const QCString &title, const QCString &projName, const QCString &projNum, const QCString &projBrief)
Definition: util.cpp:3335
Config_getBool
#define Config_getBool(name)
Definition: config.h:33
LatexGenerator::endConstraintList
void endConstraintList()
Definition: latexgen.cpp:1989
LatexGenerator::startFile
void startFile(const QCString &name, const QCString &manName, const QCString &title, int id)
Definition: latexgen.cpp:529
LatexGenerator::startMemberList
void startMemberList()
Definition: latexgen.cpp:1736
LatexGenerator::startDirDepGraph
void startDirDepGraph()
Definition: latexgen.cpp:1833
DotCallGraph::writeGraph
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Definition: dotcallgraph.cpp:183
LatexCodeGenerator::startCodeLine
void startCodeLine(bool) override
Definition: latexgen.cpp:217
IndexSections
IndexSections
Definition: index.h:115
term
void term(const char *fmt,...)
Definition: message.cpp:220
extraLatexStyleSheet
static QCString extraLatexStyleSheet()
Definition: latexgen.cpp:558
SectionType::Section
@ Section
LatexGenerator::endInlineHeader
void endInlineHeader()
Definition: latexgen.cpp:2007
LatexGenerator::endDescTableData
void endDescTableData()
Definition: latexgen.cpp:1726
FileInfo
Minimal replacement for QFileInfo.
Definition: fileinfo.h:22
substituteLatexKeywords
static QCString substituteLatexKeywords(const QCString &str, const QCString &title)
Definition: latexgen.cpp:604
LatexGenerator::startTitle
void startTitle()
Definition: latexgen.cpp:1297
isPageDocumentation
@ isPageDocumentation
Definition: index.h:135
isPageDocumentation2
@ isPageDocumentation2
Definition: index.h:136
FileInfo::absFilePath
std::string absFilePath() const
Definition: fileinfo.cpp:101
qPrint
const char * qPrint(const char *s)
Definition: qcstring.h:589
LatexGenerator
Generator for LaTeX output.
Definition: latexgen.h:79
LatexGenerator::endDescription
void endDescription()
Definition: latexgen.cpp:1847
LatexGenerator::endInlineMemberDoc
void endInlineMemberDoc()
Definition: latexgen.cpp:2079
LatexGenerator::startInlineMemberType
void startInlineMemberType()
Definition: latexgen.cpp:2053
Config_getString
#define Config_getString(name)
Definition: config.h:32
LatexGenerator::writeDoc
void writeDoc(DocNode *, const Definition *ctx, const MemberDef *, int id)
Definition: latexgen.cpp:1946
isMainPage
@ isMainPage
Definition: index.h:119
LatexGenerator::writeObjectLink
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name)
Definition: latexgen.cpp:1230
config.h
DotGroupCollaboration
Representation of a group collaboration graph
Definition: dotgroupcollaboration.h:28
Doxygen::namespaceLinkedMap
static NamespaceLinkedMap * namespaceLinkedMap
Definition: doxygen.h:97
ASSERT
#define ASSERT(x)
Definition: qcstring.h:44
groupdef.h
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:153
LatexCodeGenerator::writeCodeLink
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
Definition: latexgen.cpp:149
LatexGenerator::endParameterList
void endParameterList()
Definition: latexgen.cpp:1903
LatexGenerator::endConstraintParam
void endConstraintParam()
Definition: latexgen.cpp:1967
LatexGenerator::startTextLink
void startTextLink(const QCString &, const QCString &)
Definition: latexgen.cpp:1204
LatexGenerator::startDescItem
void startDescItem()
Definition: latexgen.cpp:1853
Translator::latexDocumentPre
virtual QCString latexDocumentPre()
Definition: translator.h:76
Dir::exists
bool exists() const
Definition: dir.cpp:199
DotInclDepGraph
Representation of an include dependency graph
Definition: dotincldepgraph.h:30
DocNode::accept
virtual void accept(DocVisitor *v)=0
LatexGenerator::startMemberGroupHeader
void startMemberGroupHeader(bool)
Definition: latexgen.cpp:1754
LatexGenerator::writeStartAnnoItem
void writeStartAnnoItem(const QCString &type, const QCString &file, const QCString &path, const QCString &name)
Definition: latexgen.cpp:1161
LatexGenerator::lineBreak
void lineBreak(const QCString &style=QCString())
Definition: latexgen.cpp:2012
OutputGenerator::operator=
OutputGenerator & operator=(const OutputGenerator &o)
Definition: outputgen.cpp:48
LatexGenerator::endIndexItem
void endIndexItem(const QCString &ref, const QCString &file)
Definition: latexgen.cpp:1116
CodeSymbolType::Default
@ Default
COPYCHAR
#define COPYCHAR()
checkExtension
bool checkExtension(const QCString &fName, const QCString &ext)
Definition: util.cpp:5270
LatexGenerator::LatexGenerator
LatexGenerator()
Definition: latexgen.cpp:263
FileInfo::fileName
std::string fileName() const
Definition: fileinfo.cpp:118
LatexGenerator::endGroupHeader
void endGroupHeader(int)
Definition: latexgen.cpp:1335
GOF_EPS
@ GOF_EPS
Definition: dotgraph.h:27
OutputGenerator::endPlainFile
void endPlainFile()
Definition: outputgen.cpp:72
LatexGenerator::endInlineMemberName
void endInlineMemberName()
Definition: latexgen.cpp:2069
portable.h
Portable versions of functions that are platform dependent.
latexEscapePDFString
QCString latexEscapePDFString(const QCString &s)
Definition: util.cpp:5173
LatexGenerator::startInclDepGraph
void startInclDepGraph()
Definition: latexgen.cpp:1806
Translator::trExamples
virtual QCString trExamples()=0
filterLatexString
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces)
Definition: util.cpp:4934
LatexGenerator::startProjectNumber
void startProjectNumber()
Definition: latexgen.cpp:553
LatexGenerator::endMemberTemplateParams
void endMemberTemplateParams(const QCString &, const QCString &)
Definition: latexgen.cpp:1607
Doxygen::classLinkedMap
static ClassLinkedMap * classLinkedMap
Definition: doxygen.h:78
LatexGenerator::operator=
LatexGenerator & operator=(const LatexGenerator &)
Definition: latexgen.cpp:272
Dir::mkdir
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition: dir.cpp:237
util.h
A bunch of utility functions.
createSubDirs
void createSubDirs(const Dir &d)
Definition: util.cpp:3677
g_header
static QCString g_header
Definition: latexgen.cpp:49
LatexGenerator::endInclDepGraph
void endInclDepGraph(DotInclDepGraph &)
Definition: latexgen.cpp:1810
Translator::latexDocumentPost
virtual QCString latexDocumentPost()
Definition: translator.h:81
CodeSymbolType
CodeSymbolType
Definition: types.h:204
LatexCodeGenerator::m_t
TextStream & m_t
Definition: latexgen.h:70
LatexGenerator::m_codeGen
LatexCodeGenerator m_codeGen
Definition: latexgen.h:343
LatexGenerator::startPageRef
void startPageRef()
Definition: latexgen.cpp:1252
latexEscapeIndexChars
QCString latexEscapeIndexChars(const QCString &s)
Definition: util.cpp:5129
LatexGenerator::endGroupCollaboration
void endGroupCollaboration(DotGroupCollaboration &g)
Definition: latexgen.cpp:1819
LatexGenerator::endAnonTypeScope
void endAnonTypeScope(int)
Definition: latexgen.cpp:1589
QCString::right
QCString right(size_t len) const
Definition: qcstring.h:217
OutputGenerator::startPlainFile
void startPlainFile(const QCString &name)
Definition: outputgen.cpp:60
QCString::prepend
QCString & prepend(const char *s)
Definition: qcstring.h:339
diagram.h
LatexCodeGenerator::m_relPath
QCString m_relPath
Definition: latexgen.h:71
QCString::sprintf
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:24
LatexGenerator::endTextLink
void endTextLink()
Definition: latexgen.cpp:1220
LatexGenerator::startTitleHead
void startTitleHead(const QCString &)
Definition: latexgen.cpp:1266
ClassDiagram::writeFigure
void writeFigure(TextStream &t, const QCString &path, const QCString &file) const
Definition: diagram.cpp:1047
LatexGenerator::writePageLink
void writePageLink(const QCString &, bool)
Definition: latexgen.cpp:1058
Config_getList
#define Config_getList(name)
Definition: config.h:37
writeLatexMakefile
static void writeLatexMakefile()
Definition: latexgen.cpp:287
FALSE
#define FALSE
Definition: qcstring.h:33
LatexGenerator::startConstraintType
void startConstraintType()
Definition: latexgen.cpp:1971
Doxygen::exampleLinkedMap
static PageLinkedMap * exampleLinkedMap
Definition: doxygen.h:81
LatexGenerator::startHtmlLink
void startHtmlLink(const QCString &url)
Definition: latexgen.cpp:1132
isConceptDocumentation
@ isConceptDocumentation
Definition: index.h:132
QCString
This is an alternative implementation of QCString.
Definition: qcstring.h:108
LatexGenerator::endConstraintType
void endConstraintType()
Definition: latexgen.cpp:1976