So I'm trying to make the format of the subsection be normal font size, underlined, and have title case. Below is an example, stolen from here:
\documentclass{article}
\usepackage[normalem]{ulem}
\usepackage{sectsty} % Used for section formatting
\usepackage{titlecaps} % used for title case
\sectionfont{\centering\bfseries\normalsize\titlecap}
\begin{document}
\section*{Materials and methods}
\subsectionfont{\normalfont\normalsize\underline\titlecap}
\subsection*{Sampling about something magic}
\subsectionfont{\normalfont\normalsize\titlecap}
\subsection*{A very long sectional heading title that will probably have to be split over two lines}
Lorem ipsum
\end{document}
As you can see, the section Sampling about something magic
makes has the underline, but not the title case. The next section with a long title has the title case once you remove the underline. How do I get both at the same time?
Also, more random note, if the \titlecap
isn't at the end of the format arguments, it will not compile. Not sure if that helps out or not.
\underline{\titlecap{#1}}
\subsectionfont{\normalsize\normalfont\underline{\titlecap{#1}}}
didn't work either. It looks like it's complaining about the fact that I'm using a#1
without it actually having a command. Is there a way to do what you're talking about in the context of\subsectionfont
?\UlCap
in some way like\underline{\titlecap{#1}}
and then use it in\subsectionfont{\normalsize\normalfont\UlCap}
.\newcommand{\ULcap}[1]{\underline{\titlecap{#1}}}
and\subsectionfont{\normalsize\normalfont\ULcap}
doesn't work either.