From 647e2ba0f6a927f22340821fbab7b92058c3ce4f Mon Sep 17 00:00:00 2001 From: albert-github Date: Sun, 10 Feb 2019 14:23:48 +0100 Subject: Section title runs into margin In the PDF version of the doxygen manual we see that for the `\image` command the chapter title the text runs into the margin (due to an unbreakable part). With this fix the problem is solved. (see also: https://tex.stackexchange.com/questions/474055/section-title-running-into-margin and , for the ifstar part, https://tex.stackexchange.com/questions/376375/using-ifstar-to-define-a-star-variant) --- src/latexdocvisitor.cpp | 2 +- src/latexgen.cpp | 86 ++++++++++++++++++++++----------------------- templates/latex/doxygen.sty | 9 +++++ 3 files changed, 53 insertions(+), 44 deletions(-) diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index 463eedf..dd2da64 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -38,7 +38,7 @@ const int maxLevels=5; static const char *secLabels[maxLevels] = - { "section","subsection","subsubsection","paragraph","subparagraph" }; + { "doxysection","doxysubsection","doxysubsubsection","doxyparagraph","doxysubparagraph" }; static const char *getSectionName(int level) { diff --git a/src/latexgen.cpp b/src/latexgen.cpp index b860195..de20e15 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -913,39 +913,39 @@ void LatexGenerator::startIndexSection(IndexSections is) } break; case isMainPage: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Introduction}\n" break; //case isPackageIndex: - // if (compactLatex) t << "\\section"; else t << "\\chapter"; + // if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; // t << "{"; //Package Index}\n" // break; case isModuleIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Module Index}\n" break; case isDirIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Directory Index}\n" break; case isNamespaceIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Namespace Index}\" break; case isClassHierarchyIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Hierarchical Index}\n" break; case isCompoundIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Annotated Compound Index}\n" break; case isFileIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Annotated File Index}\n" break; case isPageIndex: - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Annotated Page Index}\n" break; case isModuleDocumentation: @@ -957,7 +957,7 @@ void LatexGenerator::startIndexSection(IndexSections is) { if (!gd->isReference()) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Module Documentation}\n"; found=TRUE; } @@ -973,7 +973,7 @@ void LatexGenerator::startIndexSection(IndexSections is) { if (dd->isLinkableInProject()) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Module Documentation}\n"; found=TRUE; } @@ -989,7 +989,7 @@ void LatexGenerator::startIndexSection(IndexSections is) { if (nd->isLinkableInProject()) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; // Namespace Documentation}\n": found=TRUE; } @@ -1008,7 +1008,7 @@ void LatexGenerator::startIndexSection(IndexSections is) !cd->isEmbeddedInOuterScope() ) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Compound Documentation}\n"; found=TRUE; } @@ -1030,7 +1030,7 @@ void LatexGenerator::startIndexSection(IndexSections is) { if (isFirst) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //File Documentation}\n"; isFirst=FALSE; break; @@ -1042,13 +1042,13 @@ void LatexGenerator::startIndexSection(IndexSections is) break; case isExampleDocumentation: { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Example Documentation}\n"; } break; case isPageDocumentation: { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{"; //Page Documentation}\n"; } break; @@ -1275,7 +1275,7 @@ void LatexGenerator::endIndexSection(IndexSections is) { if (!pd->getGroupDef() && !pd->isReference()) { - if (compactLatex) t << "\\section"; else t << "\\chapter"; + if (compactLatex) t << "\\doxysection"; else t << "\\chapter"; t << "{" << pd->title(); t << "}\n"; @@ -1515,11 +1515,11 @@ void LatexGenerator::startTitleHead(const char *fileName) } if (Config_getBool(COMPACT_LATEX)) { - t << "\\subsection{"; + t << "\\doxysubsection{"; } else { - t << "\\section{"; + t << "\\doxysection{"; } } @@ -1540,11 +1540,11 @@ void LatexGenerator::startTitle() { if (Config_getBool(COMPACT_LATEX)) { - t << "\\subsection{"; + t << "\\doxysubsection{"; } else { - t << "\\section{"; + t << "\\doxysection{"; } } @@ -1557,19 +1557,19 @@ void LatexGenerator::startGroupHeader(int extraIndentLevel) if (extraIndentLevel==3) { - t << "\\subparagraph*{"; + t << "\\doxysubparagraph*{"; } else if (extraIndentLevel==2) { - t << "\\paragraph{"; + t << "\\doxyparagraph{"; } else if (extraIndentLevel==1) { - t << "\\subsubsection{"; + t << "\\doxysubsubsection{"; } else // extraIndentLevel==0 { - t << "\\subsection{"; + t << "\\doxysubsection{"; } disableLinks=TRUE; } @@ -1584,11 +1584,11 @@ void LatexGenerator::startMemberHeader(const char *,int) { if (Config_getBool(COMPACT_LATEX)) { - t << "\\subsubsection*{"; + t << "\\doxysubsubsection*{"; } else { - t << "\\subsection*{"; + t << "\\doxysubsection*{"; } disableLinks=TRUE; } @@ -1637,7 +1637,7 @@ void LatexGenerator::startMemberDoc(const char *clname, } t << "}" << endl; } - static const char *levelLab[] = { "subsubsection","paragraph","subparagraph", "subparagraph" }; + static const char *levelLab[] = { "doxysubsubsection","doxyparagraph","doxysubparagraph", "doxysubparagraph" }; static bool compactLatex = Config_getBool(COMPACT_LATEX); static bool pdfHyperlinks = Config_getBool(PDF_HYPERLINKS); int level=0; @@ -1755,11 +1755,11 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect { switch(type) { - case SectionInfo::Page: t << "subsection"; break; - case SectionInfo::Section: t << "subsubsection"; break; - case SectionInfo::Subsection: t << "paragraph"; break; - case SectionInfo::Subsubsection: t << "subparagraph"; break; - case SectionInfo::Paragraph: t << "subparagraph"; break; + case SectionInfo::Page: t << "doxysubsection"; break; + case SectionInfo::Section: t << "doxysubsubsection"; break; + case SectionInfo::Subsection: t << "doxyparagraph"; break; + case SectionInfo::Subsubsection: t << "doxysubparagraph"; break; + case SectionInfo::Paragraph: t << "doxysubparagraph"; break; default: ASSERT(0); break; } t << "{"; @@ -1768,11 +1768,11 @@ void LatexGenerator::startSection(const char *lab,const char *,SectionInfo::Sect { switch(type) { - case SectionInfo::Page: t << "section"; break; - case SectionInfo::Section: t << "subsection"; break; - case SectionInfo::Subsection: t << "subsubsection"; break; - case SectionInfo::Subsubsection: t << "paragraph"; break; - case SectionInfo::Paragraph: t << "subparagraph"; break; + case SectionInfo::Page: t << "doxysection"; break; + case SectionInfo::Section: t << "doxysubsection"; break; + case SectionInfo::Subsection: t << "doxysubsubsection"; break; + case SectionInfo::Subsubsection: t << "doxyparagraph"; break; + case SectionInfo::Paragraph: t << "doxysubparagraph"; break; default: ASSERT(0); break; } t << "{"; @@ -1800,7 +1800,7 @@ void LatexGenerator::writeChar(char c) void LatexGenerator::startClassDiagram() { - //if (Config_getBool(COMPACT_LATEX)) t << "\\subsubsection"; else t << "\\subsection"; + //if (Config_getBool(COMPACT_LATEX)) t << "\\doxysubsubsection"; else t << "\\doxysubsection"; //t << "{"; } @@ -1994,11 +1994,11 @@ void LatexGenerator::startMemberGroupHeader(bool hasHeader) // changed back to rev 756 due to bug 660501 //if (Config_getBool(COMPACT_LATEX)) //{ - // t << "\\subparagraph*{"; + // t << "\\doxysubparagraph*{"; //} //else //{ - // t << "\\paragraph*{"; + // t << "\\doxyparagraph*{"; //} } @@ -2243,11 +2243,11 @@ void LatexGenerator::startInlineHeader() { if (Config_getBool(COMPACT_LATEX)) { - t << "\\paragraph*{"; + t << "\\doxyparagraph*{"; } else { - t << "\\subsubsection*{"; + t << "\\doxysubsubsection*{"; } } diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty index de16c7d..a05f1ca 100644 --- a/templates/latex/doxygen.sty +++ b/templates/latex/doxygen.sty @@ -545,6 +545,15 @@ % Version of hypertarget with correct landing location \newcommand{\Hypertarget}[1]{\Hy@raisedlink{\hypertarget{#1}{}}} +% possibility to have sections etc. be within the margins +\makeatletter +\newcommand{\doxysection}[1]{\@ifstar{\begingroup\sloppy\raggedright\section*{#1}\endgroup}{\begingroup\sloppy\raggedright\section{#1}\endgroup}} +\newcommand{\doxysubsection}[1]{\@ifstar{\begingroup\sloppy\raggedright\subsection*{#1}\endgroup}{\begingroup\sloppy\raggedright\subsection{#1}\endgroup}} +\newcommand{\doxysubsubsection}[1]{\@ifstar{\begingroup\sloppy\raggedright\subsubsection*{#1}\endgroup}{\begingroup\sloppy\raggedright\subsubsection{#1}\endgroup}} +\newcommand{\doxyparagraph}[1]{@ifstar{\begingroup\sloppy\raggedright\paragraph*{#1}\endgroup}{\begingroup\sloppy\raggedright\paragraph{#1}\endgroup}} +\newcommand{\doxysubparagraph}[1]{@ifstar{\begingroup\sloppy\raggedright\subparagraph*{#1}\endgroup}{\begingroup\sloppy\raggedright\subparagraph{#1}\endgroup}} +\makeatother + % Define caption that is also suitable in a table \makeatletter \def\doxyfigcaption{% -- cgit v0.12 From 7b12eb96f1d66a5243d26b2cf6d0915337544e63 Mon Sep 17 00:00:00 2001 From: albert-github Date: Tue, 19 Feb 2019 10:39:53 +0100 Subject: Bug 322353 - C variable argument list doesn't work in @param The `...` argument was not documented in case of inline parameter documentation, with `\param` it was possible to document the `...` argument. --- src/scanner.l | 1 + 1 file changed, 1 insertion(+) diff --git a/src/scanner.l b/src/scanner.l index 9b3d3f3..3d3c109 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -6987,6 +6987,7 @@ static void handleParametersCommentBlocks(ArgumentList *al) //printf(" Param %s docs=%s\n",a->name.data(),a->docs.data()); if (!a->docs.isEmpty()) { + if (!a->name && a->type == "...") a->name= "..."; int position=0; bool needsEntry; -- cgit v0.12 From d1dd7d6247f6e5eadebeec9f6d6d12fb9027bde3 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 22 Feb 2019 13:28:23 +0100 Subject: Latex code double minus goes to endash In case in code 2 consecutive minus signs are present they are shown as endash. using the same code as in the non code part solves the issue. Issue can e.g. be seen in cpp source code (with e.g. i--) and in the doxygen documentation in the paragraph "Comment blocks in VHDL" This is a regression in 1.8.15 --- src/util.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util.cpp b/src/util.cpp index b99753e..035bef3 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6856,6 +6856,7 @@ void filterLatexString(FTextStream &t,const char *str, case '%': t << "\\%"; break; case '#': t << "\\#"; break; case '$': t << "\\$"; break; + case '-': t << "-\\/"; break; case '^': (usedTableLevels()>0) ? t << "\\string^" : t << (char)c; break; case '~': (usedTableLevels()>0) ? t << "\\string~" : t << (char)c; break; case ' ': if (keepSpaces) t << "~"; else t << ' '; -- cgit v0.12 From 351d64c35502c64ff446458e8ad6892b3f22ead4 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 22 Feb 2019 13:40:09 +0100 Subject: Remove some doxygen warnings in internal documentation Generating the doxygen internal documentation gave some warning messages, these have been corrected. --- src/config.h | 2 ++ src/doxygen.md | 20 ++++++++++---------- src/emoji.cpp | 4 ++-- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/config.h b/src/config.h index 102774e..1b79b1e 100644 --- a/src/config.h +++ b/src/config.h @@ -65,6 +65,8 @@ namespace Config /*! Post processed the parsed data. Replaces raw string values by the actual values. * and replaces environment variables. * \param clearHeaderAndFooter set to TRUE when writing header and footer templates. + * \param compare signals if we in Doxyfile compare (`-x`) mode are or not. Influences + * setting of the default value. */ void postProcess(bool clearHeaderAndFooter, bool compare = FALSE); diff --git a/src/doxygen.md b/src/doxygen.md index 17144ec..7680a94 100644 --- a/src/doxygen.md +++ b/src/doxygen.md @@ -2,17 +2,17 @@ Doxygen Internals {#mainpage} ================= Introduction ------------- +============ This page provides a high-level overview of the internals of doxygen, with links to the relevant parts of the code. This document is intended for developers who want to work on doxygen. Users of doxygen are referred to the -[User Manual](http://www.doxygen.org/manual.html). +[User Manual](http://www.doxygen.nl/manual/index.html). The generic starting point of the application is of course the main() function. Configuration options ---------------------- +===================== Configuration file data is stored in singleton class Config and can be accessed using wrapper macros @@ -22,20 +22,20 @@ option. The format of the configuration file (options and types) is defined by the file `config.xml`. As part of the build process, -the python script `configgen.py` will create a file configoptions.cpp +the python script `configgen.py` will create a file `configoptions.cpp` from this, which serves as the input for the configuration file parser that is invoked using Config::parse(). The script `configgen.py` will also create the documentation for the configuration items, creating the file `config.doc`. Gathering Input files ---------------------- +===================== After the configuration is known, the input files are searched using searchInputFiles() and any tag files are read using readTagFile() Parsing Input files -------------------- +=================== The function parseFiles() takes care of parsing all files. It uses the ParserManager singleton factory to create a suitable parser object @@ -71,7 +71,7 @@ extracted like section labels, xref items, and formulas. Also Markdown markup is processed using processMarkdown() during this pass. Resolving relations -------------------- +=================== The Entry objects created and filled during parsing are stored on disk (to keep memory needs low). The name, parent/child relation, and @@ -98,7 +98,7 @@ Finally the data for members of classes, namespaces, and files is stored in the subclass MemberDef. Producing debug output ----------------------- +====================== Within doxygen there are a number of ways to obtain debug output. Besides the invasive method of putting print statements in the code there are a number of @@ -174,12 +174,12 @@ easy ways to get debug information. problem occurs. This makes it easier to select the file to be compiled in `lex` debug mode. Producing output ----------------- +================ TODO Topics TODO ------------ +=========== - Grouping of files in Model / Parser / Generator categories - Index files based on IndexIntf - HTML navigation diff --git a/src/emoji.cpp b/src/emoji.cpp index c332083..311f748 100644 --- a/src/emoji.cpp +++ b/src/emoji.cpp @@ -1578,7 +1578,7 @@ void EmojiEntityMapper::writeEmojiFile(QFile &file) /*! @brief Access routine to the unicode sequence for the Emoji entity * - * @param symb code of the requested Emoji entity returned by symbol2index() + * @param index code of the requested Emoji entity returned by symbol2index() * @return the unicode sequence of the Emoji entity, */ const char *EmojiEntityMapper::unicode(int index) const @@ -1588,7 +1588,7 @@ const char *EmojiEntityMapper::unicode(int index) const /*! @brief Access routine to the name of the Emoji entity * - * @param symb code of the requested Emoji entity returned by symbol2index() + * @param index code of the requested Emoji entity returned by symbol2index() * @return the name of the Emoji entity in GitHub format (i.e. :smile:) */ const char *EmojiEntityMapper::name(int index) const -- cgit v0.12 From f43b0bff1b1223f8a99c368b67e898853ff06f39 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 22 Feb 2019 14:04:52 +0100 Subject: Removed page restriction with `\anchor` command in documentation The `\anchor` command can used on other places as well. --- doc/commands.doc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/commands.doc b/doc/commands.doc index ec207f1..0e66c1d 100644 --- a/doc/commands.doc +++ b/doc/commands.doc @@ -1969,10 +1969,6 @@ Commands to create links This command places an invisible, named anchor into the documentation to which you can refer with the \ref cmdref "\\ref" command. - \note Anchors can currently only be put into a comment block - that is marked as a page (using \ref cmdpage "\\page") or mainpage - (\ref cmdmainpage "\\mainpage"). - \sa section \ref cmdref "\\ref".
-- cgit v0.12 From 1666897861c9acf8ef136022ad278b2fcf4eca65 Mon Sep 17 00:00:00 2001 From: albert-github Date: Sat, 23 Feb 2019 12:17:12 +0100 Subject: Indentation of paragraphs in LaTeX Looking in the documentation at e.g. the commands `\class` or `\image` we see that the start of some paragraph titles in LaTeX is a bit to the left of the normal indentation. Corrected the leftmargin setting (consistent with other settings). --- templates/latex/doxygen.sty | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/latex/doxygen.sty b/templates/latex/doxygen.sty index de16c7d..2d31cf3 100644 --- a/templates/latex/doxygen.sty +++ b/templates/latex/doxygen.sty @@ -308,7 +308,7 @@ \newenvironment{DoxyParagraph}[1]{% \begin{list}{}{% \settowidth{\labelwidth}{40pt}% - \setlength{\leftmargin}{\labelwidth}% + \setlength{\leftmargin}{\labelwidth+\labelsep}% \setlength{\parsep}{0pt}% \setlength{\itemsep}{-4pt}% \renewcommand{\makelabel}{\entrylabel}% -- cgit v0.12