texinfo-devel
[Top][All Lists]
Advanced

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

code breaks at -_ in non-TeX


From: Karl Berry
Subject: code breaks at -_ in non-TeX
Date: Wed, 5 Sep 2012 16:20:34 GMT

Patrice,

    -Ordinarily, @TeX{} will consider breaking lines at @samp{-} and
    +Ordinarily, lines may be broken at @samp{-} and
     @samp{_} characters within @code{@@code} and related commands.  This
     can be controlled with @code{@@allowcodebreaks}
     (@pxref{allowcodebreaks,,@code{@@allowcodebreaks}}).

Does this really apply to non-TeX?  I couldn't get Info output to break
at - or _ in @code.  Is it supposed to?  Example input sentence:

  Breaks should be allowed.  This has @code{short-code} and more
  @code{really-long-words-in-code}.

should break after really- or maybe long- when codebreaks=yes, 
as far as I could see.

And as for HTML, what I see in our output for codebreaks=no is
white-space:nowrap; whose description
(http://www.w3schools.com/cssref/pr_text_white-space.asp) indicates it's
about whitespace, not hyphenation.  Furthermore, white-space:nowrap
seems wrong to me.  Breaks at whitespace should not be affect by
@allowcodebreaks; I think the only time they should be disallowed is
inside @w text.

Of course, browsers nowadays (stupidly IMHO) break at any explicit
hyphen by default.  It looks like this can be turned off with css
hyphens:none.  Perhaps we should do that when codebreaks = no?
http://www.w3.org/TR/css3-text/ (section "6.1. Hyphenation Control").

I couldn't find anything about breaking at _'s in HTML, and thankfully
browsers aren't stupid-smart enough to do it yet, that I've seen.

No idea about Docbook.

I don't really want to document all this, since we control very little
of it.  How about if we say something like @allowcodebreaks applies to
TeX, and to the other output formats as far as is possible?


Anyway, working on the rest of that last patch ...

Thanks,
k



reply via email to

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