Page 1 of 1

TOC page number: roman-style

Posted: Thu Feb 28, 2019 2:30 pm
by MyMoon
Hi team. Please help me to find the place where roman-style for page number in TOC is defined by CSS. I need normal Arabic numerals. I made a full-text search for “counter(page, lower-roman)” around the DITA catalog and have found nothing.
I even tried to redefine it with “lower-alpha”:

@page table-of-contents {
@bottom-right {
content: counter(page, lower-alpha);
font-family:GOSTTypeA-Italic, "GOST type A";
font-style:italic;
font-size:12pt;
padding-top: 24pt;
padding-right: 6pt;
}

But no result. lower-roman anyway.

Thanks,

Dmitry

Re: TOC page number: roman-style

Posted: Tue Mar 05, 2019 3:17 pm
by Costin
Hi MyMoon,

Supposing that you are using the latest version available, the default CSS you are looking for is "p-pages-and-headers.css" from oxygen_install_dir\frameworks\dita\DITA-OT3.x\plugins\com.oxygenxml.pdf.css\css\print.

The TOC pages numbering style is defined in the "The TOC page layout" section of the CSS.

However, it is not good practice to modify the default CSS files that come bundled with oXygen, but you should overwrite the predefined rules in a customization CSS that you can use either directly, by specifying it as a transformation scenario Parameter ("args.css" in the Parameters tab from the scenario configuration dialog) or as part of a publishing template.

For your specific task, in your customization CSS you should use something like:

Code: Select all

@page table-of-contents:left {
@top-left {
content: string(toc-header) " | " counter(page, decimal);
}
}
@page table-of-contents:right {
@top-right {
content: string(toc-header) " | " counter(page, decimal);
}
}
Regards,
Costin

Re: TOC page number: roman-style

Posted: Wed Mar 06, 2019 3:32 pm
by MyMoon
Hi Costin!
Thanks for answer. I've found, that for @page table-of-contents counter format is ignored, and acceptable form is @page table-of-contents:right. I don't know, how to declare that I haven't got left or right pages.

So this code works:

@page table-of-contents:right {
@bottom-right { content: counter(page, decimal);
font-family:GOSTTypeA-Italic, "GOST type A";
font-style:italic;
font-size:12pt;
padding-top: 24pt;
padding-right: 10pt; }
}

Of course, I'm using custom CSS. But it appears that Editor takes some defaults from Document Type Association / Locations / Additional frameworks directories, where I placed copies of shipped CSS. Maybe I shouldn't have done that.

Regards,
Dmitry