LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text 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: Fri, 25 Oct 2013 20:59:18 +0100
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID: <[log in to unmask]>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
In-Reply-To: <[log in to unmask]>
Content-Type: text/plain; charset=ISO-8859-1
From: Joseph Wright <[log in to unmask]>
Parts/Attachments: text/plain (32 lines)
On 19/10/2013 09:05, Andrew Parsloe wrote:
> 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

As others have said, the current \tl_to_uppercase:n doesn't work as
you'd expect here and you need \tl_expandable_uppercase:n. We (the team)
know that \tl_to_uppercase:n is currently 'wrong' but haven't agreed on
a 'good' solution. (See
for more)

Broadly, there are three cases we can thing of:

 - You want to make 'text' upper case for example for headings
 - You want to make 'strings' lower case for example for file name
   checks, case-insensitive ordering, etc.
 - You want to make 'weird' chars (catcode tricks with \lowercase

The three different use cases need different interfaces and
implementations, but getting to a point were we agree on what to do is
Joseph Wright