[Tex/LaTex] ClassicThesis: override options of a previously loaded classicthesis package

classicthesispackage-options

I have recently upgraded from Ubuntu 11.04 to Ubuntu 11.10. I also installed "vanilla" TexLive 2011 (instead of the old TexLive 2009 from the repositories) and upgraded it with sudo tlmgr update --self -all so all the packages are in the latest version. I currently need TexLive to write my PhD thesis and I use classicthessis package to do it.

In the new version of the classicthesis, v.3.0 that comes with TexLive 2011 the package is used by issuing just

\usepackage {classicthesis-preamble}

which is loaded as the first package in the preamble and then it sets everything and loads the classicthesis package (it is in the last line).

My question now is: Is there a way to pass options to the classicthesis package and/or how can I disable some of the default options that classicthesis-preamble passes to the classicthesis package – FROM MY PREAMBLE (i.e. without altering the installed classicthesis files or creating their copies in my document folder and altering those?

For example, classicthesis-preamble passes drafting option to the classicthesis

\PassOptionsToPackage{....,drafting,...}{classicthesis}

and I want to compile the my document without that option – but would prefer to do it from the preamble of my own document.

I tried reloading the classicthesis after classisthesis-preamble with my own set of options, expecting some error because classicthesis would be already called from the classicthesis-preamble:

\usepackage{classicthesis-preamble}
\usepackage[<some,option,set,that,does,not,contain,"drafting">]{classicthesis}

but there was no error, but no change in the options either. I tried using \PassOptionsToPackage but it can just add additional options to the existing ones. I tried googling for similar command that can replace instead of add options, but did not find one.

Best Answer

André Miede's idea is that one should copy classicthesis-preamble.sty in the working directory and changes is to suit the needs for a particular job.

Not a very good idea, in my opinion, as the code in this package is quite intimidating for the novice and does not limit itself to some

\usepackage[<options>]{<package>}

lines, maybe with some auxiliary definitions. It's not very clear why saying

\PassOptionsToPackage{fleqn}{amsmath}           % math environments and more by the AMS 
 \RequirePackage{amsmath}

is to be preferred to the simpler

\usepackage[fleqn]{amsmath}

or what the novice user is supposed to do with

\ifthenelse{\boolean{cld@backref}}%
{%
                \PassOptionsToPackage{hyperpageref}{backref}
                \RequirePackage{backref} % to be loaded after hyperref package 
                   \renewcommand{\backreftwosep}{ and~} % seperate 2 pages
                   \renewcommand{\backreflastsep}{, and~} % seperate last of longer list
                   \renewcommand*{\backref}[1]{}  % Disable standard
                   \renewcommand*{\backrefalt}[4]{% Detailed backref
                      \ifcase #1 %
                         \backrefnotcitedstring%
                      \or%
                         \backrefcitedsinglestring{#2}%
                      \else%
                         \backrefcitedmultistring{#2}%
                      \fi}%
}{\relax}

which is code that should go in classicthesis.sty.

If you feel intimidated by classicthesis-preamble.sty, then don't load it and add the packages you need, passing the desired options directly to classicthesis.

For example

\documentclass[...]{scrbook}
\usepackage[fleqn]{amsmath}

\usepackage[eulerchapternumbers,subfig,beramono,eulermath,parts]{classicthesis}

\usepackage{hyperref}
\hypersetup{%draft, % = no hyperlinking at all (useful in b/w printouts)
    colorlinks=true, linktocpage=true, pdfstartpage=3, pdfstartview=FitV,%
    % uncomment the following line if you want to have black links (e.g., for printing)
    %colorlinks=false, linktocpage=false, pdfborder={0 0 0}, pdfstartpage=3, pdfstartview=FitV,% 
    breaklinks=true, pdfpagemode=UseNone, pageanchor=true, pdfpagemode=UseOutlines,%
    plainpages=false, bookmarksnumbered, bookmarksopen=true, bookmarksopenlevel=1,%
    hypertexnames=true, pdfhighlight=/O,%hyperfootnotes=true,%nesting=true,%frenchlinks,%
    urlcolor=webbrown, linkcolor=RoyalBlue, citecolor=webgreen, %pagecolor=RoyalBlue,%
    %urlcolor=Black, linkcolor=Black, citecolor=Black, %pagecolor=Black,%
    pdftitle={},%
    pdfauthor={},%
    pdfsubject={},%
    pdfkeywords={},%
    pdfcreator={pdfLaTeX},%
    pdfproducer={LaTeX with hyperref and classicthesis}%
}   

which might be sufficient for many purposes.