Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Hi,
I am trying to use asciimath/mathjax, but I am running into some problems: 1. the html5 will only render mathjax if accessed from webserver. Local file:// access does not work 2. I am mostly using docbook pdf backend: this does not seem to work with asciimath at all Are there plans to support asciimath with docbook? Thanks, MT -- |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
I tried it and it works for me. I'm just shooting in the dark, but perhaps there's a proxy error? Is the browser JavaScript console reporting any problems? Either way, this is likely a MathJax issue.
You bet! Thanks to Pepijn, support for AsciiMath is coming to the DocBook backend (based on the new http://rubygems.org/gems/asciimath gem). See the following issue for details: https://github.com/asciidoctor/asciidoctor/pull/954 I'm hoping to make that integration part of the 1.5.3 release. -Dan |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
I do indeed get an error on the Javascript console: "Uncaught SyntaxError: Unexpected token ILLEGAL".
Turns out that both 1.5.2 and 1.5.3.dev generate this code: <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [\(\)], displayMath: [\[\]], ignoreClass: "nostem|nolatexmath" }, asciimath2jax: { delimiters: [\$\$], ignoreClass: "nostem|noasciimath" }, TeX: { equationNumbers: { autoNumber: "none" } } }); Whereas the 1.5.0 release notes at http://asciidoctor.org/release-notes/asciidoctor-1-5-0/ contain the following code: <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [["\\(", "\\)"]], displayMath: [["\\[", "\\]"]], ignoreClass: "nostem|nolatexmath" }, asciimath2jax: { delimiters: [["\\$", "\\$"]], ignoreClass: "nostem|noasciimath" }, TeX: { equationNumbers: { autoNumber: "none" } } }); Any idea why the square bracket and backslash are not repeated in my case? MT -- |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Looks like this is related to Ruby version and a change in to_s behavior: I am using ruby 1.8.7.
By changing to_s to inspect in converter/html5.rb I get the correct behavior: MathJax.Hub.Config({ tex2jax: { inlineMath: [#{INLINE_MATH_DELIMITERS[:latexmath].inspect}], displayMath: [#{BLOCK_MATH_DELIMITERS[:latexmath].inspect}], ignoreClass: "nostem|nolatexmath" }, asciimath2jax: { delimiters: [#{BLOCK_MATH_DELIMITERS[:asciimath].inspect}], ignoreClass: "nostem|noasciimath" }, TeX: {#{eqnums_opt}} }); MT -- |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
Thanks for reporting! On Tue, Jan 6, 2015 at 6:28 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote: By changing to_s to inspect in converter/html5.rb I get the correct behavior: Aha. inspect is what we intend here. As it turns out, Ruby 1.9.3 and above delegates to_s to inspect. I've pushed the change upstream. See https://github.com/asciidoctor/asciidoctor/commit/f86e65d92bf0af5e05d30d1983b57daa57286b51. > I am using ruby 1.8.7. Technically Ruby 1.8.7 is no longer supported. We're not making the change officially until 1.6.0, but there are several features already which won't work under Ruby 1.8.7. I strongly urge you to upgrade as Ruby 1.8.7 isn't even actively developed anymore. Cheers, |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Do you have a timeline for integrating asciimath support docbook in 1.5.3.dev?
When do you expect to release 1.5.3? Thanks, MT -- |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
|
On Thu, Jan 8, 2015 at 3:29 PM, metro [via Asciidoctor :: Discussion] <[hidden email]> wrote: Do you have a timeline for integrating asciimath support docbook in 1.5.3.dev? -- Dan Allen | http://google.com/profiles/dan.j.allen |
Free forum by Nabble | Edit this page |