0

I am trying to compile asciidoc document which contains some equations, the format is usually the following:

.First equation
[latexmath]
++++++++++++++++++++++++++++++++++++++++++++
\[C = \alpha + \beta Y^{\gamma} + \epsilon\]
++++++++++++++++++++++++++++++++++++++++++++

As I understand, I need first to use asciidoc processor to compile this to docbook:

 $ asciidoctor -o test.xml -b docbook test.asciidoc

The asciidoctor complains about latexmath block, but produces some xml anyway:

asciidoctor: WARNING: test.asciidoc: line 3: invalid style for pass block: latexmath

Then I try to create pdf using dblatex:

dblatex -D --pdf -o test1.pdf test.xml

However the produced pdf is just empty, I cannot see my equation whatsoever. What am I doing wrong?

Particularly I'm trying to compile this document: https://github.com/aantonop/bitcoinbook/blob/develop/ch04.asciidoc

I believe the problem is more related to asciidoc rather than tex, but can you help me anyway? How to render this file in Ubuntu?

I already asked this on asciidoctor forum, but nobody answers there... http://discuss.asciidoctor.org/Invalid-style-for-pass-block-latexmath-td2373.html

Aleksei Petrenko
  • 6,698
  • 10
  • 53
  • 87
  • 1
    Have you tried using a [stem] block? http://asciidoctor.org/docs/user-manual/#stem for more info. – LightGuard Oct 27 '14 at 17:42
  • Yes, I tried, but this does not work either. The document should be perfectly fine its just I don't know how to render it. I cannot find the contacts of an author to ask him, so I asked here. – Aleksei Petrenko Oct 27 '14 at 18:10

2 Answers2

1

You must pass the the math attribute either via the commandline: asciidoctor -a math or in the header of the document: :math: if you want to do this with html output.

I was not able to get it to work with dblatex nor asciidoctor-epub3, but a plain html should work, you could print to pdf from firefox or chrome.

LightGuard
  • 5,298
  • 19
  • 19
-1

You need to get rid of both \[ and \], then it works.

andalou
  • 11
  • 3