LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Sat, 19 Oct 2013 13:25:09 +0200
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="sXLGiU2ergks3ulc5LdEcS3mgIT5kJN8n"
From: Clemens Niederberger <[log in to unmask]>
Parts/Attachments: text/plain (937 bytes) , signature.asc (554 bytes)

Am 19.10.2013 10:05, schrieb Andrew Parsloe:
> I thought (naively) that writing
> \tl_set:Nx \l_tmpa_tl { \tl_to_uppercase:n {text} }
> would put TEXT in the variable \l_tmpa_tl (as revealed by \tl_show:N
> \l_tmpa_tl). It doesn't, and nothing else that I've tried does either.
> What is the recipe for getting \l_tmpa_tl to contain TEXT, starting from
> text?
> Andrew

\tl_to_uppercase:n is a wrapper around the primitive \uppercase which is
not expandable. That's probably the reason why \tl_to_uppercase:n isn't
expandable either.

There is however \tl_expandable_uppercase:n which I believe works by
expandably replacing letters with their uppercase versions:

\tl_set:Nx \l_tmpa_tl { \tl_expandable_uppercase:n { text } }
\tl_show:N \l_tmpa_tl


Clemens Niederberger
Public PGP Key ID: 65CCDFE7