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.

I try to have the chapter's number in my document twice as big as the title on the left and the two-line chapter title on the right. The number should span two lines, so the two lines of the title are exactly the same size the number is and they are at the same height.

You can see what I achieved so far here:

enter image description here

The problem now is that the title starts at the bottom of the number, but it should start at the top.

I did this using titlesec package:

\titleformat{\chapter}[hang]{\Huge\bfseries\sffamily}{{\fontsize{75}{80}\selectfont\color{chpgrey}{\thechapter~|~}}}{15pt}{}

My document class is scrreprt.

Does anyone have an idea how I can achieve what I want?

share|improve this question
    
Instead of providing code snippets with references only, rather compile a minimal working example (MWE) that starts with \documentclass and ends with \end{document} that replicates a small instance of your current setup. It will improve the likelihood of answers that exactly match your needs. –  Werner Jan 30 '13 at 20:23
add comment

1 Answer

One possibility is to use the explicit option for titlesec and two \parboxes (one for the number and the vertical rule, the other one for the title) vertically aligned at the bottom:

\documentclass{scrreprt}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{xcolor}
\usepackage{linegoal}
\usepackage[explicit]{titlesec}

\colorlet{chpgrey}{gray!40}

\newcommand\chapnumfont{%
  \fontsize{75}{80}\selectfont\color{chpgrey}}
\titleformat{\chapter}[hang]
  {\bfseries\sffamily}
  {}{0pt}
  {{\chapnumfont\parbox[b]{3cm}{%
      \thechapter}\vrule width3pt depth0.2ex}\hspace{15pt}%
    \parbox[b]{\linegoal}{\Huge\raggedright#1}}

\begin{document}

\chapter{Test Chapter Title}
\chapter{Test Chapter Title Spanning Two Lines}

\end{document}

An image for a one line title:

enter image description here

An image for a title spanning two lines:

enter image description here

Feel free to adjust the widths of the boxes according to your needs.

share|improve this answer
add comment

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.