[LH3790] Title epub3 and rst_scene

User avatar
mattclayne
Posts: 18
Joined: Wed Aug 30, 2017 8:42 am
Platform: Windows
Contact:

Fri Feb 14, 2020 1:04 am Post

Hi !
I'm trying to compile an epub3 but I have some problem.
My novel is like that :
- Chapter 1
+ scene 1
+ scene 2...
- Chapter 2
+ scene 1
+ scene 2

I put "Chapter <$n:chapter>" in prefix for chapter number and "<$rst_scene>" in suffix.
For the text section => "<$n:scene>" in prefix.
The numbers are working BUT the text <$rst_scene> appear in the title like "Chapter 1<$rst_scene>".

If I use "$n" and "$sn", the title now shows in the book app just a number of the next scene...

User avatar
AmberV
Posts: 23910
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Fri Feb 14, 2020 2:22 pm Post

Thanks, this was reported a while ago and it looks like the priority has been raised recently.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
mattclayne
Posts: 18
Joined: Wed Aug 30, 2017 8:42 am
Platform: Windows
Contact:

Sun Feb 16, 2020 6:13 pm Post

Great ! Because I can't export until it's fixed !

User avatar
AmberV
Posts: 23910
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sun Feb 16, 2020 9:57 pm Post

Apologies, I should have given you a potential workaround, I didn’t realise you were in a bind without this feature. The reset tokens are one way to handle the problem of resetting a numbering stream, but there are other ways that work as well. This is how I would approach it in a simple chapter-scene two level hierarchy:

Code: Select all

<$n:<$parenttitle_no_spaces>>


This essentially generates a new n-style auto-number stream for each folder that scenes fall within. Since new streams start at “1”, it has the same effect of having a generalised <$n:scene> auto-number stream and resetting it. You just end up internally with a bunch of streams like <$n:NameOfChapterOne> <$n:TheBeginningOfTheEnd>, etc.

Now if you have a lot of hierarchy within each chapter, it might be more complicated to handle that (there is another broken placeholder that you could have used here), particularly if your hierarchy does not reflect the structure of the book (you nest scenes within scenes for your own reasons, not because they are sub-scenes that shouldn’t be numbered).
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
mattclayne
Posts: 18
Joined: Wed Aug 30, 2017 8:42 am
Platform: Windows
Contact:

Mon Feb 17, 2020 10:09 am Post

I'm sorry, I don't understand what I should do with this.
What code I put in suffix/prefix for chapter and scene ?

What I need it's this :
- "Chapter 1"
+ "1"
+ "2"
+ etc.
- "Chapter 2"

User avatar
AmberV
Posts: 23910
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Mon Feb 17, 2020 10:21 am Post

You would put it in the Section Layout’s Title Prefix field, where there is currently a “<$n:scene>” placeholder (“Numbered Section” probably?). And of course you would also remove the nonfunctional reset placeholder from whatever Layout you are using for chapter.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
mattclayne
Posts: 18
Joined: Wed Aug 30, 2017 8:42 am
Platform: Windows
Contact:

Mon Feb 17, 2020 11:07 am Post

I do what you said and I get this in text for the scene :

"<$n:NameOfMyscene>"

the $n is not translated in 1,2 or 3 and it show the name scene.
I just need the number of the scene.

Chapters are ok.
I did something wrong ?

User avatar
tiho_d
Posts: 967
Joined: Tue Sep 13, 2011 1:14 pm
Platform: Linux + Windows

Mon Feb 17, 2020 12:47 pm Post

Can you please upload a small project with few documents and the failing <$rst_scene> placeholder.
We improved it in the latest builds, but we might have missed something. I believe you are using Beta 38.

User avatar
AmberV
Posts: 23910
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Mon Feb 17, 2020 1:37 pm Post

Yes, make sure you are up to date, as Tiho says. The placeholder as I provided it above should not be working the way you describe. It should print the folder name that the scenes are nested within, not the name of the scene file itself---for one thing---but even so in your case we would expect to see "1" over and over (since each scene would start a new numbering stream) rather than a bare placeholder.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

User avatar
mattclayne
Posts: 18
Joined: Wed Aug 30, 2017 8:42 am
Platform: Windows
Contact:

Mon Feb 17, 2020 5:03 pm Post

tiho_d > I create a new file, and <$rst_scene> doesn't appear anymore... But on my epub reader app (Liberty on windows) the title chapter is "2" and "2" intead of "Chapter 1" and "Chapter 2" (in the navigation or in the TOC, it's ok in the content)
Plus, depend on settings, but text is crop at bottom or/and not justified (I check ignore style...) and sometines the file make crash the app.

amber_v > I use beta 38. I made a mistake. I didn't see "<$n:NameOfMyscene>" but "<$n:NameOfMyChapter>" in text.

I put 2 epub in the zip to show you what I get.
Attachments
DebugCompile.zip
(52.65 KiB) Downloaded 5 times