I need to force some letters to be lower case in the title because it is part of a mathematician's name (deRham). How can I do that?
[Tex/LaTex] How to force lower case in the title
capitalizationtitles
Related Solutions
This code should get you started. It uses a couple of the stringstrings
package's string manipulation routines, including its horrendously time-expensive \addlcwords
to identify the words you'd prefer to typeset in lower case. The rest of the code hooks this into APA's sectioning commands (it's tedious but it does the trick).
Note that although this should get you going, it isn't completely ready for prime time, mainly because the work will take some time which, if it weren't something you wanted to proceed with, would divert me from things I'm actually supposed to be doing :)
. Nevertheless, if this were something you wanted to proceed with, you'll need to let stringstrings
know that '-' (as in 'Knock-on') should be treated the same way as a space character (run the code below to see what I mean). That work would probably involve handing '-' to stringstrings
's \encodetoken
command and involve providing some extra buttressing code -- although I wouldn't be surprised if there were several ways to skin that particular cat.
Anyway, although there's still some work remaining, I hope it takes you in the direction you set out to go. (NB, don't forget: stringstrings
's \addlcwords
seems to scale time-exponentially. Or worse.)
\documentclass[jou]{apa}
\usepackage{lipsum}
\usepackage{stringstrings}
\addlcwords{all of the and a an is before on}
\DeclareRobustCommand*\MakeTitlecase[1]{%
\caselower[e]{#1}%
\capitalizetitle{\thestring}%
}
\makeatletter
% Four Levels with Sections in Title Case
\def\FourLevelHeadingTitleCase{%
\def\section{\@ifnextchar*{\@sections}%
{\@ifnextchar[{\@sectionb}{\@section}}}%
\def\@sections*##1{\leveltwo{\MakeTitlecase{##1}}}%
\def\@sectionb[##1]##2{\leveltwo{\MakeTitlecase{##2}}%
\@mkboth{\MakeUppercase{##1}}{\MakeUppercase{##1}}%
\addcontentsline{toc}{section}{\MakeTitlecase{##1}}}%
\def\@section##1{\leveltwo{\MakeTitlecase{##1}}%
\@mkboth{\MakeUppercase{##1}}{\MakeUppercase{##1}}%
\addcontentsline{toc}{section}{\MakeTitlecase{##1}}}%
%
\def\subsection{\@ifnextchar*{\@subsections}%
{\@ifnextchar[{\@subsectionb}{\@subsection}}}%
\def\@subsections*##1{\levelthree{\MakeTitlecase{##1}}}%
\def\@subsectionb[##1]##2{\levelthree{\MakeTitlecase{##2}}%
\addcontentsline{toc}{subsection}{\MakeTitlecase{##1}}}%
\def\@subsection##1{\levelthree{\MakeTitlecase{##1}}%
\addcontentsline{toc}{subsection}{\MakeTitlecase{##1}}}%
%
\def\subsubsection{\@ifnextchar*{\@subsubsections}%
{\@ifnextchar[{\@subsubsectionb}{\@subsubsection}}}%
\def\@subsubsections*##1{\levelfour{\MakeTitlecase{##1}}}%
\def\@subsubsectionb[##1]##2{\levelfour{\MakeTitlecase{##2}}%
\addcontentsline{toc}{subsubsection}{\MakeTitlecase{##1}}}%
\def\@subsubsection##1{\levelfour{\MakeTitlecase{##1}}%
\addcontentsline{toc}{subsubsection}{\MakeTitlecase{##1}}}%
%
\let\paragraph=\levelfive%
}
\makeatother
\FourLevelHeadingTitleCase
\title{On the Bodleianisation of L-Space Interior Topologies}
\author{The Librarian}
\affiliation{Unseen University}
\shorttitle{Ook}
\rightheader{Oook}
\leftheader{Capitalised Headers}
\abstract{\lipsum[1]}
\begin{document}
\maketitle
\section{Library-Space is NOT countable}
\lipsum[1]
\subsection{Turtles ALL the way down}
\lipsum[2]
\subsubsection{On THE Knock-ON Effect oN wood}
\lipsum[3]
\subsubsection{an orang And a utan}
\lipsum[3]
\end{document}
Your problem description points to a "feature" in the LaTeX standard classes like book
and report
: Headers for standard chapters are formatted using \chaptermark
which in turn calls the \MakeUppercase
macro which does exactly what it name suggests. Your redefinition of \chaptermark
removes \MakeUppercase
for standard chapters. However, \MakeUppercase
is hard-coded into the header of the ToC and the bibliography. Solution: Use the nouppercase
option of scrpage2
which disables \MakeUpperCase
in the header.
\documentclass{book}
\usepackage[headsepline,plainheadsepline,nouppercase]{scrpage2}
\pagestyle{scrheadings}
\clearscrheadfoot %clear everything
\ohead[\rightmark ~$\vert$ \pagemark]{\rightmark ~$\vert$ \pagemark} %define header for beginning of chapter and "normal" pages
\renewcommand{\chaptermark}[1]{\markright{\ #1}} %??
\setheadsepline{1pt} %set size of sep-line
\usepackage{lipsum}
\begin{document}
\tableofcontents
\chapter{foo}
\lipsum[1-12]
\addtocontents{toc}{\protect\newpage}
\chapter{bar}
\lipsum[1-12]
\end{document}
Best Answer
You could use
\MakeLowercase
:I am not sure about using lowercase for the last name; perhaps
could be better?