asciidoctor-mathematical fails to install

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

asciidoctor-mathematical fails to install

jvdh
hi there,

happy asciidoctor user here. however, today I ran into a problem, when trying to install
asciidoctor-mathematical on an OSX 10.15.3 machine in order to see whether asciidoctor-pdf plus
asciidoctor-mathetmatical is a viable alternative to asciidoc plus dblatex for getting latex
equations into pdf output. of course, if there are better ways, I'd appreciate any advice.

actually, the problem is `Mathematical' itself but I am not a ruby (or C, actually) person and do
hope for some guidance here. the error message I receive during `gem install
asciidoctor-mathematical' is:

compiling mathematical.c
In file included from mathematical.c:23:
In file included from ./mathematical.h:14:
In file included from /opt/local/include/glib-2.0/glib/gi18n.h:23:
/opt/local/include/libintl.h:440:8: error: unknown type name 'locale_t'
extern locale_t newlocale (int, const char *, locale_t);
        ^
where /opt/local/ is the path to the Macports maintained additional software packages (like glib).

all the dependencies (pango, glib, cmake etc) seem to be installed. any ideas?

thank you,

joerg


Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

abelsromero
Quick thought. Have you checked libs dependencies here https://github.com/asciidoctor/asciidoctor-mathematical#os-x ?
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

jvdh


On 17.08.20 16:53, abelsromero [via Asciidoctor :: Discussion] wrote:
>
>
> Quick thought. Have you checked libs dependencies here
> https://github.com/asciidoctor/asciidoctor-mathematical#os-x ?

thanks, but yes I did that (it's `glib2' and `gdk-pixbuf2') but I believe that is ok, no?

>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8174.html
> To start a new topic under Asciidoctor :: Discussion, email [hidden email]
> To unsubscribe from Asciidoctor :: Discussion, visit https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=dmVlZGVlaGpheUBnbWFpbC5jb218MXw0MTY2MTIyMjc=
>
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

abelsromero
I'd try with the exact libs they mention. If it does not work, post directly in the projects GitHub repo.
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

mojavelinux
Administrator
What I can tell you is that even I cannot install asciidoctor-mathematical. The only way I know to use it is via the Docker container. That's because mathematical is not really a portable library. It works on very specific versions of Linux. One of those is Alpine, which the Docker image builds on.

Best Regards,

-Dan

On Mon, Aug 17, 2020 at 12:34 PM abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I'd try with the exact libs they mention. If it does not work, post directly in the projects GitHub repo.


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8176.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

jvdh


On 17.08.20 22:27, mojavelinux [via Asciidoctor :: Discussion] wrote:
>
>
> What I can tell you is that even I cannot install asciidoctor-mathematical.
> The only way I know to use it is via the Docker container. That's because
> mathematical is not really a portable library. It works on very specific
> versions of Linux. One of those is Alpine, which the Docker image builds on.
>

ah, I see. unfortunate, but thanks for clarifying.

question: I am not sure, what the `asciidoc' and(?) `a2x' do to pass latex equations through
docbook/xml to dblatex exactly but that seems to be the only option, then, to get latex math into
pdf output. is there a way to do similar with `asciidoctor'?

best regards,
joerg

> Best Regards,
>
> -Dan
>
> On Mon, Aug 17, 2020 at 12:34 PM abelsromero [via Asciidoctor ::
> Discussion] <[hidden email]> wrote:
>
>> I'd try with the exact libs they mention. If it does not work, post
>> directly in the projects GitHub repo.
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8176.html
>> To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>> .
>> NAML
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

mojavelinux
Administrator
AsciiDoc Python passes the latex expressions through raw, then a2x (aka DocBook toolchain) uses dblatex (which is actually LaTeX itself) to handle the equations.

asciidoctor-mathematical is the current solution in the Asciidoctor ecosystem. However, you have to use the Docker container to make use of it (unless you are able to compile mathematical yourself).

Another viable solution is to use MathJax. There are users who have done it successfully. But as of yet, no one has come forward with an official extension for Asciidoctor. So we wait ;)

Best Regards,

-Dan

On Tue, Aug 18, 2020 at 1:59 AM jvdh [via Asciidoctor :: Discussion] <[hidden email]> wrote:


On 17.08.20 22:27, mojavelinux [via Asciidoctor :: Discussion] wrote:
>
>
> What I can tell you is that even I cannot install asciidoctor-mathematical.
> The only way I know to use it is via the Docker container. That's because
> mathematical is not really a portable library. It works on very specific
> versions of Linux. One of those is Alpine, which the Docker image builds on.
>

ah, I see. unfortunate, but thanks for clarifying.

question: I am not sure, what the `asciidoc' and(?) `a2x' do to pass latex equations through
docbook/xml to dblatex exactly but that seems to be the only option, then, to get latex math into
pdf output. is there a way to do similar with `asciidoctor'?

best regards,
joerg

> Best Regards,
>
> -Dan
>
> On Mon, Aug 17, 2020 at 12:34 PM abelsromero [via Asciidoctor ::
> Discussion] <[hidden email]> wrote:
>
>> I'd try with the exact libs they mention. If it does not work, post
>> directly in the projects GitHub repo.
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8176.html
>> To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>> .
>> NAML
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8182.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

jvdh


On 18.08.20 10:17, mojavelinux [via Asciidoctor :: Discussion] wrote:
>
>
> AsciiDoc Python passes the latex expressions through raw, then a2x (aka
> DocBook toolchain) uses dblatex (which is actually LaTeX itself) to handle
> the equations.

ok, if that's the case, could that strategy not be used by asciidoctor as well? if the equations
reach the docbook output in a way that dblatex can identify/use them, at least the xml -> latex ->
pdf route could be used with asciidoctor as well (and it would for this use case (equation heavy
documents) be neither than svg or png images, of course).

>
> asciidoctor-mathematical is the current solution in the Asciidoctor
> ecosystem. However, you have to use the Docker container to make use of it
> (unless you are able to compile mathematical yourself).

understood. I will have to try that, then.

>
> Another viable solution is to use MathJax. There are users who have done it
> successfully. But as of yet, no one has come forward with an official
> extension for Asciidoctor. So we wait ;)

I would if I could but I can't :).

best regards,

joerg

>
> Best Regards,
>
> -Dan
>
> On Tue, Aug 18, 2020 at 1:59 AM jvdh [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:
>
>>
>>
>> On 17.08.20 22:27, mojavelinux [via Asciidoctor :: Discussion] wrote:
>>>
>>>
>>> What I can tell you is that even I cannot install
>> asciidoctor-mathematical.
>>> The only way I know to use it is via the Docker container. That's
>> because
>>> mathematical is not really a portable library. It works on very specific
>>> versions of Linux. One of those is Alpine, which the Docker image builds
>> on.
>>>
>>
>> ah, I see. unfortunate, but thanks for clarifying.
>>
>> question: I am not sure, what the `asciidoc' and(?) `a2x' do to pass latex
>> equations through
>> docbook/xml to dblatex exactly but that seems to be the only option, then,
>> to get latex math into
>> pdf output. is there a way to do similar with `asciidoctor'?
>>
>> best regards,
>> joerg
>>
>>> Best Regards,
>>>
>>> -Dan
>>>
>>> On Mon, Aug 17, 2020 at 12:34 PM abelsromero [via Asciidoctor ::
>>> Discussion] <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=8182&i=0>> wrote:
>>>
>>>> I'd try with the exact libs they mention. If it does not work, post
>>>> directly in the projects GitHub repo.
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>> discussion
>>>> below:
>>>>
>>>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8176.html
>>>> To start a new topic under Asciidoctor :: Discussion, email
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=8182&i=1>
>>>> To unsubscribe from Asciidoctor :: Discussion, click here
>>>> <
>> https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>>
>>>> .
>>>> NAML
>>>> <
>> https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>>>
>>>
>>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8182.html
>> To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>> .
>> NAML
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

mojavelinux
Administrator
> ok, if that's the case, could that strategy not be used by asciidoctor as well

Yes, absolutely. You always have the option of converting to DocBook, then using the DocBook toolchain (either using a2x or fopub) to convert to PDF. However, that's technically going outside of the Asciidoctor ecosystem, which is why I said that asciidoctor-mathematical is the solution within the Asciidoctor ecosystem.

Best Regards,

-Dan

On Tue, Aug 18, 2020 at 2:29 AM jvdh [via Asciidoctor :: Discussion] <[hidden email]> wrote:


On 18.08.20 10:17, mojavelinux [via Asciidoctor :: Discussion] wrote:
>
>
> AsciiDoc Python passes the latex expressions through raw, then a2x (aka
> DocBook toolchain) uses dblatex (which is actually LaTeX itself) to handle
> the equations.

ok, if that's the case, could that strategy not be used by asciidoctor as well? if the equations
reach the docbook output in a way that dblatex can identify/use them, at least the xml -> latex ->
pdf route could be used with asciidoctor as well (and it would for this use case (equation heavy
documents) be neither than svg or png images, of course).

>
> asciidoctor-mathematical is the current solution in the Asciidoctor
> ecosystem. However, you have to use the Docker container to make use of it
> (unless you are able to compile mathematical yourself).

understood. I will have to try that, then.

>
> Another viable solution is to use MathJax. There are users who have done it
> successfully. But as of yet, no one has come forward with an official
> extension for Asciidoctor. So we wait ;)

I would if I could but I can't :).

best regards,

joerg

>
> Best Regards,
>
> -Dan
>
> On Tue, Aug 18, 2020 at 1:59 AM jvdh [via Asciidoctor :: Discussion] <
> [hidden email]> wrote:
>
>>
>>
>> On 17.08.20 22:27, mojavelinux [via Asciidoctor :: Discussion] wrote:
>>>
>>>
>>> What I can tell you is that even I cannot install
>> asciidoctor-mathematical.
>>> The only way I know to use it is via the Docker container. That's
>> because
>>> mathematical is not really a portable library. It works on very specific
>>> versions of Linux. One of those is Alpine, which the Docker image builds
>> on.
>>>
>>
>> ah, I see. unfortunate, but thanks for clarifying.
>>
>> question: I am not sure, what the `asciidoc' and(?) `a2x' do to pass latex
>> equations through
>> docbook/xml to dblatex exactly but that seems to be the only option, then,
>> to get latex math into
>> pdf output. is there a way to do similar with `asciidoctor'?
>>
>> best regards,
>> joerg
>>
>>> Best Regards,
>>>
>>> -Dan
>>>
>>> On Mon, Aug 17, 2020 at 12:34 PM abelsromero [via Asciidoctor ::
>>> Discussion] <[hidden email]
>> <http:///user/SendEmail.jtp?type=node&node=8182&i=0>> wrote:
>>>
>>>> I'd try with the exact libs they mention. If it does not work, post
>>>> directly in the projects GitHub repo.
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>> discussion
>>>> below:
>>>>
>>>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8176.html
>>>> To start a new topic under Asciidoctor :: Discussion, email
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=8182&i=1>
>>>> To unsubscribe from Asciidoctor :: Discussion, click here
>>>> <
>> https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>>
>>>> .
>>>> NAML
>>>> <
>> https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>>>>
>>>
>>>
>>
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8182.html
>> To start a new topic under Asciidoctor :: Discussion, email
>> [hidden email]
>> To unsubscribe from Asciidoctor :: Discussion, click here
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=1&code=ZGFuLmouYWxsZW5AZ21haWwuY29tfDF8MTY5MzI5MDU4>
>> .
>> NAML
>> <https://discuss.asciidoctor.org/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8185.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

abelsromero
I don't mean to contradict any of the afirmations, but I was curious and not happy if really the project was not compatible. So I pinged in the repo and tested myself. In short, it should compile and I could do it without problems installing the dependencies with homebrew.

I noticed my 'libintl.h' line 440 is different from the one showing in your error, so maybe the issue is in another dependency and not glib.
These are my deps are reported with "brew info":

- glib 2.64.5
- gdk-pixbuf 2.40
- cairo 1.16
- pango 1.46
- cmake 3.18.1

Could be also

If it helps, I updated all my installed tools with "brew update && brew outdated && brew upgrade".
Reply | Threaded
Open this post in threaded view
|

Re: asciidoctor-mathematical fails to install

mojavelinux
Administrator
Abel,

Thanks for testing! I'm delighted to hear you're able to compile the library and dependencies on OSX using homebrew. Since my experience is related to Linux, that doesn't contradict my assertion. It's still a challenge to install on Linux, perhaps because the library isn't verified to be portable on Linux.

It would probably be helpful if the asciidoctor-mathematical README was more specific about where the library can be installed and how. I think the terse instructions are a major source of the confusion.

Best Regards,

-Dan

On Wed, Aug 19, 2020 at 1:20 PM abelsromero [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I don't mean to contradict any of the afirmations, but I was curious and not happy if really the project was not compatible. So I pinged in the repo and tested myself. In short, it should compile and I could do it without problems installing the dependencies with homebrew.

I noticed my 'libintl.h' line 440 is different from the one showing in your error, so maybe the issue is in another dependency and not glib.
These are my deps are reported with "brew info":

- glib 2.64.5
- gdk-pixbuf 2.40
- cairo 1.16
- pango 1.46
- cmake 3.18.1

Could be also

If it helps, I updated all my installed tools with "brew update && brew outdated && brew upgrade".


If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/asciidoctor-mathematical-fails-to-install-tp8173p8192.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux