TOC page number: roman-style
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 23
- Joined: Thu Feb 28, 2019 2:19 pm
TOC page number: roman-style
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
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
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: TOC page number: roman-style
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:
Regards,
Costin
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);
}
}
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 23
- Joined: Thu Feb 28, 2019 2:19 pm
Re: TOC page number: roman-style
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
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
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service