# #StackBounty: #titlesec #capitalization Title case for theorem argument

### Bounty: 50

I would like to make the optional argument I pass to a theorem environment (which puts the argument in a parenthetical next to the theorem number – typically for naming a theorem) have title case i.e. non-articles should be capitalized. I am able to do this for section headings using the titlecaps and titlesec packages (see the MWE below), but I’m unsure how this behavior can be obtained without manually doing it each time in the theorem argument.

I’m using a self made definition environment (through amsthm) and have a lot of named definitions in the beginning of my document so it would be nice not to have to capitalize all of their titles by hand.

MWE:

``````documentclass{article}
usepackage{amsmath}
usepackage{amsthm}
usepackage{titlesec,titlecaps}

theoremstyle{definition}
newtheorem{theorem}{Theorem}[subsection]
newtheorem{definition}[theorem]{Definition}

titleformat{section}[block]{}{normalfontLargebfseriesthesection.;}{0pt}{formatsectiontitle}
newcommand{formatsectiontitle}[1]{normalfontLargebfseriestitlecap{#1}}

begin{document}

section{this is an automatically title capitalized section}
begin{definition}[I wish this was title capitalized]
Definition.
end{definition}

end{document}
``````

Get this bounty!!!

This site uses Akismet to reduce spam. Learn how your comment data is processed.