texinfo-devel
[Top][All Lists]
Advanced

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

Re: spec for @inlinehtml etc.


From: Patrice Dumas
Subject: Re: spec for @inlinehtml etc.
Date: Wed, 28 Dec 2011 23:50:29 +0100
User-agent: Mutt/1.4.2.2i

On Sun, Dec 25, 2011 at 02:59:24PM -0800, Karl Berry wrote:
>     But having a new context in which the only recognized @-commands are
>     the @-commands escaping @, } { and , should not be that hard.
> 
> (and \)
> 
> But what about switching to actually executing "most" commands, when
> they make sense?  Since that is what C makeinfo did, apparently.  How
> hard would that be, any idea?

After some more thinking, it seems to me that it would be in fact 
rather easy.  For the parser, it would be exactly like parsing 
@example/@format/@display...  For the converter it would be quite easy
since the output would simply be the text inside, and the only thing
to take care of would be that text should not be protected.

The same rules for what may appear inside would apply as for 
@example/@format/@display... that is mostly everything except for
@node, @chapter and a few other @-commands.


Also, I think that what would be best would be to have the 2
possibilities, raw html as in tp currently and an other block 
command where @-commands are expanded as you propose.

Maybe we could even use this opportunity to have something more
generic, like @inlineraw, that is without the format name in the
command name.



So, it could be like

@blockraw html
Here HTML characters are not escaped, and @-commands are not expanded.
@end blockraw

@blockfmt html
Here HTML characters are not escaped, but @@-commands are expanded.
@end blockfmt

And to generalize @ifhtml we could even imagine something like
@blockiffmt html
Here HTML characters are escaped and @@-commands are expanded.
It is exactly the same as @@ifhtml/@@end ifhtml
@end blockiffmt



And then there would be the corresponding @inline stuff:

@inlineraw{html, HTML characters are not escaped, and @-commands are not
expanded except for @atchar{} @lbracechar{} and @rbracechar{} (and
@backslashchar{}?)}

@inlinefmt{html, HTML characters are not escaped, but @@-commands 
are expanded }

@inlineiffmt{html, HTML characters are escaped and @@-commands are expanded.
It is similar with @@ifhtml/@@end ifhtml (and you proposed @@inlinefmt as
name for this command)}


Would that be possible and interesting?

-- 
Pat



reply via email to

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