Fix broken TOC of PDFs if section includes an image

If someone adds an image to a section it will be added to the sidebar
TOC of a PDF, too. A PDF viewer will show the "width and height"
data instead of an image. So we need to filter out images for this with
the optional "short title" of latex sections.
This commit is contained in:
André Klitzing
2015-09-16 12:08:12 +02:00
parent c100089334
commit 62c49763f8
5 changed files with 49 additions and 2 deletions

View File

@@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
master_doc = 'index'
rst_epilog = '''
.. |picture| image:: pic.png
:width: 15pt
:height: 15pt
:alt: alternative_text
'''

View File

@@ -0,0 +1,18 @@
test-image-in-section
=====================
this is dummy content
|picture| Test section
----------------------
blah blah blah
Another section
---------------
another blah
Other [blah] |picture| section
------------------------------
other blah

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B