questions about font and picture settings

alison
Posts: 6
Joined: Thu Sep 16, 2021 6:05 am

questions about font and picture settings

Post by alison » Thu Sep 16, 2021 6:23 am

Hi There:

I'm using Oxygen XML 20.1 and PDF output.
I have some questions about font and picture settings.

1. How to add a subscript to a picture? And can I set the subscript to be centered and modify the font size of the subscript?
2. When I call element P, how to set line break in the same paragraph?

Thanks! :D
Attachments
image.png
image.png (60.04 KiB) Viewed 210 times
image.png
image.png (60.04 KiB) Viewed 210 times

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

Re: questions about font and picture settings

Post by julien_lacour » Thu Sep 16, 2021 10:53 am

Hello,

Oxygen 20.1 has officially reached its end of support period since the release of Oxygen 23.0.
Also since Oxygen 21.0 we recommend the usage of PDF-HTML5&CSS transformation instead of PDF-XSL-FO.

Nevertheless, regarding both points, I can suggest few options:
  1. You can try to put your image into a figure element and add a title or a description element under it, then customize this element.
  2. You can try to ask on the DITA-OT users group to see if this is possible to break within a paragraph.
    I also give you a set of useful links that will help you customizing your PDF outputs:
    https://www.oxygenxml.com/doc/versions/ ... utput.html
    https://www.dita-ot.org/3.6/topics/pdf- ... aches.html
    https://www.dita-ot.org/3.6/topics/pdf- ... urces.html
Regards,
Julien

alison
Posts: 6
Joined: Thu Sep 16, 2021 6:05 am

Re: questions about font and picture settings

Post by alison » Thu Sep 16, 2021 11:45 am

Hi Julien,

Thank you so much for your suggestion!

May I know how to put the image into a figure element? I don’t seem to find this option. Do I need to upgrade the software version?

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

Re: questions about font and picture settings

Post by julien_lacour » Thu Sep 16, 2021 1:12 pm

Hello,

No, you don't need any upgrade, simply add the <fig> element as a parent of <image>.
http://docs.oasis-open.org/dita/dita/v1 ... g.html#fig

Regards,
Julien

alison
Posts: 6
Joined: Thu Sep 16, 2021 6:05 am

Re: questions about font and picture settings

Post by alison » Thu Sep 16, 2021 3:10 pm

Hi Julien,

Thank you!

Now that I've called the <fig> element, and then how do I add the image and subscript it?
image.png
image.png (114.08 KiB) Viewed 191 times

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

Re: questions about font and picture settings

Post by julien_lacour » Fri Sep 17, 2021 10:07 am

Hello,

Your XML source must look like the following (in Oxygen Text Mode - <desc> is optional if you just need the title):

Code: Select all

<fig id="fig_tmh_c2g_5qb">
  <title>Iris sanguinea</title>
  <desc>Description</desc>
  <image href="../../images/Iris_sanguinea.jpg" scale="50" id="image_inh_c2g_5qb"/>
</fig>
If you are using Author Mode, you can directly select the <image> tag, press Enter and select Surround with > fig in the contextual menu.

Regards,
Julien

alison
Posts: 6
Joined: Thu Sep 16, 2021 6:05 am

Re: questions about font and picture settings

Post by alison » Sat Sep 18, 2021 5:08 am

Hi Julien,

Thank you very much for your suggestion, now I have successfully added a description to the picture, as shown in the picture:
image.png
image.png (133.52 KiB) Viewed 143 times
But it seems that I can't set it to center or adjust its font size? Can I get some further advice?

Thanks in advance!

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

Re: questions about font and picture settings

Post by julien_lacour » Mon Sep 20, 2021 10:25 am

Hello,

This is when the hard part starts: for this you need to customize the DITA Map PDF - based on XSL-FO transformation by adding an extension to the 'org.dita.pdf2' DITA-OT plugin. This is why I gave you links to DITA-OT users group and to DITA-OT documentation in my first answer.

You need to create some XSLT style-sheets that match some elements and add them additional attributes like font-size or text-align.

If you are not used to XSLT, you may need an upgrade to a newer version of Oxygen. The new Oxygen 24.0 will be available soon and with it you can use the new DITA Map PDF - based on HTML5 & CSS transformation which uses CSS instead of XSL for PDF output and is easier to use for novice users.

Regards,
Julien

Post Reply