-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Support and document installation of LaTeXML via homebrew on Mac OS X #929
Comments
Hi @asmaier, I'm able to install and use LaTeXML with Homebrew (on High Sierra 10.13.2) via:
which installs the latest GitHub version with all the required and optional dependencies. I agree, anyway, that the formula should be updated and that a mention in the documentation would be nice! 😉 |
@matteosecli Nice work. Your solution seems to work, because the HEAD version of latexml on github has fixed the shebang in the perl scripts from |
Excellent, thank you for all the information! |
@asmaier I'll try to figure out how to fiddle around with the current LaTeXML Homebrew formula to include these fixes, since it appears from your bug report Homebrew/homebrew-core#22903 that they only want pull requests. |
I had a weird problem. The installation of the HEAD version of LaTeXML following the steps of @matteosecli failed on my machine. The two perl modules
So somehow my version of Anaconda (https://www.anaconda.com/download/#macos) interfered with the build process of the Perl modules |
... could you give us a list of files inside that |
Install all the necessary Perl modules for LaTeXML to work properly. Related issues: brucemiller/LaTeXML#929 and Homebrew#22903.
@asmaier I've sent a PR to the Homebrew folks with an updated recipe for LaTeXML. It should solve many of the issues here, including your problems with the I've tested the recipe in a clean High Sierra install and it seems to work; could you please give it a try? Btw I've tried to track down all the non-core Perl modules (and their dependencies) that LaTeXML depends on, but there are chances I've missed some of them. If you get errors about missing modules let me know! 😉 Edit: |
@dginev Don't worry too much about the problem with Anaconda. It turned out that my version of Anaconda was very old. I decided to simply delete it. And it seems to be a known problem, that Anaconda is often interfering with Homebrew, see https://hashrocket.com/blog/posts/keep-anaconda-from-constricting-your-homebrew-installs . So this is not a problem unique to LaTeXML. |
@matteosecli I did install your new homebrew formula with
on Mac OS X 10.12.6 and it worked flawlessly. Imagemagick was installed and I was able to convert my latex document with images included. Thank you very much for this new homebrew formula for LaTeXML! |
@asmaier Happy to hear that it works! 😄 |
I'm a little confused by some of this. If there already is a Homebrew formula, the best approach would be to fix it (or get it fixed). It looks like @matteosecli submitted a PR, that wasn't accepted. While I don't know formula language, I took a look at it and was a bit confused. It seemed to have all sorts of dependencies (like HTTP::Cookie and lots of others) that aren't dependencies of LaTeXML. Perhaps this threw the Homebrew folks off, as well? The point being, I'm not sure how to distill this discussion into a "do this and that". All the better: I've just spent some time reorganizing and fleshing out the wiki pages to hopefullly make them more welcoming :> Could I ask you guys @matteosecli and @asmaier to look at the "Installation Guide" wiki page and add something there? Thanks!!! |
@brucemiller you're perfectly right, the formula has to pull lots of dependencies. My understanding is that Homebrew packages are installed in a way that limits to the lowest possible level the interference with the OS. In a certain sense, they look like small "containers" that are designed to communicate only with other Homebrew "containers" or with system libraries. So, they have to include all the necessary pieces in order to work independently from other non-Homebrew software. Then, in a Homebrew formula you can have two kind on dependencies:
In the second case, the official guidelines say that you have to pull these dependencies as That being said, I've recently tried to simplify a lot the formula (see Homebrew/homebrew-core#24254) by temporally using It turns out that the problem is not the readability or the complexity of the formula; they just don't like the fact that you have to pull many dependencies (despite the existence of formulas like the previous In addition, it appears that you cannot specify Homebrew dependencies with specific options. In this case, LaTeXMl depends on ImageMagick; however, Homebrew does not ship ImageMagick with it own Perl module by default. One could force a recompilation of ImageMagick with its Perl module by using So at this point, unless you really want to ship LaTeXML with all the modules and ImageMagick itself, I would say that there are three possibilities for the "Installation Guide" wiki:
From my point of view, the third option is a hassle anyway since it requires different pre-installation steps; I would prefer just to pull the tarball and compile it myself. But it would have the benefit that, once installed the dependencies for the first time, all the subsequent updates would be automatic. So, @brucemiller @asmaier what do you think? 🤔💭 Waiting for your thoughts! PS: Sorry for the philippic! 😅 |
Sorry, I missed your response. Thanks for the detailed explanation of Homebrew formula. Actually, Homebrew's model (as I understand it) isn't actually much different from the other installation/repo systems I'm familiar with (rpm, debian, macports...), with exception of the apparent lack of formula for components. Are there really no pre-existing formula for perl's Archive::Zip, DB_File, LWP, etc? I tried searching, but maybe I did it wrong.Those "common" modules, I'd think, really deserve a separate formula of their own. Recursively disentangling their dependencies and embedding the resulting mess in any formula that needs them utterly violates any sensible modularity and maintainability. Although the resource mechanism seems to be a really useful last-resort, but hardly seems the right approach for most use cases. But I'm confused about how introducing Image::Magick somehow cascaded into having to explicitly import all the LWP dependences. How did it work before? There's some comments in the other issues regarding which perl is used, but I didn't quite follow it. There's been a change since 0.8.2 involving the way perl gets invoked, in fact it now uses Not sure how to proceed for now, though. I would suppose it's possible to write a formula that uses the development version of LaTeXML, fetching a zip from github? That might answer some of these questions. |
The best way I could think of to summarize this discussion was to put a link on the Wiki page to this discussion. Hope that helps somebody in the future. |
Hi, I am working on a project (amc2moodle) that depends on latexml. Some users are using macOS but I never use it. In order to test the project, I would like to install latexml on the macOS Catalina 10.15.4 provided by github actions.
doesn't work. I have tried several approaches proposed here, but I still stuck with a XSLT trouble :
obtained with
Have you an idea to solved this problem Benoit |
Hi @nennigb, I use
To be honest, the solution in the Japanese post didn't work for me; so I've tried to manually build
Now, hopefully, you have a working |
I've just tested the head version of git clone https://github.com/brucemiller/LaTeXML.git && cd LaTeXML/
perl Makefile.PL
make test and I got:
so I guess it's working correctly, at least with Homebrew's libraries. I've also tried to convert to epub some random paper from arXiv and seems to be working fine. |
Hi, thank you for your help. My workflow now contains your steps. The following code allows to install latexml on github actions catalina.
To fully test my application, I still need tikz, but its not your problem ;-) Benoit |
That's great, glad it worked! 😄 |
Hi, LaTeXML does not detect tikz (and keyval) and raises
Before installing LaTeXML, I have run
I assume that I still have an environment variable problem, Thank a lot, |
After further investigation, the problem comes from my wrong conception of environment variable (like PATH here) in github action. These variable are not conserved between steps (subprocess). |
Many people use homebrew as package manager on Mac OS X (see https://brew.sh/analytics/os-version/). Unfortunately LaTeXML doesn't officially seem to support installation via homebrew and the available package has some issues: Homebrew/homebrew-core#22903 . Especially it is missing the dependency to Imagemagick and therefore after installation it is not possible to convert LaTeX files with images.
But I managed to install LaTeXML using homebrew with Imagemagick and want to document this here. Maybe this is helpful for someone or even can be added to the official documentation:
After doing this the
latexmlpost
command should find theImage::Magick
perl module and be able to convert images.The text was updated successfully, but these errors were encountered: