[LH4619|4620|4621] Can't get Chapter Autonumber Resetting (e.g. <$rst_chapter>) to work

So I tried this a few months ago, and again today, and couldn’t get it to work.

I want:
PART
Chapter 1
Chapter 2
PART
Chapter 1…

I should be able to do that by placing
<$n:chapter> in the Title Prefix of Chapter Section Layout
and
<$rst_chapter> in the Title Prefix of Part Section Layout (which is the parent of Chapter Section Layout).

However, when I do this, it just doesn’t reset. I get:
PART
Chapter 1
Chapter 2
PART
Chapter 3…

Can anyone help?

I wasn’t able to reproduce this. Using a sample project with a binder containing two folders in the Draft, each with two documents, I edited the Manuscript (Times) compile format to add the <$rst_chapter> placeholder to the end of the “Part Number” section layout’s title prefix, then assigned that layout to the folders and the “Chapter Heading” layout to the documents. This compiles to PDF with the chapter numbering restarting for each part.

You commented that the “Part Section Layout” is “the parent of the Chapter Section Layout”. I’m not sure what you mean by this, as the layouts themselves don’t have any sort of parent/child hierarchy and are not assigned that way. I would suggest double-checking the layouts that you have assigned to the section types that are your part and chapter files, and ensure that these are the ones in the compile format designer that are emboldened and have the correct placeholders. The default settings when creating or modifying a compile format often include multiple layout options for parts and chapters, so it could be that the restart tag was just added to the wrong one.

The file format you’re compiling to might be a factor in this. Are you using PDF? an ebook format? DOCX?

Jennifer, thanks for the reply.

When I say “Parent”, I just mean that the “Chapters” are correctly nested within the “Parts” (not for example, incorrectly placed the other way around) (see below).

I’ve tried EPUB, MOBI, and (since your post) PDF. I get the same problem with each format: the Chapter count not resetting.

EDIT: Image don’t seem to be showing up, and I can’t see a guide how to upload here (the BBCode isn’t a help), so I’ll just edit to the URL’s on Pasteboard.
pasteboard.co/JeH11mN.jpg
In this image you see Chapters within Parts. (The numbering is Roman Numeral, see below, but it’s the same with standard Numeric)
Below, the Chapters have <$r:chapter>
And the Parts have <$rst_chapter>
So the Chapter Count should be getting Reset at the beginning of every new Part (such as Part 2 here); but it’s not.
pasteboard.co/JeH4QTK.jpg
pasteboard.co/JeH51M8.jpg

I can’t seem to include the Test Scrivener Project to this post (and don’t want to lose this post) so I’ll try and attach below.

There honestly seems a lot of issues with the Compiler (and I’ve only been using it a couple of days):
From the “unable to align/choose color” of text in the Compiler, as the buttons are grayed out, which I followed up on in this thread after someone else mentioned it.
To the incorrectly mixed-case Roman numbering in the Title of Contents: despite setting it as $R (and even choosing “Uppercase” in both “Title Options” Case boxes) I only get mixed Case results, ala Iii, Iv, etc. I obviously should be getting III and IV. Notice this when generating a mobi, etc, in the (hopefully) attached Project.
To the Compiler constantly “forgetting” Title Case in Title Options. I must have had to go back and rechoose “Uppercase” in the Title Options dozens of times. Try it with the Project attached. Set Part Title to Uppercase, Compile, close Scrivener down, and reopen it. The Case just keeps going back to Normal.

If you can point me to a description of how I can Attach a Project file, I can include one.
It’s just a trimmed-down, Lorem Ipsum demo project, that shows the problems that are occuring.

Thanks for the follow up. Even using the $R placeholder following your images, I’m still not reproducing this, so the sample project would be helpful. You can use File > Back Up > Back Up To… to create a zipped backup of the project, and the zip file can be attached to your forum post by clicking “Attachments” on the Post A Reply page, below the Save Draft,Preview, and Submit buttons; select Add Files to browse for the .zip. Alternatively, you should be able to drag and drop the zipped file directly into the message area to attach it.

This is an issue with the autocorrect for “I”, I think. Not sure.

However… I’m not getting any Roman Numerals for <$R> (I should be, I think). Just ordinary “Arabic” numberals, when compiling to PDF.

I’m not getting any Roman Numerals for <$R> (I should be, I think). Just ordinary “Arabic” numberals, when compiling to PDF or Epub2.
[/quote]
Correction: I’m getting something resembling lower-case roman numerals as long as I put the <$R> inline in the text. If I put the <$R> in the Prefix section of the layout in Compile, I get Arabic numerals.

I made a project where both are used:
Scriv_romanNumbering2.JPG

Here’s the <$R> in the text:

Here’s the <$R> in the “Prefix” section:

Should have produced cap roman numerals, yes?
So <$R> is not functioning correctly in either place. In Prefix, it’s behaving like <$n>; inline, it’s behaving like <$r>.

I hope that helps in tracking this one down.

Could you share a sample project with the $R placeholder coming out wrong? The capitalised Roman numerals are working fine in the title prefix of my test project, as I said earlier, and given all the possible combinations of settings, it would be helpful to have a specific project that is producing the incorrect results.

Thanks for the reply.
I’ve attached the Demo Project.
I also seperately attached the custom Format from “My Formats”, in case the problems don’t happen on your end, without it. I had to zip it so the forum would accept the upload.

Issues that should show:

  1. Reset not working (Chapter Section Layout calls “<$R:chapter>”; Part Section Layout calls “<$rst_chapter>”).
  2. Roman numerals displaying incorrectly as Iii, Xiv, etc (that is mixed case: Uppercase followed by all Lowercase) in the Table of Contents. In the actual mobi/epub document they display correctly as all uppercase ($R) or lowercase ($r), just not in the ToC.
  3. Title Case in the Title Options of Section Layouts resets to Normal (if I, for example, set it to Uppercase or Lowercase) every time I save, exit, and restart.
  4. Also, “Remove First Line Indents” in Text Layout never works for me. Even when I tick all the boxes.

1 and 2 can be seen in the auto-generated Table of Contents image I’ve attached.

Hope this helps.

ToC.jpg
My MOBI Format.zip (3.7 KB)
TestMobiNovel [2020_06_26_11_37_21].zip (400 KB)

Do they work in the Table of Contents though?
They work for me in the document (epub, mobi). They just display incorrectly as “FirstLetterUppercase-EverythingElseLowercase” in the ToC (as the image I attached above shows).

Attached.

I saved the offending project as its own project and stripped text. A new behavior has begun; it’s adding two underscores in front of the lower-case Roman numerals. The project shouldn’t be corrupt; it’s nearly brand new.

I had just output an epub version of it, which might have altered something about the PDF compile. Shouldn’t, though, should it?
Test_RomanNumbers_001.scriv.zip (358 KB)
Test Rom Nums 002.pdf (15.1 KB)

Thanks, both! It’s a big help to have the sample projects to work with. I’ve filed tickets for the issues of the <$rst_keyword> tag not working in ebooks, the Roman numerals using title case in the ebook auto-generated TOC, and the title case option resetting to normal. I still need to look into the first-line indent and the issues rwfranz mentioned.

OK, I’ve now also got the bug with the uppercase placeholders ($R, $L, and $W) coming out lowercase if they don’t have an assigned stream (so <$R:chapter> compiles correctly but <$R> does not). Thanks!

It looks like the project you sent doesn’t have the compile settings you’re using, and just using the default format I’m not getting this. Could you please select the compile format in your project and use Export Formats… from the gear menu in the bottom left of the compile window to save those settings, then zip that and upload it here?

attached
TestRomanNums_001.zip (3.83 KB)

@rwfranz, thanks for the compile file; that solves it. The underscore is coming from your Text Section with Heading layout, which includes it as the section prefix. You can delete this from the Prefix tab to remove it, or add a carriage return after it if you had intended it to be there but on its own line.

I don’t even remember putting that there. (I should put notes in when I do something like that, but there’s no notes for the compile dialogs). I was obviously testing something, but Lord alone knows what.

Jennifer, thanks for all this.
Let me know if you have a problem getting the first-line indent issue to show up.