Format callouts

Post here questions and problems related to editing and publishing DITA content.
SusanCampbell01
Posts: 9
Joined: Fri Jan 24, 2014 9:36 pm

Format callouts

Post by SusanCampbell01 »

Hello,

We currently use a numbered list within a figure element to create our callouts. Is there a way to use letters rather than numbers for the callouts? We'd like to use a, b, c, etc. rather than 1,2,3, etc.

Thanks,
Susan
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Format callouts

Post by Radu »

Hi Susan,

Indeed in DITA there is no specific attribute that you could set on an ol in order to force a certain numbering on it.
You could probably set a certain outputclass attribute on it something like:

Code: Select all

<ol outputclass="alpha">
.......
and then perform an XSLT or CSS customization to consider this outputclass value when counting the list items in the list.

This is an example of how this could be done for the XHTML-based outputs:

http://www.oxygenxml.com/forum/topic9789.html

Do you need this for the PDF or for the XHTML based outputs?

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SusanCampbell01
Posts: 9
Joined: Fri Jan 24, 2014 9:36 pm

Re: Format callouts

Post by SusanCampbell01 »

Hi Radu,

Thanks. I would need this for the mobile/html outputs.

Susan
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Format callouts

Post by Radu »

Hi Susan,

So if in the DITA topic you have something like this:

Code: Select all

            <ol outputclass="number-alpha">
<li>A</li>
<li>B</li>
<li>C</li>
</ol>
(note the custom @outputclass value I have set for <ol>).

Then you can create a custom CSS file with the content:

Code: Select all

ol.number-alpha{
list-style-type:lower-alpha;
}
Then edit or duplicate and edit the DITA to WebHelp (or WebHelp Mobile) transformation scenario you are using and in the Parameters tab set the parameter args.css to point to your custom CSS file and the parameter args.copycss to yes in order to copy your CSS to the output folder.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
SusanCampbell01
Posts: 9
Joined: Fri Jan 24, 2014 9:36 pm

Re: Format callouts

Post by SusanCampbell01 »

Thanks, Radu! That worked for me.

I did have one other minor question. I set my figure title to precede the image. However, now when I have callouts for an image, those also precede the image. Is there a way to get the following order: figure title, image, image callouts?

Thanks,
Susan
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Format callouts

Post by Radu »

Hi Susan,

You mentioned:
I set my figure title to precede the image.
Did you do this using an XSLT customization? Indeed by default Oxygen WebHelp output shows the title below the image. If you made a customization in the XSLT you can probably make some changes there to output the ordered list after the image.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply