bugtex4ht - Bugs: bug #449, \<space> is not a nobreak...

 
 
Show feedback again

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

bug #449: \<space> is not a nobreak space

Submitted by:  Karl Berry <karl>
Submitted on:  Tue 18 Feb 2020 01:44:31 AM EET  
 
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Open

(Jump to the original submission Jump to the original submission)

Fri 28 Feb 2020 10:28:58 AM EET, comment #10:

Ah, that is bad. I think we should revert for now. I will put \:nbsp back.

Michal Hoftich <michal_h21>
Project Member
Fri 28 Feb 2020 12:50:55 AM EET, comment #9:

Hi Michal - as you warned, but I didn't fully take in, this change affects verbatim also. That doesn't seem good. Spaces are not generally breakpoints in verbatim, and the difference between nbsp and ensp might well be noticeable when verbatim is used for ASCII art, etc.

I noticed it with a {BVerbatim} block from fancyvrb, but I suppose all kinds of verbatim blocks are affected.

So, the question ... is there any feasible way to use nbsp for verbatim and ensp outside verbatim? If not, I kind of think we should revert. Thanks.

Karl Berry <karl>
Project Administrator
Thu 27 Feb 2020 12:53:45 AM EET, comment #8:

thanks. we'll see.

Karl Berry <karl>
Project Administrator
Wed 26 Feb 2020 01:50:24 PM EET, comment #7:

OK, I've introduced a new command \:ensp. It is used for \Configure{ }.

Michal Hoftich <michal_h21>
Project Member
Wed 26 Feb 2020 01:41:33 AM EET, comment #6:

well, \<space> being an unbreakable space is just plain wrong. And multiple \<space> being preserved at line breaks (which I think happens now with nbsp?) is also wrong.

So I'd like to try the enspace thing. Agreed it is a big change that might cause problems, but I think it's worth a try. We can always revert it and/or make an option if we need to.

wdyt? thanks as always. -k

Karl Berry <karl>
Project Administrator
Fri 21 Feb 2020 07:32:57 PM EET, comment #5:

It seems that multiple enspaces after line break are discarded. So should I add them? I am bit worried that it may break things.

Michal Hoftich <michal_h21>
Project Member
Thu 20 Feb 2020 01:01:28 AM EET, comment #4:

how about some kind of css? is the normal interword space for the current font somehow accessible, the way it should be?

allowing line breaks would be an improvement, at least. an en space would generally be a little too wide, but the line breaks seem more important.

what happens with multiple enspaces in a row? do they disappear at the break, or just randomly get assigned to one line or the other?

and, how about &nbsp;<wbr>? i would expect those spaces would not disappear if the line break is taken, though.

This exact question was asked here with no good answer that i can see:
https://stackoverflow.com/questions/605360

Sigh. Thanks for considering the question.

Karl Berry <karl>
Project Administrator
Wed 19 Feb 2020 04:37:06 PM EET, comment #3:

I' am afraid it isn't possible to use <span> </span>, it collapses. It is possible to use en space (&#x2002;), but I don't think it has any advantages over nbsp, except that it allows line breaks.

Michal Hoftich <michal_h21>
Project Member
Wed 19 Feb 2020 04:40:31 AM EET, comment #2:

oh yeah, collapsing multiple. Hmm.

Is there really no way to output a normal, breakable, interword space other than a literal " " character in html/css? It seems so basic.

How about outputting <span> </span>, so that it does not collapse if there is more than one?

as you say, it's not a solution to mess up verbatim :).

Karl Berry <karl>
Project Administrator
Tue 18 Feb 2020 04:10:04 PM EET, comment #1:

Hi Karl,

I see. But the space generated by '\ ' is non-collapsible, so it is not an ordinary space. It is possible to configure it to produce normal space using:

\Configure{ }{ },

but it causes issues in verbatim, for example. You will lose line indentation with this configuration, which is not good.

Michal Hoftich <michal_h21>
Project Member
Tue 18 Feb 2020 01:44:31 AM EET, original submission:

Hi Michal - It seems \<space> (or \<newline>, etc.) generates a no-break space. This seems wrong to me. The meaning in TeX is (as you know :) a regular (breakable) space. Does this seem feasible to change to you?

Input:

\documentclass{article}
\begin{document}\thispagestyle{empty}
foo\ bar
\end{document}

Process: htlatex foo.tex "xhtml,html5"

Output (boilerplate omitted):
foo&#x00A0;bar

(or the Unicode equivalent 0302 0240, given "-cunihtf -utf8".)

Thanks,
Karl

Karl Berry <karl>
Project Administrator

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by michal_h21 (Posted a comment)
  • -unavailable- added by karl (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
    Fri 28 Feb 2020 12:50:55 AM EETkarlOpen/ClosedClosed=>Open
    Thu 27 Feb 2020 12:53:45 AM EETkarlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup+gray