Page 1 of 1

questions about font and picture settings

Posted: Thu Sep 16, 2021 6:23 am
by alison
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

Re: questions about font and picture settings

Posted: Thu Sep 16, 2021 10:53 am
by julien_lacour
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

Re: questions about font and picture settings

Posted: Thu Sep 16, 2021 11:45 am
by alison
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?

Re: questions about font and picture settings

Posted: Thu Sep 16, 2021 1:12 pm
by julien_lacour
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

Re: questions about font and picture settings

Posted: Thu Sep 16, 2021 3:10 pm
by alison
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 1186 times

Re: questions about font and picture settings

Posted: Fri Sep 17, 2021 10:07 am
by julien_lacour
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

Re: questions about font and picture settings

Posted: Sat Sep 18, 2021 5:08 am
by alison
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 1138 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!

Re: questions about font and picture settings

Posted: Mon Sep 20, 2021 10:25 am
by julien_lacour
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