LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Wed, 1 Jun 2011 06:44:17 +0100
text/plain (28 lines)
On 31/05/2011 22:46, Bruno Le Floch wrote:
> Note that verbatim input cannot be done reliably, while this one can.

I realise the technical issues are very different.

> Actually, I can see it used if someone wants the first word of each
> paragraph bold (but who would?):
> \DeclareDocumentCommand { \bw }
>   { w { ! \token_if_letter_p:N } w { \token_if_letter_p:N } }
>   { #1 \textbf {#2} }
> \toks_put_right:Nn \tex_everypar:D { \bw }
> (where \everypar should have a LaTeX3 interface). This grabs
> everything before the first letter as #1, then all letters which
> follow as #2, and puts that second argument in bold. It fails if there
> is a space or brace between \bw and the following word. There are
> probably better ways of doing that, though (I don't know).

At an implementation level, I think a "u"-type would be easier here.
However, more broadly my point is that I don't really like this input
approach. TeX's input flexibility is great, but there is a need to try
to have some structure, especially when dealing with things like
conversion to other formats. I'd hope that this is one of the things
LaTeX3 (as an input syntax) will improve on over LaTeX2e.