include/exclude comment content - based on html vs. latex ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

include/exclude comment content - based on html vs. latex ?

Monique Semp
Hello, Doxygen-users,
 
In Doxygen 1.8.10 (on Windows), is there any way to have different portions of the Doxygen comment block appear depending on which output is generated?
 
I was producing only HTML, and so I had nice tables of thumbnail images that the user can click to open a full-size page of the image. But now that I’ve added PDF (well, Doxygen->LaTeX->PDF), verbiage such as “click the thumbnail” doesn’t make sense. I’m using the full-size image for the “\image latex” instead of what I use for the html output (an <href> on the thumbnail that resolves to the full-size image).
 
As well, there are places where I’d like to simply refer people to a named section in the PDF, but in the HTML include an actual image.
 
I know that I could use separate Doxyfile config files and the ENABLED_SECTIONS to selectively enable parts of the comments based on their output (for example; __INCLUDE_PDF-ONLY_CONTENT__ and __INCLUDE_HTML-ONLY_CONTENT__), but then that’s yet another configuration file to keep in sync. So I’m hoping for some smarter way to get Doxygen comments into only one output format.
 
I do know about the \htmlonly and \latexonly commands, but then I really have to know how to deal with low-level LaTeX coding, which I’d prefer Doxygen took care of.
 
Thanks for any suggestions,
-Monique
 

------------------------------------------------------------------------------

_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: include/exclude comment content - based on html vs. latex ?

Robert Heller
At Mon, 22 Aug 2016 14:57:32 -0700 Monique Semp <[hidden email]> wrote:

>
>
>
> Hello, Doxygen-users,
>
> In Doxygen 1.8.10 (on Windows), is there any way to have different portions
> of the Doxygen comment block appear depending on which output is generated?

>
> I was producing only HTML, and so I had nice tables of thumbnail images that
> the user can click to open a full-size page of the image. But now that
> I've added PDF (well, Doxygen->LaTeX->PDF), verbiage such as "click the
> thumbnail" doesn't make sense. I'm using the full-size image for the
> "\image latex" instead of what I use for the html output (an <href> on
> the thumbnail that resolves to the full-size image).
>
> As well, there are places where I'd like to simply refer people to a named
> section in the PDF, but in the HTML include an actual image.

You would just use \ref.  For either HTML or LaTeX.

>
> I know that I could use separate Doxyfile config files and the
> ENABLED_SECTIONS to selectively enable parts of the comments based on their
> output (for example; __INCLUDE_PDF-ONLY_CONTENT__ and
> __INCLUDE_HTML-ONLY_CONTENT__), but then that's yet another configuration
> file to keep in sync. So I'm hoping for some smarter way to get Doxygen
> comments into only one output format.
>
> I do know about the \htmlonly and \latexonly commands, but then I really
> have to know how to deal with low-level LaTeX coding, which I'd prefer
> Doxygen took care of.

Doxygen will *still* take of it.  You don't really have to deal with low-level
LaTeX (or even HTML) coding, although there really isn't anything there
anyway.   The \htmlonly and \latexonly don't mean those sections contain
either HTML or LaTeX, only that those sections should only be processed for
those specific output formats.  You would still use normal Doxygen commands.  
For the most part, you don't actually use any low-level LaTeX coding -- in a
sense, there isn't any such thing as "low-level LaTeX coding", since *LaTeX*
is pretty much a high level thing.

>
> Thanks for any suggestions,
> -Monique
> MIME-Version: 1.0
>
> ------------------------------------------------------------------------------
>
> MIME-Version: 1.0
>
> _______________________________________________
> Doxygen-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/doxygen-users
>
>                                                                                        

--
Robert Heller             -- 978-544-6933
Deepwoods Software        -- Custom Software Services
http://www.deepsoft.com/  -- Linux Administration Services
[hidden email]       -- Webhosting Services
                                 

------------------------------------------------------------------------------
_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users
Reply | Threaded
Open this post in threaded view
|

Re: include/exclude comment content - based on html vs.latex ?

Monique Semp
In reply to this post by Monique Semp

>> As well, there are places where I'd like to simply refer people to a named section in the PDF, but in the HTML include an actual image.

>

> You would just use \ref.  For either HTML or LaTeX.

 

No; what I meant was to use the equivalent of \ref to a .page file for the LaTeX output (which I've figured out how to do, with the nameref package), but in the HTML output, have the result of using the \image command to include the image.

 

<snip>

 

>> I do know about the \htmlonly and \latexonly commands, but then I really have to know how to deal with low-level LaTeX coding, which I'd prefer Doxygen took care of.

>

> Doxygen will *still* take of it.  You don't really have to deal with

> low-level LaTeX (or even HTML) coding, although there really isn't anything there

> anyway.   The \htmlonly and \latexonly don't mean those sections contain

> either HTML or LaTeX, only that those sections should only be

> processed for those specific output formats.  You would still use normal Doxygen commands.

> For the most part, you don't actually use any low-level LaTeX coding

> -- in a sense, there isn't any such thing as "low-level LaTeX coding",

> since *LaTeX* is pretty much a high level thing.

 

It would be lovely if things worked this way. But my quick trial didn't work at all. When I surrounded Doxygen comments (in a .page file, so perhaps it is different in a regular .c file's comments; I didn't try that) with \htmlonly and \endhtmlonly, all the Doxygen commands were simply output as text. And given the Doxygen documentation's description of this command (https://www.stack.nl/~dimitri/doxygen/manual/commands.html#cmdhtmlonly), "Starts a block of text that will be verbatim included in the generated HTML documentation only", I'm not surprised.

 

Another off-list reply said that they used sed scripting to manage multiple Doxyfile configuration files and then a preprocessing mechanism similar to what I'd described (using the ENABLED_SECTIONS for things such as __INCLUDE_PDF-ONLY__).

 

So I guess that's what I'll be doing.

 

Thanks for the help,

-Monique


------------------------------------------------------------------------------

_______________________________________________
Doxygen-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/doxygen-users