Hi there.
I'd like to change how the index is laid out in a PDF file created from DITA using the DITA MAP based on HTML5 & CSS transformation.
What I want is to have the page numbers appear on the same line as the index text, rather than on the line below.
How do I achieve this?
Current:
index entry
4,7,99,123
Desired:
index entry 4,7,99,123
Changing formatting of index in DITA>PDF output
Re: Changing formatting of index in DITA>PDF output
Hello,
You should use in your CSS a rule like:
You could style the way the index terms are displayed in the PDF even further.
For more information on styling the elements in the Index section see the Index section from the DCPP User-Guide.
Also, for such situations, when you need to identify the right selectors that you should use in your own customization CSS in order to style the elements in the resulted PDF (and overwrite in your CSS the rules that come from the default CSS files used by oXygen), please see the Debugging the CSS section.
Regards,
Costin
You should use in your CSS a rule like:
Code: Select all
*[class~="index/formatted-value"],
*[class~="index/refid"] {
display:inline;
}
For more information on styling the elements in the Index section see the Index section from the DCPP User-Guide.
Also, for such situations, when you need to identify the right selectors that you should use in your own customization CSS in order to style the elements in the resulted PDF (and overwrite in your CSS the rules that come from the default CSS files used by oXygen), please see the Debugging the CSS section.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support