fpdoc link tags do not resolve correctly
Original Reporter info from Mantis: ggeldenhuys
-
Reporter name: Graeme Geldenhuys
Original Reporter info from Mantis: ggeldenhuys
- Reporter name: Graeme Geldenhuys
Description:
Op 2010-08-10 14:37, Michael Van Canneyt het geskryf:
In one package, &LtPos;unit_name>.&LtPos;identifier> should be enough in the description text.
In 'short' tags, however, something goes wrong when creating TOC pages that
use this tag, and the resolving goes wrong; so there
#&LtPos;package_name>.&LtPos;unit_name>.&LtPos;identifier>
is needed.
I can confirm that this bug occurs in the &LtPos;descr> tag as well, and happens
in both the New IPF and LaTeX output writers. So it's not an IPF output
writer issue. When I tested with IPF and LaTeX output, no TOC pages are generated - like in the case of HTML output.
------------[ fpg_main.xml ]-------------------------------
...
&LtPos;element name="fpgColorToRGB">
<short>Convert a color to RGB values of that color</short>
<descr><printshort id="fpgColorToRGB"/>. Not all <link
id="fpg_base.TfpgColor">TfpgColor&LtPos;/link> values are in RGB format. For
example you are "named" colors too. eg: clWindowBackground&LtPos;/descr>
&LtPos;/element>
...
--------------------------------------------------
results in the following latex output.
--------------[ fpgui.latex ]-----------------------
...
% fpgColorToRGB
\subsection{fpgColorToRGB}
\label{fpgui:fpgmain:fpgcolortorgb}
\index{fpgColorToRGB}
\begin{FPCList}
\Synopsis
Convert a color to RGB values of that color\Declaration
\begin{verbatim}
function fpgColorToRGB(col: TfpgColor) : TfpgColor
\end{verbatim}
\Visibility
default
\Description
Convert a color to RGB values of that color. Not all TfpgColor
(\pageref{fpgui:fpgmain}) values are in RGB format. For example you are
"named" colors too. eg: clWindowBackground\end{FPCList}
% fpgDeleteFirstMessage
...
-------------------------------------------------------
As you can see the \pageref is trying to referencing TfpgColor in
fpgui.fpgmain when in fact it is defined in fpg_base.pas
Adding the '#fpgui.' package reference to the front of the link in the XML file, results in correct Latex \pageref link. See below:
----------------------------------------------------
....
% fpgColorToRGB
\subsection{fpgColorToRGB}
\label{fpgui:fpgmain:fpgcolortorgb}
\index{fpgColorToRGB}
\begin{FPCList}
\Synopsis
Convert a color to RGB values of that color\Declaration
\begin{verbatim}
function fpgColorToRGB(col: TfpgColor) : TfpgColor
\end{verbatim}
\Visibility
default
\Description
Convert a color to RGB values of that color. Not all TfpgColor
(\pageref{fpgui:fpgbase:tfpgcolor}) values are in RGB format. For example
you are "named" colors too. eg: clWindowBackground\end{FPCList}
% fpgDeleteFirstMessage
....
----------------------------------------------------
Mantis conversion info:
- Mantis ID: 17146
- OS: Ubuntu Linux
- OS Build: 10.04
- Platform: x86_64
- Version: 2.5.1
- Fixed in version: 2.4.4
- Fixed in revision: 16365 (#605d9b5e)