texi2html
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Texi2html] Feature request: use non-breaking hyphens in @w


From: Mark Polesky
Subject: Re: [Texi2html] Feature request: use non-breaking hyphens in @w
Date: Thu, 25 Feb 2010 13:07:40 -0800 (PST)

Karl Berry wrote:
>> I'd like hyphens within a @w argument to be converted to
>> non-breaking hyphens in html (entity #8209).
>
> Is #8209 actually supported in "most" fonts and browsers,
> for some definition of most?

Not sure.  Is there some development tool for questions like
this?

Anyway, I now realize that there are situations where the
hyphens should definitely *not* be converted to #8209, such
as within a @code{...} block.  In that case, if the hyphens
were converted, when a user copies/pastes from the browser
to the command line, the shell will balk because it won't
see #8209 as a ASCII hyphen.

Okay, I have a better idea.  What about surrounding the
@w{...} content with:

<span style="white-space:pre">...</span>

You'd have to make sure that the entire element goes on one
line in the generated html, but I don't suppose that would
be a problem.

Similarly, when @allowcodebreaks is false, blocks of @code
(and related @-commands) could aquire the same style
attribute in their associated html tags, eg:

The <command style="white-space:pre">apt-get</command> command.

Or if you prefer to use `name' attributes and CSS (or
something like that), that should be doable too.


> I have never seen HTML configured to break at hyphens.

Really?  I found these browsers that allow normal hyphens to
break:

1) Internet Explorer 8 on Windows XP
2) Firefox 3.5.7 on Windows XP
3) Firefox 3.5.8 on Ubuntu 9.10 64-bit

But looking at the HTML 4.01 specs, I see this:

"The plain hyphen should be interpreted by a user agent as
just another character."
-- http://www.w3.org/TR/html401/struct/text.html#h-9.3.3

I find it a little upsetting that the specs don't allow for
a break to be inserted after a regular hyphen when needed,
which I would've thought to have been the standard
interpretation.  In either case, enough users are on those
browsers to justify implementing some feature to prevent
hyphen-breaking.

By the way, I see that Konqueror 4.3.2 does not allow normal
hyphens to break (on Ubuntu).

> It seems like it would hugely break the web in general for
> this to be done.

Perhaps you're right.  But let me know what you think of the
white-space:pre idea.

Thanks!
- Mark


      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]