Create Section/Subsection based on Scrivener Structure


I hope this is the right forum to post this in. I just started using Scrivener to write my LaTeX documents, and I like it a lot.

However, I have a problem creating Sections and subsections based on the folder structure in scrivener. I thought that exporting to tex should automatically create the appropriate structure. However, in my case, the resulting tex document just places the section headings as bolded regular text. I am sure I am overlooking something very basic here, but any pointers on how to fix this would be much appreciated.

This is a bug in the Formatting pane. It should indeed be doing exactly what you are expecting, down to six levels of depth (which is more than most LaTeX styles handle anyway). So that is why the documentation is phrased as though it should be working. The problem is that it is just putting asterisks around the title instead of the appropriate number of hashes.

The funny thing is that the code exists, it just isn’t being triggered. What you need to do is go into the Formatting pane, and for each icon type and depth, click Modify then Section Layout.... Now add a single carriage return in the Suffix field, and disable “Place suffix inside hashes”. “Okay” out of that and you’ll see hashes in the editor preview area now. It won’t be the correct number of hashes, but it’s fine, just ignore that.

If you still get asterisks around the hashes let me know. We had a bug causing that in an earlier pre-release.


Thank you for answering my question, but I am still getting the same problem. I added the carriage return in the suffix field, and I disabled the place suffix inside hashes. In the preview pane, I do now see the header with a number of hashes.

However, when I export the document to latex, it still gets output as \textbf{# Intro #} and not as \section{Intro} like I was hoping. Any idea where I am going wrong?

Thank you

First of all, just to verify, make sure you are running 1.6.0 using the “About” choice in the “Help” menu.

That does sound like the bug I mentioned is still active, if you are using 1.6.0. Try this: load up a copy of the tutorial (a fresh one if you can), open the compiler, switch it to plain MMD, and then set the formatting pane to export just the title, and do the hash work-around for each icon type. Next, set a simple piece of meta-data like “Title: Me”. Try compiling that and see if you get asterisks.


The version is 1.6. And it seems like you are right about the bug. I compiled a fresh tutorial in MMD and the document shows hastags without any asterisks. Once I switch it to a latex document, the error comes back.

So with the same project, same exact compile settings (save for the output format) you get different results with the tutorial? That’s very strange, theoretically there should be no Scrivener-born difference between running a post-processing engine or not doing so, and just providing the raw source file itself.

This is what I get:

Title: Test  

# Part 1: Basics #

## Step 1: Beginnings ##

## Step 2: Header View ##

## Step 3: Footer View ##


And from .tex:


\part{Part 1: Basics}

\chapter{Step 1: Beginnings}

\chapter{Step 2: Header View}

\chapter{Step 3: Footer View}