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.
The LaTeX core defines \@ifclassloaded{classname}{true branch}{false branch}
which is basically the same as \@ifpackageloaded
for checking whether a certain package is loaded.
The class name has to be specified without the usual .cls
extension.
Since @
occurs in the macro name \@ifclassloaded
, \makeatletter...\makeatother
is needed in the document preamble, if the check occurs in a self-written package, \makeatletter...\makeatother
must not appear there!
\documentclass{letter}
\usepackage{lipsum}
\makeatletter
\@ifclassloaded{letter}{%
\typeout{this uses letter class}%
}{%
\usepackage{titling}
\typeout{this uses another class}%
}
\makeatother
\signature{Your name}
\address{Street \\ City \\ Country}
\begin{document}
\begin{letter}{Company name \\ Street\\ City\\ Country}
\opening{Dear Sir or Madam:}
\lipsum[1-2]
\closing{Yours Faithfully,}
\ps{P.S. Here goes your ps.}
\encl{Enclosures.}
\end{letter}
\end{document}
Best Answer
You have to load
fullpage
after\ProcessOptions
, first of all.Here's the scheme:
Then a document calling either
or
will load
fullpage
; a document callingwon't.
Thus you won't have to change your old document, but new ones will be able to avoid loading of
fullpage
.