[tex4ht] [bug #208] lit/Makefile has extra space in latex argument confusing MikTeX latex

2014-03-06 Thread Karl Berry
Follow-up Comment #2, bug #208 (project tex4ht):

Hi Vincent - well, thanks for the report and patch, but not dequoting is a
fundamental discrepancy between shells.  I have no intention of trying to
support DOS, Windows, or anything else Microsoft.  If you want to, ok, but
otherwise, consider it unsupported.

I wrote lit/Makefile to be a convenience on Unix (and it is far from
complete); Eitan never had a Makefile at all. (Sigh.)

As far as the patch goes, htlatex is just one of many scripts.  And patching
it directly isn't possible, since those scripts are all generated from
tex4ht-mkht.tex (and other things?) in some process I haven't internalized. 
So I'm afraid I can't even tell you for sure the actual source files that need
to be changed.

All the Unix scripts have quoting problems too.  It's all a gigantic mess and
is one of the lowest-priority things to even look at :(.

  sorry,
karl


___

Reply to this item at:

  http://puszcza.gnu.org.ua/bugs/?208

___
  Message sent via/by Puszcza
  http://puszcza.gnu.org.ua/




[tex4ht] [bug #208] lit/Makefile has extra space in latex argument confusing MikTeX latex

2014-03-02 Thread Vincent Belaïche
URL:
  http://puszcza.gnu.org.ua/bugs/?208

 Summary: lit/Makefile has extra space in latex argument
confusing MikTeX latex
 Project: tex4ht
Submitted by: vincentb1
Submitted on: lun. 03 mars 2014 00:11:12 EET
Category: None
Priority: 5 - Normal
Severity: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any

___

Details:

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.




___

File Attachments:


---
Date: lun. 03 mars 2014 00:11:12 EET  Name: Makefile.diff  Size: 399 o   By:
vincentb1

http://puszcza.gnu.org.ua/bugs/download.php?file_id=166

___

Reply to this item at:

  http://puszcza.gnu.org.ua/bugs/?208

___
  Message posté via/par Puszcza
  http://puszcza.gnu.org.ua/




[tex4ht] [bug #208] lit/Makefile has extra space in latex argument confusing MikTeX latex

2014-03-02 Thread Vincent Belaïche
Follow-up Comment #1, bug #208 (project tex4ht):

Ok, I attached htlatex.bat.diff which is certainly a better patch to correct
this issue than my previous patch in Makefile.diff

(file #167)
___

Additional Item Attachment:

File name: htlatex.bat.diff   Size:3 KB


___

Reply to this item at:

  http://puszcza.gnu.org.ua/bugs/?208

___
  Message posté via/par Puszcza
  http://puszcza.gnu.org.ua/