Not getting (small)caps for chapter names in TOC

Issue #203 closed
Artem Pelenitsyn created an issue

Hi! I have a basic setup with classicthesis, and it looks great but TOC doesn’t have names of chapters capitalized as in all examples I saw. Could you take a look and tell me what I’m doing wrong?

My code is here: https://github.com/ulysses4ever/thesis Should be buildable with just pdflatex main.tex (there's also a Makefile that calls latexmk, for convenience).

Attached is a screenshot of what I currently see. I expect capitalized names of chapters (Introduction, Empirical Study, etc.)

Comments (7)

  1. Ivo Pletikosić

    Artem, looks like you're not the only one. The guy there found a solution, though I don't know what it does differently than classicthesis. In your case what I'd try is:

    • change the order in which packages are called
    • have a local copy of classicthesis.sty and arsclassica.sty (remove global packages)
    • check what's written in the auxiliary .toc file after your thesis has been processed

    I'll try to compile your thesis too, but that's going to be later today.

  2. Artem Pelenitsyn reporter

    Oh, right: I even saw that TeX.SE thread before but completely forgot about it. Unfortunately, their solution

    \newcommand{\tocFixedChapter}[1]{\chapter{\spacedlowsmallcaps{#1}}}
    \renewcommand{\tocEntry}[1]{\protect\numberline{}{\spacedlowsmallcaps{#1}}}
    

    doesn’t seem to have any effect on the result for me.

    After some more googling and experimenting, I came up with

    \renewcommand{\cftchapfont}{\spacedlowsmallcaps}
    

    and it seems to just work.

    It’d be nice to figure why it doesn’t work out of the box, though… Anyway, thanks a lot for a prompt response!

  3. Artem Pelenitsyn reporter

    I created a branch without the cftchapfont workaround. You can check it out with git checkout no-workaround-toc to experiment. The main branch is moving on for the time being.

  4. Ivo Pletikosić

    This is now present in our template as well (tested with TeX Live @ Fedora Linux 38). Not sure whether it's because of a change in tocloft or some other package. While \renewcommand{\cftchapfont}{\spacedlowsmallcaps} fixes the issue for chapters, \renewcommand{\cftpartfont}{\spacedlowsmallcaps} causes some errors. This needs to be further investigated ASAP.

  5. André Miede repo owner

    Sorry for the late reply and thank you for all of your work so far.

    Somehow, the workaround with \cftpartaftersnumb does not work any longer and \cftpartfont does not accept \spacedlowsmallcaps as a valid argument (as \cftchapfont does).

    I am not in the best state of mind for a while and could fix this via some ugly hack for the next release.

    (Introducing \spacedlowsmallcapsstyle with\DeclareRobustCommand{\spacedlowsmallcapsstyle}{\ct@caps\lsstyle\lowercase}. Hopefully, this does not break somewhere else ;-).)

  6. Log in to comment