Figures

MicTie
Posts: 3
Joined: Mon Dec 07, 2020 12:57 pm

Figures

Post by MicTie » Mon Dec 07, 2020 2:03 pm

Hi,
is there a simple way the replace the word 'Figure' by 'Image'?

My project only contains images (and no tables), so I prefer to read something like 'Image 2' instead of 'Figure 2' when I convert to PDF.

My typical data-structure:
<section> <fig> <title> xxx</title><image href ..../></fig> </section>

Thanks!

julien_lacour
Posts: 170
Joined: Wed Oct 16, 2019 3:47 pm

Re: Figures

Post by julien_lacour » Mon Dec 07, 2020 4:35 pm

Hello,

If you want to publish your output in PDF using CSS, you can use the following CSS:

Code: Select all

*[class ~= "fig--title-label"] {
    display: none;
}

*[class ~= "topic/fig"] > [class ~= "topic/title"]::before {
    display: inline;
    content: "Image " counter(figcount) "" ": ";
}
If you want to do this in another output on in Author mode, could you add details to this request?

Regards,
Julien

MicTie
Posts: 3
Joined: Mon Dec 07, 2020 12:57 pm

Re: Figures

Post by MicTie » Tue Dec 08, 2020 5:40 am

Thanks for your reply!
Actually I want to use Miramo as it offers a very easy customisation of the generated PDF output.

How can this be accomplished in Author-Mode?

On a wider view:
Would it also be possible to separate this 'label' based on contents, by using some attribute?
Eg.: Table 1, Image 1, Diagram 1, Formular 1 ....

corinna
Posts: 1
Joined: Tue Dec 08, 2020 1:03 pm

Re: Figures

Post by corinna » Tue Dec 08, 2020 2:57 pm

Good day MicTie!

I am Corinna from Datazone Miramo, stepping in to answer this one as it seems to be a Miramo question.

By default, the 'figureTitle' ParaDef ListLabel is configured to reference the 'lang-figure' language variable, which is set to 'Figure' for English publications (different values will be automatically swapped in depending on the DITA content xml:language context). Here's a screenshot of the figureTitle <ParaDef> 'ListLabel' dialog to illustrate this:

image.png
image.png (25.45 KiB) Viewed 315 times

To change 'Figure' to 'Image' you can do either of the following:
  • Edit the MiramoPDF DITA-OT plugin language configuration file/s to change the 'lang-figure' text to 'Image' in all the languages you expect to publish in.
  • Edit the label text in the ListLabel dialog to replace language variable by the word 'Image' (not recommended unless you're sure you will only ever publish in English
See Chapter 6 - Multilingual publishing in the Miramo DITA-OT Getting Started Guide for detailed information on customizing language strings.

See also the section on 'Controlling formatting using DITA @outputclass values' for information on using @outputclass values to override the default formatting - for example:

Code: Select all

<title outputclass="mmpdf:paraDef:diagramTitle">this is a diagram</title
... would apply a 'diagramTitle' ParaDef to the given title paragraph - the 'diagramTitle' ParaDef can be configured as required in the MFD template, eg to have the word 'Diagram' in the ParaDef ListLabel..

I do hope that answers your question, if you need further help please reach out either here or to support@datazone.com.

Best regards,
... Corinna

MicTie
Posts: 3
Joined: Mon Dec 07, 2020 12:57 pm

Re: Figures

Post by MicTie » Tue Dec 08, 2020 5:05 pm

Dear Corinna,
thank you for your very detailed reply!

This was exactly what I was looking for

Best regards
Michael

Post Reply