Skip to content

timtylin/scholdoc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Fork of Pandoc for the implementation of a ScholarlyMarkdown parser

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Haskell 81.8%
  • HTML 14.9%
  • Roff 1.3%
  • Lua 0.8%
  • Shell 0.6%
  • JavaScript 0.3%
  • Other 0.3%