bugtex4ht - Bugs: bug #357, Issues with image names containing...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #357: Issues with image names containing spaces

Submitted by:  Michal Hoftich <michal_h21>
Submitted on:  Sun Mar 12 15:47:21 2017  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

Mon Mar 13 23:21:25 2017, comment #1:

committed to tl (also the \legend changes), r43490.

One problem with always using quotes is that then filenames with quote chars fail. I think this is why it is not done in the graphics package; I think grffile tries to work around this.

Admittedly quotes are hardly ever used in comparison with spaces, so maybe there are other reasons. Anyway, it's a well-known issue (for umpteen years) so I'm not inclined to bring it up with them again. If anyone wants to, feel free :) ... https://github.com/latex3/graphics-def.

What's really needed is a feature in eTeX to delimit filenames by catcode 1/2 tokens. Maybe someday ...

Karl Berry <karl>
Project Administrator
Sun Mar 12 15:47:21 2017, original submission:

I've found strange issue with images whose filenames contain spaces (I know that it isn't a good idea, but sometimes you can't control your input):

It produces the following code

The issue with first image is that the quotes used in the filename messes with the quotes in HTML attributes, so the file isn't loaded properly. Second and third examples produces spurious `Crest.xbb` text. The last one has wrong resolution and the image is clipped, so only small part of it is displayed.

I've modified the tex4ht sources to remove the quotes from the filename, which fixes the first issue. The second issue might be actually bug in the Graphics package. It tries to open the .xbb file with image dimensions, when it contains spaces, it tries to open only the part before space, the rest will end in the document. I've patched \Gread@eps macro to always include the quotes for .xbb loading. The last issue disappeared almost magically with these fixes, I am not really sure how :)

Simple testing file is attached.

Michal Hoftich <michal_h21>
Project Member

 

Attached Files
file #277:  imagepath.zip added by michal_h21 (71kB - application/zip)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by karl (Posted a comment)
  • -unavailable- added by michal_h21 (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    2 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Mar 13 23:21:25 2017karlOpen/ClosedOpen=>Closed
    Sun Mar 12 15:47:21 2017michal_h21Attached File-=>Added imagepath.zip, #277
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray