6

I want to make chapter titles that look something like this:

enter image description here

I'll be using a different font, but the idea is the same. If possible, I'd like it to work like this:

  1. Pick the size of the number (one should be able to make it arbitrarily large). The top of the number should always coincide with the top of the chapter title.
  2. Choose the size of the font used in the chapter title.
  3. Extend the number to the desired length. (This will of course be the same for all chapters.)

The chapter text should wrap around, as shown, but it should fit at the top of a page (like a standard chapter title). The number should be flush with the left margin, and the width of the entire block should be \textwidth. You should also be able to change the distance from the chapter title to the text below it.

Edit: Here's my partial solution:

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\usepackage{adjustbox}
\usepackage{multirow}

\makeatletter
\def\@makechapterhead#1{%
    \vspace*{-5.0em}%
    {\parindent \z@  \normalfont
    \interlinepenalty\@M
    \begin{table}[h]
        \begin{tabular}{rl}
            {\resizebox{1cm}{3cm}{\thechapter}} & \multicolumn{1}{l}{
                                                  {\fontsize{2cm}{0cm}
                                                  \selectfont\MakeUppercase{#1}}}
        \end{tabular}
    \end{table}
    \par\vspace{3.5em}%
}}
\makeatother

\begin{document}
\chapter{Vectors and Kinematics -- A Few Mathematical Preliminaries}
\end{document}

Here is the output: enter image description here

I need to fix the vertical alignment of the chapter number and make it flush left with the margin, and fix the text wrapping in the chapter title.

![enter image description here][3]

  • You are asking quite a lot there, but give few information. Which documentclass are you using? – Johannes_B May 8 '15 at 14:33
  • \documentclass{report}. If I left out anything else, please let me know. – Randy Randerson May 8 '15 at 14:35
  • 4
    You know the drill: first the MWE... – DG' May 8 '15 at 14:38
  • The giant number looks awfully distorted. I don't advise to use it for typographical reasons – user31729 May 8 '15 at 15:07
  • 3
    Folks, could we be a bit nicer? The OP was asked for a MWE. He's done that and now we're complaining about how he went about doing it? This doesn't make sense. I don't know how to do what he wants. But, if you do, perhaps instead of criticizing the MWE, show the OP how to properly accomplish this. – A.Ellett May 8 '15 at 16:05
8

Here's a solution using some more appropriate low level commands - but it's a bit fiddly, so titlesec might be a better way to do it.

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\makeatletter
\def\@makechapterhead#1{\bgroup
\moveright-1in\vbox to 0pt{\hbox{}\vskip4pt\fontsize{86}{68}\selectfont\thechapter\par\vss}%
\parindent\z@\normalfont\fontsize{32}{36}\selectfont\raggedright%
\MakeUppercase{#1}
\par\egroup
\vskip36pt
}
\makeatother
\begin{document}
\chapter{Vectors and Kinematics -- A Few Mathematical Preliminaries}

In particular, any associated supporting element necessitates that urgent
consideration be applied to possible bidirectional logical relationship approaches.
Conversely, any associated supporting element recognizes other systems' importance
and the necessity for possible bidirectional logical relationship approaches.
However, a service-oriented paradigm is further compounded when taking into account
the evolution of specifications over a given time period.  
\end{document}

enter image description here

2

I guess you want the number to be as high as two lines of text; here's a possibility independent of the font size (I used \Huge). The number is in the margin.

Note that showframe and lipsum are not necessary; the former is used just to show the boundaries of the various parts of the page.

\documentclass{report}
\usepackage[T1]{fontenc}
\usepackage{cmbright}
\usepackage{graphicx}
\usepackage{showframe,lipsum}

\makeatletter
\def\@makechapterhead#1{%
  \begingroup\raggedright
  \noindent\normalfont\Huge\selectfont
  \setbox0=\vbox{A\par A}% measure two lines
  \dimen0=\ht0 % save the height
  \sbox0{A}% measure just one uppercase letter
  \dimen2=\ht0 % save the height
  \makebox[0pt][r]{%
    % lower the box containing the chapter number
    \raisebox{\dimexpr\dimen2-\dimen0\relax}[\dimen2][0pt]{%
      % scale the chapter number to be as high as two lines of text
      \resizebox{!}{\dimen0}{\thechapter}%
    }\hspace{5mm}% some gap to the title
  }%
  % typeset the title
  \MakeUppercase{#1}\par
  \endgroup
  \vspace{6ex}
}
\makeatother

\begin{document}
\chapter{Vectors and Kinematics -- A Few Mathematical Preliminaries}

\lipsum[1]

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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