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:  Mon Feb 17 23:44:31 2020  
Category: NonePriority: 5 - Normal
Severity: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: Closed

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

Mon Jun 29 22:25:34 2020, comment #11:

guess we have to give up on this idea of breakable spaces, unfortunately. closing.

Karl Berry <karl>
Project Administrator
Fri Feb 28 08:28:58 2020, comment #10:

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

Michal Hoftich <michal_h21>
Project Member
Thu Feb 27 22:50:55 2020, 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
Wed Feb 26 22:53:45 2020, comment #8:

thanks. we'll see.

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

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

Michal Hoftich <michal_h21>
Project Member
Tue Feb 25 23:41:33 2020, 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 Feb 21 17:32:57 2020, 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
Wed Feb 19 23:01:28 2020, 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:

Sigh. Thanks for considering the question.

Karl Berry <karl>
Project Administrator
Wed Feb 19 14:37:06 2020, 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 Feb 19 02:40:31 2020, 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 Feb 18 14:10:04 2020, 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
Mon Feb 17 23:44:31 2020, 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?


foo\ bar

Process: htlatex foo.tex "xhtml,html5"

Output (boilerplate omitted):

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


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):



    3 latest changes follow.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon Jun 29 22:25:34 2020karlOpen/ClosedOpen=>Closed
    Thu Feb 27 22:50:55 2020karlOpen/ClosedClosed=>Open
    Wed Feb 26 22:53:45 2020karlOpen/ClosedOpen=>Closed
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup+gray