Reference the number

Post here questions and problems related to editing and publishing DITA content.
annyjul
Posts: 11
Joined: Fri Mar 02, 2018 12:20 pm

Reference the number

Post by annyjul »

OxygenXML 20.1, DITA to PDF CSS (WYSIWYG), Russian Localization for strings/pdf

I have 2 problems with referencing:

1) When I reference a figure (or table) in text I want link that displays only the number, so it would be like this: "... and see this on scheme 21..".
I set args.figurelink.style and args.tablelink.style to NUMBER, but it still displays the "Figure" and "Table". I found kinda similar topic, but couldn't apply it to solve my problem.

2) I want to reference topics by their number, is it possible? I use this custom css for numbering.
So If I have TOC like this:
1. Chapter
1.1 Section A
1.1.1 Sub-section A

the cross-ref in text would be "... see description in p. 1.1 ... ".
Costin
Posts: 828
Joined: Mon Dec 05, 2011 6:04 pm

Re: Reference the number

Post by Costin »

Hi,

Due to a bug, the args.tablelink.style and args.figurelink.style parameters did not work correctly in the transformation scenario.
However, we fixed the parameters behavior in our internal development stream and the fix will be included in the next version of oXygen.

If you are willing to test, you should write us on support (support@oxygenxml.com) and we could grant you access to the latest nightly build of the oXygen publishing engine, which includes the fix.

As for the figures/tables labeling, it is possible to hide the default labels that the DITA Open Toolkit creates for figures/tables when publishing to PDF and create and use your own labels instead. Using your own labels to appear in front of figures/tables, you could hide the "Figure " / "Table " from the label and leave only the counter (number of figure/table).
More specific, in your customization CSS, you could have something like:

Code: Select all


@import "p-optional-numbering-deep.css";

*[class ~= "topic/topic"] {
counter-reset:tablecount;
counter-reset:figcount;
}

.table--title-label, .figtitleprefix{
display:none;
}

*[class ~= "topic/table"] > caption:before{
/* Add more styling or change the content if needed */
content: counter(tablecount) ". ";
counter-increment:tablecount;
}

*[class ~= "topic/fig"] > figcaption:before{
/* Add more styling or change the content if needed */
content: counter(figcount) ". ";
counter-increment:figcount;
}
More details in the User-Guide, at:
https://www.oxygenxml.com/doc/versions/ ... aid-title8
and
https://www.oxygenxml.com/doc/versions/ ... aid-title6

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
annyjul
Posts: 11
Joined: Fri Mar 02, 2018 12:20 pm

Re: Reference the number

Post by annyjul »

@Costin, thank you, I'll try your css! I have already contacted support about figure/table links (and some other problems with links I have).
Post Reply