Fork of Pandoc for the implementation of a ScholarlyMarkdown parser
Haskell HTML Other Lua Shell JavaScript Other
Clone or download
Pull request Compare This branch is 220 commits ahead, 5280 commits behind jgm:master.
timtylin temporarily cap highlighting-kate version to pass travis
(will make a more proper fix to unit tests after more merging)
Latest commit 2620c8a Apr 16, 2015
Permalink
Failed to load latest commit information.
benchmark bump criterion to 1.0 API for benchmark Feb 7, 2015
data LaTeX writer: output H1 as "part" unless "book" or "chapters" option … Feb 15, 2015
deb Add Installed-Size to debian package control file. Jan 26, 2015
osx OSX installer improvements. Aug 15, 2014
src/Text scholmd: more reliable detection of align vs gather Mar 20, 2015
tests LaTeX writer: use "\phantom{\ }" to escape spaces in texttt Feb 18, 2015
tryscholdoc refactored versioning information Nov 4, 2014
windows Update Windows build scripts for Scholdoc Nov 4, 2014
.editorconfig Fix editorconfig for test files Apr 12, 2014
.gitignore gitignore: Ignore cabal's sandbox files Apr 30, 2014
.gitmodules update template submodule remote path to new Scholdoc naming scheme Feb 7, 2015
.tm_properties check in textmate project file Oct 12, 2014
.travis.yml Travis: don't need alex, happy. Jun 18, 2014
BUGS massive cleanup of documents; removed old Pandoc-specific documents Oct 15, 2014
CHANGELOG-pandoc Merged release 1.13.2 from jgm Feb 4, 2015
CHANGELOG.md make documentation names more consistent Oct 17, 2014
CONTRIBUTING.md Merge fb7a03d from jgm Feb 4, 2015
COPYING COPYING: Fixed sublist indentation. Feb 10, 2013
COPYRIGHT massive cleanup of documents; removed old Pandoc-specific documents Oct 15, 2014
INSTALL.md bump criterion to 1.0 API for benchmark Feb 7, 2015
Interact.hs Added note to Interact.hs recommending 'cabal repl'. Jan 6, 2014
Makefile Merged release 1.13.2 from jgm Feb 4, 2015
README-pandoc Merge fb7a03d from jgm Feb 4, 2015
README.md editorial changes to readme Apr 16, 2015
Setup.hs Setup.hs: ensure make-man-pages not installed in bindir. Aug 13, 2014
github-upload.sh OSX package: Create .zip rather than .dmg. Dec 8, 2013
make_deb.sh Add Installed-Size to debian package control file. Jan 26, 2015
make_osx_package.sh Improved osx build procedure. Aug 18, 2014
scholdoc.cabal temporarily cap highlighting-kate version to pass travis Apr 16, 2015
scholdoc.hs Added "--force-crossrefs" option to CLI Feb 15, 2015

README.md

Scholdoc

Converts ScholarlyMarkdown documents into HTML5, LaTeX, or Docx

Current stable version: 0.1.4

Development build status build status
Stable build status build status

Scholdoc is a command-line utility that converts ScholarlyMarkdown documents into the HTML5, LaTeX, and Docx (OOML) formats. It is intended to facilitate academic writing in a cross-platform, semantic-aware, plaintext format that can be quickly used in modern publishing pipelines.

You can test the HTML and LaTeX output of Scholdoc on small (limited to 10,000 characters) ScholarlyMarkdown snippets using the online Dingus.

Scholdoc is implemented as fork of Pandoc, and mostly retains the same user interface (including the custom template and filter system). It essentially understands a new input format markdown_scholarly (implemented in the markdown reader a superset of markdown_pandoc features), and limits itself to HTML5/LaTeX/Docx output. Scholdoc defaults to standalone output and has its own custom templates to ensure output compatibility with ScholarlyMarkdown.

See the Pandoc Guide for more about Pandoc, its usage, and the Markdown dialect that Pandoc (and hence Scholdoc) understands.

Scholdoc is currently up to date with Pandoc version 1.13.2 (up to commit fb7a03dcda)

Installing Scholdoc

Via Homebrew (OS X only)

On OS X, the easiest way to obtain Scholdoc is from the official Homebrew tap. First make sure you have Homebrew set-up correctly on your system, and that running brew doctor gives you no serious warnings. After that, run the following:

brew tap timtylin/scholdoc
brew update
brew install scholdoc scholdoc-citeproc

To upgrade to the latest release, just run

brew update
brew upgrade scholdoc scholdoc-citeproc

Via pre-built binary distribution

Pre-built binary distributions exist for some platforms. Check the download page to see the list of available builds.

Compile via Hackage (all operating systems)

Scholdoc is written in pure Haskell. It requires the GHC compiler and the cabal-install build system. The easiest way to get it on all platforms is by installing the Haskell platform for your operating system. Please make sure you are using GHC version 7.4 or above.

If you are using Ubuntu, Herbert V. Riedel have conveniently provided a PPA of pre-compiled GHC and cabal-install for recent Ubuntu systems. Here's an example of how to get recommended versions of GHC and cabal-install using apt-get

sudo add-apt-repository ppa:hvr/ghc
sudo apt-get update && sudo apt-get install ghc-7.8.3 cabal-install-1.20

Once you have GHC and cabal-install on your system, run the following

cabal update
cabal install scholdoc
cabal install scholdoc-citeproc

To upgrade to the latest release of Scholdoc, just run the above three commands again.

HTML output

Important: A ScholarlyMarkdown core CSS is required for proper formatting of most HTML files output by Scholdoc.

Scholdoc's HTML output is strictly limited to HTML5 due to its enhanced semantic capabilities (such as the figure and figcaption element), and relies on some CSS3 features for layout (mostly for multi-image figures with subcaptions). It adheres to a fairly straightforward schema. No formatting information is written to the HTML by Scholdoc, so a ScholarlyMarkdown core CSS is required for bare minimum proper formatting. You can also write your own CSS that target the schema.

By default, the html output format generates a complete (but bare-bones) HTML5 document that can be used immediately. To have Scholdoc generate just the bare content (everything inside scholmd-content), use the html_bodyonly output format. By default, Scholdoc will always include proper MathJax settings for the way ScholarlyMarkdown prescribes math content in HTML.

Docx output

The Docx writer currently isn't fully functional yet. It does not yet output structures specific to ScholarlyMarkdown (such as figures).