reitzig / ltx2any

Yet another LaTeX build wrapper, with one or two nifty features
GNU General Public License v3.0
59 stars 4 forks source link

Adds hints how to run ltx2any on Windows. Refs #51. #61

Closed koppor closed 8 years ago

koppor commented 8 years ago

Refs #51.

akerbos commented 8 years ago

I don't have a machine to test this, so I'll have to trust that what you do is reasonable. Some questions:

  1. Why gnuplot? It's not necessary for all documents.
  2. Why Cygwin? Is this just for the GNU binary dependencies? (iirc cat, grep and awk at the moment) If that's all, it's probably about time I removed these if possible.

I'm glad that it appears to mostly work on Windows out of the box?

koppor commented 8 years ago

gnuplot: if I start ltx2any.rb, I get following output

[ltx2any] Initialising ...
[ltx2any] Essential dependency gnuplot (binary) unfulfilled

[ltx2any] Shutdown

I didn't search for how to disable gnuplot via command line and I read that output that gnuplot is absolutely required. Reading your comment, it reads that the word "Essential" is not quite true there? Installing gnuplot from sourceforge makes the error disappear.

Cygwin was the easiest thing to install gnuplot and cat. If installing gnuplot and pandoc manually from the websites, I get following output

[ltx2any] Initialising ... Done
[ltx2any] Copying files to tmp ... Done
[ltx2any] PdfLaTeX(1) running ... Der Befehl "cat" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Done
[ltx2any] PdfLaTeX(2) running ... Der Befehl "cat" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Done
[ltx2any] There were 0 errors and 0 warnings.
[ltx2any] Output generated at minimal-only-document.pdf
[ltx2any] Assembling log files ... Error
          Failed to build PDF log:
          You need pandoc for PDF logs.
[ltx2any] Falling back to Markdown log ... Done
[ltx2any] Log file generated at minimal-only-document.log.md

I don't know whether cat is absolutely necessary? The produced output without the cat call reads fine. Reading your comment again: Yes, Cygwin is because of cat, grep, and awk). There should be Windows equivalents around, but difficult to install. The alternative to Cygwin is to force the users to use git for windows and have them the BASH tools added to the path (which is an installation option).

The real issue remaining is that pandoc doesn't seem to be found, even if a call in the windows command line succeeds. This might be a hint for #64.

akerbos commented 8 years ago

ad gnuplot: Oh dear. Dependency management is still a work-in-progress. Several dependencies are marked :essential in their respective extensions, which is correct: the Gnuplot extension can't work without the binary. However, it's not a dependency for the whole program. See #65; these instructions should not mention gnuplot (when #65 is fixed, at least).

cat, grep and awk are currently used to determine if the resulting PDF changed. Without them, the number of iterations of the engine will be off (always twice, apparently?). I think I can get rid of the dependency, but that'll have to wait for a free afternoon. See #66.

So, once #65 is fixed and #66 is implemented, there is no need for Cygwin, right?

akerbos commented 8 years ago

Thank you for your interest and efforts, by the way. Yours is the first real feedback I've gotten on this tool. It's deeply appreciated! :)

koppor commented 8 years ago

Yes, I'd say so. The pandoc calling issue, however, is still to be solved. pandoc is not available in cygwin and therefore I really wonder, what's going on there. :worried:

You're welcome :star2:. I like to support interesting new ideas.

akerbos commented 8 years ago

What do you mean exactly; pandoc is not found when called from ltx2any, or the call fails with that error mentioned in #64?

akerbos commented 8 years ago

@koppor Oh, I forgot to ping you. The dependencies on GNU binaries are gone now. Can you confirm that ltx2any works under Windows (PATH issues with gnuplot and pandoc aside)?

koppor commented 8 years ago

Yes, it works without cygwin. I updated the PR accordingly.

koppor commented 8 years ago

I checked again in a fresh Windows 10 machine. No cygwin dependencies needed. When gnuplot and pandoc are installed, normal call works fine. Using -d leads to an endless loop.

akerbos commented 8 years ago

Thank you!

Changing how optional dependencies are handled is on my todo list. The goal is that runs that don't need gnuplot or pandoc execute when these tools are not installed, of course. The current situation is not specific to Windows.

What do you mean by "endless loop"? The one we expect, or something pathological? At which point?

koppor commented 8 years ago

ltx2any checks for changes and always thinks that there is a change. Further, I cannot use CTRL+c to cancel the build. Pushing it several times terminates the build process only, but not the ruby script itself. (Should I open a separate issue for that)?

I tried to replicate on ArchLinux, but I get

ERROR: undefined local variable or method `shortcode' for main:Object (see ausarbeitung.err for details)

#<NameError: undefined local variable or method `shortcode' for main:Object>

../ltx2any/ltx2any.rb:190:in `rescue in <main>'
../ltx2any/ltx2any.rb:185:in `<main>'%   

ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

Is there a quick fix or should I open a separate iusse?

koppor commented 8 years ago

Think, my issue described above does not influence the Windows installation description.

The described endless loop affects a complex template only. With Springer's LNCS template, C:\Ruby22-x64\bin\ruby ..\..\ltx2any\ltx2any.rb -d paper works fine. The only issue I still have, that CTRL+c does not cancel the job. Follow up on #82.

akerbos commented 8 years ago

ltx2any checks for changes and always thinks that there is a change.

sigh I'm using the listen gem pretty much as a black box. Restructuring the code and making it up to date with their latest version is on my todo list; other than that there's little I can do, I'm afraid. :/

#<NameError: undefined local variable or method `shortcode' for main:Object>

  ../ltx2any/ltx2any.rb:190:in `rescue in <main>'
  ../ltx2any/ltx2any.rb:185:in `<main>'%   

In the current revision, there is no such variable in the whole of ltx2any.rb. Please confirm that you are running the latest version.

akerbos commented 8 years ago

Anyway, since all Windows-specific issues seem to have been resolved for now, I'm closing this. If the issue you're having with shortcode persist, please open a new bug report. Thank you for your ongoing feedback!

koppor commented 8 years ago

Is it possible to include the provided installation hints for windows (861147301e365adf7e491be9ff2eb3de81a7d144) in the README.md? This was the intention of this pull request. It is intended for users just installing the LaTeX environment and which do not want to do trial and error. This starts with the choose of the ruby distribution etc. I wanted to lower the border for Windows users with this PR.

akerbos commented 8 years ago

Done, thank you!