ToC Fun

On MacOS. Started with non-fiction (general) template.
Under “Front Matter” added:
-title page
-copyright
-preface
-introduction

I didn’t add a ToC, isn’t this supposed to be automatic?

Then I added Main Matter. When I tried to compile, the Main Matter folder did not appear. How can I compile the project including Main Matter?

thanks.


I starrted a new blank project, giving up on the template.
And now the Compile command is greyed out, as is back-up.

I closed the NF gral template and these two commands were restored on the new project. OK, Whaaa?

On the new project, Main Matter was there and compiled. No ToC and I really don’t want “Front Matter” and “Main Matter” printed as if they were part of the text, but progress is progress.

Why, though, did the NF g’ral template fail?
And Help=>Table of Contents=>no results found
isn’t very helpful

I need to get the equivalent of LaTeX’s \subsubsection entries (all 721 of them) into the ToC.
Creating 721 subsubdocuments in the binder doesn’t seem reasonable.
I could create a ToC in another program, delete all page numbers and dot leaders, add what remains to the Scrivener project, copy as ToC–then what?
How can I accomplish this sorcery? I believe these subsubsections were already marked when the document came over from Word.
But maybe not–that’s why I inquired earlier about Scrivener styles.

Main matter == Manuscript.

If Manuscript is empty, there’s nothing to Compile.

So remove Main Matter and place your content in the Manuscript folder.

Use the Copy > Copy Special command to get a list of your Sections and subsections in the Binder. Place that list in your ToC Document in the Front Matter Folder.

Hope this helps

2 Likes

There’s an entire Chapter (22) on Tables of Contents in the manual.

If you already have LaTeX markup in the project, then you need to specify the document class – either your own or one that Scrivener supplies – in order to tell the Compile command what to do with it. Section D.6. in the manual describes the classes that Scrivener supplies in more detail, but complete instructions on how to use LaTeX are outside of our scope.

If the subsubsection headings are labeled with Word styles, those should be preserved when you import the document to Scrivener. However, you’ll need to define styles with the same names in Scrivener before importing the Word document. (See Section 17.4.5 in the manual.)

If you already have a complete ready-to-publish manuscript in Word, though, what are you hoping to accomplish with Scrivener? In particular, using Word’s heading styles to create a Word ToC is extremely simple.

3 Likes

Thanks. I don’t have a marked-up LaTeX version. It’s somewhat complicated, but here goes: 2/3rds of the text is a law. Because it’s a law, the numbering cannot be changed. Nevertheless, the law is incomplete: its 721 subsubsections lack names. Owing to this lack, the law is opaque. So I added names to inform readers about the contents of the law. A table of contents is key if it can capture the subsubsection article names.

This is a separate file.

The remaining 1/3rd is a summary and analysis. This too is a separate file.

This third should be part of the book’s front matter–preface and introduction. The remaining 2/3rds is the main matter.

Page numbering doesn’t matter for epubs, so I guess I can join the two files together. Scrivener is good for doing this. But even though the subsubsection articles are styled, Scrivener doesn’t included them in the ToC. Thus, I get a three entry ToC: preface, intro and main matter. This is not as useful as a detailed ToC.

The workaround is to use the joined file and make an ePub. This seems to be working. But thee print version is another story.

Importing the joined text into Vellum is a work in progress. It looks like it’s not possible to include the detailed subsubsection article names in the ToC.

I’m not fluent in Scrivener’s treatment of front matter but it’s easy in LaTeX. \begin…
\end… But there’s still the matter of the 721 subsubsections.

Each article looks like this:

Article 1 All about article 1.
Article 2 Here’s another cool article.

Is there an awk command that will generate:

\subsubsection{Article 1. All about article 1.}
\subsubsection{Article 2. Here’s another cool article.}

…and ignore the second instance of “article 1 of the first item in the list above.” There’s two parts to this:

  1. add \subsubsection at the beginning of the line; and
  2. enclose the line, excluding the LaTeX subsubsection command, in brackets.

Miss a bracket in LaTeX and all hell breaks loose. Finding the error requires eagle eyes and an undocumented, trial and error technique.

I suspect that awk can mark up the subsubsections, so I could copy all the articles into a text file, run the appropriate awk command, and bring the result back into the file. That way, LaTeX will properly generate the front matter (Roman numerals) and the main matter (Arabic numerals).

My guess is that one of the AI platforms can generate the correct LaTeX mark-up, but I’m not sure.

The problem is in creating both a pdf for publication and an ePub for electronic distribution.

One other possible issue is that assigning styles in Word isn’t easy when the number of styles won’t fit on the menu bar. Sure, the menu bar can expand but that’s not quick and prone to error. So I’m styling parts, chapters, sections, subsections and subsubsections in Mellel, where it is very very easy. Mellel also exports to Word and will give me an ePub. But though I’m told that Mellel will give me front matter, I haven’t been able to properly generate it for a pdf (with Roman and Arabic numerals).

If the entire document were in Markdown from the beginning, things might be easier, but I don’t know how to generate a ToC in Markdown.

The Mellel/Word ePub looks good enough for government work. I may have to bite the bullet and convert the Word document to LaTeX (can pando do this?) and use awk or AI to for those 721 mark-ups.

I started experimenting with Lacuna to see if post-import corrections is less of an ordeal.

I had hoped that Scrivener would give me a ToC with all 721 articles included, but they are not in the binder and it would be easier to do LaTeX mark-up than bring them there.

For awk, I suppose you can substitute Python, Pearl or C, C++…

I wouldn’t try to create the ToC in Scrivener. I’d use Scrivener for the writing, making sure all of the headings in all of the sections have assigned Styles, then Compile to Word and use its ToC features. Formatting this kind of complex document is something that Word does pretty well. (Complex corporate documents being a large part of their business, after all.)

2 Likes