An easy framework for drafting scientific documents: Write (Markdown), Compile (PDF, Word, HTML), Share.
An easy framework for drafting scientific documents: Write (Markdown), Compile (PDF, Word, HTML), Share.
This framework is designed to make writing easier. It provides lots of helper scripts to do the work for you, like building the manuscript PDF, creating folders for milestones, generating diffs, and more. You can focus on writing, while formating, compiling, and collaborating will just work like a charm.
This product aims to serve everyone and does not try to convince people to use a specific platform or programming language.
No fancy hacking. No strange dependencies. Science.md only uses standard shell commands, and well-accepted software tools (Pandoc, LaTeX, latexdiff, mutools). Even the templates are based on Pandoc's defaults with only tiny scholarly adpations. To be honest, the whole magic boils down to the Makefile and a few short scripts that let you process your manuscript as easy as pressing a button.
release/science.md.*
to view some examples.Science.md uses no OS-specific software and thus should work on any operating system. However, so far it has been tested only on Windows, and I would be glad if someone could test it on Mac and Linux!
sudo yum install docker
sudo docker pull ivotron/pandoc
in your AMI linux ,use git to get Scince.md,then change to the direcotry.
sudo docker run -d --name myscimd -v
pwd
:/usr/scimd ivotron/pandoc
since there is no scimd direcotry in the ivotron/pandoc image ,you should first go into a running one ,mkdir and then commmit the change.
sudo docker run exec -it containerid /bin/bash/
cd /usr/scimd
make -s pdf or any others ,enjoy:). becuase we use docker to mount a direcoty ,you can find you output in you host linux ,they are in Scince.md/release direcotry.
You do not need anything to write your draft, but a simple text editor to edit the files content/*.md
. Some text editor suggestions:
If you want to compile your text to LaTeX, PDF, Word, or HTML, you need:
pdflatex
, e.g., from the TeXlive distribution,Then some very basic bash
commands are needed. Most of them are actually standard on Linux and Mac, but Windows sometimes needs a slight additional kick.
make
, cat
, sed
, du
, rm
, wc
, e.g. from the cygwin distribution.mintty
, also from cygwin.I recommend creating .png
equivalents from every .pdf
figure, such that HTML and Word output can actually display the (originally .pdf
) figures. There is a handy script for this job in fig/pdf2png.bat
, which requires mutools:
General Note: Please make sure that all the binary files of the installed tools are accessible from command line, i.e., registered in the system paths. E.g. on Windows, add all folders containing
pandoc.exe
,pdflate.exe
,mutools.exe
,cygwin/bin/sed.exe
, ..., to the system path viaControl Panel > System > Advanced > Environmental Variables
.
To start writing your paper, use this Science.md repository as a template. Just download the whole repository and copy all its content into the folder of your project, which is probably called "my_nature_paper-no3".
If you want to version-control or share your work, I'd recommend git
, but also svn
or anything else would do, it's all your choice. You can self-host the repository remotely on your own server if you want. There are many GUI tools for version-control, from which I think GitHub Desktop is the most easy to use for non-geeks.
git pull
, or with GitHub Desktop press Sync
.git diff
or git log
, or with GitHub Desktop's History
tab. Or use run the script release/diff.bat
to create a latexdiff between the current and the latest released version.content/*.md
, add figures to fig/*
, etc.make -s all
or make.bat
.release/release.bat
.git add . && git commit -am "Message"
, or with GitHub Desktop press Commit
.git push
, or with GitHub Desktop press Sync
.As soon as your paper is ready and went smoothly through the internal review, you can submit it to a journal. You can either submit the Word document, or the LateX document. Some journals require a certain LaTeX template, which should be easy to fill with the content from release/NAME.tex
that Science.md generated for you.
==XX I better like invisble comments, though.==
. Use the YAML settings in content/title.md
to add individual initials and the corresponding colors. Typora will highlight these comments with yellow shade if the setting is activated in the program preferences. In MS Word, individual colors are not supported due to pandoc limitations. Comments in general must not contain equal signs.<!--- this is a comment --->
.fig/
.pdf
files to assure high-quality figures. Only for pure photographs .jpg
is acceptable. After adding or changing .pdf
figures, go to fig/
and run pdf2png.bat
. This will convert all .pdf
figures to .png
equivalents, which are easier to visualize in text editors, Word, and web browsers.![caption](../fig/name.png){#fig:label}
. Use the .png
extension even for .pdf
figures, to make them visible for Typora, Word, HTML. The PDF compiled output will always use the corresponding .pdf
file.Add a citation using @Eistein1905
or [see also @Eistein1905]
. The corresponding name must be appended to lit/references.bib
. Those BibTeX entries can be found everywhere in the internet, e.g. using the google scholar search engine or the export feature of any reference manager.
The text from content/*.md
can be compiled to Markdown, LaTeX, PDF, or Word.
(Once): Open the file Makefile
or make.bat
and make sure that the .md
files are arranged in the correct order. If you added new files to content/
, also add them to the given list.
If you have a capable terminal, run make -s all
to compile to all available output formats. Use the flag -s
to reduce verbose output. The following commands are available:
make -s
make -s tex
make -s pdf
make -s docx
make -s all
make clean
(Or): On Windows, you can simply double-click the file make.bat
to compile to all output formats.
The currently compiled files are stored in release/
and can be copied to an extra folder, release/version[Date]-[Time]
, to permanently save one version, which can be used later to perform diffs, for instance. This process has been automated, simply go to release/
and run release.bat
.
git diff
, or using the GitHub Desktop GUI.latexdiff
script that usually comes with the texlive
distribution. Edit the file diff.bat
by specifiying the two folders which you want to compare (the new version defaults to the current files in the release/
folder). Then run diff.bat
. It creates diffs from the two .tex
files in the given folders and compiles a new diff.pdf
where differences are nicely highlighted.@Einstein2015
, or [see @Einstein2015; @Newton1730, and references therein]
# Section
, ## Subsection
, ### Subsubsection {#sec:label}
, ...![caption](../fig/file.png){#fig:label}
$x=1$
, $$ A=B $$ {#eq:label}
, $$\begin{aligned} A &= B \\ C &= A+B \end{aligned}$$
@Fig:label
, [@Fig:label1; @fig:label1]
, @sec:label
, @eq:label
, @tbl:label
, [Appendix @sec:label]
, [Appendices @sec:label1; Appendices @sec:label1]
==XX a random comment==
, ==MS a personalized comment==
(defined in content/title.md), <!--- invisible comment --->
`code`
or paragraphs with a left-padding of 4 spaces| A | B | C |
| --: | --------------: | :---: |
| 42 | $y=x+1$ | True |
| 23 | None | False |
Table: Caption. {#tbl:label}