80 const char *p=str.
data();
105 case '^': *
m_t <<
"\\string^";
109 case '`': *
m_t <<
"\\`{}";
114 int spacesToNextTabStop = tabSize - (
m_col%tabSize);
115 while (spacesToNextTabStop--)
126 case '\n': *
m_t <<
'\n';
136#define COPYCHAR() do { \
137 int bytes = getUTF8CharNumBytes(c); \
138 if (lresult < (i + bytes + 1)) \
141 result = static_cast<char *>(realloc(result, lresult)); \
143 for (int j=0; j<bytes && *p; j++) \
153 c!=0x0c && c!=
'\t' && c!=
'\n' && c!=
' ' && c!=
'^'
203 if (ref.
isEmpty() && usePDFLatex && pdfHyperlinks)
205 *
m_t <<
"\\mbox{\\hyperlink{";
227 *
m_t <<
"\\DoxyCodeLine{";
238 lineAnchor.
sprintf(
"_l%05d",l);
241 bool showTarget = usePDFLatex && pdfHyperlinks && !lineAnchor.
isEmpty() && writeLineAnchor;
244 *
m_t <<
"\\Hypertarget{" <<
stripPath(lineAnchor) <<
"}";
273 *
m_t <<
"\\DoxyCodeLine{";
292 *
m_t <<
"\\textcolor{" << name <<
"}{";
311 *
m_t <<
"\\end{" << style <<
"}\n";
369 term(
"Could not open file %s for writing\n",
qPrint(fileName));
377 const int latex_count = 8;
379 t <<
"LATEX_CMD?=" << latex_command <<
"\n"
380 <<
"MKIDX_CMD?=" << mkidx_command <<
"\n"
381 <<
"BIBTEX_CMD?=" << bibtex_command <<
"\n"
382 <<
"LATEX_COUNT?=" << latex_count <<
"\n"
383 <<
"MANUAL_FILE?=" << manual_file <<
"\n"
387 t <<
"all: $(MANUAL_FILE).dvi\n"
389 <<
"ps: $(MANUAL_FILE).ps\n"
391 <<
"pdf: $(MANUAL_FILE).pdf\n"
393 <<
"ps_2on1: $(MANUAL_FILE).ps\n"
395 <<
"pdf_2on1: $(MANUAL_FILE).pdf\n"
397 <<
"$(MANUAL_FILE).ps: $(MANUAL_FILE).dvi\n"
398 <<
"\tdvips -o $(MANUAL_FILE).ps $(MANUAL_FILE).dvi\n"
400 t <<
"$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n";
401 t <<
"\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n\n";
402 t <<
"$(MANUAL_FILE).dvi: clean $(MANUAL_FILE).tex doxygen.sty\n"
403 <<
"\techo \"Running latex...\"\n"
404 <<
"\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
405 <<
"\tif [ $$? != 0 ] ; then \\\n"
406 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
409 <<
"\techo \"Running makeindex...\"\n"
410 <<
"\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
413 t <<
"\techo \"Running bibtex...\"\n";
414 t <<
"\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
415 t <<
"\techo \"Rerunning latex....\"\n";
416 t <<
"\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
417 <<
"\tif [ $$? != 0 ] ; then \\\n"
418 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
422 t <<
"\techo \"Rerunning latex....\"\n"
423 <<
"\t$(LATEX_CMD) $(MANUAL_FILE).tex\n"
424 <<
"\tlatex_count=$(LATEX_COUNT) ; \\\n"
425 <<
"\twhile grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
427 <<
"\t echo \"Rerunning latex....\" ;\\\n"
428 <<
"\t $(LATEX_CMD) $(MANUAL_FILE).tex ; \\\n"
429 <<
"\t $(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
430 <<
"\t if [ $$? != 0 ] ; then \\\n"
431 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
434 <<
"\t latex_count=`expr $$latex_count - 1` ;\\\n"
436 <<
"\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
437 <<
"\t$(LATEX_CMD) $(MANUAL_FILE).tex || \\\n"
438 <<
"\tif [ $$? != 0 ] ; then \\\n"
439 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
442 <<
"$(MANUAL_FILE).ps: $(MANUAL_FILE).ps\n"
443 <<
"\tpsnup -2 $(MANUAL_FILE).ps >$(MANUAL_FILE).ps\n"
445 <<
"$(MANUAL_FILE).pdf: $(MANUAL_FILE).ps\n"
446 <<
"\tps2pdf $(MANUAL_FILE).ps $(MANUAL_FILE).pdf\n";
450 t <<
"all: $(MANUAL_FILE).pdf\n\n"
451 <<
"pdf: $(MANUAL_FILE).pdf\n\n";
452 t <<
"$(MANUAL_FILE).pdf: clean $(MANUAL_FILE).tex\n";
453 t <<
"\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
454 <<
"\tif [ $$? != 0 ] ; then \\\n"
455 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
458 t <<
"\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n";
461 t <<
"\t$(BIBTEX_CMD) $(MANUAL_FILE)\n";
462 t <<
"\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
463 <<
"\tif [ $$? != 0 ] ; then \\\n"
464 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
468 t <<
"\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
469 <<
"\tif [ $$? != 0 ] ; then \\\n"
470 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
473 <<
"\tlatex_count=$(LATEX_COUNT) ; \\\n"
474 <<
"\twhile grep -E -s 'Rerun (LaTeX|to get cross-references right|to get bibliographical references right)' $(MANUAL_FILE).log && [ $$latex_count -gt 0 ] ;\\\n"
476 <<
"\t echo \"Rerunning latex....\" ;\\\n"
477 <<
"\t $(LATEX_CMD) $(MANUAL_FILE) || \\\n"
478 <<
"\t if [ $$? != 0 ] ; then \\\n"
479 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
482 <<
"\t latex_count=`expr $$latex_count - 1` ;\\\n"
484 <<
"\t$(MKIDX_CMD) $(MANUAL_FILE).idx\n"
485 <<
"\t$(LATEX_CMD) $(MANUAL_FILE) || \\\n"
486 <<
"\tif [ $$? != 0 ] ; then \\\n"
487 <<
"\t \\echo \"Please consult $(MANUAL_FILE).log to see the error messages\" ; \\\n"
495 <<
"*.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl $(MANUAL_FILE).pdf\n";
507 const int latex_count = 8;
512 term(
"Could not open file %s for writing\n",
qPrint(fileName));
514 t <<
"pushd %~dp0\r\n";
515 t <<
"if not %errorlevel% == 0 goto :end1\r\n";
517 t <<
"set ORG_LATEX_CMD=%LATEX_CMD%\r\n";
518 t <<
"set ORG_MKIDX_CMD=%MKIDX_CMD%\r\n";
519 t <<
"set ORG_BIBTEX_CMD=%BIBTEX_CMD%\r\n";
520 t <<
"set ORG_LATEX_COUNT=%LATEX_COUNT%\r\n";
521 t <<
"set ORG_MANUAL_FILE=%MANUAL_FILE%\r\n";
522 t <<
"if \"X\"%LATEX_CMD% == \"X\" set LATEX_CMD=" << latex_command <<
"\r\n";
523 t <<
"if \"X\"%MKIDX_CMD% == \"X\" set MKIDX_CMD=" << mkidx_command <<
"\r\n";
524 t <<
"if \"X\"%BIBTEX_CMD% == \"X\" set BIBTEX_CMD=" << bibtex_command <<
"\r\n";
525 t <<
"if \"X\"%LATEX_COUNT% == \"X\" set LATEX_COUNT=" << latex_count <<
"\r\n";
526 t <<
"if \"X\"%MANUAL_FILE% == \"X\" set MANUAL_FILE=" << manual_file <<
"\r\n";
528 t <<
"del /s /f *.ps *.dvi *.aux *.toc *.idx *.ind *.ilg *.log *.out *.brf *.blg *.bbl %MANUAL_FILE%.pdf\r\n\r\n";
532 t <<
"%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
533 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
534 t <<
"echo ----\r\n";
535 t <<
"%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
538 t <<
"%BIBTEX_CMD% %MANUAL_FILE%\r\n";
539 t <<
"echo ----\r\n";
540 t <<
"\t%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
541 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
543 t <<
"setlocal enabledelayedexpansion\r\n";
544 t <<
"set count=%LAT#EX_COUNT%\r\n";
546 t <<
"set content=X\r\n";
547 t <<
"for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
548 t <<
"if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
549 t <<
"if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
550 t <<
"if !content! == X goto :skip\r\n";
551 t <<
"set /a count-=1\r\n";
552 t <<
"if !count! EQU 0 goto :skip\r\n\r\n";
553 t <<
"echo ----\r\n";
554 t <<
"%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
555 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
556 t <<
"goto :repeat\r\n";
559 t <<
"%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
560 t <<
"%LATEX_CMD% %MANUAL_FILE%.tex\r\n";
561 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
562 t <<
"dvips -o %MANUAL_FILE%.ps %MANUAL_FILE%.dvi\r\n";
564 t <<
" -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite "
565 "-sOutputFile=%MANUAL_FILE%.pdf -c save pop -f %MANUAL_FILE%.ps\r\n";
569 t <<
"%LATEX_CMD% %MANUAL_FILE%\r\n";
570 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
571 t <<
"echo ----\r\n";
572 t <<
"%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
575 t <<
"%BIBTEX_CMD% %MANUAL_FILE%\r\n";
576 t <<
"%LATEX_CMD% %MANUAL_FILE%\r\n";
577 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
579 t <<
"echo ----\r\n";
580 t <<
"%LATEX_CMD% %MANUAL_FILE%\r\n";
581 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
583 t <<
"setlocal enabledelayedexpansion\r\n";
584 t <<
"set count=%LATEX_COUNT%\r\n";
586 t <<
"set content=X\r\n";
587 t <<
"for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun LaTeX\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
588 t <<
"if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get cross-references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
589 t <<
"if !content! == X for /F \"tokens=*\" %%T in ( 'findstr /C:\"Rerun to get bibliographical references right\" %MANUAL_FILE%.log' ) do set content=\"%%~T\"\r\n";
590 t <<
"if !content! == X goto :skip\r\n";
591 t <<
"set /a count-=1\r\n";
592 t <<
"if !count! EQU 0 goto :skip\r\n\r\n";
593 t <<
"echo ----\r\n";
594 t <<
"%LATEX_CMD% %MANUAL_FILE%\r\n";
595 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
596 t <<
"goto :repeat\r\n";
599 t <<
"%MKIDX_CMD% %MANUAL_FILE%.idx\r\n";
600 t <<
"%LATEX_CMD% %MANUAL_FILE%\r\n";
601 t <<
"@if ERRORLEVEL 1 goto :error\r\n";
604 t <<
"goto :end\r\n";
606 t <<
"@echo ===============\r\n";
607 t <<
"@echo Please consult %MANUAL_FILE%.log to see the error messages\r\n";
608 t <<
"@echo ===============\r\n";
611 t<<
"@REM reset environment\r\n";
613 t<<
"set LATEX_CMD=%ORG_LATEX_CMD%\r\n";
614 t<<
"set ORG_LATEX_CMD=\r\n";
615 t<<
"set MKIDX_CMD=%ORG_MKIDX_CMD%\r\n";
616 t<<
"set ORG_MKIDX_CMD=\r\n";
617 t<<
"set BIBTEX_CMD=%ORG_BIBTEX_CMD%\r\n";
618 t<<
"set ORG_BIBTEX_CMD=\r\n";
619 t<<
"set MANUAL_FILE=%ORG_MANUAL_FILE%\r\n";
620 t<<
"set ORG_MANUAL_FILE=\r\n";
621 t<<
"set LATEX_COUNT=%ORG_LATEX_COUNT%\r\n";
622 t<<
"set ORG_LATEX_COUNT=\r\n";
634 term(
"Could not create output directory %s\n",
qPrint(dname));
684 t <<
"% Latex header for doxygen " << getDoxygenVersion() <<
"\n";
690 t <<
"% Latex footer for doxygen " << getDoxygenVersion() <<
"\n";
696 t <<
"% stylesheet for doxygen " << getDoxygenVersion() <<
"\n";
727 m_t <<
"\\\\[1ex]\\large ";
734 for (
const auto &fileName : extraLatexStyles)
736 if (!fileName.empty())
741 result +=
"\\usepackage{";
762 if (!latex_mkidx_command.
isEmpty())
764 if (latex_mkidx_command[0] ==
'\\')
765 result += latex_mkidx_command;
767 result +=
"\\"+latex_mkidx_command;
771 result +=
"\\makeindex";
780 case LATEX_BATCHMODE_t::NO:
return "";
781 case LATEX_BATCHMODE_t::YES:
return "\\batchmode";
782 case LATEX_BATCHMODE_t::BATCH:
return "\\batchmode";
783 case LATEX_BATCHMODE_t::NON_STOP:
return "\\nonstopmode";
784 case LATEX_BATCHMODE_t::SCROLL:
return "\\scrollmode";
785 case LATEX_BATCHMODE_t::ERROR_STOP:
return "\\errorstopmode";
809 case TIMESTAMP_t::YES:
810 case TIMESTAMP_t::DATETIME:
814 case TIMESTAMP_t::DATE:
818 case TIMESTAMP_t::NO:
829 generatedBy = tg.
str();
834 if (latexEmojiDirectory.
isEmpty()) latexEmojiDirectory =
".";
835 latexEmojiDirectory =
substitute(latexEmojiDirectory,
"\\",
"/");
847 if (!formulaMacrofile.
isEmpty())
867 {
"$latexdocumentpre", [&]() {
return theTranslator->latexDocumentPre(); } },
868 {
"$latexdocumentpost", [&]() {
return theTranslator->latexDocumentPost(); } },
869 {
"$generatedby", [&]() {
return generatedBy; } },
870 {
"$latexbibstyle", [&]() {
return style; } },
871 {
"$latexcitereference", [&]() {
return theTranslator->trCiteReferences(); } },
873 {
"$papertype", [&]() {
return paperType+
"paper"; } },
875 {
"$languagesupport", [&]() {
return theTranslator->latexLanguageSupportCommand(); } },
876 {
"$latexfontenc", [&]() {
return latexFontenc; } },
877 {
"$latexfont", [&]() {
return theTranslator->latexFont(); } },
878 {
"$latexemojidirectory", [&]() {
return latexEmojiDirectory; } },
879 {
"$makeindex", [&]() {
return makeIndex(); } },
880 {
"$extralatexpackages", [&]() {
return extraLatexPackages; } },
881 {
"$latexspecialformulachars", [&]() {
return latexSpecialFormulaChars; } },
882 {
"$formulamacrofile", [&]() {
return stripMacroFile; } },
891 {
"COMPACT_LATEX", compactLatex },
892 {
"PDF_HYPERLINKS", pdfHyperlinks },
893 {
"USE_PDFLATEX", usePdfLatex },
894 {
"TIMESTAMP", timeStamp!=TIMESTAMP_t::NO },
895 {
"LATEX_FONTENC", !latexFontenc.
isEmpty() },
896 {
"FORMULA_MACROFILE", !formulaMacrofile.
isEmpty() },
897 {
"PROJECT_NUMBER", !projectNumber.
isEmpty() }
918 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
922 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
926 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
930 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
934 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
938 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
942 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
946 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
950 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
957 if (!gd->isReference())
959 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
970 if (!mod->isReference() && mod->isPrimaryInterface())
972 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
983 if (dd->isLinkableInProject())
985 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
996 if (nd->isLinkableInProject() && !nd->isAlias())
998 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
1009 if (cd->isLinkableInProject() && !cd->isAlias())
1011 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
1022 if (cd->isLinkableInProject() &&
1023 cd->templateMaster()==
nullptr &&
1024 !cd->isEmbeddedInOuterScope() &&
1028 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
1040 for (
const auto &fd : *fn)
1042 if (fd->isLinkableInProject() || fd->generateSourceFile())
1046 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
1058 if (compactLatex)
m_t <<
"\\doxysection";
else m_t <<
"\\chapter";
1088 m_t <<
"}\n\\input{modules}\n";
1091 m_t <<
"}\n\\input{topics}\n";
1094 m_t <<
"}\n\\input{dirs}\n";
1097 m_t <<
"}\n\\input{namespaces}\n";
1100 m_t <<
"}\n\\input{concepts}\n";
1103 m_t <<
"}\n\\input{hierarchy}\n";
1106 m_t <<
"}\n\\input{annotated}\n";
1109 m_t <<
"}\n\\input{files}\n";
1112 m_t <<
"}\n\\input{pages}\n";
1119 if (!gd->isReference() && !gd->isASubGroup())
1131 if (!mod->isReference() && mod->isPrimaryInterface())
1143 if (dd->isLinkableInProject())
1150 m_t <<
"\\input{" << dd->getOutputFileBase() <<
"}\n";
1160 if (nd->isLinkableInProject() && !nd->isAlias())
1167 m_t <<
"\\input{" << nd->getOutputFileBase() <<
"}\n";
1177 if (cd->isLinkableInProject() && !cd->isAlias())
1184 m_t <<
"\\input{" << cd->getOutputFileBase() <<
"}\n";
1194 if (cd->isLinkableInProject() &&
1195 cd->templateMaster()==
nullptr &&
1196 !cd->isEmbeddedInOuterScope() &&
1205 m_t <<
"\\input{" << cd->getOutputFileBase() <<
"}\n";
1215 for (
const auto &fd : *fn)
1217 if (fd->isLinkableInProject())
1224 m_t <<
"\\input{" << fd->getOutputFileBase() <<
"}\n";
1226 if (fd->generateSourceFile())
1233 m_t <<
"\\input{" << fd->getSourceFileBase() <<
"}\n";
1244 m_t <<
"\\input{" << pd->getOutputFileBase() <<
"}\n";
1252 if (!pd->getGroupDef() && !pd->isReference() && !pd->hasParentPage()
1274 m_t <<
"{" << name <<
"}\n";
1304 m_t <<
"\n" <<
"\n";
1309 m_t <<
"\n" <<
"\n";
1322 m_t <<
"\\contentsline{section}{";
1337 m_t <<
"\\item\\contentsline{section}\\textbf{ ";
1345 m_t <<
"\\item\\contentsline{section}{";
1355 if (hasBrief)
m_t <<
"\\\\*";
1377 m_t <<
"\\mbox{\\hyperlink{";
1384 m_t <<
"\\textbf{ ";
1400 bool insideTabbing,
bool disableLinks)
1404 if (!disableLinks && ref.
isEmpty() && pdfHyperlinks)
1406 result +=
"\\mbox{\\hyperlink{";
1409 if (!anchor.
isEmpty()) result += anchor;
1416 result +=
"\\textbf{ ";
1427 t <<
"\\texorpdfstring{";
1432 t <<
"}{" << strRepl <<
"}";
1444 m_t <<
" \\doxyref{}{";
1464 if (hierarchyLevel < 0)
1465 m_t <<
"\\chapter{";
1467 m_t <<
"\\doxy" << QCString(
"sub").repeat(hierarchyLevel) <<
"section{";
1476 if (usePDFLatex && pdfHyperlinks && !
fileName.isEmpty())
1484 m_t <<
"\\label{" << fn <<
"}";
1500 m_t <<
"\\doxysubsection{";
1504 m_t <<
"\\doxysection{";
1515 if (extraIndentLevel>=3)
1517 m_t <<
"\\doxysubparagraph*{";
1519 else if (extraIndentLevel==2)
1521 m_t <<
"\\doxyparagraph{";
1526 m_t <<
"\\doxy" << QCString(
"sub").repeat(extraIndentLevel) <<
"section{";
1545 m_t <<
"\\doxysub" << QCString(
"sub").repeat(l) <<
"section*{";
1563 if (!memname.
isEmpty() && memname[0]!=
'@')
1597 m_t <<
"\\doxysubparagraph";
1599 else if (compactLatex)
1601 m_t <<
"\\doxyparagraph";
1611 m_t <<
"\\texorpdfstring{";
1620 m_t <<
"\\hspace{0.1cm}{\\footnotesize\\ttfamily [" << memCount <<
"/" << memTotal <<
"]}";
1623 m_t <<
"\n{\\footnotesize\\ttfamily ";
1641 if (usePDFLatex && pdfHyperlinks)
1643 m_t <<
"\\Hypertarget{";
1669 if (usePDFLatex && pdfHyperlinks)
1714 if (usePDFLatex && pdfHyperlinks)
1721 switch(
type.level())
1730 default:
ASSERT(0);
break;
1736 switch(
type.level())
1745 default:
ASSERT(0);
break;
1753 m_t <<
"}\\label{" << lab <<
"}\n";
1793 m_t <<
"\\begin{tabbing}\n";
1794 m_t <<
"xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=xx\\=\\kill\n";
1804 m_t <<
"\n" <<
"\\end{tabbing}";
1814 m_t <<
"{\\footnotesize ";
1850 m_t <<
"\\begin{DoxyCompactList}\\small\\item\\em ";
1864 m_t <<
"\\end{DoxyCompactList}";
1903 m_t <<
"\\begin{DoxyEnumFields}[" << (hasInits?3:2) <<
"]{" << title <<
"}\n";
1909 m_t <<
"\\end{DoxyEnumFields}\n";
1916 m_t <<
"\\raisebox{\\heightof{T}}[0pt][0pt]{";
1948 m_t <<
"\\\\\n\\hline\n\n";
1960 m_t <<
"\\begin{DoxyCompactItemize}\n";
1969 m_t <<
"\\end{DoxyCompactItemize}\n";
1976 if (hasHeader)
m_t <<
"\\begin{Indent}";
1977 m_t <<
"\\textbf{ ";
2012 if (hasHeader)
m_t <<
"\\end{Indent}";
2018 m_t <<
"\n" <<
"\n";
2064 m_t <<
"\\begin{Desc}\n\\item[";
2071 m_t <<
"\\end{Desc}\n";
2077 if (openBracket)
m_t <<
"(";
2078 m_t <<
"\\begin{DoxyParamCaption}";
2116 m_t <<
"\\end{DoxyParamCaption}";
2117 if (closeBracket)
m_t <<
")";
2127 else if (closeBracket)
2136 const DocNodeAST *astImpl =
dynamic_cast<const DocNodeAST*
>(ast);
2142 std::visit(visitor,astImpl->
root);
2148 m_t <<
"\\begin{Desc}\n\\item[";
2151 m_t <<
"\\begin{description}\n";
2156 m_t <<
"\\item[{\\em ";
2165 m_t <<
"} : {\\em ";
2183 m_t <<
"\\end{description}\n";
2184 m_t <<
"\\end{Desc}\n";
2191 m_t <<
"\\doxyparagraph*{";
2212 m_t <<
"\\newline\n";
2221 m_t <<
"\\begin{DoxyEnumFields}{";
2226 m_t <<
"\\begin{DoxyFields}{";
2239 m_t <<
"\\end{DoxyEnumFields}\n";
2243 m_t <<
"\\end{DoxyFields}\n";
2275 m_t <<
"\\\\\n\\hline\n\n";
2280 m_t <<
"\\hspace{0.3cm}";
2285 m_t <<
"{\\ttfamily [" << l <<
"]}";
2286 if (!isLast)
m_t <<
", ";
2300 m_t <<
"\\doxyparagraph*{";
2316 m_t <<
"\\etocsetnexttocdepth{" << maxLevel <<
"}\n";
2317 m_t <<
"\\localtableofcontents\n";
2327 if (!extraPackages.empty())
2329 t <<
"% Packages requested by user\n";
2330 for (
const auto &pkgName : extraPackages)
2332 if ((pkgName[0] ==
'[') || (pkgName[0] ==
'{'))
2333 t <<
"\\usepackage" << pkgName.c_str() <<
"\n";
2335 t <<
"\\usepackage{" << pkgName.c_str() <<
"}\n";
2343 unsigned char minus[4];
2344 unsigned char sup2[3];
2345 unsigned char sup3[3];
2357 t <<
"\\ifPDFTeX\n";
2358 t <<
"\\usepackage{newunicodechar}\n";
2361 t <<
" \\makeatletter\n"
2362 " \\def\\doxynewunicodechar#1#2{%\n"
2363 " \\@tempswafalse\n"
2364 " \\edef\\nuc@tempa{\\detokenize{#1}}%\n"
2365 " \\if\\relax\\nuc@tempa\\relax\n"
2366 " \\nuc@emptyargerr\n"
2368 " \\edef\\@tempb{\\expandafter\\@car\\nuc@tempa\\@nil}%\n"
2371 " \\@namedef{u8:\\nuc@tempa}{#2}%\n"
2377 t <<
" \\doxynewunicodechar{" << minus <<
"}{${}^{-}$}% Superscript minus\n"
2378 " \\doxynewunicodechar{" << sup2 <<
"}{${}^{2}$}% Superscript two\n"
2379 " \\doxynewunicodechar{" << sup3 <<
"}{${}^{3}$}% Superscript three\n"
2385 bool insideTabbing,
bool insidePre,
bool insideItem,
bool insideTable,
bool keepSpaces,
const bool retainNewline)
2390 const char *p = str.
data();
2391 const char *q =
nullptr;
2392 unsigned char pc=
'\0';
2396 unsigned char c=
static_cast<unsigned char>(*p++);
2404 if (
static_cast<unsigned char>(*(p)) == 0xbf &&
static_cast<unsigned char>(*(p+1)) == 0xbd)
2410 t << static_cast<char>(c);
2412 case '\\': t <<
"\\(\\backslash\\)";
break;
2413 case '{': t <<
"\\{";
break;
2414 case '}': t <<
"\\}";
break;
2415 case '_': t <<
"\\_";
break;
2416 case '&': t <<
"\\&";
break;
2417 case '%': t <<
"\\%";
break;
2418 case '#': t <<
"\\#";
break;
2419 case '$': t <<
"\\$";
break;
2420 case '"': t <<
"\"{}";
break;
2421 case '-': t <<
"-\\/";
break;
2422 case '^':
insideTable ? t <<
"\\string^" : t << static_cast<char>(c);
break;
2423 case '~': t <<
"\\string~";
break;
2424 case '\n':
if (retainNewline) t <<
"\\newline";
else t <<
' ';
2426 case ' ':
if (keepSpaces) t <<
"~";
else t <<
' ';
2430 else t << static_cast<char>(c);
2440 if (
static_cast<unsigned char>(*(p)) == 0xbf &&
static_cast<unsigned char>(*(p+1)) == 0xbd)
2446 t << static_cast<char>(c);
2448 case '#': t <<
"\\#";
break;
2449 case '$': t <<
"\\$";
break;
2450 case '%': t <<
"\\%";
break;
2451 case '^':
processEntity(t,pdfHyperlinks,
"$^\\wedge$",
"\\string^");
break;
2456 while ((*q >=
'a' && *q <=
'z') || (*q >=
'A' && *q <=
'Z') || (*q >=
'0' && *q <=
'9'))
2483 case '*':
processEntity(t,pdfHyperlinks,
"$\\ast$",
"*");
break;
2484 case '_':
if (!insideTabbing) t <<
"\\+";
2486 if (!insideTabbing) t <<
"\\+";
2488 case '{': t <<
"\\{";
break;
2489 case '}': t <<
"\\}";
break;
2490 case '<': t <<
"$<$";
break;
2491 case '>': t <<
"$>$";
break;
2492 case '|':
processEntity(t,pdfHyperlinks,
"$\\vert$",
"|");
break;
2493 case '~':
processEntity(t,pdfHyperlinks,
"$\\sim$",
"\\string~");
break;
2499 case ']':
if (pc==
'[') t <<
"$\\,$";
2505 case '-': t <<
"-\\/";
2507 case '\\': t <<
"\\textbackslash{}";
2509 case '"': t <<
"\"{}";
2511 case '`': t <<
"\\`{}";
2513 case '\'': t <<
"\\textquotesingle{}";
2515 case '\n':
if (retainNewline) t <<
"\\newline";
else t <<
' ';
2517 case ' ':
if (keepSpaces) {
if (insideTabbing) t <<
"\\>";
else t <<
'~'; }
else t <<
' ';
2522 if (!insideTabbing &&
2523 ((c>=
'A' && c<=
'Z' && pc!=
' ' && !(pc>=
'A' && pc <=
'Z') && pc!=
'\0' && *p) || (c==
':' && pc!=
':') || (pc==
'.' &&
isId(c)))
2534 t << static_cast<char>(c);
2555 const char *p=s.
data();
2561 case '|': t <<
"\\texttt{\"|}";
break;
2562 case '!': t <<
"\"!";
break;
2563 case '@': t <<
"\"@";
break;
2564 case '%': t <<
"\\%";
break;
2565 case '{': t <<
"\\lcurly{}";
break;
2566 case '}': t <<
"\\rcurly{}";
break;
2567 case '~': t <<
"````~";
break;
2574 while ((c=*p) && c!=
'@' && c!=
'[' && c!=
']' && c!=
'!' && c!=
'{' && c!=
'}' && c!=
'|')
2600 const char *p=s.
data();
2606 case '!': t <<
"\"!";
break;
2607 case '"': t <<
"\"\"";
break;
2608 case '@': t <<
"\"@";
break;
2609 case '|': t <<
"\\texttt{\"|}";
break;
2610 case '[': t <<
"[";
break;
2611 case ']': t <<
"]";
break;
2612 case '{': t <<
"\\lcurly{}";
break;
2613 case '}': t <<
"\\rcurly{}";
break;
2620 while ((c=*p) && c!=
'"' && c!=
'@' && c!=
'[' && c!=
']' && c!=
'!' && c!=
'{' && c!=
'}' && c!=
'|')
2644 const char *p=s.
data();
2650 case '\\': t <<
"\\textbackslash{}";
break;
2651 case '{': t <<
"\\{";
break;
2652 case '}': t <<
"\\}";
break;
2653 case '_': t <<
"\\_";
break;
2654 case '%': t <<
"\\%";
break;
2655 case '&': t <<
"\\&";
break;
2656 case '#': t <<
"\\#";
break;
2657 case '$': t <<
"\\$";
break;
2658 case '^': t <<
"\\string^";
break;
2659 case '~': t <<
"\\string~";
break;
2670 constexpr auto hex =
"0123456789ABCDEF";
2673 const char *p=s.
data();
2679 case '#': t <<
"\\#";
break;
2680 case '%': t <<
"\\%";
break;
2681 case '\\': t <<
"\\\\";
break;
2685 unsigned char id =
static_cast<unsigned char>(c);
2686 t <<
"\\%" <<
hex[
id>>4] <<
hex[
id&0xF];
QCString latexBibFiles()
lists the bibtex cite files in a comma separated list
static CitationManager & instance()
bool isEmpty() const
return TRUE if there are no citations.
Class representing a built-in class diagram.
void writeFigure(TextStream &t, const QCString &path, const QCString &file) const
The common base class of all entity definitions found in the sources.
virtual QCString getDefFileExtension() const =0
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Representation of an call graph.
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Representation of a class inheritance or dependency graph.
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)
Representation of an directory dependency graph.
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)
Representation of a group collaboration graph.
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
Representation of an include dependency graph.
QCString writeGraph(TextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const QCString &path, const QCString &fileName, const QCString &relPath, bool writeImageMap=TRUE, int graphId=-1)
static NamespaceLinkedMap * namespaceLinkedMap
static ConceptLinkedMap * conceptLinkedMap
static std::unique_ptr< PageDef > mainPage
static FileNameLinkedMap * inputNameLinkedMap
static ClassLinkedMap * classLinkedMap
static PageLinkedMap * exampleLinkedMap
static PageLinkedMap * pageLinkedMap
static DirLinkedMap * dirLinkedMap
static GroupLinkedMap * groupLinkedMap
Minimal replacement for QFileInfo.
std::string fileName() const
std::string absFilePath() const
const char * latex(SymType symb) const
Access routine to the LaTeX code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
SymType name2sym(const QCString &symName) const
Give code of the requested HTML entity name.
opaque representation of the abstract syntax tree (AST)
void setStripIndentAmount(size_t amount) override
void endFontClass() override
void writeLineNumber(const QCString &, const QCString &, const QCString &, int, bool) override
void setSourceFileName(const QCString &sourceFileName)
void setRelativePath(const QCString &path)
void startFontClass(const QCString &) override
void endSpecialComment() override
void stripCodeComments(bool b) override
void startCodeFragment(const QCString &style) override
size_t m_stripIndentAmount
void startCodeLine(int) override
LatexCodeGenerator(TextStream *t, const QCString &relPath, const QCString &sourceFile)
void startSpecialComment() override
void endCodeFragment(const QCString &style) override
QCString m_sourceFileName
void codify(const QCString &text) override
void endCodeLine() override
void writeCodeLink(CodeSymbolType type, const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name, const QCString &tooltip) override
void endMemberItem(MemberItemType) override
void addCodeGen(OutputCodeList &list) override
void endIndexKey() override
void endInlineMemberDoc() override
void startProjectNumber() override
void endPageRef(const QCString &, const QCString &) override
void endSection(const QCString &, SectionType) override
void startIndexSection(IndexSection) override
void endParameterList() override
void endMemberDescription() override
std::unique_ptr< OutputCodeList > m_codeList
void endDirDepGraph(DotDirDeps &g) override
void endDescTable() override
void startParameterType(bool, const QCString &) override
void startMemberGroup() override
void endInlineHeader() override
void endGroupHeader(int) override
void startMemberDoc(const QCString &, const QCString &, const QCString &, const QCString &, int, int, bool) override
void writeChar(char c) override
void endDescTableInit() override
void startParameterName(bool) override
void endMemberTemplateParams(const QCString &, const QCString &) override
void endParameterType() override
void startPageRef() override
void writeInheritedSectionTitle(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
void endLabels() override
void startParagraph(const QCString &classDef) override
void endIndexSection(IndexSection) override
void startConstraintType() override
void startClassDiagram() override
void endInlineMemberType() override
void startDescTableTitle() override
void startSection(const QCString &, const QCString &, SectionType) override
void writeString(const QCString &text) override
void endInclDepGraph(DotInclDepGraph &) override
void writeNonBreakableSpace(int) override
void startMemberGroupDocs() override
void endDescTableTitle() override
void startInclDepGraph() override
void lastIndexPage() override
void endExamples() override
void endMemberGroupHeader() override
void docify(const QCString &text) override
void startAnonTypeScope(int) override
void endPlainFile() override
void startDoxyAnchor(const QCString &, const QCString &, const QCString &, const QCString &, const QCString &) override
static void writeFooterFile(TextStream &t)
void startParameterList(bool) override
void endMemberDoc(bool) override
void endConstraintType() override
void startDescTableRow() override
void endAnonTypeScope(int) override
void startMemberHeader(const QCString &, int) override
void endConstraintList() override
void startDotGraph() override
void endParameterExtra(bool last, bool one, bool bracket) override
void endDescTableData() override
void writeLabel(const QCString &l, bool isLast) override
void startTextLink(const QCString &, const QCString &) override
void startConstraintList(const QCString &) override
void startGroupCollaboration() override
void startLabels() override
static void writeStyleSheetFile(TextStream &t)
void endTitleHead(const QCString &, const QCString &name) override
void startGroupHeader(int) override
void endMemberHeader() override
OutputType type() const override
void endIndexItem(const QCString &ref, const QCString &file) override
void startDescTable(const QCString &title, const bool hasInits) override
void endConstraintDocs() override
void startIndexKey() override
void writeDoc(const IDocNodeAST *node, const Definition *ctx, const MemberDef *, int id) override
void startConstraintParam() override
void lineBreak(const QCString &style=QCString()) override
void endInlineMemberName() override
void startMemberTemplateParams() override
void startInlineMemberType() override
void startInlineMemberDoc() override
void writeAnchor(const QCString &fileName, const QCString &name) override
void startCallGraph() override
void endMemberList() override
void startExamples() override
LatexGenerator & operator=(const LatexGenerator &)
void startDirDepGraph() override
void endTextLink() override
void writeStartAnnoItem(const QCString &type, const QCString &file, const QCString &path, const QCString &name) override
void startMemberList() override
void startDescTableData() override
void endDescTableRow() override
void startConstraintDocs() override
void endMemberGroupDocs() override
void endClassDiagram(const ClassDiagram &, const QCString &, const QCString &) override
void startDescTableInit() override
void endMemberDocSimple(bool) override
void addIndexItem(const QCString &, const QCString &) override
void endParameterName() override
void endIndexValue(const QCString &, bool) override
void writeObjectLink(const QCString &ref, const QCString &file, const QCString &anchor, const QCString &name) override
void startMemberDocSimple(bool) override
void startPlainFile(const QCString &name) override
void exceptionEntry(const QCString &, bool) override
void endCallGraph(DotCallGraph &) override
void endGroupCollaboration(DotGroupCollaboration &g) override
void startIndexItem(const QCString &ref, const QCString &file) override
void writeLocalToc(const SectionRefs &sr, const LocalToc <) override
void startFile(const QCString &name, const QCString &manName, const QCString &title, int id, int hierarchyLevel) override
void startTitleHead(const QCString &) override
void startInlineHeader() override
void endConstraintParam() override
void endDotGraph(DotClassGraph &) override
void writePageLink(const QCString &, bool) override
void startParameterExtra() override
LatexCodeGenerator * m_codeGen
void endMemberGroup(bool) override
void startMemberDescription(const QCString &, const QCString &, bool) override
void startMemberItem(const QCString &, MemberItemType, const QCString &) override
static void writeHeaderFile(TextStream &t)
void endParagraph() override
void addLabel(const QCString &, const QCString &) override
void writeStyleInfo(int part) override
void endDoxyAnchor(const QCString &, const QCString &) override
void startIndexValue(bool) override
void startInlineMemberName() override
void startMemberGroupHeader(bool) override
bool m_templateMemberItem
bool isLatexEnabled() const
A model of a class/file/namespace member symbol.
static ModuleManager & instance()
Class representing a list of different code generators.
void add(OutputCodeIntfPtr &&p)
Abstract interface for output generators.
QCString fileName() const
This is an alternative implementation of QCString.
QCString & prepend(const char *s)
size_t length() const
Returns the length of the string, not counting the 0-terminator.
bool isEmpty() const
Returns TRUE iff the string is empty.
const std::string & str() const
QCString & sprintf(const char *format,...)
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
static ResourceMgr & instance()
Returns the one and only instance of this class.
QCString getAsString(const QCString &name) const
Gets the resource data as a C string.
class that represents a list of constant references to sections.
static constexpr int Section
static constexpr int Subsection
static constexpr int Subsubsection
static constexpr int Page
static constexpr int Paragraph
static constexpr int Subsubparagraph
static constexpr int Subparagraph
Text streaming class that buffers data.
std::string str() const
Return the contents of the buffer as a std::string object.
virtual QCString trInheritedFrom(const QCString &members, const QCString &what)=0
virtual QCString trEnumerationValues()=0
virtual QCString trCompoundMembers()=0
virtual QCString trExamples()=0
#define Config_getInt(name)
#define Config_getList(name)
#define Config_getEnumAsString(name)
#define Config_getBool(name)
#define Config_getString(name)
#define Config_getEnum(name)
std::vector< std::string > StringVector
QCString dateToString(DateTimeType includeTime)
Returns the current date, when includeTime is set also the time is provided.
static constexpr auto hex
static QCString objectLinkToString(const QCString &, const QCString &f, const QCString &anchor, const QCString &text)
bool insideTable(const DocNodeVariant *n)
static void writeDefaultStyleSheet(TextStream &t)
@ isNamespaceDocumentation
Translator * theTranslator
static QCString latex_batchmode()
QCString latexEscapePDFString(const QCString &s)
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
static QCString makeIndex()
QCString latexFilterURL(const QCString &s)
static void writeLatexMakefile()
static QCString substituteLatexKeywords(const QCString &str, const QCString &title)
static const SelectionMarkerInfo latexMarkerInfo
static QCString extraLatexStyleSheet()
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline)
static void processEntity(TextStream &t, bool pdfHyperlinks, const char *strForm, const char *strRepl)
static void writeMakeBat()
static void writeDefaultStyleSheet(TextStream &t)
void writeExtraLatexPackages(TextStream &t)
QCString latexEscapeIndexChars(const QCString &s)
static QCString objectLinkToString(const QCString &ref, const QCString &f, const QCString &anchor, const QCString &text, bool insideTabbing, bool disableLinks)
void writeLatexSpecialFormulaChars(TextStream &t)
QCString latexEscapeLabelName(const QCString &s)
QCString latexEscapePDFString(const QCString &s)
void filterLatexString(TextStream &t, const QCString &str, bool insideTabbing, bool insidePre, bool insideItem, bool insideTable, bool keepSpaces, const bool retainNewline=false)
#define LATEX_STYLE_EXTENSION
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces=FALSE)
QCString latexEscapeIndexChars(const QCString &s)
QCString latexEscapeLabelName(const QCString &s)
std::ofstream openOutputStream(const QCString &name, bool append=false)
const char * ghostScriptCommand()
OutputCodeDefer< LatexCodeGenerator > LatexCodeGeneratorDefer
Portable versions of functions that are platform dependent.
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
const char * qPrint(const char *s)
Various UTF8 related helper functions.
size_t updateColumnCount(const char *s, size_t col)
void checkBlocks(const QCString &s, const QCString fileName, const SelectionMarkerInfo &markerInfo)
QCString stripPath(const QCString &s)
QCString removeEmptyLines(const QCString &s)
QCString selectBlocks(const QCString &s, const SelectionBlockList &blockList, const SelectionMarkerInfo &markerInfo)
remove disabled blocks and all block markers from s and return the result as a string
QCString relativePathToRoot(const QCString &name)
void clearSubDirs(const Dir &d)
QCString fileToString(const QCString &name, bool filter, bool isSourceCode)
QCString stripExtensionGeneral(const QCString &fName, const QCString &ext)
void createSubDirs(const Dir &d)
bool checkExtension(const QCString &fName, const QCString &ext)
QCString substituteKeywords(const QCString &s, const KeywordSubstitutionList &keywords)
bool copyFile(const QCString &src, const QCString &dest)
Copies the contents of file with name src to the newly created file with name dest.
A bunch of utility functions.