[Tex/LaTex] Clean thesis template, references not compressed

biblatexcleanthesis

I'm using Clean Thesis template for my thesis. My problem is: "the references are not compressed," as shown in the highligted line segment in the image below. Could anyone please suggest how the issue can be addressed? Thanks a million.

And, here is the code that configure the bibliography system:

\usepackage[
    figuresep=colon,
    sansserif=false,
    hangfigurecaption=false,
    hangsection=true,
    hangsubsection=true,
    colorize=full,
    bibsys=bibtex,
    bibfile=bib-refs,
    bibstyle=numeric
    bibliographystyle=ieeetr
]{cleanthesis}

enter image description here

Best Answer

The cleanthesis.sty uses biblatex to manage citations. While biblatex itself offers a broad variety of citationstyles, cleanthesis offers only three of them: alphabetic, numeric and authoryear to choose from using the style=... option from cleanthesis.

In order to use citationstyles other than the above mentioned, one can edit a local copy of cleanthesis.sty in the following two ways:

1. fixed citestyle, not customizable via option

The first customization option is to directly pass the desired citationstyle as an option to biblatex. Consider the following code, which is a copy of line 284-300 from cleanthesis.sty.

\RequirePackage[                    % use biblatex for bibliography
    backend=\cthesis@bibsys,        %   - use biber backend (bibtex replacement) or bibtex
    style=\cthesis@bibstyle,        %   - use alphabetic (or numeric) bib style
    natbib=true,                    %   - allow natbib commands
    hyperref=true,                  %   - activate hyperref support
    backref=true,                   %   - activate backrefs
    isbn=false,                     %   - don't show isbn tags
    url=false,                      %   - don't show url tags
    doi=false,                      %   - don't show doi tags
    urldate=long,                   %   - display type for dates
    maxnames=3,%
    minnames=1,%
    maxbibnames=5,%
    minbibnames=3,%
    maxcitenames=2,%
    mincitenames=1%
]{biblatex}

Replacing style=\cthesis@bibstyle by citestyle=numeric-copm (or every other citestyle biblatex offers) and not using clearthesis's bibstyle=... option in the preamble of the document should work.

2. flexible citestyle, customizable via option

A better and more flexible approach is the following. The following code is again copied from cleanthesis.sty (line 92).

\define@choicekey*[ct]{cthesis}{bibstyle}[\val\bibstylenr]
{alphabetic,numeric,authoryear}[alphabetic]{\def\cthesis@bibstyle{#1}}

To customize this one could add the numeric-comp style (or any other) as follows:

\define@choicekey*[ct]{cthesis}{bibstyle}[\val\bibstylenr] alphabetic,numeric,authoryear,numeric-comp}[alphabetic]{\def\cthesis@bibstyle{#1}}

Now the added style can be chosen in the preamble of the .tex file using something like:

\usepackage[bibstyle=alphabetic,bibfile=filename]{cleanthesis}