1

I am using the cleanthesis template which uses the KOMA–Script Package. I want the bibliography section to have the same chapter title format as the other chapters (with some minor differences which I won't discuss here). This is easily done using:

\chapter{Bibliography} 
\label{Bibliography}
\printbibliography[heading=none]

I am also trying to add the bibliography to the TOC without a number. I have tried using \addchap{Bibliography} but this does not use the chapter title format.

In the Clean thesis style file the chapter title format is defined using:

\titleformat{\chapter}[display]%
    {\usekomafont{chapter}}%
    {\vspace{-8em}\raggedleft{%
        {\color{ctcolorchapterline}%
            \rule[-5pt]{2pt}{5cm}}\quad%
        {\color{ctcolorchapternum}
            \fontsize{60}{60}\selectfont\thechapter}%
        }%
    }%
    {-2.1em}%
    {\ctformatchapter}%
[\phantomsection]

I tried add the following just before calling \addchap{Bibliography}.

\titleformat{\addchap}[display]%
    {\usekomafont{chapter}}%
    {\vspace{-8em}\raggedleft{%
        {\color{ctcolorchapterline}%
            \rule[-5pt]{2pt}{5cm}}\quad%
        {\color{ctcolorchapternum}
            \fontsize{60}{60}\selectfont\thechapter}%
        }%
    }%
    {-2.1em}%
    {\ctformatchapter}%
[\phantomsection]

But this doesn't work and the title had no formatting.

EDIT 1

Is the problem here that the \titleformat command from here doesn't work with the koma script \addchap?

EDIT 2

The following is based on the Master branch from the clean thesis github page. Using the clean thesis style a conventional chapter heading looks like this: enter image description here.

The bibliography section looks like this: enter image description here

I would like the bibliography section to have the same style as a conventional chapter. This can be achieved by placing the following right after the last \input{content/...:

\chapter{Bibliography}
\label{Bibliography}
\printbibliography[heading=none]

Which results in:

enter image description here

The only problem here is that the bibliography is now numbered in the TOC like this: enter image description here

Is it possible to have the bibliography with a chapter style but not numbered in the TOC?

  • 2
    koma is not compatible with titlesec. As soon as you load titlesec, several koma features are lost. – Johannes_B May 30 '17 at 16:32
  • In that case I suppose this is a trade-off for using the clean thesis style. Is there anyway to add an un-numbered chapter to the TOC? – 1QuickQuestion May 30 '17 at 16:37
  • 3
    cleanthesis is based on the idea of classicthesis, which is another template most experienced users don't recommend. Th next version of cleanthesis won't use titlesec anymore (see the dev branch on github) whereas classicthesis will just drop using KOMA-script. – Johannes_B May 30 '17 at 16:38
  • \addcontentsline{toc}{chapter}{Bibliography}. – Johannes_B May 30 '17 at 16:38
  • I guess your question will be answered if you post a minimal working example, so people here can reproduce what you see. – Johannes_B May 30 '17 at 16:40
  • Okay, I'll update the question to be more helpful. I had presumed that this problem was generic for the style. Presumably using \addcontentsline{toc}{chapter}{Bibliography} also implies using \chapter*{Bibliography} just before which, funnily enough, behaves the same as just using \addchap{Bibliography} (i.e. no chapter title styling but an unnumbered Bibliography in the TOC). – 1QuickQuestion May 30 '17 at 16:45
  • 2
    Reading your last comment, i realize i don't even understand the problem, so a MWE is really really needed. – Johannes_B May 30 '17 at 16:47
  • If the last edit doesn't make any sense I'll just delete the question and try to write a better one tomorrow. – 1QuickQuestion May 30 '17 at 17:14
  • 3
    But if the bibliography is numbered, it should be numbered in the toc as well. If not, this is confusing for the readers (if this is a thesis, the readers are the ones that grade your work). I would leave the bibliography unnumbered and amend unnumbered chapters to look more chapter style (whatever that means). – Johannes_B May 30 '17 at 17:27
  • 2
    Deleteing a question and just asking a new one isn't the best way. You can delete, improve the question and undelete later. That way, helpers can still see where the question came from, what questions in the comments have been asked already. It avoids duplication. – Johannes_B May 30 '17 at 17:29

1 Answers1

3

I am not sure if I understand what you are looking for, but maybe the following does what you want:

\begin{filecontents*}{bib-refs.bib}
@online{WEB:GNU:GPL:2010,
  Author = {{Free Software Foundation, Inc.}},
  Title = {GNU General Public License},
  Url = {http://www.gnu.org/licenses/gpl.html},
  Urldate = {2011-05-27},
  Year = {2010}}
\end{filecontents*}

\documentclass[%
  bibliography=totoc,% include bib in toc
]{scrreprt}%
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage[
  bibsys=biber,%
  bibfile=bib-refs,%
  bibstyle=alphabetic,%
]{cleanthesis}
\hypersetup{hidelinks}

\titleformat{name=\chapter,numberless}[display]%
  {\usekomafont{chapter}}%
  {\vspace{-8em}\raggedleft{%
    {\color{ctcolorchapterline}%
      \rule[-5pt]{2pt}{5cm}}\quad%
    {\color{ctcolorchapternum}
      \fontsize{60}{60}\selectfont}%
    }%
  }%
  {-2.1em}%
  {\ctformatchapter}%
  [\phantomsection]

\usepackage{blindtext}% only for dummy text
\begin{document}
\tableofcontents
\blinddocument
\nocite{*}
\printbibliography
\end{document}

Result:

enter image description here

enter image description here

But note that cleanthesis breaks a lot of KOMA-Script features. It would be possible to use KOMA-Script commands to get similar results. See e.g. here.

esdd
  • 85,675
  • That's precisely what I was after. Thank you. – 1QuickQuestion May 31 '17 at 09:00
  • 1
    @1QuickQuestion Quick question from my side: You are not bothered about the Contents? It is a chapter just like the bibliography is. Why should the chapter called contents look different in style? – Johannes_B May 31 '17 at 16:16
  • Good point - that's not really something that I had considered. I guess I felt that everything up to Chapter 1 was front matter and could have its only style (e.g. Abstract, Acknowledgement, Declaration, Contents, LoF, LoT, Nomenclature) but then everything subsequent to Chapter 1 would have consistent style albeit without the numbering for the Bibliography and Appendixes. Maybe most would find this a horrible stylistic choice but I quite like it! – 1QuickQuestion May 31 '17 at 16:42