View Single Post
Old 09-06-2022, 05:55 PM   #7506
Amalthia
Wizard
Amalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beautyAmalthia does all things with Zen-like beauty
 
Amalthia's Avatar
 
Posts: 1,188
Karma: 32196
Join Date: Jan 2007
Location: Anchorage, AK
Device: Sony Reader PRS-505, PRS-650, PRS-T3, Pocketbook HD2
Hi,

I was testing out this block of code:

Code:
strip_chapter_numbers:true
add_chapter_numbers:true
chapter_title_add_pattern: Chapter ${number}. ${title}
It works great up to the point where the chapters don't have a title.

In my test story "Chapter 1" turns into "Chapter 1 - Chapter 1," if I remove ${title} from the chapter_title_add_pattern it turns "Chapter 1 - Chapter 1" back to "Chapter 1."

However, stories that have a chapter title lose the chapter title if I don't include ${title}.

Without the block of code managing the chapters, my chapters look like this:

"1. title of chapter"
"1. Chapter 1"

I was trying to find a way to make the chapters look like this instead:

"Chapter 1 - title of chapter"
"Chapter 1"

I think without conditional statements what I'm trying to accomplish may not be possible. But I thought I'd run it by this forum first before I give up.

Thanks for any and all advice.
Amalthia
Amalthia is offline   Reply With Quote