[Tex/LaTex] Small letter in section using classicthesis

classicthesis

In most cases the default classicthesis section style gives no problem. But, there is some sections in which I need to customized the section font style.

For example,
\section{Fe\textsubscript{oct2} terminated Fe\textsubscript{3}O\textsubscript{4} nanocluster model}
would make all letter small caps:

enter image description here

but I want the letter "e" in Fe and "oct2" in subscript written as small letter instead of
small caps:

enter image description here

How can I achieve that?

Best Answer

The following seems to work (assuming classicthesis' pdfspacing option is active). I don't know if there are places when classicthesis uses its \spacedlowsmallcaps where the non-robust redefinition would cause troubles...

\documentclass{scrbook}
\usepackage[pdfspacing]{classicthesis}
% loadad by `classicthesis' already but so we know it's there,
% provides \NoCaseChange:
\usepackage{textcase}

% chemical formulae:
\usepackage{chemmacros}
\chemsetup{chemformula/format=\normalfont}
% better: use lining numbers for the formulae:
% \chemsetup{chemformula/format=\normalfont\fontfamily{ppl}\selectfont}

% patch \sectionmark, should probably do the same to \chaptermark
% if you're using chapters
\usepackage{etoolbox}
\patchcmd\sectionmark
  {\spacedlowsmallcaps{#1}}
  {\unexpanded{\spacedlowsmallcaps{#1}}}
  {}{}

% the original definition of \spacedlowsmallcaps but not robust:
\renewcommand\spacedlowsmallcaps[1]{\textls[80]{\textsc{\MakeTextLowercase{#1}}}}

\begin{document}

\tableofcontents

\chapter{Some Title}
\section{\NoCaseChange{\ch{Fe_{oct2}}} terminated \NoCaseChange{\ch{Fe3O4}} nanocluster model}

% let's see what the header looks like:
\newpage\null\newpage\null

\end{document}

The table of contents:

enter image description here

The heading:

enter image description here

The header:

enter image description here

Related Question