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: Patrice Dumas
Subject: Re: [Texi2html] Feature request: use non-breaking hyphens in @w
Date: Sun, 28 Feb 2010 23:57:53 +0100
User-agent: Mutt/1.5.20 (2009-06-14)

On Thu, Feb 25, 2010 at 10:46:45PM -0800, Mark Polesky wrote:
> 
> To accurately implement the Texinfo specification, texi2html
> would have to use an algorithm like this:
> 
> * If @allowcodebreaks is currently set to false,
> * and we are *not* currently inside a @w{...} block,

I can't see why there is such a requirement. Even if @w{..}
is implemented as the same <span ..>, <span ..> may be nested
right. 

> * and we come across a @code block (or something related),
> * then we need to look inside the @code block for lexical
>   tokens that contain one or more hyphens/underscores (and
>   no whitespace)
> * and mark any matching tokens to be wrapped in:
>     <span style="white-space:pre">...</span>
> 
> Of course, CSS can streamline things:
> 
> <style type="text/css">
> .nocodebreak {white-space:pre}
> </style>
> 
> <span class="nocodebreak">...</span>

Looks good.

I have the choice to do that when closing the @code or when processing
the text within @code. I think that it is better to do it when processing
text within @code. Indeed, when a @code is closed, what is within
is already html. So if there is an attribute with a - things will be 
messed up, for example an @anchor in @code.

So, if it is done when processing text, it means that @-commands will
stop the word detection, so that, for example

@code{it is aa-bb@'{e}cc_d}

will lead to

<code>it is <span class="nocodebreak">aa-bb</span>&eacute;<span 
class="nocodebreak">cc_d</span>

I don't think we should worry about that, though.

--
Pat




reply via email to

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