Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Why the following code does not compile? How can I fix that?

\documentclass{scrlttr2}

\usepackage[american]{babel}
\usepackage{classicthesis}

\begin{document}
Test
\end{document}
share|improve this question
3  
scrlttr2 is a letter class. I hope you don't mind me asking, but why do you need classicthesis for a letter? I guess it wasn't designed for such a class... –  Jubobs May 6 '13 at 21:29
1  
classicthesis relies upon usual sectioning commands like \section being defined (and on \chapter since you're not using classicthesis' nochapters option). They're not available in the scrlttr2 class, though. –  cgnieder May 6 '13 at 21:39

1 Answer 1

up vote 3 down vote accepted

The classicthesis package relies on the usual sectioning commands such as \section being defined. For example it loads titlesec which it uses to define the sectioning formats.

However, the scrlttr2 class does not define sectioning commands since they're not needed for a letter.

But then, classicthesis is meant for formatting a thesis and not a letter...

If you define dummy commands for the sectioning commands and the figure and table floats (that aren't defined in scrlttr2 either as they're not needed for a letter, too) you can avoid the immediate errors:

\documentclass[a4paper,version=last]{scrlttr2}
\usepackage[ngerman]{babel}

\setkomavar{fromname}{Max Musterman}
\setkomavar{fromaddress}{Musterstr.\,1\\54321 Musterstadt}

\makeatletter
\def\section{}
\newcounter{section}
\def\l@section{}
\def\subsection{}
\def\l@subsection{}
\def\subsubsection{}
\def\l@subsubsection{}
\def\paragraph{}
\def\l@paragraph{}
\def\subparagraph{}
\def\l@subparagraph{}
\newcounter{figure}
\def\l@figure{}
\def\figurename{}
\newcounter{table}
\def\l@table{}
\def\tablename{}
\def\@pnumwidth{}
\makeatother
\usepackage[nochapters]{classicthesis}

\begin{document}

\begin{letter}{Otto Normalverbraucher\\Normalstr.\,1\\12345 Normalstadt}
\opening{}


\closing{}
\end{letter}

\end{document}
share|improve this answer
    
That is exactly what I had need! ;) A question: What are the horizontal little lines at the left of the letter body? –  FormlessCloud May 7 '13 at 11:28
    
@FormlessCloud Folding guides? (To help fold the letter correctly for insertion into an envelope.) –  Paul Stanley May 7 '13 at 11:35
1  
They are fold marks. There is an option to turn them off but I can't remember it at the moment. You should be able to find it in KOMA-Script's documentation –  cgnieder May 7 '13 at 11:35
    
@PaulStanley Thank you all guys you're fantastic. For your knowledge the option is "foldmarks=false" –  FormlessCloud May 7 '13 at 12:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.