formatting for chapter number and chapter title
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 5
- Joined: Mon Apr 01, 2024 11:05 am
formatting for chapter number and chapter title
Post by freewingwind23 »
Hi,
I want my chapter number and title to display like this:
However, in the output pdf, the chapter is still on the same line after the chapter number. Please help me to solve this problem. Many thanks!
I want my chapter number and title to display like this:
image.png
and I used the following css codes to achieve it, as a predefined template is used:
Code: Select all
/* Chapter number formatting */
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"]:before {
content: counter(chapter) ". ";
counter-increment: chapter;
display: inline-block;
text-align: right;
background-color: blue;
color: white;
font-size: 80pt;
padding: 10px;
margin-right: 10px;
}
/* Chapter title formatting */
*[class ~= "topic/topic"][is-chapter]:not([is-part]) > *[class ~= "topic/title"] {
display: block;
text-align: left;
color: blue;
font-size: 36pt;
margin-top: 20px;
clear: both;
}
image.png
You do not have the required permissions to view the files attached to this post.
-
- Posts: 665
- Joined: Wed Oct 16, 2019 3:47 pm
Re: formatting for chapter number and chapter title
Post by julien_lacour »
Hello,
If you want to display the number on a separate line, you can change its display from inline-block to block directly.
Oxygen PDF Chemistry doesn't support the clear property yet, and using text-align: right will only move the text but not the blue rectangle (which will still be displayed on the whole page width).
Instead you could try to position the block with something like this:
Regards,
Julien
If you want to display the number on a separate line, you can change its display from inline-block to block directly.
Oxygen PDF Chemistry doesn't support the clear property yet, and using text-align: right will only move the text but not the blue rectangle (which will still be displayed on the whole page width).
Instead you could try to position the block with something like this:
Code: Select all
position: relative;
left: 5in;
width: 1em;
Julien
-
- Posts: 5
- Joined: Mon Apr 01, 2024 11:05 am
Re: formatting for chapter number and chapter title
Post by freewingwind23 »
Thanks a lot. It worked!
-
- Posts: 1
- Joined: Wed Sep 11, 2024 5:12 am
Re: formatting for chapter number and chapter title
Post by Johnsondavid »
Thanks for sharing. Geometry Dash ScratchI was having the same problem thanks to your post I was able to fix it.julien_lacour wrote: ↑Fri Jul 19, 2024 9:37 am Hello,
If you want to display the number on a separate line, you can change its display from inline-block to block directly.
Oxygen PDF Chemistry doesn't support the clear property yet, and using text-align: right will only move the text but not the blue rectangle (which will still be displayed on the whole page width).
Instead you could try to position the block with something like this:Regards,Code: Select all
position: relative; left: 5in; width: 1em;
Julien
Last edited by Johnsondavid on Thu Sep 12, 2024 6:08 am, edited 1 time in total.
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