Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

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

share|improve this answer
    
Thanks! Actually when I asked, I didn't think of using normal font, but it looks good too (even better). –  user26939 Mar 8 '13 at 12:16
    
@user26939 You're welcoms. This is how it should look like, IMHO. This way the proportions with regard to the oldstyle numbers and the small caps are as they should be. You might actually want to use \chemsetup{chemformula/format=\normalfont\fontfamily{ppl}\selectfont} so that chemical formulae get lining numbers instead of oldstyle ones. –  cgnieder Mar 8 '13 at 12:32
    
Thanks for the info. Actually I use Minion Pro typeface. In this case I should have \chemsetup{chemformula/format=\normalfont\fontfamily{MinionPro}\selectfont} instead ? –  user26939 Mar 8 '13 at 12:47
    
I don't have the MinionPro package installed but according to the documentation something like \chemsetup{chemformula/format=\normalfont\figureversion{lining,proportional}} should work. You might also need to change the redefinition of \spacedlowsmallcaps to \renewcommand\spacedlowsmallcaps[1]{\textssc{\MakeTextLowercase{#1}}} with Minion Pro. –  cgnieder Mar 8 '13 at 12:59
    
Thanks. Unfortunately, for now I experience "Package siunitx Error: Support package expl3 too old" when using chemmacros package, , that I need to use \textsubscript{} instead. But that's another issue. –  user26939 Mar 8 '13 at 14:06

classicthesis is printing the heading as lower case small caps already. So you (a) need to switch off the \scshape, easiest done with \textnormal, (b) need to reduce the size of the letter, \scriptsize is one choice, other sizes could be acheived with \fontsize{size}{baselineskip}\selectfont. For the subscripts an extra \textnormal seems fine. You should also provide an optonial argument to \section so these formatting commands don't apply to the table of contents.

EDIT If you also have running heads, then you have change \sectionmark to include the formatting there.

Sample output

running head

Sample running head

\documentclass{scrbook}

\usepackage[nochapters,pdfspacing]{classicthesis}

\newcommand{\hdlower}[1]{\textnormal{\scriptsize #1}}
\newcommand{\hdsub}[1]{\textsubscript{\textnormal{#1}}}

\usepackage{lipsum} %dummy text for illustration

\begin{document}
\tableofcontents

\bigbreak
\hrule
\bigbreak\noindent
Document Body:

\section[Fe\textsubscript{oct2} terminated
  Fe\textsubscript{3}O\textsubscript{4} nanocluster model]%
  {F\hdlower{e}\hdsub{oct2} terminated 
      F\hdlower{e}\hdsub{3}O\hdsub{4} nanocluster model} 

\sectionmark{F\hdlower{e}\hdsub{oct2} terminated
  F\hdlower{e}\hdsub{3}O\hdsub{4} nanocluster model}

\lipsum[1-10] 
\end{document}

The above code provides two commands \hdlower and \hdsub to enact the above suggestions.

share|improve this answer
    
Thanks! It does the job well except for the header, which is still unaffected. –  user26939 Mar 8 '13 at 11:48
    
I have now added information on how to fix that. –  Andrew Swann Mar 8 '13 at 12:09
    
Thanks for the update. –  user26939 Mar 8 '13 at 12:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.