scholdoc

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. Scholdoc is implemented as (rather crude) fork of pandoc, and the command-line executable 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, and Docx output. Unfortunately, currently Scholdoc occupies the Pandoc namespace. This is done to avoid problems when merging in fixes and changes from the core Pandoc project, and to potentially allow enhancements from Scholdoc to be contributed back to Pandoc. It is thus not recommended to use the library directly, as Scholdoc is not backwards-compatible with Pandoc, to avoid confusion. For descriptions of the original pandoc package, please visit http://hackage.haskell.org/package/pandoc


Keywords
benchmark, gpl, library, program, text, Propose Tags , Text.Pandoc, Text.Pandoc.MediaBag, Text.Pandoc.Options, Text.Pandoc.PDF, Text.Pandoc.Pretty, Text.Pandoc.Process, Text.Pandoc.Readers.HTML, Text.Pandoc.Readers.LaTeX, Text.Pandoc.Readers.Markdown, Text.Pandoc.Readers.Native, Text.Pandoc.Readers.TeXMath, Text.Pandoc.Scholarly, Text.Pandoc.SelfContained, Text.Pandoc.Shared, Text.Pandoc.Templates, Text.Pandoc.UTF8, Text.Pandoc.Writers.Custom, Text.Pandoc.Writers.Docx, Text.Pandoc.Writers.HTML, Text.Pandoc.Writers.Haddock, Text.Pandoc.Writers.LaTeX, Text.Pandoc.Writers.Man, Text.Pandoc.Writers.Markdown, Text.Pandoc.Writers.Native, Text.Pandoc.XML, ScholarlyMarkdown, Pandoc, template, filter, custom templates, Pandoc Guide, understands, core CSS, schema, scholmd-content, MathJax
License
GPL-2.0+
Install
cabal install scholdoc-0.1.3

Documentation

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).