# Format of unnumbered chapter in TOC to be equal to the format of numbered chapter

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?

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

-
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}. – Christian Hupfer Jun 21 '14 at 10:39
@ChristianHupfer MWE added. – thunder1123 Jun 21 '14 at 11:03
I have added a possible solution, the additional \pdfbookmarks are not necessary, this is done by \addchap already. – Christian Hupfer Jun 21 '14 at 12:45

## 2 Answers

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}


-
Perfect! Just a detail: is there a way to align, for example, SOMMARIO to the L of the chapter "1 LOREM"? – thunder1123 Jun 21 '14 at 12:52
@thunder1123: I think about it. At first glance, it is not that easy ;-) – Christian Hupfer Jun 21 '14 at 12:54
@thunder1123: Updated ;-) – Christian Hupfer Jun 21 '14 at 13:04
Perfect! Thank you – thunder1123 Jun 21 '14 at 13:13
@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 ;-) – Christian Hupfer Jun 21 '14 at 13:15

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}


-