I'm having a problem with the chapter headings formatting. I would like to change only the first letter of each chapter, but for the lists of figures and tables chapters it's not working.
Here is the example:
\documentclass[oneside]{book}
\font\chapterTextFont = Rothdn scaled 4500 \relax
\def\splitfirstchar#1#2\sentinel{
\chapterTextFont\uppercase{#1}\LARGE\uppercase{#2}}
\def\chapterText#1{\splitfirstchar#1\sentinel}
\usepackage{titlesec}
\titleformat{\chapter}
{\normalfont\LARGE\bfseries}{}{1em}{\chapterText}
\begin{document}
\listoffigures
\begingroup
\let\clearpage\relax
\chapter{Testing title}
\endgroup
\end{document}
Might be possible to fix this problem by removing the text formatting of \listfigurename
and save in another variable, but I do not know how to do this.
========= Edit 2013/01/19 ========
Simplest solution found by Ulrike Fischer (Thank you!)
Just change:
\def\chapterText#1{\splitfirstchar#1\sentinel}
to:
\def\chapterText#1{\expandafter\splitfirstchar#1\sentinel}
And also thank you Gonzalo Medina and karlkoeller both answers worked too.