Getting started with my thesis

So, I’m working on my thesis (yay!). And in the process of getting Scrivener all set up for it. I want to use Scrivener because I love writing in it, and I seem to write better if I’m using Scrivener than if I try to e.g. write markup in a text editor. But I’m running into a couple of little wrinkles.

At the moment, I’m trying to generate Pandoc Markdown, because I can easily generate e.g. web pages from this, even though the main thesis (& indeed some articles I’m also working on) need to go via LaTeX. But I’m also keen to e.g. quickly generate a Word doc, and the new Styles support is great for this as I don’t need to put markup in my Scrivener doc (which I hate doing - I really like the ability to just write, and see something which approximates my eventual output not loads of markup).

So, in Scrivener 3 I get that I’m supposed to use “No style” for normal text. But I can’t figure out how to make this generate a blank line between paragraphs. I know that I could just put a blank line in my text, but I really don’t want to do that as it mucks up e.g. compiling to a Word document.

I can create a “Body” paragraph style, and use the compile settings to add a blank line after each paragraph. But that seems against the spirit of the styles idea, and the latest update has removed the ability to have a default style anyway.

Any thoughts?

BTW I’ve realised I should have posted this in the MMD & LaTeX board - apols, and mods please feel free to move the post

Hi Lyndon, why do you want a blank line between paragraphs? Normally, paragraph breaks should deal with this, which in Pandoc I always do using [space][space][return][return] — in HTML these become

, in LaTeX and word it becomes a paragraph break which uses Word paragraph styles or LaTeX paragraph spacing commands to control the inter-paragraph spacing. Blank lines are not really ideal for this.

By the way you can generate PDFs from HTML directly, which is an alternative to LaTeX if you would be more comfortable with this (CSS is more understandable for layout than the mess that is trying to understand LaTeX packages).

Because I’m trying to avoid writing Pandoc markup in my Scrivener file. For everything else (apart from citations), Scrivener converts the rich text or my styles into Pandoc markup. But the paragraph breaks don’t get converted. If I do [space][space][return][return] and compile to Word (rather than getting Pandoc to produce a Word file), then I’ll end up with blank lines across the Word doc.

Basically, I’m trying to stay as compile-agnostic as I possibly can while writing. The thesis will take quite a while to do and I’m trying (as far as is humanly possible) to avoid tying myself into Pandoc too much at the early writing stage. As I say, I can just define a “Body” style and use the suffix option in the compile settings. But I was wondering if there’s another way around it.

So, I’ve made a bit of progress, mainly by creating a separate test file with all the different kinds of markup I want to use in a systematic setup.

I’ve found a couple of things along the way about the otherwise wonderful “Convert rich text to MultiMarkdown”:

  • the fact that it is part of the project’s compile options, not part of the compile format, causes all sort of problems. E.g., any prefix/suffix code I add to a style in the compile format then gets mangled
  • it doesn’t handle enumerated lists, only bulleted lists, because while the paragraph before a bulleted list gets a blank line after it, the same is not true for the paragraph before an enumerated list (so Pandoc doesn’t recognise the correctly-formatted list that follows as a list
  • there’s no way to mark text in a footnote as “raw code”, because styles can’t be applied to text in a footnote. This affects my Pandoc citations, which use [ ] delimiters, among other things.

What it does handle beautifully is italics, bulleted lists, and so forth. Plus it adds the correct extra blank lines to set paragraphs correctly.

So, what about if we turn off “Convert rich text to Markdown” (and retain “Convert lists and tables”)? Other problems crop up:

  • No blank lines between paragraphs, unless one switches from indented paragraphs to spacing between paragraphs, and uses the “Convert to plain text - Paragraph spacing” option in the compile format. As long as I put at least a 1-line-equivalent paragraph space “after” in the format, I get the hoped-for blank line.
  • But this is kind of annoying because then the editor looks weird on lists, so I end up having to mess around with formatting when that’s kind of what I’m trying to avoid.

I can see that I should probably be using the styles system to add all the Pandoc markup for the moment, and that I should avoid any of the auto-converting options until they’ve matured a bit more.

But, unless I’m happy to insert blank lines everywhere in my document and mess up other compile formats, I’m back to having to use a “Body” style and apply it everywhere, now that version 3.0.3 has removed the possibility of a default style.

It does have a default style, it’s called “No style”, and you set it in the Scrivener Preferences to be the default for all your projects, or in Project > Project settings > Formatting for individual projects.

:smiley:

Mark

Pandoc produces a cleaner and semantically richer Word doc than Scrivener does by default, but OK if you want to retain maximum compatibility then you could try to use compile replacements to change between different paragraph markup? You should be able to convert [space][space][return][return] into [return] using regex replacement… It may also be possible to do this with compile separators, though I haven’t ever tried to do this…

I don’t think I can use the Compile format to process the “No style” style, though? E.g. to pre- or post-pend Pandoc to its paragraphs?

That’s a good point re Pandoc–> Word. I just tried the direct compile to Word and realised that it’s a bit limited too. I’ll persist with the Pandoc export. I guess in the end I’m going to have to commit to writing in one format or another, and the reason for all the effort is that the process of actually writing prose in Scrivener is worth the little bit of hassle to get it from there into a nice format.

At the back of my mind, too, has been the thought that I might want to set the thesis in InDesign instead of LaTeX, but if I can get the Pandoc export working well then that’s still perfectly feasible.

If you take the effort to switch to Styles, and make use of Replacements and other features of Compile, you should still be able to generate just about any output. I regularly compile my scientific papers to at least 3 formats automatically, a LaTeX PDF, a DOCX and a Plain Text file (all with a bibliography) which I do using pandocomatic driven via the post-process panel of Scrivener.

For academic work, the fact that Pandoc can generate your bibliography automatically in any format was the major incentive to switch from MMD for me.

Pandoc supports ICML too, so if you ever get the InDesign itch, then you can scratch it easily with Scrivener+Pandoc :smiley: — Pandoc also supports several HTML+CSS⇨PDF systems (I’ve used Prince, but there are several others), which I know some people use instead of LaTeX because CSS is so much more intuitive in terms of understanding layout than LaTeX.

Yep, now that I’ve got it working I think this is going to be the way forward. It’s a few years since I wrote anything in Scrivener, but I can see already that it’s worth the effort learning how to use it (again). E.g. even the ability to compile an outline, include the synopses, is brilliant — so much better than trying to maintain a separate outline, which never quite matches the real document.

Tomorrow I’m going to set up some pandocomatic (& scrivomatic - thank you!) templates.