0
votes
0answers
111 views

How to check if the selected letter is uppercase or lowercase in a macro?

I'm using Texmaker and want to define some custom macros. The macros shall check if a selected letter is uppercase or lowercase and then replace that letter by a sequence defined in the macro. I need ...
5
votes
1answer
125 views

Capitalization of datetime format

In languages like dutch, the first letter of the names of days and months are not capitalized unless they occur as the first character of a sentence. So I added the following code in the preamble of ...
4
votes
1answer
125 views

Small letters as input but capital letters as output

Is it possible to define (or is there already) a macro which takes small letters as input but gives the same letters in capital as output? Example: \CapLet{horse} and \CapLet{fish} wiht the output ...
8
votes
1answer
239 views

auto-capitalise the output of a newcommand

How can I create a newcommand that automictically capitalises the first letter, when the command is used after a full stop (or question mark, exclamation mark, etc.)? \newcommand{\tinycommand}{tiny ...
5
votes
1answer
1k views

force section and subsection to capital letters

hi Im trying to renew the section cmd to make all sections in capitals. i have tried stuff like \newcommand{\tmpsection}[1]{} \let\tmpsection=\section ...
8
votes
1answer
179 views

Changing case of URL in \href argument

I would like to write a macro similar to the \href command from the hyperref package, but which takes a single argument. The URL is generated by making the argument lowercase. Here is a minimal ...
5
votes
2answers
144 views

\uppercase does not work with \IfSubStr?

I'm using \IfSubStr macro of xstring package to decide if user given options contains some letter and if they do I take some actions. I want case independent test on whether user options contain ...
4
votes
3answers
222 views

Command to uppercase the first letter of a maths command

This question is a bit similar to Command to uppercase the first letter of each word in a sentence. What I want is to build a new command for being used just at math mode, using the ...
12
votes
4answers
378 views

Create a capitalized macro token using \csname

Two things I understand and one thing I don't: I often use \csname to create user-defined tokens. For instance, the following code uses \expandafter to expand everything between \csname and ...
4
votes
1answer
2k views

How to print “LaTeX” as shown in many tutorials and books? [duplicate]

Possible Duplicate: How to write (La)TeX (with braces) [or any other TeX-related logo] I came across the tug tutorial, and writing down the very first basic example of printing simple ...
8
votes
2answers
393 views

Writing the chapter and the heading in two different ways

How can I write in capitals the first letter of each word in a title? In other words, I want to write the title normally \chapter{Title of my chapter} and to have the heading in this way Title Of ...
15
votes
3answers
12k views

\uppercase in \newcommand

I tried to use \uppercase in \newcommand: \newcommand\universidad{My University} \newcommand\Universidad{\uppercase{\universidad}} When I use this I get My University and not MY ...
18
votes
3answers
690 views

Capitalizing strings ignoring closed class words

I was just reviewing my "capitalization standards" for titles and such and was wondering if there's a macro to do the same thing I'm forced to do by hand nowadays. My personal rules (feel free to ...
5
votes
2answers
980 views

Centering and \MakeUppercase with linebreaks

I wish to make the list of authors show up as centered, uppercase and listed vertically on my titlepage. My documentclass contains a section like this \begin{center} ... ...
17
votes
5answers
1k views

Are there purely expandable variants of \MakeUppercase?

\MakeUppercase and \uppercase use TeX's uccode, and they are not purely expandable. Say, \edef\temp{\MakeUppercase{abc}} will fail. Sometimes purely expandable macros are very useful. They are ...
6
votes
2answers
741 views

Macro for typesetting acronyms

All-caps acronyms and brand names like IBM look better when typeset a little smaller than usual. My simple solution is the following macro: \def\<#1>{{\small #1}} It's used like here ...
20
votes
4answers
4k views

Command to uppercase the first letter of each word in a sentence

I'm writing a textboox in latex, and I have things like \textit{some definition}\index{Some Definition} all over the place. I'd like to combine them into something like \define{some definition} ...
15
votes
3answers
1k views

Detect beginning of a sentence in a macro for capitalization

Is it possible to make macros give different results at the beginning of a new sentence? Suppose that I want the macro "\secname" to write "Section" at the beginning of a new sentence, and "section" ...