headers disappeared

I’ve reorganized my document so that only folders’ titles are exported, so that groups and files are not becoming sections. Now I can control sections and subsections by explicitly creating folders. However, I don’t get any headers in the resulting MMD file, hence no sections/subsections in latex! Even when I specify export all titles, I still don’t get any headers.

The only changes besides moving some things into folders is importing some MMD files into the current Scrivener one. Metadata looks unchanged… I check everything for inclusion; but I start with one folder down under Draft, which did work before and produced sections. How do I debug why no titles are exported as headers for folders?

The headers do show up in Plain Text export, when only folder titles are set to export as desired. Thus something prevents MMD from exporting folder titles!

That’s an excellent tactic for controlling literal book outline amongst a loose authorial outline. I use it all of the time (and all I use is MMD), so this should definitely be working. :slight_smile:

There are two settings which can override default title appearance, and it sounds like you have one of them checked already (inclusion). Of course check to make sure the folders are even included in the Draft. Second thing is Preserve Formatting. In MMD, if this is checked it means: Don’t emit titles, since otherwise that flag has no meaning since formatting is always wiped from the RTF files. This would definitely alternate with Plain-text export, as that export method does not use this mechanism at all.

That’s my main suspect. Otherwise, I’d try exporting a plain MMD file and inspecting that to see if the headers are really there, and perhaps you have an XSLT problem or something further down the pipe that is neglecting headers.

Exactly, AmberV – I had “Keep Formatting” on for all units, assuming it’s somehow related to preserving MMD. Just found out to report, and your suspicion is correct!

Now, I still experience problems with direct MultiMarkdown->LaTeX export. Now MMD has headers, while LaTeX doesn’t.

The only things I changed in XSLT are:

– replaced clean-text.xslt with clean-text-allow-latex.xslt

– in the latter, commented out tilde replacement by \ensuremath{~} – I use it as a non-breaking space in references to figures and tables, such as Figure~\ref{workflow}.

I tried to run mmd2LaTeX.pl directly on my MMD, and it loses the headers present in MMD as

Overview

However, mmd2PDFXeLaTeX runs fine! So we’re close… :slight_smile:

Update: I’ve simply run xelatex on the latex file emitted by Scrivener and it looks fine with headers. Then pdflatex ran fine on it. Both are from the latest TeXLive. I might have added some Unicode characters, so perhaps pdflatex was losing headers where xelatex was preserving them! Running pdflatex after xelatex still produces the right output. Running pdflatex first loses the headers!

Hmm – looks like it has to do with running twice to generate the Contents, and xelatex does it by itself… Still have to investigate.