From ee0e15c57a8ad7616b3f431ad3cdee5458cb1074 Mon Sep 17 00:00:00 2001 From: kthoden Date: Fri, 29 Mar 2019 15:47:08 +0100 Subject: [PATCH] Short caption --- eoatex2imxml.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eoatex2imxml.py b/eoatex2imxml.py index 4319a0f..555ef55 100755 --- a/eoatex2imxml.py +++ b/eoatex2imxml.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 # -*- coding: utf-8; mode: python -*- -# Time-stamp: <2019-03-20 17:50:39 (kthoden)> +# Time-stamp: <2019-03-29 15:46:46 (kthoden)> """ Converts Latex files into a customized DocBook XML file. @@ -934,6 +934,9 @@ def cleanup(): Figurenumber = 1 xmlFigures = xmlChapter.xpath(".//EOAfigure | .//EOAlsfigure") for xmlFigure in xmlFigures: + shortcaption = xmlFigure.find("shortcaption") + if shortcaption and shortcaption.text == "1": + shortcaption.tag = "temp" xmlAnchor = xmlFigure.find("anchor") # Check if Figure is in a numbered Chapter # Otherwise just put the Number of the figure