[LH3790] Title epub3 and rst_scene

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…

Thanks, this was reported a while ago and it looks like the priority has been raised recently.

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

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:


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).

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”

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.

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


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 ?

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.

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.

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.
DebugCompile.zip (52.6 KB)