Scripts and templates for writing a scientific paper in markdown formatting. Make sure you view the actual templates in "Raw" markdown, github does not handle the yaml header appropriately. You can either hit the "raw" button here or clone the repo and go through it with your prefered text editor.
git clone https://github.com/liamtimms/bashscripts.gitI also recommend installing pandoc and you'll need a distribution of LaTeX if you want to compile .tex or .pdf files from this. On Linux I use texlive (on Windows I use MiKTeX but I haven't tested pandoc on Windows with it).
To get started look at general template.
-
LaTeX
- Pros:
- easily the best existing language for dealing with complex formatting and type setting
- many journals provide templates for use with LaTeX
- FOSS compilers and plain text source files
- Cons:
- often uncomfortable for collaborators outside of physics, math, and comp sci
- difficult to parse as plain text while writing (verbose syntax)
- not all journals accept LaTeX source files
- Pros:
-
Microsoft Word
- Pros:
- very simple to get started in
- everyone knows how to use it
- journals always accept it (in my experience)
- Cons:
- type-setting nightmare once you have a complex document
- unpredictable formatting
- proprietary (can lose access to your own work)
- difficult/impossible to work with actual source files (
docxis actually aziparchive of some really complexXMLfiles)
- Pros:
Compiles to both MS Word (.docx) and LaTeX (.tex or .pdf with LaTeX as an intermediate step) from a single source file. You can choose the pros or cons of either based on your current need without having to deal with complex processing in either. Additionall for markdown itself:
-
Markdown
- Pros:
- very simple to get started in
- many people already know how to use it (used for formatting on websites - github, reddit, etc.)
- if you don't know it you can try https://www.markdowntutorial.com/
- easy to write and parse (simple syntax)
- automatic formatting available (prettier)
- FOSS compilers and plain text source files
- many editors offer good support
- bibtex based citations which translate to both Word and LaTeX
- Cons:
- cannot be submitted for journals or assigments directly
- may require you to backport collaborator's changes from docx which wastes time
- Pros:
- keep templates as simple as possible
- cover all common issues which are not clear in existing templates
- explain the syntax using the syntax
- maintain maximum compatibility for both Word and LaTeX where possible
- never require more than one compilation command
- never require/push the use of an external website
Goes over the basics for a general purpose document.
PDF output:
pandoc ${inputfile} --filter pandoc-crossref -C -N --highlight-style zenburn -o outputfile.pdfMS Word output:
pandoc ${inputfile} --filter pandoc-crossref -C --csl ieee.csl -o outputfile.docxShould be looked at in addition to the general_template.md. Requires additional install of pandoc/lua-filters.
PDF output:
pandoc --filter pandoc-crossref --lua-filter=/${some_path}/lua-filters/short-captions/short-captions.lua -C -N --highlight-style zenburn -o outputfile.pdf ${inputfile}note: You can see my script for this to automatically recompile documents on changes here: https://github.com/liamtimms/bashscripts/blob/master/pdfpreview