Recommendations for starting with LaTeX output?

Hey all,

How easy is it to get LateX output from Scrivener? Before I started with this tool last week, I used latex to make book notes for things I read. There was one giant document for books and papers in a domain, with an elaborate personal index system (indexed by my set of concepts, not the original authors), and these get compiled to a uniform index I can use to compare papers.

As I looked around these forums, people seemed to recommend keywords (but warned not to have too many; I need hundreds), or DevonThink (a non-option; I don’t do Mac).

If I am to attempt to set up a flow to get generate LaTeX instead, any recommendations on where to get started?


Start by posting in the dedicated forum for Multimarkdown and Latex.

Moved to LaTex forum.

There are two basic approaches to using Scrivener as part of a “front end” creative interface that exports to LaTeX. Both methods use Scrivener as a fancy text editor, basically, rather than a word processor. You may consider that to be a positive aspect of the process, as I do:

  • Markdown: you compose and convert all of your material to MultiMarkdown syntax (refer to the user manual, which has a chapter on all of this). I’d say in general this is a nice approach for writing, in that if you type in “writing” you get “\emph{writing}” when MMD converts to LaTeX. It’s cleaner on the eyes and easier to type in.

Downsides: it naturally only supports a small subset of what LaTeX can do. But it does have mechanisms for getting around that, ways of inserting raw LaTeX where needed. The other downside of course is that it is less suitable for an existing document already written in LaTeX.

  • LaTeX: just like that. You use Scrivener to hold your .tex file content, that’s how you write, just like you would have in a plain-text editor, and when you compile you select “Plain-Text” and save the output as “something.tex”. There are things you can do with the compiler settings to make this way of working easier, such as inserting a chapter or section break using the binder titles as visible titles for the section, that sort of stuff.

This method will grow stronger in the version 3 upgrade, scheduled for later this year. We’ll be including a built-in template specifically for LaTeX usage. Much of Scrivener’s internal rich text formatting can be converted by this template—and it’s all built using Scrivener’s native feature set, just like all of our templates and compile settings. So you can get in and tweak it and change how everyting about it works, even to the point of having it export another kind of structured text format entirely.

I’d recommend playing with both methods a bit on a small subset of data, to evaluate which will be best for you, going forward. Here’s a basic test: copy a chunk of your .tex file into the starter text file in a new “blank” project. Now scroll to a natural sectional breakpoint within the pasted content, put your cursor where you should break, and hit ⌃K to split the file into two. Now compile. Set the Compile for setting to “Plain-text (.txt)”. You’ll probably need to rename the file to change the extension, depending on what tools you use to typeset, but examine the file. It should be something you could typeset if you copied over enough to do so. That’s all there is to it at this most basic level of usage. (And in v3 the file extension problem will be gone, you’ll even be able to set up the default for your project to “tex”.)

As for general organisation tips: keywords should be fine. You can organise keywords into groups in the keyword panel, so that helps keep things manageable when you have hundreds of them. The cautionary notes you saw may have been for more than that—thousands of keywords even. I only recall a few issues (all usage-related I think, as the UI is really simple, and isn’t built for such a repository sized index), but I do focus more on Mac bugs and might be unaware of some limitations specific to Windows.

Lastly, with Scrivener you can also use folders to organise your draft, which may take care of the main topical index, cutting down on some necessary keywords. Hierarchy in the draft can be used by the compiler, but it can also be ignored on a per-item or even per-type basis (you can make it so all folders do not export anything, but all file groups (files nested under files) print themselves like major section titles).