mathdown icon indicating copy to clipboard operation
mathdown copied to clipboard

LaTeX export

Open cben opened this issue 10 years ago • 10 comments

  • [ ] Either use Docverter or host pandoc myself on heroku.
  • [ ] One-click button to then import into writelatex and/or sharelatex.

Far away:

  • [ ] Markdown lint that warns about suspicious markdown (e.g. list not preceded by newline).

cben avatar Mar 08 '14 00:03 cben

Tempted to host pandoc myself, to have unrestricted choice of markdown flavors, and to json input/output which would make easy to run arbitrary client-side filters in javascript (2 round trips but who cares).

cben avatar Mar 11 '14 22:03 cben

Pie-in-the-sky plans:

In the long term, I’m dreaming of creating a markdown normailzation & export wizard, at which point it’d be easier to run pandoc myself than use docverter:

  • give user fine-grained control over markdown extensions (and show the exact pandoc command line)
  • offer markdown->markdown conversion between dialects
  • markdown “lint” highlighting possible mistakes and suboptimal syntaxes (missing blank lines before header/list, “lazy” wrapping etc.)
  • for latex export, create combined pandoc+sharelatex app with 3 panes: markdown->tex->pdf. Users would be able to edit only the markdown and see tex and pdf update; when happy with result, download tex.

cben avatar May 19 '14 21:05 cben

  • [ ] However I implement comments (cf #41), latex export should convert them to pretty todonotes.

cben avatar May 21 '14 08:05 cben

Hmm, Gitbook has several issues about scientific features (math, footnotes and/or citations). They seem receptive to adopting pandoc extensions. Perhaps Gitbook should be used for quality export to PDF/epub? The problem is that it uses Marked, has no latex export, so it's not in the normal path to a And Mathdown is certainly not the best platform to full-length books... Still, should keep an eye on it for dialect compatibility...

cben avatar May 29 '14 21:05 cben

  1. I've wrapped Pandoc in a web service. You can try it here https://github.com/mrded/pandoc-as-a-service and here http://pandoc-as-a-service.com -- http://stackoverflow.com/a/31028085/239657

  2. I had an itch to scratch, and I wanted to get a bit more familiar with Openshift. [...] This is a simple app that takes the URL of a markdown file on GitHub, and outputs a pandoc converted PDF. I wanted to use pandoc specifically, because it produces PDF’s that were beautifully created with LaTeX. -- https://ttboj.wordpress.com/2014/10/18/hacking-out-an-openshift-app/

cben avatar Aug 11 '15 15:08 cben

The latter installs pandoc on OpenShift by copying the files and latex by running texlive installer. [https://github.com/purpleidea/pdfdoc/blob/master/INSTALL.md]

cben avatar Aug 11 '15 16:08 cben

https://www.npmjs.com/package/pandoc-bin !

cben avatar Aug 11 '15 17:08 cben

pandoc-as-a-service does support specifying custom markdown extensions :-)

$ curl -H "Content-Type: text/markdown_github-blank_before_header+tex_math_dollars+tex_math_single_backslash" -X POST http://pandoc-as-a-service.com/html -d '
foo
# header
$math^2$
'
<p>foo</p>
<h1 id="header">header</h1>
<p><span class="math"><em>m</em><em>a</em><em>t</em><em>h</em><sup>2</sup></span></p>

cben avatar Aug 11 '15 17:08 cben

  • [ ] Whatever I use, I'll want to run my own instance for privacy of doc content.

cben avatar Aug 11 '15 17:08 cben

markup.rocks was a cool demo of pandoc-compiled-to-JS but it's unmaintained for 7 years.

This is a sizable project, I'm not gonna work on this any time soon (see #172).

cben avatar Dec 17 '22 18:12 cben