:ini:`HTML_OUTPUT` The output will be written here
:ini:`TAGFILES` Used to discover what base URL to prepend to
external references
-:ini:`IMAGE_PATHS` Used to discover where Doxygen gets the image
- files
:ini:`HTML_EXTRA_STYLESHEET` List of CSS files to include. Relative paths
are also searched relative to the
``dox2html5.py`` script. See below for more
See the `CSS files`_ section below for more information about customizing the
CSS files.
-`Text content`_
-===============
+`Content`_
+==========
Brief and detailed description is parsed as-is with the following
modifications:
</li>
</ul>
+To match the stock HTML output, images that are marked with ``html`` target are
+used. If image name is present, the image is rendered as a figure with caption.
+
+.. block-warning:: Doxygen patches
+
+ Current stable release of Doxygen has broken copying of images for the XML
+ output. You need to apply :gh:`doxygen/doxygen#629` in order to fix that.
+
`Pages, sections and table of contents`_
========================================
elif i.tag == 'image':
has_block_elements = True
name = i.attrib['name']
- path = None
if i.attrib['type'] == 'html':
- # Discover the real path of the image
- for candidate in state.doxyfile['IMAGE_PATH']:
- path = os.path.join(state.basedir, candidate, name)
- if os.path.exists(path):
- state.images += [path]
- break
+ path = os.path.join(state.basedir, state.doxyfile['OUTPUT_DIRECTORY'], state.doxyfile['XML_OUTPUT'], name)
+ if os.path.exists(path):
+ state.images += [path]
else:
- logging.warning("Image {} was not found in any IMAGE_PATH".format(name))
+ logging.warning("Image {} was not found in XML_OUTPUT".format(name))
- alt = i.text
- if not alt:
- alt = 'Image'
- logging.warning("Image {} has no alt text".format(name))
-
- out.parsed += '<img class="m-image" src="{}" alt="{}" />'.format(name, html.escape(alt))
+ caption = i.text
+ if caption:
+ out.parsed += '<figure class="m-figure"><img src="{}" alt="Image" /><figcaption>{}</figcaption></figure>'.format(name, html.escape(caption))
+ else:
+ out.parsed += '<img class="m-image" src="{}" alt="Image" />'.format(name)
# Either block or inline because DOXYGEN!!! WHAT!!!
elif i.tag == 'formula':
'OUTPUT_DIRECTORY': [''],
'XML_OUTPUT': ['xml'],
'HTML_OUTPUT': ['html'],
- 'IMAGE_PATH': [],
'HTML_EXTRA_STYLESHEET': [
'https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600',
'../css/m-dark+doxygen.compiled.css'],
# List values that we want. Drop empty lines.
for i in ['TAGFILES',
- 'IMAGE_PATH',
'HTML_EXTRA_STYLESHEET',
'HTML_EXTRA_FILES']:
if i in config:
<h1>
My Project
</h1>
-<img class="m-image" src="tiny.png" alt="Alt text" />
+<p>Image:</p><img class="m-image" src="tiny.png" alt="Image" /><p>Figure:</p><figure class="m-figure"><img src="tiny.png" alt="Image" /><figcaption>Caption</figcaption></figure>
</div>
</div>
</div>
/** @mainpage
-@image html tiny.png Alt text
+Image:
+
+@image html tiny.png
+
+Figure:
+
+@image html tiny.png Caption
*/
/** @page warnings Images that produce warnings
-@image html nonexistent.png Image that doesn't exist.
-
-Image without alt text:
+Image that doesn't exist:
-@image html tiny.png
+@image html nonexistent.png
*/
<h1>
Images that produce warnings
</h1>
-<img class="m-image" src="nonexistent.png" alt="Image that doesn't exist." /><p>Image without alt text:</p><img class="m-image" src="tiny.png" alt="Image" />
+<p>Image that doesn't exist:</p><img class="m-image" src="nonexistent.png" alt="Image" />
</div>
</div>
</div>
'HTML_EXTRA_FILES': ['css', 'another.png', 'hello'],
'HTML_EXTRA_STYLESHEET': ['a.css', 'b.css'],
'HTML_OUTPUT': 'html',
- 'IMAGE_PATH': [],
'M_CLASS_TREE_EXPAND_LEVELS': 1,
'M_EXPAND_INNER_TYPES': 0,
'M_FILE_TREE_EXPAND_LEVELS': 1,