page numbering
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
page numbering
Post by IsleofGough »
When I generate a ditamap to pdf based on HTML and CSS, the page numbers are all in roman. It does not do this with XSL-FO. How do I change the HTML/CSS conversion to use normal numbers for page numbers? Thanks.
-
- Posts: 666
- Joined: Wed Oct 16, 2019 3:47 pm
Re: page numbering
Post by julien_lacour »
Hello,
By default only pages in the Table of Contents, Front and Back Matter use the lower roman numbering.
You can check the Default Page Definitions topic from our user-guide for more information.
You can find some examples of headers/footers customization in the Page Headers and Footers topic.
Regards,
Julien
By default only pages in the Table of Contents, Front and Back Matter use the lower roman numbering.
You can check the Default Page Definitions topic from our user-guide for more information.
You can find some examples of headers/footers customization in the Page Headers and Footers topic.
Regards,
Julien
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: page numbering
Post by IsleofGough »
It would be nice if only the front and back matter used lower roman numbering, but the entire book uses roman numbering if built with HTML/CSS. Fortunately I don't have any of these issues with docbook files and ePub or PDF targets. I was just hoping that DITA had reasonable conversions. Here is the ditamap that does not generate regular numbering of pages.
Maybe the problem is that I used:

Maybe the problem is that I used:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE bookmap PUBLIC "-//OASIS//DTD DITA BookMap//EN" "bookmap.dtd">
<bookmap>
You do not have the required permissions to view the files attached to this post.
Last edited by IsleofGough on Tue Sep 27, 2022 1:36 am, edited 1 time in total.
-
- Posts: 922
- Joined: Thu May 02, 2019 2:32 pm
Re: page numbering
Post by chrispitude »
Hi IsleofGough,
I published a simple <bookmap> with DITA Map PDF - based on HTML5 & CSS and I see the page numbering convention that Julien describes.
Here is the testcase, so maybe you can identify what is different between it and your content:
I published a simple <bookmap> with DITA Map PDF - based on HTML5 & CSS and I see the page numbering convention that Julien describes.
Here is the testcase, so maybe you can identify what is different between it and your content:
chemistry_page_numbering.zip
You do not have the required permissions to view the files attached to this post.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: page numbering
Post by IsleofGough »
Thank you for the example. Your ditamap does indeed number correctly. I think I had some left over junk code from the docbook version causing problems.
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
Re: page numbering
Post by IsleofGough »
Julien provided me with the solution to the numbering:
The only issue with this is that the normal numbering does not begin at page "1", as is generally done with real books. It acts as if the numbering starts at page one for the front matter but just gets displayed as roman numbers for the front matter and then normal numbers for the chapters (without resetting the numbering to "1")
_______________The bookmap is valid indeed but there's still a problem: you are using empty chapters element:This structure is valid but lead to a wrong interpretation in PDF, you should have this instead:Code: Select all
<chapter> <topicref href="topics/Overview.dita"/> </chapter>
Another variant could be to use the @navtitle attribute:Code: Select all
<chapter href="topics/Overview.dita"/>
Code: Select all
<chapter navtitle="MyTitle"> <topicref href="topics/Overview.dita"/> </chapter>
The only issue with this is that the normal numbering does not begin at page "1", as is generally done with real books. It acts as if the numbering starts at page one for the front matter but just gets displayed as roman numbers for the front matter and then normal numbers for the chapters (without resetting the numbering to "1")
Last edited by IsleofGough on Wed Sep 28, 2022 9:23 pm, edited 3 times in total.
-
- Posts: 666
- Joined: Wed Oct 16, 2019 3:47 pm
Re: page numbering
Post by julien_lacour »
Hello,
You can reset the numbering at the first chapter by using a custom CSS rule. The full explanation is available in the How to Reset Page Numbering at First Chapter topic from our user-guide.
Make sure to use the adapted rule depending on your numbering scheme (shallow or deep).
Regards,
Julien
You can reset the numbering at the first chapter by using a custom CSS rule. The full explanation is available in the How to Reset Page Numbering at First Chapter topic from our user-guide.
Make sure to use the adapted rule depending on your numbering scheme (shallow or deep).
Regards,
Julien
-
- Posts: 34
- Joined: Fri Dec 02, 2016 9:55 pm
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