davidcarlisle / dpctex

Assorted TeX packages
94 stars 30 forks source link

pslatex wraps options within quotes and breaks --help #42

Closed xworld21 closed 1 year ago

xworld21 commented 1 year ago

If I run pslatex -help, latex will complain with ! I can't find file `-help'., because it receives the literal "-help" which gets interpreted as a file name instead of an option.

It all comes from the line https://github.com/davidcarlisle/dpctex/blob/ccc351abc68de5a48489afea1ed83c79387e240b/pslatex/shell/pslatex#L20 where the arguments receive extra escaped double quotes.

davidcarlisle commented 1 year ago

@xworld21 oh I guess so. are you actually using pslatex? I have never used it in its latex2e form (it only really made sense for latex2.09-nfnss)

I would have removed it from ctan except removing anything always breaks something, similarly changing it now when it hasn't really changed since the 1990s is not without risk....

xworld21 commented 1 year ago

are you actually using pslatex?

No, I am just running a texlive-wide script test, trying to run all scripts with either --help or --version to check if we package them properly (for Nixpkgs), and pslatex opposed considerable resistance.

similarly changing it now when it hasn't really changed since the 1990s is not without risk....

True! I would argue that it can't become more broken than now, but then it all depends on the particular semantics of whichever shell is used to run the script. The escaped quotes must have worked for somebody after all!

If you prefer not to touch this script, I am happy to mark pslatex as "broken" in my tests.

davidcarlisle commented 1 year ago

I'll think about it, I suspect it used to work but I changed something around $@ / $* and gained a level of " for auctex, but it's been like that since last century. grr I suppose I could change it it could only affect people who use it and that should be no one....

I'll leave this open and comment here over the weekend if I decide to change

davidcarlisle commented 1 year ago

I pushed this to ctan, thanks for the report.