asciidoctor / asciidoctor-browser-extension

:white_circle: An extension for web browsers that converts AsciiDoc files to HTML using Asciidoctor.js.
https://chrome.google.com/webstore/detail/asciidoctorjs-live-previe/iaalpfgpbocpdfblpnhhgllgbdbchmia
MIT License
218 stars 50 forks source link

Add asciidoctor-latex functionality #93

Open jxxcarlson opened 9 years ago

jxxcarlson commented 9 years ago

It would be great to add the html backend features of asciidoctor-latex to asciidoctor-chrome-extension. The repo is at https://github.com/asciidoctor/asciidoctor-latex.

For a description of what asciidoctor-latex, does, see http://www.noteshare.io/section/asciidoctor-latex-manual-intro

For an exemplar of the extension's use, see https://vschool.s3.amazonaws.com/manuscripts/337.html

Would be glad to discuss this.

ggrossetie commented 9 years ago

It's a good idea but I think the first step is to cross-compile asciidoctor-latex to Javascript using Opal to create asciidoctor-latex.js ! (similar to what has be done with Asciidoctor.js)

Once this is done we can find a way to integrate it.

jxxcarlson commented 9 years ago

Great! I have never used Opal, but will try to learn how and cross-compile. Could you point to where I might learn to do this?

Thanks so much!

Sent from my iPhone

On Feb 23, 2015, at 12:20 PM, Guillaume Grossetie notifications@github.com wrote:

It's a good idea but I think the first step is to cross-compile asciidoctor-latex to Javascript using Opal to create asciidoctor-latex.js ! (similar to what has be done with Asciidoctor.js)

Once this is done we can find a way to integrate it.

— Reply to this email directly or view it on GitHub.

jxxcarlson commented 9 years ago

Oops! Your link has all the necessary info. I'll work on it.

Jim

Sent from my iPhone

On Feb 23, 2015, at 12:20 PM, Guillaume Grossetie notifications@github.com wrote:

It's a good idea but I think the first step is to cross-compile asciidoctor-latex to Javascript using Opal to create asciidoctor-latex.js ! (similar to what has be done with Asciidoctor.js)

Once this is done we can find a way to integrate it.

— Reply to this email directly or view it on GitHub.

stefaneidelloth commented 6 years ago

I am new to asciidoc and wanted to include a latex equation. The related issue: https://github.com/asciidoctor/asciidoctor-browser-extension/issues/51 pointed me to a solution. The following syntax worked for me to display some equations in myFile.ad with Firefox or Chrome. The "trick" was to add ":stem: latexmath" at the beginning.

:stem: latexmath

== Test of more complicated mathematics

The fundamental theorem of calculus statest that

[latexmath]
++++
\frac{d}{dx}\int_a^x f(t) dt = f(x)
++++

An inline equation latexmath:[C = \alpha + \beta Y^{\gamma} + \epsilon]
using the ’latexmath’ inline macro.