Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Doxygen: How to embed images on main page for all output formats?

I am using Doxygen 1.8.6 on Ubuntu 14.04 to generate API documentation from C/C++ header files.

I have a main page in markdown format (file mainpage.md) and want to embed an image (file logo.png) into that page.

Currently, I have that working for HTML output, with the following directory structure:

    work
    ├── mainpage.md
    ├── resources
    │   └── logo.png
    └── html
        └── index.html

The way the markdown in mainpage.md embeds the image, is:

![The Logo](../resources/logo.png)

This works, but it depends on the fact that the HTML output directory is one level down from the work directory, and (fwiw) that is not in sync with the location of the mainpage.md file containing that reference.

I have to admit that I did not try out what happens with other output formats (intended formats are: HTML, PDF via LaTex, man pages, Eclipse help), but they may work differently w.r.t. their output directory and the reference to the image file.

My questions are:

  1. Do the above mentioned other output formats work with this markdown reference?

  2. Is there a more output format agnostic way for referencing the image file from the main page markdown?

Andy

like image 803
Andreas Maier Avatar asked Jun 16 '15 09:06

Andreas Maier


1 Answers

Unfortunately you need multiple image commands to make this work. Latex will require a pdf compatible image type, web browsers usually require a different image type, etc., so the image command must be issued multiple times to specify the image file for each format

\image html logo.png
\image latex logo.eps

The following formats are supported: html, latex, docbook and rtf.

You can use shorter paths if you put your images in an image folder and specify it's location in your configuration:

IMAGE_PATH     = my_image_dir
like image 164
Denise Skidmore Avatar answered Oct 21 '22 06:10

Denise Skidmore