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

Help on wrong usage of lf #108

Closed koppor closed 6 years ago

koppor commented 6 years ago

Command line:

ruby c:\git-repositories\ltx2any\ltx2any.rb -lf pdf paper.tex

Result:

[ltx2any] Error: wrong number of arguments (given 3, expected 0)
          See "#{self[:jobname]}".err for details.
c:/git-repositories/ltx2any/ltx2any.rb:280:in `initialize': Invalid argument @ rb_sysopen - C:/SVNs/SmartOrchestra-IAAS/Publications/2018-04 - IC2E - TDL/01 - Workspace/"#{self[:jobname]}".err (Errno::EINVAL)
        from c:/git-repositories/ltx2any/ltx2any.rb:280:in `open'
        from c:/git-repositories/ltx2any/ltx2any.rb:280:in `rescue in <main>'
        from c:/git-repositories/ltx2any/ltx2any.rb:48:in `<main>'

Should there be any error message here?

reitzig commented 6 years ago

That looks very wrong. Looking at the current code, I don't know what is happening here. If you insert puts e between lin 277 and 278, what does it say?

Does calling ltx2any.rb directly usually work for you? (On GNU/Linux, I had to do some trickery to get the script path correctly in the presence of symlinks.) Which Ruby version are you flying? Has this been happening only since the changes I made in August?

bichselb commented 6 years ago

Tried out ltx2any today, and I get the same error, but with a different stacktrace:

$ ruby /opt/ltx2any/ltx2any/ltx2any.rb -lf pdf main.tex
[ltx2any] Error: wrong number of arguments (given 3, expected 0)
          See "#{self[:jobname]}".err for details.
$ cat \"#\{self\[\:jobname\]\}\".err 
#<ArgumentError: wrong number of arguments (given 3, expected 0)>

/opt/ltx2any/ltx2any/lib/DependencyManager.rb:104:in `list'
/opt/ltx2any/ltx2any/logwriters/PDF.rb:23:in `block in <top (required)>'
/opt/ltx2any/ltx2any/lib/ParameterManager.rb:192:in `block in set'
/opt/ltx2any/ltx2any/lib/ParameterManager.rb:191:in `each'
/opt/ltx2any/ltx2any/lib/ParameterManager.rb:191:in `set'
/opt/ltx2any/ltx2any/lib/ParameterManager.rb:99:in `processArgs'
/opt/ltx2any/ltx2any/ltx2any.rb:51:in `<main>'

My ruby version is

$ ruby -v
ruby 2.3.1p112 (2016-04-26) [x86_64-linux-gnu]

I do not have symlinks in the path to my ltx2any.rb.

To install ltx2any, I used

sudo apt-get install ruby-full gnuplot pandoc
sudo gem install ruby-progressbar parallel
git clone https://github.com/akerbos/ltx2any.git
reitzig commented 6 years ago

Thanks for following up on this!

Hmpf. This seems to have had to do with the changes in Ruby around named and default parameters. I have to admit that due to my intermittent engagement with this project (sorry about that :/) I don't quite recall when I changed it why, but this particular line has changed back and forth between the two concepts. Maybe because I had different Ruby versions running at work vs home and forgot about the background in between changes -- I don't know.

Anyway, apparently I missed to convert that one call site for PDF logs. Fixed now. Sorry for the inconvenience.

@koppor I assume this solves your issue as well? Sorry for not looking in the right place back then.