beginner to MMD and LaTeX: looking for advice for incorporating into existing Scrivener 3/Papers 3 academic workflow

da
dagobah
Posts: 6
Joined: Mon May 06, 2019 5:38 am
Platform: Mac

Mon May 06, 2019 5:59 am Post

tl;dr: As a complete MMD and LaTeX beginner, what is the simplest workflow I could adopt that allows me to use existing LaTeX templates from academic publishers + Scrivener?

I've just started to lurk on this forum and the great resources/discussion here. But as a beginner I confess to jumping into the MMD/LaTeX pool without first learning to swim a bit. Most of my time has been spent browsing Fletcher Penney's MultiMarkdown resources: https://github.com/fletcher

As a PhD student I am revising my workflow to be as efficient as possible while also avoiding having to go down the rabbit hole of LaTeX. However, since LaTeX templates are almost always provided for most of my writing projects, I want to take advantage of them to automate formatting. But I have no LaTeX experience and have never used LaTeX templates.

My current workflow primarily consists of MacOS Scrivener 3 for writing + Papers 3 for references/library. They do play nice together with Paper’s “magic” cite key features (thanks for updating this recently). However, I don’t take full advantage of Scrivener’s compile features and embedded MMD functionality. I almost always end up compiling as a .doc and then doing a bit of formatting in Word before sending to colleagues. I still need to use .doc/x with colleagues from time to time, and that won't change, but I want to streamline the process and also produce high quality .pdfs as most everyone here does too.

My writing projects include:

1. PhD dissertation in University-required formatting (a LaTeX template exists).
2. Individual papers for submission to academic journals in their required formatting (often a LaTeX template exists).
3. Maintaining working versions of these papers, and generating high quality PDFs of them as needed (presumably using LaTeX to enable this, using a template).

Again, I have no need/time to go deep into LaTeX for these projects. However, what is the simplest workflow I could adopt that allows me to use existing LaTeX templates from publishers?

? Scrivener > MultiMarkdown > text editor and/or converter? > .PDF & .DOC ?

I suppose my beginner’s questions are:

- In what step of a workflow does the LaTeX template come into play?
- Do I need both a text editor (e.g. TextMate) AND a document converter program (e.g. Pandoc, MultiMarkdown Converter) as separate steps in this workflow? Or could I avoid the editor altogether and simply use a converter as the last step (or vice versa)?

I did just take a peek at the Scrivener LaTeX template and binder structure, and it looks super helpful. But as I understand it this requires some necessary LaTeX coding embedded within Scrivener. I'd like to avoid going too deep into LaTeX 'codeland', but I'm willing to try. Is there a way to combine this Scrivener LaTeX template + the various LaTeX templates from publishers I wish to use across my projects?

Am I overcomplicating things? To summarize, what should I add to my existing Scrivener 3 + Papers 3 workflow in order to take simple advantage of LaTeX templates and output as properly formatted .pdf and .docx?

Cheers!

de
derick
Posts: 409
Joined: Mon Aug 11, 2008 9:58 pm

Mon May 06, 2019 10:11 am Post

Are you in a field where you require LaTeX ? If not, I’d avoid it if you don’t want to invest the time. If so, then you’re best off really learning it, Ideally through an institutional class or the like, Here are the materials that accompany the classes at my institution - hopefully something similar is offered where you are:

https://gradquant.ucr.edu/gq-calendar/w ... ex-series/

da
dagobah
Posts: 6
Joined: Mon May 06, 2019 5:38 am
Platform: Mac

Mon May 06, 2019 5:40 pm Post

Thanks Derick,

No I am not in a field that requires LaTeX. Thanks for sharing your institutional LaTeX materials. I do believe my university has a few workshops. But yes, for now I'm trying to keep in minimal investment if possible.

User avatar
nontroppo
Posts: 1148
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Mon May 06, 2019 10:58 pm Post

As you want to be able to generate multiple outputs, the dedicated LaTeX template is not advised. The Scrivener 3 manual is written in Scrivener, using lots of Styles and narkdown; making it more flexible and compiled via LaTeX and a bit of magic to PDF; it is well worth having a look at to see how this is all done. Go to https://www.literatureandlatte.com/lear ... ser-guides and scroll to the bottom of that menu...

For academic use you could also look at Pandoc integrated with Scrivener. Pandoc offers better control of metadata > templates. As an example, you can see what is possible using Pandoc Scholar (https://pandoc-scholar.github.io), where you get scholarly metadata turned into full document leaders in latex, epub, docx etc. My own academic workflow is another example, using a Pandoc templating language called pandocomatic, all controlled within Scrivener itself. LaTeX is one of my main outputs, yet my knowledge is minimal thanks to Pandoc templates doing the brunt work behind the scenes.

da
dagobah
Posts: 6
Joined: Mon May 06, 2019 5:38 am
Platform: Mac

Tue May 07, 2019 12:39 am Post

nontroppo - thanks for your useful reply. I will definitely take a look at the Scrivener 3 manual.

nontroppo wrote:For academic use you could also look at Pandoc integrated with Scrivener. Pandoc offers better control of metadata > templates. As an example, you can see what is possible using Pandoc Scholar (https://pandoc-scholar.github.io), where you get scholarly metadata turned into full document leaders in latex, epub, docx etc. My own academic workflow is another example, using a Pandoc templating language called pandocomatic, all controlled within Scrivener itself. LaTeX is one of my main outputs, yet my knowledge is minimal thanks to Pandoc templates doing the brunt work behind the scenes.


This sounds like exactly what I was envisioning. I reviewed your workflow on github and it sounds attractive and a good fit for my needs (thanks for sharing). I will have to look into pandoc scholar in more details later as well.

I'm not familiar with pandocomatic, Say I have an external LaTeX template that I want to use for my document formatting. Using your workflow as an example, I would point pandocomatric to use that template file when it does it's work behind the scenes? No need to mess with it in a LaTeX editor?

I like the idea of maintaining a few "external pandocomatic templates" (as de Beer phrases it), which affect all documents that use that template.

Thanks again.

User avatar
nontroppo
Posts: 1148
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Tue May 07, 2019 5:40 am Post

Both Pandoc and MMD come with default templates that will work just fine for general reports/articles. In addition there are several LaTeX templates have been adapted to work with Pandoc. For example I use Eisvogel for technical academic reports (https://github.com/Wandmalfarbe/pandoc-latex-template), which supports Pandoc but doesn't support academic metadata and so I edit it slightly to enable author affiliations etc. to work. There are quite a lot of modified templates around, for example I write all my letters in Scrivener, using a pandoc>letter template to put addresses/signatures/letter headings etc. You can even make presentations from Scrivener > pandoc > HTML/beamer/pptx...

For more specific LaTeX templates that do not support Pandoc or MMD, you would need to edit them so Pandoc/MMD can use them. For Pandoc, the simplest edit is to put $body$ in the right place; this tells Pandoc where to put the document body. But if you want better integration or handling of metadata you will need to do more manual editing (there is a simple template languagebult-in to Pandoc, see the docs). For MMD you would usually split the LaTeX template into 3 sections, [leader|begin|footer] (see docs).

So you will need to get your hands dirty with Scrivener > markdown workflows, but I think this is still much less confusing and more flexible than jumping into the LaTeX-only world...

da
dagobah
Posts: 6
Joined: Mon May 06, 2019 5:38 am
Platform: Mac

Thu May 09, 2019 5:41 pm Post

nontroppo wrote:Both Pandoc and MMD come with default templates that will work just fine for general reports/articles. In addition there are several LaTeX templates have been adapted to work with Pandoc.

So you will need to get your hands dirty with Scrivener > markdown workflows, but I think this is still much less confusing and more flexible than jumping into the LaTeX-only world...


Thanks again nontroppo. That makes sense and I think I understand better how pandoc (and pandocomatic) templates work. I've also had some back and forth with the creator of pandocomatic which further added to your recommendations. I'll be trying different things out in the next few works.

User avatar
nontroppo
Posts: 1148
Joined: Mon Mar 05, 2007 5:22 pm
Platform: Mac
Location: Airstrip One

Thu May 09, 2019 11:29 pm Post

dagobah wrote:
nontroppo wrote:I've also had some back and forth with the creator of pandocomatic which further added to your recommendations.


Yes, Huub is great and takes user needs and recommendations seriously, this was also the reason I originally settled on pandocomatic. You don't need a Pandoc "manager" like pandocomatic, you could also use Scrivener Compile formats as a simplistic manager of Pandoc settings. But pandocomatic templates are a more flexible and (IMO) elegant solution, especially when running additional pre/post processing into the mix.