Sun Mar 2 22:11:12 2014, original submission:
In lit/Makefile we have these lines:
tex_opts = --interaction=nonstopmode #--file-line-error
tex_1opt = "$(tex_opts)"
This means that the argument passed e.g. to htlatex.bat is (with added delimitting by `and ') the following
`--interaction=nonstopmode '
i.e. there is one tailing space just after the nonstopmode.
This confuses latex (as called by htlatex.bat) which outputs the following error message
latex: Invalid option argument.
latex: Data: nonstopmode
latex: Invalid option argument.
latex: Data: nonstopmode
latex: Invalid option argument.
latex: Data: nonstopmode
I.e. latex does not know `nonstopmode ', but only `nonstopmode'.
The root cause for the problem is that when passing argument to a MSDOS batch, the argument is not de-quoted. That is to say, assume that I have some batch toto.bat as follows
some_exe.exe %1
and I call
toto.bat "a b c"
Then %1 will expand to "a b c", and therefore the command some_exe.exe will be passed only one argument that is `a b c', instead of 3 arguments a, b and c, which is the intention.
This means that the patch which I propose as attached is not really a definitive solution --- if ever there would be more than one option, that would not work any longer. Instead, to follow the intention of tex_1opt Makefile variable double-quoting in order to pass several options just as one argument, one needs in htlatex.bat some explicit code in order to do the de-quoting --- that would by the same way solve the tailing space issue, so the same lit/Makefile as currently could be reverted.
I will try to propose this in another post, I need some more thinking how to do that in MSDOS --- if ever feasible, DOS is no longer maintained, and quite unpractical a language.
|