I want to capitalize the first letter of the first word in the argument of a "\section" \command.
Consider \newcommand{\hello}{hello world}
I want to use
\section{\hello}
so that the compiled section header is
0.1 Hello world
I tried
\titleformat{\section}
{\normalfont\Large\bfseries\expandafter\MakeUppercase }{\thesection}{1em}{}
But that returns HELLO WORLD.
How can I only capitalize the first word so that I get
0.1 Hello world
Is there a way to carry over the title to the table of contents as well?
\let\TEMPtableofcontents\tableofcontents
\renewcommand{\tableofcontents}{
\clearemptydoublepage
\providecommand\phantomsection{} \phantomsection
\addcontentsline{toc}{chapter}{Table of Contents}
\TEMPtableofcontents
}



vim-latexto compile. If it can be integrated without package installation. I will give it a try. – A.Dumas Nov 10 '22 at 15:59inputencandfontencpackages and, instead, load thefontencpackage. For more information on this topic, see Frequently loaded packages: Differences between pdfLaTeX and LuaLaTeX. – Mico Nov 11 '22 at 07:17