3

I am using classicthesis and arsclassica to write my thesis.

I have used \addchap to add a unnumbered chapter, that is automatically added to the TOC. However, the graphic format/font of those unnumbered chapters is different, and I would like to make it equal to the format of the numbered chapters?

Imgur

In the image, I would like to change "Sommario,Abstract,Introduzione" to be equale to LOREM (and also, if possible, to align them to the L)

\documentclass[10pt,%                    
               a4paper,%                  
               twoside,openright,%        
%              oneside,openany,%         
               titlepage,%               
               headinclude,,footinclude,%  
               BCOR5mm,%                  
               cleardoublepage=empty,%    
               captions=tableheading,%       
               ]{scrreprt}    
\usepackage[T1]{fontenc}

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}       

\usepackage[eulerchapternumbers,%        
            beramono,%                   
            eulermath,%                    
            pdfspacing,%                 
            listings,%                  
%           parts,%                       
            ]{classicthesis}   
\usepackage{arsclassica}    
\begin{document}
\hypersetup{pageanchor=false}
\pagestyle{scrheadings} 
\pagenumbering{gobble}


\cleardoublepage
\pdfbookmark{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2}
\tableofcontents
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}} 
\cleardoublepage

\hypersetup{pageanchor=true}
\pagenumbering{arabic}

\deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{}
\renewcommand{\chapterpagestyle}{pgnumtopouter}

\cleardoublepage
\phantomsection
\pdfbookmark{Sommario}{Sommario}
\begingroup
\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax

\addchap{Sommario}

Qui Abstract in italiano

\lipsum
\lipsum
\lipsum
\lipsum
\lipsum
\vfill

\selectlanguage{english}
\pdfbookmark{Abstract}{Abstract}

\addchap{Abstract}
\lipsum
\lipsum
\lipsum
Qui abstract in inglese

\selectlanguage{italian}

\endgroup           

\vfill

\chapter{Lorem}
\label{cap:lorem}
\lipsum
\lipsum
\lipsum
\lipsum
\end{document}

Thank you

3
  • 1
    Please help us to help you and add a minimal working example (MWE) that illustrates your problem. It will be much easier for us to reproduce your situation and find out what the issue is when we see compilable code, starting with \documentclass{...} and ending with \end{document}.
    – user31729
    Jun 21 '14 at 10:39
  • @ChristianHupfer MWE added.
    – Pierpaolo
    Jun 21 '14 at 11:03
  • I have added a possible solution, the additional \pdfbookmarks are not necessary, this is done by \addchap already.
    – user31729
    Jun 21 '14 at 12:45
3

In order to get the alignment as well as the correct font, one way is to write nothing to the toc and use \addcontentsline with an empty chapter number as first argument of \numberline{}{...} The command \spacedlowsmallcaps from the arsclassica package is used to write the 'chapter' title within the TOC line.

I have added a wrapper, which automatically does this for your setup, assuming, that the chapter title is also intended as entry to the toc.

Please not the difference between \addchap and \addchapextended, I just did \addchap{Sommario} effectively twice.

Extended version

\documentclass[10pt,%                    
               a4paper,%                  
               twoside,openright,%        
%              oneside,openany,%         
               titlepage,%               
               headinclude,,footinclude,%  
               BCOR5mm,%                  
               cleardoublepage=empty,%    
               captions=tableheading,%       
               ]{scrreprt}    
\usepackage[T1]{fontenc}

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}       

\usepackage[eulerchapternumbers,%        
            beramono,%                   
            eulermath,%                    
            pdfspacing,%                 
            listings,%                  
%           parts,%                       
            ]{classicthesis}   
\usepackage{arsclassica}    


%\newcommand{\addchapextended}[1]{%  Old version without alignment
%\addchap[\noexpand\spacedlowsmallcaps{#1}]{#1}%
%}%




\makeatletter
\newcommand{\addchapextended}[1]{%
\phantomsection%


\makeatletter
\newcommand{\addchapextended}[1]{%
\phantomsection%
\addchap[]{#1}%  Do the unnumbered chapter head in the content section 
\markboth{\spacedlowsmallcaps{#1}}{\spacedlowsmallcaps{#1}} 
\pdfbookmark[0]{#1}{\thepage::\thechapter}%
%Add a contentsline to the TOC, omit the chapter number and align correctly
\begingroup%
\renewcommand{\Hy@writebookmark}[5]{}{}{}{}{}%   Drop the automatic writing of bookmarks by addcontentsline%
\addcontentsline{toc}{chapter}{%
\numberline{}{\noexpand\spacedlowsmallcaps{#1}}}%
\endgroup%
}%
\makeatother%



\begin{document}
\hypersetup{pageanchor=false}
\pagestyle{scrheadings} 
\pagenumbering{gobble}


\cleardoublepage
\pdfbookmark{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2}
\tableofcontents
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}} 
\cleardoublepage

\hypersetup{pageanchor=true}
\pagenumbering{arabic}

\deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{}
\renewcommand{\chapterpagestyle}{pgnumtopouter}

\cleardoublepage
\phantomsection
%\pdfbookmark{Sommario}{Sommario}
\begingroup
\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax

%\phantomsection
%\chapter*{Sommario}%
%\addcontentsline{toc}{chapter}{\protect{\scshape Sommario}}

\addchapextended{Sommario}%
\addchap{Sommario}


%\addchap[\noexpand\MakeTextLowercase{\sffamily\textsc{Sommario}}]{Sommario}%

%\addchap[\sffamily\textsc{Lorem}]{Sommario}%

Qui Abstract in italiano

\lipsum
\lipsum
\lipsum
\lipsum
\lipsum
\vfill

\selectlanguage{english}
\pdfbookmark{Abstract}{Abstract}

\addchapextended{Abstract}
\addchapextended{Lorem}

\lipsum
\lipsum
\lipsum
Qui abstract in inglese

\selectlanguage{italian}

\endgroup           

\vfill

\chapter{Lorem}
\label{cap:lorem}
\lipsum
\lipsum
\lipsum
\lipsum

\chapter{Lorem Nr. 2}

\end{document}

enter image description here

enter image description here

13
  • Perfect! Just a detail: is there a way to align, for example, SOMMARIO to the L of the chapter "1 LOREM"?
    – Pierpaolo
    Jun 21 '14 at 12:52
  • 1
    @thunder1123: I think about it. At first glance, it is not that easy ;-)
    – user31729
    Jun 21 '14 at 12:54
  • @thunder1123: Updated ;-)
    – user31729
    Jun 21 '14 at 13:04
  • @thunder1123: There is a little problem with the bookmark, of "Sommario" and other ones -- they are not aligned with the rest, I do not know why, but there is a remedy ;-)
    – user31729
    Jun 21 '14 at 13:15
  • Ah! That's true! What is the remedy?
    – Pierpaolo
    Jun 21 '14 at 13:23
2

Here is a solution that uses the titletoc package:

\documentclass[10pt,%
               a4paper,%
               twoside,openright,%
% oneside,openany,%
               titlepage,%
               headinclude,,footinclude,%
               BCOR5mm,%
               cleardoublepage=empty,%
               captions=tableheading,%
               ]{scrreprt}
\usepackage[T1]{fontenc}

\usepackage{lipsum}
\usepackage[utf8]{inputenc}
\usepackage[english,italian]{babel}

\usepackage[eulerchapternumbers,%
 beramono,%
 eulermath,%
 pdfspacing,%
 %listings,%
% parts,%
 ]{classicthesis}
\usepackage{arsclassica}
\usepackage{hyperref}

\usepackage{titletoc}
 \titlecontents{chapter}[1.44em]{\smallskip}%\vspace{1cm}
 {{\contentslabel[\thecontentslabel.]{1.25em}}}%numbered
 {\spacedlowsmallcaps}%numberless
 {\quad\contentspage}[\medskip]%


\begin{document}
\hypersetup{pageanchor=false}
\pagestyle{scrheadings}
\pagenumbering{gobble}


\cleardoublepage
\pdfbookmark{\contentsname}{tableofcontents}
\setcounter{tocdepth}{2}
\tableofcontents
\markboth{\spacedlowsmallcaps{\contentsname}}{\spacedlowsmallcaps{\contentsname}}
\cleardoublepage

\hypersetup{pageanchor=true}
\pagenumbering{arabic}

\deftripstyle{pgnumtopouter}{}{}{\pagemark}{}{}{}
\renewcommand{\chapterpagestyle}{pgnumtopouter}

\cleardoublepage
\phantomsection
\pdfbookmark{Sommario}{Sommario}
\begingroup
\let\clearpage\relax
\let\cleardoublepage\relax
\let\cleardoublepage\relax

\addchap{Sommario}

Qui Abstract in italiano

\lipsum
\lipsum
\lipsum
\lipsum
\lipsum
\vfill

\selectlanguage{english}
\pdfbookmark{Abstract}{Abstract}

\addchap{Abstract}
\lipsum
\lipsum
\lipsum
Qui abstract in inglese

\selectlanguage{italian}

\endgroup

\vfill

\chapter{Lorem}
\label{cap:lorem}
\lipsum
\lipsum
\lipsum
\lipsum
\end{document} 

enter image description here

0

I have been using classicthesis and had the same problem. The answers here wouldn't help me, but guided me to a solution.

For new chapters, I am now using \addchap{\tocEntry{>CHAPTERNAME<}}, which appears both in the pdf as well as in small caps in the LoC.

For the contents, where you would receive a toc-entry automatically but not in the classicthesis style, I used this (here for the LoC):

\phantomsection
\addcontentsline{toc}{chapter}{{\tocEntry{\contentsname}}}%
\tableofcontents

For glossaries, I needed another workaround, which is:

\renewcommand{\glossarysection}[2][]{}
\addchap{\tocEntry{Symbols}}
\printglossary[type=symbols]

\newpage

\addchap{\tocEntry{Acronyms}}
\printglossary[type=\acronymtype]

I hope this helps tackling the next readers issues as well. Cheers!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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