Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doxygen-latex-cannot-create-pdf-when-using-param-tags #17

Open
nitindeshpande opened this issue Mar 21, 2019 · 10 comments
Open

doxygen-latex-cannot-create-pdf-when-using-param-tags #17

nitindeshpande opened this issue Mar 21, 2019 · 10 comments
Labels
duplicate This issue or pull request already exists

Comments

@nitindeshpande
Copy link

I am seeing a problem generating pdf from the Latex output generated by doxygen.
came across the thread below
https://stackoverflow.com/questions/54780072/doxygen-latex-cannot-create-pdf-when-using-param-tags

I tried using the tabu.sty from this repo but that did not help solve the problem
instead i see another error "missing \begin{document}"

I have tried using MikTex and TexLive.

Could you please advice how do fix the issue doxygen-latex-cannot-create-pdf-when-using-param-tags?

Regards

@vng
Copy link

vng commented May 31, 2019

Any progress on this? One more discussion about it here doxygen/doxygen#6769

@muzimuzhi
Copy link

I have skimmed the linked discussions. Using the following example, the tabular in my local output PDF looks alright.

Would you please provide a MWE (minimal working example, see how to prepare a MWE) to show the problem?


Source:

\documentclass{article}
\usepackage{longtable}
\usepackage{tabu}
\usepackage{ifthen}
\usepackage{lipsum}
\listfiles

% Copied from post https://stackoverflow.com/q/54780072/8590320
% Used by parameter lists
\newenvironment{DoxyParams}[2][]{%
    \tabulinesep=1mm%
    \par%
    \ifthenelse{\equal{#1}{}}%
      {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|}}% name + description
    {\ifthenelse{\equal{#1}{1}}%
      {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + name + desc
      {\begin{longtabu*}spread 0pt [l]{|X[-1,l]|X[-1,l]|X[-1,l]|X[-1,l]|}}% in/out + type + name + desc
    }
    \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
    \hline%
    \endfirsthead%
    \multicolumn{2}{l}{\hspace{-6pt}\bfseries\fontseries{bc}\selectfont\color{darkgray} #2}\\[1ex]%
    \hline%
    \endhead%
}{%
    \end{longtabu*}%
    \vspace{6pt}%
}

\begin{document}
\begin{DoxyParams}{Parameter}
content & \lipsum[1] \\ \hline
\end{DoxyParams}
\end{document}

Output:
image

Version info (excerpted from the first line and very ending of the .log file):

pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019
 *File List*
 article.cls    2018/09/03 v1.4i Standard LaTeX document class
  size10.clo    2018/09/03 v1.4i Standard LaTeX file (size option)
longtable.sty    2014/10/28 v4.11 Multi-page Table package (DPC)+ FMi change
    tabu.sty    2019/01/11 v2.9 - flexible LaTeX tabulars (FC+tabu-fixed)
   array.sty    2018/12/30 v2.4k Tabular extension package (FMi)
varwidth.sty    2009/03/30 ver 0.92;  Variable-width minipages
  ifthen.sty    2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
  lipsum.sty    2019/01/02 v2.2 150 paragraphs of Lorem Ipsum dummy text
   expl3.sty    2019-05-09 L3 programming layer (loader) 
expl3-code.tex    2019-05-09 L3 programming layer 
l3pdfmode.def    2019-04-06 v L3 Experimental driver: PDF mode
  xparse.sty    2019-05-03 L3 Experimental document command parser
  lipsum.ltd
 ***********

@vng
Copy link

vng commented Jun 1, 2019

Example:

\hypertarget{class_foo}{}\section{Foo Class Reference}
\label{class_foo}\index{Foo@{Foo}}


\mbox{\hyperlink{class_foo}{Foo}} class.  




{\ttfamily \#include $<$foo.\+hpp$>$}

\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{class_foo_a70facd2c267fd7f732fca29274f86f86}{foo}} (int bar)
\begin{DoxyCompactList}\small\item\em \mbox{\hyperlink{class_foo}{Foo}} function. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
\mbox{\hyperlink{class_foo}{Foo}} class. 

\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_foo_a70facd2c267fd7f732fca29274f86f86}\label{class_foo_a70facd2c267fd7f732fca29274f86f86}} 
\index{Foo@{Foo}!foo@{foo}}
\index{foo@{foo}!Foo@{Foo}}
\subsubsection{\texorpdfstring{foo()}{foo()}}
{\footnotesize\ttfamily void Foo\+::foo (\begin{DoxyParamCaption}\item[{int}]{bar }\end{DoxyParamCaption})}



\mbox{\hyperlink{class_foo}{Foo}} function. 


\begin{DoxyParams}{Parameters}
{\em bar} & Input var \\
\hline
\end{DoxyParams}


The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
foo.\+hpp\end{DoxyCompactItemize}

Stripped log:

This is pdfTeX, Version 3.14159265-2.6-1.40.20 (MiKTeX 2.9.7000) (preloaded format=pdflatex 2019.5.30)  1 JUN 2019 11:16

Package: tabu 2019/01/11 v2.9 - flexible LaTeX tabulars (FC+tabu-fixed)

! Missing } inserted.
<inserted text> 
                }
l.37 \end{DoxyParams}

@muzimuzhi
Copy link

The example you provided is not complete. A complete example normally begins from \documentclass and ends with \end{document}, and can be compiled by itself. Moreover, the complete example should use as few as user defined commands and/or environments, or provide their definitions (for example, command \+ and enviroment DoxyParamCaption in your case).

More detailed guidelines about how to prepare a qualified MWE can be found from the link I have posted in #17 (comment).

@vng
Copy link

vng commented Jun 2, 2019

latex.zip

Not a minimal, but complete example. Start with refman.tex

@muzimuzhi
Copy link

A MWE simplified from your uploaded example. Currently I am not able to fix the problem, but I will try.

\documentclass{article}
\usepackage{xcolor}
%% Uncomment "xcolor" line then error "Missing } inserted" occurs.
%% Loading "color" instead of "xcolor" raises the same error.
\usepackage{tabu}

\begin{document}
% alright
\begin{tabu}{X}
  bar
\end{tabu}

% alright
\begin{tabu} spread 100pt {l}
  zz
\end{tabu}

% error
\begin{tabu} spread 100pt {X}
  bar
\end{tabu}
\end{document}

@muzimuzhi
Copy link

Hope it is not too late to find that this issue is a duplicate of #1.

Also, from the latest commit (e0ee3dd), this package is marked as unmaintained (by LaTeX Project Team) until

a new maintainer will eventually take over the package support.

@FrankMittelbach
Copy link
Contributor

Also, from the latest commit (e0ee3dd), this package is marked as unmaintained (by LaTeX Project Team) until

Actually the repro said so from day one.

It isn't our package and it was made in a way that went below any supported interface. All we did with this repro was to try fixing it to the point that it didn't die in all circumstances. But as it turned out fixing other bugs was too compicated without a major rewrite (which we can't do). So all I did in the latest commit was to make this even more prominent, because it seemed that people had (understandably) too much hope that we could resolve the remaining issues fast.

@FrankMittelbach FrankMittelbach added the duplicate This issue or pull request already exists label Jun 13, 2019
@muzimuzhi
Copy link

@vng
Using the MWE I posted in #17 (comment) and the latest version of tabu.sty in this repo, the Missing } inserted error disappears. It is welcome that you check this in your actual and more complicated example.

The related change is made in commit 4de1453 (denoted in commit message by fixed (not fully understood yet) test files --- using the pull request data) and first proposed in push request #14.

If the latest version causes other problems (this may happen), new issues can be opened and new MWEs can be prepared.

@vng
Copy link

vng commented Jun 18, 2019

@muzimuzhi Well, when I manually replaced tabu.sty in a MiKTeX installation package, the sample works fine now ..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

4 participants