latexgen.cpp
Go to the documentation of this file.
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 <stdlib.h>
19 
20 #include <qdir.h>
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 "pagedef.h"
31 #include "docparser.h"
32 #include "latexdocvisitor.h"
33 #include "dirdef.h"
34 #include "cite.h"
35 #include "groupdef.h"
36 #include "classlist.h"
37 #include "namespacedef.h"
38 #include "filename.h"
39 #include "resourcemgr.h"
40 
41 //-------------------------------
42 
44  : m_relPath(relPath), m_sourceFileName(sourceFileName), m_col(0)
45 {
46  m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
47  setTextStream(t);
48 }
49 
51 {
52  m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
53 }
54 
56 {
57  m_streamSet = t.device()!=0;
58  m_t.setDevice(t.device());
59 }
60 
62 {
63  m_relPath = path;
64 }
65 
67 {
69 }
70 
72 {
73  if (str)
74  {
75  const char *p=str;
76  char c;
77  //char cs[5];
78  int spacesToNextTabStop;
79  static int tabSize = Config_getInt("TAB_SIZE");
80  const int maxLineLen = 108;
81  QCString result(4*maxLineLen+1); // worst case for 1 line of 4-byte chars
82  int i;
83  while ((c=*p))
84  {
85  switch(c)
86  {
87  case 0x0c: p++; // remove ^L
88  break;
89  case '\t': spacesToNextTabStop =
90  tabSize - (m_col%tabSize);
91  m_t << Doxygen::spaces.left(spacesToNextTabStop);
92  m_col+=spacesToNextTabStop;
93  p++;
94  break;
95  case '\n': m_t << '\n'; m_col=0; p++;
96  break;
97  default:
98  i=0;
99 
100 #undef COPYCHAR
101 // helper macro to copy a single utf8 character, dealing with multibyte chars.
102 #define COPYCHAR() do { \
103  result[i++]=c; p++; \
104  if (c<0) /* multibyte utf-8 character */ \
105  { \
106  /* 1xxx.xxxx: >=2 byte character */ \
107  result[i++]=*p++; \
108  if (((uchar)c&0xE0)==0xE0) \
109  { \
110  /* 111x.xxxx: >=3 byte character */ \
111  result[i++]=*p++; \
112  } \
113  if (((uchar)c&0xF0)==0xF0) \
114  { \
115  /* 1111.xxxx: 4 byte character */ \
116  result[i++]=*p++; \
117  } \
118  } \
119  m_col++; \
120  } while(0)
121 
122  // gather characters until we find whitespace or are at
123  // the end of a line
124  COPYCHAR();
125  if (m_col>=maxLineLen) // force line break
126  {
127  m_t << "\n ";
128  m_col=0;
129  }
130  else // copy more characters
131  {
132  while (m_col<maxLineLen && (c=*p) &&
133  c!=0x0c && c!='\t' && c!='\n' && c!=' '
134  )
135  {
136  COPYCHAR();
137  }
138  if (m_col>=maxLineLen) // force line break
139  {
140  m_t << "\n ";
141  m_col=0;
142  }
143  }
144  result[i]=0; // add terminator
145  //if (m_prettyCode)
146  //{
148  //}
149  //else
150  //{
151  // t << result;
152  //}
153  break;
154  }
155  }
156  }
157 }
158 
159 
160 void LatexCodeGenerator::writeCodeLink(const char *ref,const char *f,
161  const char *anchor,const char *name,
162  const char *)
163 {
164  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
165  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
166  int l = qstrlen(name);
167  if (m_col+l>80)
168  {
169  m_t << "\n ";
170  m_col=0;
171  }
172  if (!ref && usePDFLatex && pdfHyperlinks)
173  {
174  m_t << "\\hyperlink{";
175  if (f) m_t << stripPath(f);
176  if (f && anchor) m_t << "_";
177  if (anchor) m_t << anchor;
178  m_t << "}{";
179  codify(name);
180  m_t << "}";
181  }
182  else
183  {
184  m_t << name;
185  }
186  m_col+=l;
187 }
188 
189 void LatexCodeGenerator::writeLineNumber(const char *ref,const char *fileName,const char *anchor,int l)
190 {
191  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
192  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
193  if (m_prettyCode)
194  {
195  QCString lineNumber;
196  lineNumber.sprintf("%05d",l);
197 
198  if (fileName && !m_sourceFileName.isEmpty())
199  {
200  QCString lineAnchor;
201  lineAnchor.sprintf("_l%05d",l);
202  lineAnchor.prepend(m_sourceFileName);
203  //if (!m_prettyCode) return;
204  if (usePDFLatex && pdfHyperlinks)
205  {
206  m_t << "\\hypertarget{" << stripPath(lineAnchor) << "}{}";
207  }
208  writeCodeLink(ref,fileName,anchor,lineNumber,0);
209  }
210  else
211  {
212  codify(lineNumber);
213  }
214  m_t << " ";
215  }
216  else
217  {
218  m_t << l << " ";
219  }
220 }
221 
222 
224 {
225  m_col=0;
226 }
227 
229 {
230  codify("\n");
231 }
232 
234 {
235  m_t << "\\textcolor{" << name << "}{";
236 }
237 
239 {
240  m_t << "}";
241 }
242 
243 
244 //-------------------------------
245 
247 {
248  dir=Config_getString("LATEX_OUTPUT");
249  //printf("LatexGenerator::LatexGenerator() insideTabbing=FALSE\n");
253  m_indent=0;
255  m_prettyCode=Config_getBool("LATEX_SOURCE_CODE");
256 }
257 
259 {
260 }
261 
262 static void writeLatexMakefile()
263 {
264  bool generateBib = !Doxygen::citeDict->isEmpty();
265  QCString dir=Config_getString("LATEX_OUTPUT");
266  QCString fileName=dir+"/Makefile";
267  QFile file(fileName);
268  if (!file.open(IO_WriteOnly))
269  {
270  err("Could not open file %s for writing\n",fileName.data());
271  exit(1);
272  }
273  // inserted by KONNO Akihisa <konno@researchers.jp> 2002-03-05
274  QCString latex_command = Config_getString("LATEX_CMD_NAME");
275  QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME");
276  // end insertion by KONNO Akihisa <konno@researchers.jp> 2002-03-05
277  FTextStream t(&file);
278  if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
279  {
280  t << "all: refman.dvi" << endl
281  << endl
282  << "ps: refman.ps" << endl
283  << endl
284  << "pdf: refman.pdf" << endl
285  << endl
286  << "ps_2on1: refman_2on1.ps" << endl
287  << endl
288  << "pdf_2on1: refman_2on1.pdf" << endl
289  << endl
290  << "refman.ps: refman.dvi" << endl
291  << "\tdvips -o refman.ps refman.dvi" << endl
292  << endl;
293  t << "refman.pdf: refman.ps" << endl;
294  t << "\tps2pdf refman.ps refman.pdf" << endl << endl;
295  t << "refman.dvi: clean refman.tex doxygen.sty" << endl
296  << "\techo \"Running latex...\"" << endl
297  << "\t" << latex_command << " refman.tex" << endl
298  << "\techo \"Running makeindex...\"" << endl
299  << "\t" << mkidx_command << " refman.idx" << endl;
300  if (generateBib)
301  {
302  t << "\techo \"Running bibtex...\"" << endl;
303  t << "\tbibtex refman" << endl;
304  t << "\techo \"Rerunning latex....\"" << endl;
305  t << "\t" << latex_command << " refman.tex" << endl;
306  }
307  t << "\techo \"Rerunning latex....\"" << endl
308  << "\t" << latex_command << " refman.tex" << endl
309  << "\tlatex_count=8 ; \\" << endl
310  << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
311  << "\t do \\" << endl
312  << "\t echo \"Rerunning latex....\" ;\\" << endl
313  << "\t " << latex_command << " refman.tex ;\\" << endl
314  << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
315  << "\t done" << endl
316  << "\t" << mkidx_command << " refman.idx" << endl
317  << "\t" << latex_command << " refman.tex" << endl << endl
318  << "refman_2on1.ps: refman.ps" << endl
319  << "\tpsnup -2 refman.ps >refman_2on1.ps" << endl
320  << endl
321  << "refman_2on1.pdf: refman_2on1.ps" << endl
322  << "\tps2pdf refman_2on1.ps refman_2on1.pdf" << endl;
323  }
324  else // use pdflatex for higher quality output
325  {
326  t << "all: refman.pdf" << endl << endl
327  << "pdf: refman.pdf" << endl << endl;
328  t << "refman.pdf: clean refman.tex" << endl;
329  t << "\tpdflatex refman" << endl;
330  t << "\t" << mkidx_command << " refman.idx" << endl;
331  if (generateBib)
332  {
333  t << "\tbibtex refman" << endl;
334  t << "\tpdflatex refman" << endl;
335  }
336  t << "\tpdflatex refman" << endl
337  << "\tlatex_count=8 ; \\" << endl
338  << "\twhile egrep -s 'Rerun (LaTeX|to get cross-references right)' refman.log && [ $$latex_count -gt 0 ] ;\\" << endl
339  << "\t do \\" << endl
340  << "\t echo \"Rerunning latex....\" ;\\" << endl
341  << "\t pdflatex refman ;\\" << endl
342  << "\t latex_count=`expr $$latex_count - 1` ;\\" << endl
343  << "\t done" << endl
344  << "\t" << mkidx_command << " refman.idx" << endl
345  << "\tpdflatex refman" << endl << endl;
346  }
347 
348  t << endl
349  << "clean:" << endl
350  << "\trm -f "
351  << "*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf" << endl;
352 }
353 
354 static void writeMakeBat()
355 {
356 #if defined(_MSC_VER)
357  QCString dir=Config_getString("LATEX_OUTPUT");
358  QCString fileName=dir+"/make.bat";
359  QCString latex_command = Config_getString("LATEX_CMD_NAME");
360  QCString mkidx_command = Config_getString("MAKEINDEX_CMD_NAME");
361  QFile file(fileName);
362  bool generateBib = !Doxygen::citeDict->isEmpty();
363  if (!file.open(IO_WriteOnly))
364  {
365  err("Could not open file %s for writing\n",fileName.data());
366  exit(1);
367  }
368  FTextStream t(&file);
369  t << "set Dir_Old=%cd%\n";
370  t << "cd /D %~dp0\n\n";
371  t << "del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl refman.pdf\n\n";
372  if (!Config_getBool("USE_PDFLATEX")) // use plain old latex
373  {
374  t << latex_command << " refman.tex\n";
375  t << "echo ----\n";
376  t << mkidx_command << " refman.idx\n";
377  if (generateBib)
378  {
379  t << "bibtex refman\n";
380  t << "echo ----\n";
381  t << latex_command << " refman.tex\n";
382  }
383  t << "setlocal enabledelayedexpansion\n";
384  t << "set count=8\n";
385  t << ":repeat\n";
386  t << "set content=X\n";
387  t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\n";
388  t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\n";
389  t << "if !content! == X goto :skip\n";
390  t << "set /a count-=1\n";
391  t << "if !count! EQU 0 goto :skip\n\n";
392  t << "echo ----\n";
393  t << latex_command << " refman.tex\n";
394  t << "goto :repeat\n";
395  t << ":skip\n";
396  t << "endlocal\n";
397  t << mkidx_command << " refman.idx\n";
398  t << latex_command << " refman.tex\n";
399  t << "dvips -o refman.ps refman.dvi\n";
400  t << "gswin32c -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
401  "-sOutputFile=refman.pdf -c save pop -f refman.ps\n";
402  }
403  else // use pdflatex
404  {
405  t << "pdflatex refman\n";
406  t << "echo ----\n";
407  t << mkidx_command << " refman.idx\n";
408  if (generateBib)
409  {
410  t << "bibtex refman" << endl;
411  t << "pdflatex refman" << endl;
412  }
413  t << "echo ----\n";
414  t << "pdflatex refman\n\n";
415  t << "setlocal enabledelayedexpansion\n";
416  t << "set count=8\n";
417  t << ":repeat\n";
418  t << "set content=X\n";
419  t << "for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" refman.log' ) do set content=\"%%~T\"\n";
420  t << "if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" refman.log' ) do set content=\"%%~T\"\n";
421  t << "if !content! == X goto :skip\n";
422  t << "set /a count-=1\n";
423  t << "if !count! EQU 0 goto :skip\n\n";
424  t << "echo ----\n";
425  t << "pdflatex refman\n";
426  t << "goto :repeat\n";
427  t << ":skip\n";
428  t << "endlocal\n";
429  t << mkidx_command << " refman.idx\n";
430  t << "pdflatex refman\n";
431  t << "cd /D %Dir_Old%\n";
432  t << "set Dir_Old=\n";
433  }
434 #endif
435 }
436 
438 {
439 
440  QCString dir=Config_getString("LATEX_OUTPUT");
441  QDir d(dir);
442  if (!d.exists() && !d.mkdir(dir))
443  {
444  err("Could not create output directory %s\n",dir.data());
445  exit(1);
446  }
447 
449  writeMakeBat();
450 
451  createSubDirs(d);
452 }
453 
455 {
456  // part 1
457 
458  // Handle batch mode
459  if (Config_getBool("LATEX_BATCHMODE"))
460  t << "\\batchmode\n";
461 
462  // Set document class depending on configuration
463  QCString documentClass;
464  if (Config_getBool("COMPACT_LATEX"))
465  documentClass = "article";
466  else
467  documentClass = "book";
468  t << "\\documentclass[twoside]{" << documentClass << "}\n"
469  "\n";
470 
471  // Load required packages
472  t << "% Packages required by doxygen\n"
473  "\\usepackage{fixltx2e}\n" // for \textsubscript
474  "\\usepackage{calc}\n"
475  "\\usepackage{doxygen}\n"
476  "\\usepackage[export]{adjustbox} % also loads graphicx\n";
477  QStrList extraLatexStyle = Config_getList("LATEX_EXTRA_STYLESHEET");
478  for (uint i=0; i<extraLatexStyle.count(); ++i)
479  {
480  QCString fileName(extraLatexStyle.at(i));
481  if (!fileName.isEmpty())
482  {
483  QFileInfo fi(fileName);
484  if (fi.exists())
485  {
487  {
488  // strip the extension, it will be added by the usepackage in the tex conversion process
489  t << "\\usepackage{" << stripExtensionGeneral(fi.fileName().data(), latexStyleExtension) << "}\n";
490  }
491  else
492  {
493  t << "\\usepackage{" << fi.fileName().utf8() << "}\n";
494  }
495  }
496  }
497  }
498  t << "\\usepackage{graphicx}\n"
499  "\\usepackage[utf8]{inputenc}\n"
500  "\\usepackage{makeidx}\n"
501  "\\usepackage{multicol}\n"
502  "\\usepackage{multirow}\n"
503  "\\PassOptionsToPackage{warn}{textcomp}\n"
504  "\\usepackage{textcomp}\n"
505  "\\usepackage[nointegrals]{wasysym}\n"
506  "\\usepackage[table]{xcolor}\n"
507  "\n";
508 
509  // Language support
511  if (!languageSupport.isEmpty())
512  {
513  t << "% NLS support packages\n"
514  << languageSupport
515  << "\n";
516  }
517 
518  // Define default fonts
519  t << "% Font selection\n"
520  "\\usepackage[T1]{fontenc}\n"
521  "\\usepackage[scaled=.90]{helvet}\n"
522  "\\usepackage{courier}\n"
523  "\\usepackage{amssymb}\n"
524  "\\usepackage{sectsty}\n"
525  "\\renewcommand{\\familydefault}{\\sfdefault}\n"
526  "\\allsectionsfont{%\n"
527  " \\fontseries{bc}\\selectfont%\n"
528  " \\color{darkgray}%\n"
529  "}\n"
530  "\\renewcommand{\\DoxyLabelFont}{%\n"
531  " \\fontseries{bc}\\selectfont%\n"
532  " \\color{darkgray}%\n"
533  "}\n"
534  "\\newcommand{\\+}{\\discretionary{\\mbox{\\scriptsize$\\hookleftarrow$}}{}{}}\n"
535  "\n";
536 
537  // Define page & text layout
538  QCString paperName=Config_getEnum("PAPER_TYPE");
539  // "a4wide" package is obsolete (see bug 563698)
540  t << "% Page & text layout\n"
541  "\\usepackage{geometry}\n"
542  "\\geometry{%\n"
543  " " << paperName << "paper,%\n"
544  " top=2.5cm,%\n"
545  " bottom=2.5cm,%\n"
546  " left=2.5cm,%\n"
547  " right=2.5cm%\n"
548  "}\n";
549  // \sloppy is obsolete (see bug 563698)
550  // Allow a bit of overflow to go unnoticed by other means
551  t << "\\tolerance=750\n"
552  "\\hfuzz=15pt\n"
553  "\\hbadness=750\n"
554  "\\setlength{\\emergencystretch}{15pt}\n"
555  "\\setlength{\\parindent}{0cm}\n"
556  "\\setlength{\\parskip}{3ex plus 2ex minus 2ex}\n";
557  // Redefine paragraph/subparagraph environments, using sectsty fonts
558  t << "\\makeatletter\n"
559  "\\renewcommand{\\paragraph}{%\n"
560  " \\@startsection{paragraph}{4}{0ex}{-1.0ex}{1.0ex}{%\n"
561  " \\normalfont\\normalsize\\bfseries\\SS@parafont%\n"
562  " }%\n"
563  "}\n"
564  "\\renewcommand{\\subparagraph}{%\n"
565  " \\@startsection{subparagraph}{5}{0ex}{-1.0ex}{1.0ex}{%\n"
566  " \\normalfont\\normalsize\\bfseries\\SS@subparafont%\n"
567  " }%\n"
568  "}\n"
569  "\\makeatother\n"
570  "\n";
571 
572  // Headers & footers
573  QGString genString;
574  QCString generatedBy;
575  static bool timeStamp = Config_getBool("LATEX_TIMESTAMP");
576  FTextStream tg(&genString);
577  if (timeStamp)
578  {
579  generatedBy = theTranslator->trGeneratedAt(dateToString(TRUE), Config_getString("PROJECT_NAME"));
580  }
581  else
582  {
583  generatedBy = theTranslator->trGeneratedBy();
584  }
585  filterLatexString(tg, generatedBy, FALSE,FALSE,FALSE);
586  t << "% Headers & footers\n"
587  "\\usepackage{fancyhdr}\n"
588  "\\pagestyle{fancyplain}\n"
589  "\\fancyhead[LE]{\\fancyplain{}{\\bfseries\\thepage}}\n"
590  "\\fancyhead[CE]{\\fancyplain{}{}}\n"
591  "\\fancyhead[RE]{\\fancyplain{}{\\bfseries\\leftmark}}\n"
592  "\\fancyhead[LO]{\\fancyplain{}{\\bfseries\\rightmark}}\n"
593  "\\fancyhead[CO]{\\fancyplain{}{}}\n"
594  "\\fancyhead[RO]{\\fancyplain{}{\\bfseries\\thepage}}\n"
595  "\\fancyfoot[LE]{\\fancyplain{}{}}\n"
596  "\\fancyfoot[CE]{\\fancyplain{}{}}\n"
597  "\\fancyfoot[RE]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
598  "\\fancyfoot[LO]{\\fancyplain{}{\\bfseries\\scriptsize " << genString << " Doxygen }}\n"
599  "\\fancyfoot[CO]{\\fancyplain{}{}}\n"
600  "\\fancyfoot[RO]{\\fancyplain{}{}}\n"
601  "\\renewcommand{\\footrulewidth}{0.4pt}\n";
602  if (!Config_getBool("COMPACT_LATEX"))
603  {
604  t << "\\renewcommand{\\chaptermark}[1]{%\n"
605  " \\markboth{#1}{}%\n"
606  "}\n";
607  }
608  t << "\\renewcommand{\\sectionmark}[1]{%\n"
609  " \\markright{\\thesection\\ #1}%\n"
610  "}\n"
611  "\n";
612 
613  // ToC, LoF, LoT, bibliography, and index
614  t << "% Indices & bibliography\n"
615  "\\usepackage{natbib}\n"
616  "\\usepackage[titles]{tocloft}\n"
617  "\\setcounter{tocdepth}{3}\n"
618  "\\setcounter{secnumdepth}{5}\n"
619  "\\makeindex\n"
620  "\n";
621 
622  // User-specified packages
623  QStrList &extraPackages = Config_getList("EXTRA_PACKAGES");
624  if (!extraPackages.isEmpty()) {
625  t << "% Packages requested by user\n";
626  const char *pkgName=extraPackages.first();
627  while (pkgName)
628  {
629  if ((pkgName[0] == '[') || (pkgName[0] == '{'))
630  t << "\\usepackage" << pkgName << "\n";
631  else
632  t << "\\usepackage{" << pkgName << "}\n";
633  pkgName=extraPackages.next();
634  }
635  t << "\n";
636  }
637 
638  // Hyperlinks
639  bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
640  if (pdfHyperlinks)
641  {
642  t << "% Hyperlinks (required, but should be loaded last)\n"
643  "\\usepackage{ifpdf}\n"
644  "\\ifpdf\n"
645  " \\usepackage[pdftex,pagebackref=true]{hyperref}\n"
646  "\\else\n"
647  " \\usepackage[ps2pdf,pagebackref=true]{hyperref}\n"
648  "\\fi\n"
649  "\\hypersetup{%\n"
650  " colorlinks=true,%\n"
651  " linkcolor=blue,%\n"
652  " citecolor=blue,%\n"
653  " unicode%\n"
654  "}\n"
655  "\n";
656  }
657 
658  // Custom commands used by the header
659  t << "% Custom commands\n"
660  "\\newcommand{\\clearemptydoublepage}{%\n"
661  " \\newpage{\\pagestyle{empty}\\cleardoublepage}%\n"
662  "}\n"
663  "\n";
664 
665  // caption style definition
666  t << "\\usepackage{caption}\n"
667  << "\\captionsetup{labelsep=space,justification=centering,font={bf},singlelinecheck=off,skip=4pt,position=top}\n\n";
668 
669  // End of preamble, now comes the document contents
670  t << "%===== C O N T E N T S =====\n"
671  "\n"
672  "\\begin{document}\n";
673  if (theTranslator->idLanguage()=="greek")
674  t << "\\selectlanguage{greek}\n";
675  t << "\n";
676 
677  // Front matter
678  t << "% Titlepage & ToC\n";
679  bool usePDFLatex = Config_getBool("USE_PDFLATEX");
680  if (pdfHyperlinks && usePDFLatex)
681  {
682  // To avoid duplicate page anchors due to reuse of same numbers for
683  // the index (be it as roman numbers)
684  t << "\\hypersetup{pageanchor=false,\n"
685  // << " bookmarks=true,\n" // commented out to prevent warning
686  << " bookmarksnumbered=true,\n"
687  << " pdfencoding=unicode\n"
688  << " }\n";
689  }
690  t << "\\pagenumbering{roman}\n"
691  "\\begin{titlepage}\n"
692  "\\vspace*{7cm}\n"
693  "\\begin{center}%\n"
694  "{\\Large ";
695 }
696 
698 {
699  // part 2
700  // Finalize project name
701  t << "}\\\\\n"
702  "\\vspace*{1cm}\n"
703  "{\\large ";
704 }
705 
707 {
708  // part 3
709  // Finalize project number
710  t << " Doxygen " << versionString << "}\\\\\n";
711  if (Config_getBool("LATEX_TIMESTAMP"))
712  t << "\\vspace*{0.5cm}\n"
713  "{\\small " << dateToString(TRUE) << "}\\\\\n";
714  t << "\\end{center}\n"
715  "\\end{titlepage}\n";
716  bool compactLatex = Config_getBool("COMPACT_LATEX");
717  if (!compactLatex)
718  t << "\\clearemptydoublepage\n";
719 
720  // ToC
721  t << "\\tableofcontents\n";
722  if (!compactLatex)
723  t << "\\clearemptydoublepage\n";
724  t << "\\pagenumbering{arabic}\n";
725  bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
726  bool usePDFLatex = Config_getBool("USE_PDFLATEX");
727  if (pdfHyperlinks && usePDFLatex)
728  {
729  // re-enable anchors again
730  t << "\\hypersetup{pageanchor=true}\n";
731  }
732  t << "\n"
733  "%--- Begin generated contents ---\n";
734 }
735 
737 {
738  t << ResourceMgr::instance().getAsString("doxygen.sty");
739 }
740 
742 {
743  t << "%--- End generated contents ---\n"
744  "\n";
745 
746  // Bibliography
748 
749  // Index
750  t << "% Index\n";
751  QCString unit;
752  if (Config_getBool("COMPACT_LATEX"))
753  {
754  unit = "section";
755  }
756  else
757  {
758  unit = "chapter";
759  t << "\\backmatter\n";
760  }
761  t << "\\newpage\n"
762  "\\phantomsection\n"
763  "\\clearemptydoublepage\n"
764  "\\addcontentsline{toc}{" << unit << "}{" << theTranslator->trRTFGeneralIndex() << "}\n"
765  "\\printindex\n"
766  "\n"
767  "\\end{document}\n";
768 }
769 
771 {
772  FTextStream t(&f);
773  t << "% Latex header for doxygen " << versionString << endl;
775  t << "Your title here";
777  t << "Generated by";
779 }
780 
782 {
783  FTextStream t(&f);
784  t << "% Latex footer for doxygen " << versionString << endl;
786 }
787 
789 {
790  FTextStream t(&f);
791  t << "% stylesheet for doxygen " << versionString << endl;
793 }
794 
795 void LatexGenerator::startFile(const char *name,const char *,const char *)
796 {
797 #if 0
798  setEncoding(Config_getString("LATEX_OUTPUT_ENCODING"));
799 #endif
801  relPath = relativePathToRoot(fileName);
802  if (fileName.right(4)!=".tex" && fileName.right(4)!=".sty") fileName+=".tex";
803  startPlainFile(fileName);
807 }
808 
810 {
811  endPlainFile();
813 }
814 
815 //void LatexGenerator::writeIndex()
816 //{
817 // startFile("refman.tex");
818 //}
819 
821 {
822  t << "\\\\[1ex]\\large ";
823 }
824 
826 {
827  bool &compactLatex = Config_getBool("COMPACT_LATEX");
828  QCString &latexHeader = Config_getString("LATEX_HEADER");
829  switch (is)
830  {
831  case isTitlePageStart:
832  {
833  if (latexHeader.isEmpty())
834  {
836  }
837  else
838  {
839  QCString header = fileToString(latexHeader);
840  t << substituteKeywords(header,"",
841  convertToLaTeX(Config_getString("PROJECT_NAME")),
842  convertToLaTeX(Config_getString("PROJECT_NUMBER")),
843  convertToLaTeX(Config_getString("PROJECT_BRIEF")));
844  }
845  }
846  break;
847  case isTitlePageAuthor:
848  if (latexHeader.isEmpty())
849  {
851  }
852  break;
853  case isMainPage:
854  if (compactLatex) t << "\\section"; else t << "\\chapter";
855  t << "{"; //Introduction}\n"
856  break;
857  //case isPackageIndex:
858  // if (compactLatex) t << "\\section"; else t << "\\chapter";
859  // t << "{"; //Package Index}\n"
860  // break;
861  case isModuleIndex:
862  if (compactLatex) t << "\\section"; else t << "\\chapter";
863  t << "{"; //Module Index}\n"
864  break;
865  case isDirIndex:
866  if (compactLatex) t << "\\section"; else t << "\\chapter";
867  t << "{"; //Directory Index}\n"
868  break;
869  case isNamespaceIndex:
870  if (compactLatex) t << "\\section"; else t << "\\chapter";
871  t << "{"; //Namespace Index}\"
872  break;
874  if (compactLatex) t << "\\section"; else t << "\\chapter";
875  t << "{"; //Hierarchical Index}\n"
876  break;
877  case isCompoundIndex:
878  if (compactLatex) t << "\\section"; else t << "\\chapter";
879  t << "{"; //Annotated Compound Index}\n"
880  break;
881  case isFileIndex:
882  if (compactLatex) t << "\\section"; else t << "\\chapter";
883  t << "{"; //Annotated File Index}\n"
884  break;
885  case isPageIndex:
886  if (compactLatex) t << "\\section"; else t << "\\chapter";
887  t << "{"; //Annotated Page Index}\n"
888  break;
890  {
892  GroupDef *gd;
893  bool found=FALSE;
894  for (gli.toFirst();(gd=gli.current()) && !found;++gli)
895  {
896  if (!gd->isReference())
897  {
898  if (compactLatex) t << "\\section"; else t << "\\chapter";
899  t << "{"; //Module Documentation}\n";
900  found=TRUE;
901  }
902  }
903  }
904  break;
905  case isDirDocumentation:
906  {
908  DirDef *dd;
909  bool found=FALSE;
910  for (dli.toFirst();(dd=dli.current()) && !found;++dli)
911  {
912  if (dd->isLinkableInProject())
913  {
914  if (compactLatex) t << "\\section"; else t << "\\chapter";
915  t << "{"; //Module Documentation}\n";
916  found=TRUE;
917  }
918  }
919  }
920  break;
922  {
924  NamespaceDef *nd;
925  bool found=FALSE;
926  for (nli.toFirst();(nd=nli.current()) && !found;++nli)
927  {
928  if (nd->isLinkableInProject())
929  {
930  if (compactLatex) t << "\\section"; else t << "\\chapter";
931  t << "{"; // Namespace Documentation}\n":
932  found=TRUE;
933  }
934  }
935  }
936  break;
938  {
940  ClassDef *cd=0;
941  bool found=FALSE;
942  for (cli.toFirst();(cd=cli.current()) && !found;++cli)
943  {
944  if (cd->isLinkableInProject() &&
945  cd->templateMaster()==0 &&
947  )
948  {
949  if (compactLatex) t << "\\section"; else t << "\\chapter";
950  t << "{"; //Compound Documentation}\n";
951  found=TRUE;
952  }
953  }
954  }
955  break;
956  case isFileDocumentation:
957  {
958  bool isFirst=TRUE;
960  FileName *fn;
961  for (fnli.toFirst();(fn=fnli.current());++fnli)
962  {
963  FileNameIterator fni(*fn);
964  FileDef *fd;
965  for (;(fd=fni.current());++fni)
966  {
967  if (fd->isLinkableInProject())
968  {
969  if (isFirst)
970  {
971  if (compactLatex) t << "\\section"; else t << "\\chapter";
972  t << "{"; //File Documentation}\n";
973  isFirst=FALSE;
974  break;
975  }
976  }
977  }
978  }
979  }
980  break;
982  {
983  if (compactLatex) t << "\\section"; else t << "\\chapter";
984  t << "{"; //Example Documentation}\n";
985  }
986  break;
987  case isPageDocumentation:
988  {
989  if (compactLatex) t << "\\section"; else t << "\\chapter";
990  t << "{"; //Page Documentation}\n";
991  }
992  break;
994  break;
995  case isEndIndex:
996  break;
997  }
998 }
999 
1001 {
1002  //static bool compactLatex = Config_getBool("COMPACT_LATEX");
1003  static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
1004  static QCString latexHeader = Config_getString("LATEX_HEADER");
1005  static QCString latexFooter = Config_getString("LATEX_FOOTER");
1006  switch (is)
1007  {
1008  case isTitlePageStart:
1009  break;
1010  case isTitlePageAuthor:
1011  if (latexHeader.isEmpty())
1012  {
1014  }
1015  break;
1016  case isMainPage:
1017  {
1018  //QCString indexName=Config_getBool("GENERATE_TREEVIEW")?"main":"index";
1019  QCString indexName="index";
1020  t << "}\n\\label{index}";
1021  if (Config_getBool("PDF_HYPERLINKS")) t << "\\hypertarget{index}{}";
1022  t << "\\input{" << indexName << "}\n";
1023  }
1024  break;
1025  case isModuleIndex:
1026  t << "}\n\\input{modules}\n";
1027  break;
1028  case isDirIndex:
1029  t << "}\n\\input{dirs}\n";
1030  break;
1031  case isNamespaceIndex:
1032  t << "}\n\\input{namespaces}\n";
1033  break;
1034  case isClassHierarchyIndex:
1035  t << "}\n\\input{hierarchy}\n";
1036  break;
1037  case isCompoundIndex:
1038  t << "}\n\\input{annotated}\n";
1039  break;
1040  case isFileIndex:
1041  t << "}\n\\input{files}\n";
1042  break;
1043  case isPageIndex:
1044  t << "}\n\\input{pages}\n";
1045  break;
1046  case isModuleDocumentation:
1047  {
1049  GroupDef *gd;
1050  bool found=FALSE;
1051  for (gli.toFirst();(gd=gli.current()) && !found;++gli)
1052  {
1053  if (!gd->isReference())
1054  {
1055  t << "}\n\\input{" << gd->getOutputFileBase() << "}\n";
1056  found=TRUE;
1057  }
1058  }
1059  for (;(gd=gli.current());++gli)
1060  {
1061  if (!gd->isReference())
1062  {
1063  //if (compactLatex) t << "\\input"; else t << "\\include";
1064  t << "\\include";
1065  t << "{" << gd->getOutputFileBase() << "}\n";
1066  }
1067  }
1068  }
1069  break;
1070  case isDirDocumentation:
1071  {
1073  DirDef *dd;
1074  bool found=FALSE;
1075  for (dli.toFirst();(dd=dli.current()) && !found;++dli)
1076  {
1077  if (dd->isLinkableInProject())
1078  {
1079  t << "}\n\\input{" << dd->getOutputFileBase() << "}\n";
1080  found=TRUE;
1081  }
1082  }
1083  for (;(dd=dli.current());++dli)
1084  {
1085  if (dd->isLinkableInProject())
1086  {
1087  //if (compactLatex) t << "\\input"; else t << "\\include";
1088  t << "\\input";
1089  t << "{" << dd->getOutputFileBase() << "}\n";
1090  }
1091  }
1092  }
1093  break;
1095  {
1097  NamespaceDef *nd;
1098  bool found=FALSE;
1099  for (nli.toFirst();(nd=nli.current()) && !found;++nli)
1100  {
1101  if (nd->isLinkableInProject())
1102  {
1103  t << "}\n\\input{" << nd->getOutputFileBase() << "}\n";
1104  found=TRUE;
1105  }
1106  }
1107  while ((nd=nli.current()))
1108  {
1109  if (nd->isLinkableInProject())
1110  {
1111  //if (compactLatex) t << "\\input"; else t << "\\include";
1112  t << "\\input";
1113  t << "{" << nd->getOutputFileBase() << "}\n";
1114  }
1115  ++nli;
1116  }
1117  }
1118  break;
1119  case isClassDocumentation:
1120  {
1122  ClassDef *cd=0;
1123  bool found=FALSE;
1124  for (cli.toFirst();(cd=cli.current()) && !found;++cli)
1125  {
1126  if (cd->isLinkableInProject() &&
1127  cd->templateMaster()==0 &&
1128  !cd->isEmbeddedInOuterScope()
1129  )
1130  {
1131  t << "}\n\\input{" << cd->getOutputFileBase() << "}\n";
1132  found=TRUE;
1133  }
1134  }
1135  for (;(cd=cli.current());++cli)
1136  {
1137  if (cd->isLinkableInProject() &&
1138  cd->templateMaster()==0 &&
1139  !cd->isEmbeddedInOuterScope()
1140  )
1141  {
1142  //if (compactLatex) t << "\\input"; else t << "\\include";
1143  t << "\\input";
1144  t << "{" << cd->getOutputFileBase() << "}\n";
1145  }
1146  }
1147  }
1148  break;
1149  case isFileDocumentation:
1150  {
1151  bool isFirst=TRUE;
1153  FileName *fn;
1154  for (fnli.toFirst();(fn=fnli.current());++fnli)
1155  {
1156  FileNameIterator fni(*fn);
1157  FileDef *fd;
1158  for (;(fd=fni.current());++fni)
1159  {
1160  if (fd->isLinkableInProject())
1161  {
1162  if (isFirst)
1163  {
1164  t << "}\n\\input{" << fd->getOutputFileBase() << "}\n";
1165  if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
1166  {
1167  //t << "\\include{" << fd->getSourceFileBase() << "}\n";
1168  t << "\\input{" << fd->getSourceFileBase() << "}\n";
1169  }
1170  isFirst=FALSE;
1171  }
1172  else
1173  {
1174  //if (compactLatex) t << "\\input" ; else t << "\\include";
1175  t << "\\input" ;
1176  t << "{" << fd->getOutputFileBase() << "}\n";
1177  if (sourceBrowser && m_prettyCode && fd->generateSourceFile())
1178  {
1179  //t << "\\include{" << fd->getSourceFileBase() << "}\n";
1180  t << "\\input{" << fd->getSourceFileBase() << "}\n";
1181  }
1182  }
1183  }
1184  }
1185  }
1186  }
1187  break;
1189  {
1190  t << "}\n";
1192  PageDef *pd=pdi.toFirst();
1193  if (pd)
1194  {
1195  t << "\\input{" << pd->getOutputFileBase() << "}\n";
1196  }
1197  for (++pdi;(pd=pdi.current());++pdi)
1198  {
1199  //if (compactLatex) t << "\\input" ; else t << "\\include";
1200  t << "\\input";
1201  t << "{" << pd->getOutputFileBase() << "}\n";
1202  }
1203  }
1204  break;
1205  case isPageDocumentation:
1206  {
1207  t << "}\n";
1208 #if 0
1210  PageDef *pd=pdi.toFirst();
1211  bool first=TRUE;
1212  for (pdi.toFirst();(pd=pdi.current());++pdi)
1213  {
1214  if (!pd->getGroupDef() && !pd->isReference())
1215  {
1216  if (compactLatex) t << "\\section"; else t << "\\chapter";
1217  t << "{" << pd->title();
1218  t << "}\n";
1219 
1220  if (compactLatex || first) t << "\\input" ; else t << "\\include";
1221  t << "{" << pd->getOutputFileBase() << "}\n";
1222  first=FALSE;
1223  }
1224  }
1225 #endif
1226  }
1227  break;
1228  case isPageDocumentation2:
1229  break;
1230  case isEndIndex:
1231  if (latexFooter.isEmpty())
1232  {
1234  }
1235  else
1236  {
1237  QCString footer = fileToString(latexFooter);
1238  t << substituteKeywords(footer,"",
1239  convertToLaTeX(Config_getString("PROJECT_NAME")),
1240  convertToLaTeX(Config_getString("PROJECT_NUMBER")),
1241  convertToLaTeX(Config_getString("PROJECT_BRIEF")));
1242  }
1243  break;
1244  }
1245 }
1246 
1247 void LatexGenerator::writePageLink(const char *name, bool /*first*/)
1248 {
1249  //bool &compactLatex = Config_getBool("COMPACT_LATEX");
1250  // next is remove for bug615957
1251  //if (compactLatex || first) t << "\\input" ; else t << "\\include";
1252  t << "\\input" ;
1253  t << "{" << name << "}\n";
1254 }
1255 
1256 
1258 {
1259  if (part > 0)
1260  return;
1261 
1262  startPlainFile("doxygen.sty");
1264  endPlainFile();
1265 }
1266 
1268 {
1269  t << endl << endl;
1270 }
1271 
1273 {
1274  t << endl << endl;
1275 }
1276 
1278 {
1279  t << endl << endl;
1280 }
1281 
1282 void LatexGenerator::writeString(const char *text)
1283 {
1284  t << text;
1285 }
1286 
1287 void LatexGenerator::startIndexItem(const char *ref,const char *fn)
1288 {
1289  t << "\\item ";
1290  if (!ref && fn)
1291  {
1292  t << "\\contentsline{section}{";
1293  }
1294 }
1295 
1296 void LatexGenerator::endIndexItem(const char *ref,const char *fn)
1297 {
1298  if (!ref && fn)
1299  {
1300  t << "}{\\pageref{" << stripPath(fn) << "}}{}" << endl;
1301  }
1302 }
1303 
1304 //void LatexGenerator::writeIndexFileItem(const char *,const char *text)
1305 //{
1306 // t << "\\item\\contentsline{section}{";
1307 // docify(text);
1308 // t << "}{\\pageref{" << text << "}}" << endl;
1309 //}
1310 
1311 
1313 {
1314  if (Config_getBool("PDF_HYPERLINKS"))
1315  {
1316  t << "\\href{";
1317  t << url;
1318  t << "}";
1319  }
1320  t << "{\\tt ";
1321 }
1322 
1324 {
1325  t << "}";
1326 }
1327 
1328 //void LatexGenerator::writeMailLink(const char *url)
1329 //{
1330 // if (Config_getBool("PDF_HYPERLINKS"))
1331 // {
1332 // t << "\\href{mailto:";
1333 // t << url;
1334 // t << "}";
1335 // }
1336 // t << "{\\tt ";
1337 // docify(url);
1338 // t << "}";
1339 //}
1340 
1341 void LatexGenerator::writeStartAnnoItem(const char *,const char *,
1342  const char *path,const char *name)
1343 {
1344  t << "\\item\\contentsline{section}{\\bf ";
1345  if (path) docify(path);
1346  docify(name);
1347  t << "} ";
1348 }
1349 
1351 {
1352  t << "}{\\pageref{" << name << "}}{}" << endl;
1353 }
1354 
1356 {
1357  t << "\\item\\contentsline{section}{";
1358 }
1359 
1361 {
1362 }
1363 
1365 {
1366  t << " ";
1367  if (hasBrief) t << "\\\\*";
1368 }
1369 
1370 void LatexGenerator::endIndexValue(const char *name,bool /*hasBrief*/)
1371 {
1372  //if (hasBrief) t << ")";
1373  t << "}{\\pageref{" << name << "}}{}" << endl;
1374 }
1375 
1376 //void LatexGenerator::writeClassLink(const char *,const char *,
1377 // const char *,const char *name)
1378 //{
1379 // t << "{\\bf ";
1380 // docify(name);
1381 // t << "}";
1382 //}
1383 
1384 void LatexGenerator::startTextLink(const char *f,const char *anchor)
1385 {
1386  if (!disableLinks && Config_getBool("PDF_HYPERLINKS"))
1387  {
1388  t << "\\hyperlink{";
1389  if (f) t << stripPath(f);
1390  if (anchor) t << "_" << anchor;
1391  t << "}{";
1392  }
1393  else
1394  {
1395  t << "{\\bf ";
1396  }
1397 }
1398 
1400 {
1401  t << "}";
1402 }
1403 
1404 void LatexGenerator::writeObjectLink(const char *ref, const char *f,
1405  const char *anchor, const char *text)
1406 {
1407  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1408  if (!disableLinks && !ref && pdfHyperlinks)
1409  {
1410  t << "\\hyperlink{";
1411  if (f) t << stripPath(f);
1412  if (f && anchor) t << "_";
1413  if (anchor) t << anchor;
1414  t << "}{";
1415  docify(text);
1416  t << "}";
1417  }
1418  else
1419  {
1420  t << "{\\bf ";
1421  docify(text);
1422  t << "}";
1423  }
1424 }
1425 
1427 {
1428  t << " \\doxyref{}{";
1429 }
1430 
1431 void LatexGenerator::endPageRef(const char *clname, const char *anchor)
1432 {
1433  t << "}{";
1434  if (clname) t << clname;
1435  if (anchor) t << "_" << anchor;
1436  t << "}";
1437 }
1438 
1439 
1441 {
1442  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1443  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
1444  if (usePDFLatex && pdfHyperlinks && fileName)
1445  {
1446  t << "\\hypertarget{" << stripPath(fileName) << "}{}";
1447  }
1448  if (Config_getBool("COMPACT_LATEX"))
1449  {
1450  t << "\\subsection{";
1451  }
1452  else
1453  {
1454  t << "\\section{";
1455  }
1456 }
1457 
1458 void LatexGenerator::endTitleHead(const char *fileName,const char *name)
1459 {
1460  t << "}" << endl;
1461  if (name)
1462  {
1463  t << "\\label{" << stripPath(fileName) << "}\\index{";
1465  t << "@{";
1467  t << "}}" << endl;
1468  }
1469 }
1470 
1472 {
1473  if (Config_getBool("COMPACT_LATEX"))
1474  {
1475  t << "\\subsection{";
1476  }
1477  else
1478  {
1479  t << "\\section{";
1480  }
1481 }
1482 
1483 void LatexGenerator::startGroupHeader(int extraIndentLevel)
1484 {
1485  if (Config_getBool("COMPACT_LATEX"))
1486  {
1487  extraIndentLevel++;
1488  }
1489 
1490  if (extraIndentLevel==3)
1491  {
1492  t << "\\subparagraph*{";
1493  }
1494  else if (extraIndentLevel==2)
1495  {
1496  t << "\\paragraph{";
1497  }
1498  else if (extraIndentLevel==1)
1499  {
1500  t << "\\subsubsection{";
1501  }
1502  else // extraIndentLevel==0
1503  {
1504  t << "\\subsection{";
1505  }
1507 }
1508 
1510 {
1512  t << "}" << endl;
1513 }
1514 
1516 {
1517  if (Config_getBool("COMPACT_LATEX"))
1518  {
1519  t << "\\subsubsection*{";
1520  }
1521  else
1522  {
1523  t << "\\subsection*{";
1524  }
1526 }
1527 
1529 {
1531  t << "}" << endl;
1532 }
1533 
1534 void LatexGenerator::startMemberDoc(const char *clname,
1535  const char *memname,
1536  const char *,
1537  const char *title,
1538  bool showInline)
1539 {
1540  if (memname && memname[0]!='@')
1541  {
1542  t << "\\index{";
1543  if (clname)
1544  {
1546  t << "@{";
1548  t << "}!";
1549  }
1550  t << latexEscapeLabelName(memname,insideTabbing);
1551  t << "@{";
1553  t << "}}" << endl;
1554 
1555  t << "\\index{";
1556  t << latexEscapeLabelName(memname,insideTabbing);
1557  t << "@{";
1559  t << "}";
1560  if (clname)
1561  {
1562  t << "!";
1564  t << "@{";
1566  t << "}";
1567  }
1568  t << "}" << endl;
1569  }
1570  static const char *levelLab[] = { "subsubsection","paragraph","subparagraph", "subparagraph" };
1571  static bool compactLatex = Config_getBool("COMPACT_LATEX");
1572  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1573  int level=0;
1574  if (showInline) level+=2;
1575  if (compactLatex) level++;
1576  t << "\\" << levelLab[level];
1577 
1578  t << "[{";
1579  if (pdfHyperlinks)
1580  {
1581  t << "\\texorpdfstring{";
1582  }
1584  if (pdfHyperlinks)
1585  {
1586  t << "}{" << latexEscapePDFString(title) << "}";
1587  }
1588  t << "}]";
1589  t << "{\\setlength{\\rightskip}{0pt plus 5cm}";
1591 }
1592 
1594 {
1596  t << "}";
1597  //if (Config_getBool("COMPACT_LATEX")) t << "\\hfill";
1598 }
1599 
1600 void LatexGenerator::startDoxyAnchor(const char *fName,const char *,
1601  const char *anchor, const char *,
1602  const char *)
1603 {
1604 }
1605 
1606 void LatexGenerator::endDoxyAnchor(const char *fName,const char *anchor)
1607 {
1608  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1609  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
1610  if (usePDFLatex && pdfHyperlinks)
1611  {
1612  t << "\\hypertarget{";
1613  if (fName) t << stripPath(fName);
1614  if (anchor) t << "_" << anchor;
1615  t << "}{}";
1616  }
1617  t << "\\label{";
1618  if (fName) t << stripPath(fName);
1619  if (anchor) t << "_" << anchor;
1620  t << "}" << endl;
1621 }
1622 
1623 void LatexGenerator::writeAnchor(const char *fName,const char *name)
1624 {
1625  //printf("LatexGenerator::writeAnchor(%s,%s)\n",fName,name);
1626  t << "\\label{" << stripPath(name) << "}" << endl;
1627  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1628  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
1629  if (usePDFLatex && pdfHyperlinks)
1630  {
1631  if (fName)
1632  {
1633  t << "\\hypertarget{" << stripPath(fName) << "_" << stripPath(name) << "}{}" << endl;
1634  }
1635  else
1636  {
1637  t << "\\hypertarget{" << stripPath(name) << "}{}" << endl;
1638  }
1639  }
1640 }
1641 
1642 
1643 //void LatexGenerator::writeLatexLabel(const char *clName,const char *anchor)
1644 //{
1645 // writeDoxyAnchor(0,clName,anchor,0);
1646 //}
1647 
1648 void LatexGenerator::addIndexItem(const char *s1,const char *s2)
1649 {
1650  if (s1)
1651  {
1652  t << "\\index{";
1654  t << "@{";
1656  t << "}";
1657  if (s2)
1658  {
1659  t << "!";
1661  t << "@{";
1663  t << "}";
1664  }
1665  t << "}";
1666  }
1667 }
1668 
1669 
1671 {
1672  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1673  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
1674  if (usePDFLatex && pdfHyperlinks)
1675  {
1676  t << "\\hypertarget{" << stripPath(lab) << "}{}";
1677  }
1678  t << "\\";
1679  if (Config_getBool("COMPACT_LATEX"))
1680  {
1681  switch(type)
1682  {
1683  case SectionInfo::Page: t << "subsection"; break;
1684  case SectionInfo::Section: t << "subsubsection"; break;
1685  case SectionInfo::Subsection: t << "paragraph"; break;
1686  case SectionInfo::Subsubsection: t << "subparagraph"; break;
1687  case SectionInfo::Paragraph: t << "subparagraph"; break;
1688  default: ASSERT(0); break;
1689  }
1690  t << "{";
1691  }
1692  else
1693  {
1694  switch(type)
1695  {
1696  case SectionInfo::Page: t << "section"; break;
1697  case SectionInfo::Section: t << "subsection"; break;
1698  case SectionInfo::Subsection: t << "subsubsection"; break;
1699  case SectionInfo::Subsubsection: t << "paragraph"; break;
1700  case SectionInfo::Paragraph: t << "subparagraph"; break;
1701  default: ASSERT(0); break;
1702  }
1703  t << "{";
1704  }
1705 }
1706 
1708 {
1709  t << "}\\label{" << lab << "}" << endl;
1710 }
1711 
1712 
1713 void LatexGenerator::docify(const char *str)
1714 {
1716 }
1717 
1719 {
1720  char cs[2];
1721  cs[0]=c;
1722  cs[1]=0;
1723  docify(cs);
1724 }
1725 
1727 {
1728  //if (Config_getBool("COMPACT_LATEX")) t << "\\subsubsection"; else t << "\\subsection";
1729  //t << "{";
1730 }
1731 
1733  const char *fileName,const char *)
1734 {
1735  d.writeFigure(t,dir,fileName);
1736 }
1737 
1738 
1740 {
1741  if (indent==0)
1742  {
1743  t << "\\begin{tabbing}" << endl;
1744  t << "xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill" << endl;
1746  }
1747  m_indent=indent;
1748 }
1749 
1751 {
1752  if (indent==0)
1753  {
1754  t << endl << "\\end{tabbing}";
1756  }
1757  m_indent=indent;
1758 }
1759 
1761 {
1762  if (templateMemberItem)
1763  {
1764  t << "{\\footnotesize ";
1765  }
1766 }
1767 
1768 void LatexGenerator::endMemberTemplateParams(const char *,const char *)
1769 {
1770  if (templateMemberItem)
1771  {
1772  t << "}\\\\";
1773  }
1774 }
1775 
1776 void LatexGenerator::startMemberItem(const char *,int annoType,const char *)
1777 {
1778  //printf("LatexGenerator::startMemberItem(%d)\n",annType);
1779  if (!insideTabbing)
1780  {
1781  t << "\\item " << endl;
1782  templateMemberItem = (annoType == 3);
1783  }
1784 }
1785 
1787 {
1788  if (insideTabbing)
1789  {
1790  t << "\\\\";
1791  }
1793  t << endl;
1794 }
1795 
1796 void LatexGenerator::startMemberDescription(const char *,const char *)
1797 {
1798  if (!insideTabbing)
1799  {
1800  t << "\\begin{DoxyCompactList}\\small\\item\\em ";
1801  }
1802  else
1803  {
1804  for (int i=0;i<m_indent+2;i++) t << "\\>";
1805  t << "{\\em ";
1806  }
1807 }
1808 
1810 {
1811  if (!insideTabbing)
1812  {
1813  //t << "\\item\\end{DoxyCompactList}";
1814  t << "\\end{DoxyCompactList}";
1815  }
1816  else
1817  {
1818  t << "}\\\\\n";
1819  }
1820 }
1821 
1822 
1824 {
1825  //printf("writeNonBreakbleSpace()\n");
1826  if (insideTabbing)
1827  {
1828  t << "\\>";
1829  }
1830  else
1831  {
1832  t << "~";
1833  }
1834 }
1835 
1837 {
1838  if (!insideTabbing)
1839  {
1840  t << "\\begin{DoxyCompactItemize}" << endl;
1841  }
1842 }
1843 
1845 {
1846  //printf("LatexGenerator::endMemberList(%d)\n",insideTabbing);
1847  if (!insideTabbing)
1848  {
1849  t << "\\end{DoxyCompactItemize}" << endl;
1850  }
1851 }
1852 
1853 
1855 {
1856  if (hasHeader) t << "\\begin{Indent}";
1857  t << "{\\bf ";
1858  // changed back to rev 756 due to bug 660501
1859  //if (Config_getBool("COMPACT_LATEX"))
1860  //{
1861  // t << "\\subparagraph*{";
1862  //}
1863  //else
1864  //{
1865  // t << "\\paragraph*{";
1866  //}
1867 }
1868 
1870 {
1871  // changed back to rev 756 due to bug 660501
1872  t << "}\\par" << endl;
1873  //t << "}" << endl;
1874 }
1875 
1877 {
1878  t << "{\\em ";
1879 }
1880 
1882 {
1883  t << "}";
1884 }
1885 
1887 {
1888 }
1889 
1891 {
1892  if (hasHeader)t << "\\end{Indent}";
1893  t << endl;
1894 }
1895 
1897 {
1898  newParagraph();
1899 }
1900 
1902 {
1904 }
1905 
1907 {
1908 }
1909 
1911 {
1913 }
1914 
1916 {
1917 }
1918 
1920 {
1922 }
1923 
1925 {
1926 }
1927 
1929 {
1931 }
1932 
1934 {
1935 }
1936 
1938 {
1940 }
1941 
1943 {
1944  t << "\\begin{description}" << endl;
1945 }
1946 
1948 {
1949  t << "\\end{description}" << endl;
1951 }
1952 
1954 {
1956  t << "\\item[";
1957 }
1958 
1960 {
1961  if (firstDescItem)
1962  {
1963  t << "]" << endl;
1965  }
1966  else
1967  {
1968  lineBreak();
1969  }
1970 }
1971 
1973  const char *anchor,const char *title)
1974 {
1975  t << "\\begin{Desc}\n\\item[";
1976  if (file)
1977  {
1978  writeObjectLink(0,file,anchor,title);
1979  }
1980  else
1981  {
1982  docify(title);
1983  }
1984  t << "]";
1985 }
1986 
1988 {
1989  t << "\\end{Desc}" << endl;
1990 }
1991 
1993 {
1994  t << "\\begin{Desc}\n\\item[";
1995  docify(title);
1996  t << "]";
1997 }
1998 
2000 {
2001  t << "\\end{Desc}" << endl;
2002 }
2003 
2005 {
2006  /* start of ParameterType ParameterName list */
2007  if (openBracket) t << "(";
2008  t << endl << "\\begin{DoxyParamCaption}" << endl;
2009 }
2010 
2012 {
2013 }
2014 
2015 void LatexGenerator::startParameterType(bool first,const char *key)
2016 {
2017  t << "\\item[{";
2018  if (!first && key) t << key;
2019 }
2020 
2022 {
2023  t << "}]";
2024 }
2025 
2026 void LatexGenerator::startParameterName(bool /*oneArgOnly*/)
2027 {
2028  t << "{";
2029 }
2030 
2031 void LatexGenerator::endParameterName(bool last,bool /* emptyList */,bool closeBracket)
2032 {
2033  t << "}" << endl;
2034 
2035  if (last)
2036  {
2037  t << "\\end{DoxyParamCaption}" << endl;
2038  if (closeBracket) t << ")";
2039  }
2040 }
2041 
2042 void LatexGenerator::exceptionEntry(const char* prefix,bool closeBracket)
2043 {
2044  if (prefix)
2045  t << " " << prefix;
2046  else if (closeBracket)
2047  t << ")";
2048  t << " ";
2049 }
2050 
2052 {
2053  LatexDocVisitor *visitor =
2054  new LatexDocVisitor(t,*this,ctx?ctx->getDefFileExtension():QCString(""),insideTabbing);
2055  n->accept(visitor);
2056  delete visitor;
2057 }
2058 
2059 void LatexGenerator::startConstraintList(const char *header)
2060 {
2061  t << "\\begin{Desc}\n\\item[";
2062  docify(header);
2063  t << "]";
2064  t << "\\begin{description}" << endl;
2065 }
2066 
2068 {
2069  t << "\\item[{\\em ";
2070 }
2071 
2073 {
2074 }
2075 
2077 {
2078  t << "} : {\\em ";
2079 }
2080 
2082 {
2083  t << "}]";
2084 }
2085 
2087 {
2088 }
2089 
2091 {
2092 }
2093 
2095 {
2096  t << "\\end{description}" << endl;
2097  t << "\\end{Desc}" << endl;
2098 }
2099 
2101 {
2102  t << "\n\\begin{DoxyCode}\n";
2103 }
2104 
2106 {
2107  t << "\\end{DoxyCode}\n";
2108 }
2109 
2111 {
2112  if (Config_getBool("COMPACT_LATEX"))
2113  {
2114  t << "\\paragraph*{";
2115  }
2116  else
2117  {
2118  t << "\\subsubsection*{";
2119  }
2120 }
2121 
2123 {
2124  t << "}" << endl;
2125 }
2126 
2127 void LatexGenerator::lineBreak(const char *)
2128 {
2129  if (insideTabbing)
2130  {
2131  t << "\\\\\n";
2132  }
2133  else
2134  {
2135  t << "\\\\*\n";
2136  }
2137 }
2138 
2140 {
2141  t << "\\begin{DoxyFields}{";
2143  t << "}" << endl;
2144 }
2145 
2147 {
2148  t << "\\end{DoxyFields}" << endl;
2149 }
2150 
2152 {
2153 }
2154 
2156 {
2157  t << "&" << endl;
2158 }
2159 
2161 {
2162 }
2163 
2165 {
2166  t << "&" << endl;
2167 }
2168 
2170 {
2171 }
2172 
2174 {
2175  t << "\\\\\n\\hline\n" << endl;
2176 }
2177 
2179 {
2180  t << "\\hspace{0.3cm}";
2181 }
2182 
2183 void LatexGenerator::writeLabel(const char *l,bool isLast)
2184 {
2185  t << "{\\ttfamily [" << l << "]}";
2186  if (!isLast) t << ", ";
2187 }
2188 
2190 {
2191 }
2192 
2193 
static QCString name
Definition: declinfo.cpp:673
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
void startMemberTemplateParams()
Definition: latexgen.cpp:1760
void startSection(const char *, const char *, SectionInfo::SectionType)
Definition: latexgen.cpp:1670
static CiteDict * citeDict
Definition: doxygen.h:146
static GroupSDict * groupSDict
Definition: doxygen.h:119
void endPlainFile()
Definition: outputgen.cpp:55
void startProjectNumber()
Definition: latexgen.cpp:820
void startTitleHead(const char *)
Definition: latexgen.cpp:1440
void startInlineMemberDoc()
Definition: latexgen.cpp:2169
QCString fileToString(const char *name, bool filter, bool isSourceCode)
Definition: util.cpp:2418
QCString substituteKeywords(const QCString &s, const char *title, const char *projName, const char *projNum, const char *projBrief)
Definition: util.cpp:5122
QCString getAsString(const char *name) const
void writeChar(char c)
Definition: latexgen.cpp:1718
bool isLinkableInProject() const
Definition: classdef.cpp:2707
void endGroupCollaboration(const DotGroupCollaboration &g)
Definition: latexgen.cpp:1919
void endDoxyAnchor(const char *, const char *)
Definition: latexgen.cpp:1606
void endClassDiagram(const ClassDiagram &, const char *, const char *)
Definition: latexgen.cpp:1732
void startParameterType(bool, const char *)
Definition: latexgen.cpp:2015
static void writeStyleSheetFile(QFile &f)
Definition: latexgen.cpp:788
virtual QCString latexLanguageSupportCommand()=0
void addIndexItem(const char *, const char *)
Definition: latexgen.cpp:1648
void writeFigure(FTextStream &t, const char *path, const char *file) const
Definition: diagram.cpp:1057
void startConstraintType()
Definition: latexgen.cpp:2076
void startParagraph()
Definition: latexgen.cpp:1272
static constexpr double g
Definition: Units.h:144
static PageSDict * exampleSDict
Definition: doxygen.h:101
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
void endInlineMemberType()
Definition: latexgen.cpp:2155
static void writeDefaultHeaderPart3(FTextStream &t)
Definition: latexgen.cpp:706
QCString title() const
Definition: pagedef.h:54
void startIndexKey()
Definition: latexgen.cpp:1355
void endMemberGroup(bool)
Definition: latexgen.cpp:1890
static void writeMakeBat()
Definition: latexgen.cpp:354
void setSourceFileName(const QCString &sourceFileName)
Definition: latexgen.cpp:66
#define IO_WriteOnly
Definition: qiodevice.h:62
bool generateSourceFile() const
Definition: filedef.cpp:1396
static void init()
Definition: latexgen.cpp:437
void endConstraintType()
Definition: latexgen.cpp:2081
QCString getOutputFileBase() const
void startFontClass(const char *)
Definition: latexgen.cpp:233
void lineBreak(const char *style=0)
Definition: latexgen.cpp:2127
void startMemberList()
Definition: latexgen.cpp:1836
void writeCodeLink(const char *ref, const char *file, const char *anchor, const char *name, const char *tooltip)
Definition: latexgen.cpp:160
type * first()
Definition: qinternallist.h:87
bool templateMemberItem
Definition: latexgen.h:341
void startInlineMemberName()
Definition: latexgen.cpp:2160
void startCallGraph()
Definition: latexgen.cpp:1924
void startMemberDocSimple()
Definition: latexgen.cpp:2139
void setTextStream(FTextStream &t)
Definition: latexgen.cpp:55
void setDevice(QIODevice *)
static void writeDefaultHeaderPart2(FTextStream &t)
Definition: latexgen.cpp:697
void startParamList(ParamListTypes, const char *title)
Definition: latexgen.cpp:1992
void endIndexValue(const char *, bool)
Definition: latexgen.cpp:1370
IndexSections
Definition: index.h:157
const bool FALSE
Definition: qglobal.h:370
static FileNameList * inputNameList
Definition: doxygen.h:109
void endInlineHeader()
Definition: latexgen.cpp:2122
void startInlineHeader()
Definition: latexgen.cpp:2110
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:4519
static ResourceMgr & instance()
Definition: resourcemgr.cpp:35
void endTitleHead(const char *, const char *name)
Definition: latexgen.cpp:1458
void writePageLink(const char *, bool)
Definition: latexgen.cpp:1247
QCString latexEscapeIndexChars(const char *s, bool insideTabbing)
Definition: util.cpp:6683
static QCString stripPath(const QCString &s)
Definition: tagreader.cpp:1287
void endConstraintList()
Definition: latexgen.cpp:2094
void startMemberHeader(const char *)
Definition: latexgen.cpp:1515
void startConstraintDocs()
Definition: latexgen.cpp:2086
#define Config_getList(val)
Definition: config.cpp:662
QCString left(uint len) const
Definition: qcstring.cpp:213
void endSimpleSect()
Definition: latexgen.cpp:1987
void startMemberDescription(const char *, const char *)
Definition: latexgen.cpp:1796
virtual bool isReference() const
QCString m_sourceFileName
Definition: latexgen.h:64
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
Definition: util.cpp:5812
QCString relativePathToRoot(const char *name)
Definition: util.cpp:5436
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void startDotGraph()
Definition: latexgen.cpp:1896
void writeLineNumber(const char *, const char *, const char *, int)
Definition: latexgen.cpp:189
void startTitle()
Definition: latexgen.cpp:1471
void writeDoc(DocNode *, Definition *ctx, MemberDef *)
Definition: latexgen.cpp:2051
void setRelativePath(const QCString &path)
Definition: latexgen.cpp:61
static QStrList * l
Definition: config.cpp:1044
void startMemberGroupHeader(bool)
Definition: latexgen.cpp:1854
void endMemberDocSimple()
Definition: latexgen.cpp:2146
Concrete visitor implementation for LaTeX output.
void startIndexValue(bool)
Definition: latexgen.cpp:1364
QCString getDefFileExtension() const
bool isEmpty() const
Definition: cite.cpp:108
bool disableLinks
Definition: latexgen.h:338
void startLabels()
Definition: latexgen.cpp:2178
void endIndexItem(const char *ref, const char *file)
Definition: latexgen.cpp:1296
#define Config_getEnum(val)
Definition: config.cpp:663
#define Config_getInt(val)
Definition: config.cpp:661
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3133
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
def cli(ctx)
Definition: main.py:7
Definition: sortdict.h:73
static void writeHeaderFile(QFile &f)
Definition: latexgen.cpp:770
void writeNonBreakableSpace(int)
Definition: latexgen.cpp:1823
const char * data() const
Definition: qstring.h:542
void startMemberDoc(const char *, const char *, const char *, const char *, bool)
Definition: latexgen.cpp:1534
void newParagraph()
Definition: latexgen.cpp:1267
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
Definition: qdir_unix.cpp:98
QAsciiDict< Entry > fn
void startClassDiagram()
Definition: latexgen.cpp:1726
void startPageRef()
Definition: latexgen.cpp:1426
void endGroupHeader(int)
Definition: latexgen.cpp:1509
static void writeDefaultStyleSheet(FTextStream &t)
Definition: latexgen.cpp:736
Q_EXPORT uint qstrlen(const char *str)
Definition: qcstring.h:81
void startPlainFile(const char *name)
Definition: outputgen.cpp:42
Definition: dot.h:43
QCString m_relPath
Definition: latexgen.h:63
void startCodeLine(bool)
Definition: latexgen.cpp:223
virtual QCString trGeneratedBy()=0
void startGroupHeader(int)
Definition: latexgen.cpp:1483
void endParamList()
Definition: latexgen.cpp:1999
fileName
Definition: dumpTree.py:9
void endDescItem()
Definition: latexgen.cpp:1959
QCString stripExtensionGeneral(const char *fName, const char *ext)
Definition: util.cpp:6789
bool isLinkableInProject() const
Definition: filedef.cpp:1877
void endDotGraph(const DotClassGraph &)
Definition: latexgen.cpp:1901
void writeString(const char *text)
Definition: latexgen.cpp:1282
void startMemberGroup()
Definition: latexgen.cpp:1886
def key(type, name=None)
Definition: graph.py:13
QCString getSourceFileBase() const
Definition: filedef.cpp:1771
QCString right(uint len) const
Definition: qcstring.cpp:231
std::void_t< T > n
void endIndexSection(IndexSections)
Definition: latexgen.cpp:1000
bool open(int)
Definition: qfile_unix.cpp:134
void endMemberGroupHeader()
Definition: latexgen.cpp:1869
void endDirDepGraph(const DotDirDeps &g)
Definition: latexgen.cpp:1937
void startConstraintParam()
Definition: latexgen.cpp:2067
static DirSDict * directories
Definition: doxygen.h:139
void endMemberItem()
Definition: latexgen.cpp:1786
void endFile()
Definition: latexgen.cpp:809
char versionString[]
Definition: version.cpp:1
void codify(const char *text)
Definition: latexgen.cpp:71
bool insideTabbing
Definition: latexgen.h:336
void writeLabel(const char *l, bool isLast)
Definition: latexgen.cpp:2183
void startCodeFragment()
Definition: latexgen.cpp:2100
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
p
Definition: test.py:223
void endParameterType()
Definition: latexgen.cpp:2021
void startIndexSection(IndexSections)
Definition: latexgen.cpp:825
LatexCodeGenerator m_codeGen
Definition: latexgen.h:343
void startDescription()
Definition: latexgen.cpp:1942
QCString latexEscapeLabelName(const char *s, bool insideTabbing)
Definition: util.cpp:6647
void writeEndAnnoItem(const char *name)
Definition: latexgen.cpp:1350
void startDirDepGraph()
Definition: latexgen.cpp:1933
A bunch of utility functions.
static PageSDict * pageSDict
Definition: doxygen.h:102
static void writeFooterFile(QFile &f)
Definition: latexgen.cpp:781
void startDoxyAnchor(const char *, const char *, const char *, const char *, const char *)
Definition: latexgen.cpp:1600
const char * data() const
Definition: qcstring.h:207
void endPageRef(const char *, const char *)
Definition: latexgen.cpp:1431
bool isEmbeddedInOuterScope() const
Definition: classdef.cpp:4630
Definition: dirdef.h:44
void endMemberTemplateParams(const char *, const char *)
Definition: latexgen.cpp:1768
void startInlineMemberType()
Definition: latexgen.cpp:2151
void startParameterName(bool)
Definition: latexgen.cpp:2026
QCString dateToString(bool includeTime)
Definition: util.cpp:2473
#define Config_getString(val)
Definition: config.cpp:660
type * current() const
Definition: qlist.h:146
QCString relPath
Definition: latexgen.h:339
void endMemberDescription()
Definition: latexgen.cpp:1809
#define Config_getBool(val)
Definition: config.cpp:664
QCString latexEscapePDFString(const char *s)
Definition: util.cpp:6721
QIODevice * device() const
void endMemberList()
Definition: latexgen.cpp:1844
QFile * file
Definition: outputgen.h:487
Definition: dot.h:42
type * next()
Definition: qinternallist.h:89
void startParameterList(bool)
Definition: latexgen.cpp:2004
void endConstraintDocs()
Definition: latexgen.cpp:2090
bool isLinkableInProject() const
Definition: dirdef.cpp:58
void err(const char *fmt,...)
Definition: message.cpp:226
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
Definition: util.cpp:6533
void startMemberItem(const char *, int, const char *)
Definition: latexgen.cpp:1776
void writeStyleInfo(int part)
Definition: latexgen.cpp:1257
QCString getOutputFileBase() const
Definition: filedef.h:83
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString & sprintf(const char *format,...)
Definition: qcstring.cpp:27
QCString fileName
Definition: outputgen.h:488
QCString dir
Definition: outputgen.h:489
void writeLatexBibliography(FTextStream &t)
Definition: cite.cpp:41
void endInlineMemberDoc()
Definition: latexgen.cpp:2173
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
virtual QCString trGeneratedAt(const char *date, const char *projName)=0
#define COPYCHAR()
static void writeDefaultHeaderPart1(FTextStream &t)
Definition: latexgen.cpp:454
QCString getOutputFileBase() const
Definition: dirdef.cpp:113
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3824
FTextStream t
Definition: outputgen.h:486
void docify(const char *text)
Definition: latexgen.cpp:1713
void startSimpleSect(SectionTypes, const char *, const char *, const char *)
Definition: latexgen.cpp:1972
void endParameterName(bool, bool, bool)
Definition: latexgen.cpp:2031
static void writeDefaultFooter(FTextStream &t)
Definition: latexgen.cpp:741
void startHtmlLink(const char *url)
Definition: latexgen.cpp:1312
void endMemberHeader()
Definition: latexgen.cpp:1528
FTextStream m_t
Definition: latexgen.h:62
A model of a page symbol.
Definition: pagedef.h:29
void endLabels()
Definition: latexgen.cpp:2189
virtual QCString idLanguage()=0
void startIndexItem(const char *ref, const char *file)
Definition: latexgen.cpp:1287
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: latexgen.cpp:1404
void startMemberGroupDocs()
Definition: latexgen.cpp:1876
QString fileName() const
static const char * latexStyleExtension
Definition: latexgen.h:25
bool isEmpty() const
Definition: qinternallist.h:57
void endMemberDoc(bool)
Definition: latexgen.cpp:1593
void endHtmlLink()
Definition: latexgen.cpp:1323
Translator * theTranslator
Definition: language.cpp:157
QCString writeGraph(FTextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE) const
Definition: dot.cpp:3977
bool checkExtension(const char *fName, const char *ext)
Definition: util.cpp:6784
virtual QCString trCompoundMembers()=0
void startDescItem()
Definition: latexgen.cpp:1953
void startInclDepGraph()
Definition: latexgen.cpp:1906
type * at(uint i)
Definition: qinternallist.h:81
void createSubDirs(QDir &d)
Definition: util.cpp:5458
friend class Iterator
Definition: sortdict.h:289
void endCallGraph(const DotCallGraph &)
Definition: latexgen.cpp:1928
void endParameterList()
Definition: latexgen.cpp:2011
void endDescription()
Definition: latexgen.cpp:1947
void startConstraintList(const char *)
Definition: latexgen.cpp:2059
void startTextLink(const char *, const char *)
Definition: latexgen.cpp:1384
void endInclDepGraph(const DotInclDepGraph &)
Definition: latexgen.cpp:1910
void endCodeFragment()
Definition: latexgen.cpp:2105
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3503
static QCString spaces
Definition: doxygen.h:151
void startFile(const char *name, const char *manName, const char *title)
Definition: latexgen.cpp:795
const char * cs
bool isLinkableInProject() const
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:51
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
uint count() const
Definition: qinternallist.h:56
QCString utf8() const
Definition: qstring.cpp:14507
void endConstraintParam()
Definition: latexgen.cpp:2072
static void writeLatexMakefile()
Definition: latexgen.cpp:262
unsigned uint
Definition: qglobal.h:351
static ClassSDict * classSDict
Definition: doxygen.h:99
void writeAnchor(const char *fileName, const char *name)
Definition: latexgen.cpp:1623
QCString getOutputFileBase() const
Definition: pagedef.cpp:58
virtual void accept(DocVisitor *v)=0
bool firstDescItem
Definition: latexgen.h:337
virtual bool exists() const
Definition: qdir.cpp:820
virtual QCString trRTFGeneralIndex()=0
void endInlineMemberName()
Definition: latexgen.cpp:2164
const bool TRUE
Definition: qglobal.h:371
static QCString str
void endParagraph()
Definition: latexgen.cpp:1277
void endAnonTypeScope(int)
Definition: latexgen.cpp:1750
QTextStream & endl(QTextStream &s)
void startGroupCollaboration()
Definition: latexgen.cpp:1915
GroupDef * getGroupDef() const
Definition: pagedef.cpp:52
bool exists() const
Definition: qfileinfo.cpp:265
#define ASSERT(x)
Definition: qglobal.h:590
void endIndexKey()
Definition: latexgen.cpp:1360
void startAnonTypeScope(int)
Definition: latexgen.cpp:1739
bool m_prettyCode
Definition: latexgen.h:342
void endTextLink()
Definition: latexgen.cpp:1399
void endSection(const char *, SectionInfo::SectionType)
Definition: latexgen.cpp:1707
type * toFirst()
Definition: qlist.h:135
void endMemberGroupDocs()
Definition: latexgen.cpp:1881
void writeStartAnnoItem(const char *type, const char *file, const char *path, const char *name)
Definition: latexgen.cpp:1341
void exceptionEntry(const char *, bool)
Definition: latexgen.cpp:2042