LaTeX Books

Cookbook

LaTeX Beginners Guide

Limited discount 50%
coupon code tDRet6Y

click here to read the whole story

LaTeX users online

In total there are 13 users online :: 0 registered, 0 hidden and 13 guests (based on users active over the past 5 minutes)
Most users ever online was 1327 on Tue Nov 05, 2013 7:11 pm

Users browsing this forum: No registered users and 13 guests

Capitalize first letter of every word

LaTeX Forum: General

Add tags LaTeX specific issues not fitting into one of the other forums of this category.

Postby darckhart on Tue Mar 4th, 2008

Hi all. I'm looking for a way to capitalize the first letter of every word in a given block of text. Something to the effect of:
\begin{capitalize}
i want to capitalize every word of this sentence.\\
and this one too.\\
\end{capitalize}

which would of course display like:
I Want To Capitalize Every Word ....etc

Also it would have to work on text inside a table/tabular environment. I assume I'd have to write some custom macro, but I'm not savvy enough with latex yet to do this. Can anyone give me some pointers? Thanks.
darckhart
 
Posts: 34
Joined: Mon Jul 9th, 2007

Postby gmedina on Tue Mar 4th, 2008

Any resemblance to this thread?
1,1,2,3,5,8,13,21,34,55,89,144,233,...
User avatar
gmedina
 
Posts: 2313
Joined: Wed Jul 11th, 2007
Location: Colombia

Postby darckhart on Tue Mar 4th, 2008

Hm, yes very close to the first post. The reason is I'm keeping a separate table of expressions/titles and it would look more presentable if each item had every word capitalized. However, in the main text I may refer to the expression without capitalizing every word if, for example, it was in the middle of a sentence. I was thinking I might pass the whole expression as an argument to the macro which would check for a space and then apply \uppercase to the first letter immediately following. But then I also don't know how to break up the word into its component letters and only \uppercase the first letter of the word. So I'm stuck.
darckhart
 
Posts: 34
Joined: Mon Jul 9th, 2007


Return to General

LaTeX users online

Users browsing this forum: No registered users and 13 guests