Simple TeX problem

Dr_Grip

Made from concentrate
Joined
Jul 8, 2008
Messages
15,215
Location
HEL
Car(s)
79 Opel Kadett|72 Ford Country Sedan|03 Volvo XC70
Due to reasons I won't go into right now, I've spent the last few hours modifying/butchering the Springer Academic Publishing TeX Class. The only thing I can't wrap my head 'round right now is the chapter heading format:

Code:
\def\@makechapterhead#1{{\parindent\z@\raggedright\normalfont
  \hyphenpenalty \@M
  \interlinepenalty\@M
  \if@chapnum
     \chapsize\chapstyle
     \thechapter\thechapterend
  \fi
  \chapsize\chapstyle
  \ \ #1\par\nobreak
  \processchapsubtit
  \processchapauthor
  \processmotto
  \vskip 60pt
Which does a splendid job of giving me a simple
"1 Chaptertitle"
headline with five lines (60pt) of whitespace below. Problem is, when the chapter name runs longer than a single line of text, the second line starts at the beginning of the line, directly below the chapter number, instead of being aligned to the beginning of the chapter title, i.e. below the "C" in my example. Any ideas?

"\chapsize" and "\chapstyle" are styling settings. They are defined as
Code:
\newcommand{\chapsize}{\LArge}
\newcommand{\chapstyle}{\bfseries\boldmath}
"\thechapterend" is empty.
 
Last edited:
One more thing: I tried using the "titlesec" package, but it seems impossible to tell titlesec to not put a massive amount of space above the chapter title.
 
What class are you using exactly? Can you post the relevant parts of your document header?
 
Here's the preamble for my project's main .tex file:
Code:
\documentclass[graybox,envcountchap,sectrefs,deutsch]{svmono-vs}

\usepackage{helvet}
\usepackage{courier}
\usepackage{fix-cm}
%Springer-VS prefers Garamond to the standard TeX serif font
\usepackage[urw-garamond]{mathdesign}
\usepackage{makeidx}         % allows index generation
\usepackage{graphicx}        % standard LaTeX graphics tool
                             % when including figure files
\usepackage{multicol}        % used for the two-column index
\usepackage[bottom]{footmisc}% places footnotes at page bottom

\usepackage[utf8]{inputenc}
\usepackage{ngerman}

%set title formatting to Springer-VS guidelines
\usepackage{titlesec}
\titleformat*{\section}{\normalsize\bfseries}
\titleformat*{\subsection}{\normalsize\itshape}
\titleformat*{\subsubsection}{\normalsize}
%\titleformat{\chapter}[block]{\LArge\bfseries\boldmath}{\thechapter}{9pt}{}{}
The last line does what I want, except for adding a big fat space on top of the page, which is why it's not used.

And here's how a chapter start looks
Code:
\chapter{Einleitung}
\label{einleitung} % Always give a unique label
Hardly what I'd call spectacular.
 
Fixed it!
Code:
%stolen from titlesec
\def\ttl@calc#1#2{%
  {\setlength\@tempskipa{#2}%
   #1\@tempskipa}}

\def\@makechapterhead#1{{\parindent\z@\raggedright\normalfont
  \hyphenpenalty \@M
  \interlinepenalty\@M
  \if@chapnum
     \parindent\z@
     \leavevmode
     \begingroup
          \sbox\z@{\chapsize\chapstyle\thechapter\thechapterend\strut\ttl@calc\hspace{6pt}}%
          \advance\leftskip\wd\z@
          \llap{\box\z@}%
       \chapsize\chapstyle{#1}%
       \kern\z@\strut\@@par
     \endgroup

  \fi
  \processchapsubtit
  \processchapauthor
  \processmotto
  \vskip 60pt
}}
Yep, I just grabbed what I needed from titlesec.sty.
 
Top