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 want to make a "title page" for each chapter of a book, and it should have two vertical lines across the page (one thicker than the other), and the name of the chapter, as shown in the image below.

enter image description here

I don't know how to make the vertical lines and I don't know how to make the "title page" for each chapter.

I am using Texmaker in Windows.

This is the code after I included the suggestion of Werner:

\documentclass[12pt,letterpaper]{book}
\usepackage[spanish]{babel}
\usepackage[utf8]{inputenc}
\usepackage{graphicx, lipsum, lmodern}
\usepackage{geometry}
\title{Serpientes venenosas de Honduras}
\author{Gustavo A. Cruz}
\date{}

 \makeatletter
 \def\@makechapterhead#1{%
   \vspace*{50\p@}%
   \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}% Thick rule
   \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule
   \hspace{.1\linewidth}%
   {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright
      \ifnum \c@secnumdepth >\m@ne
      \normalfont\bfseries\fontsize{30\p@}{36\p@}\selectfont
      \@chapapp\space \scalebox{2}{\thechapter}
     \par\nobreak
      \vskip 30\p@
      \fi
       \interlinepenalty\@M
       \fontsize{45\p@}{55\p@} \bfseries #1
      }
     }\thispagestyle{empty}\clearpage}
    \def\@makeschapterhead#1{%
     \vspace*{50\p@}%
    \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}%        Thick rule
   \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule
   \hspace{.1\linewidth}%
   {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright
   \fontsize{45\p@}{55\p@} \bfseries #1
   }
   }\thispagestyle{empty}\clearpage}
  \makeatother
  \newcommand{\HRule}{\rule{\linewidth}{0.5mm}} 
    \begin{document}
          \maketitle

\chapter*{Agradecimiento}
 \lipsum[1]
 \end{document}
share|improve this question
    
Can you post an image (even handmade) of what you are trying to achieve? –  karlkoeller Aug 30 '13 at 5:18
    
related: tex.stackexchange.com/questions/108853/… –  Jubobs Aug 30 '13 at 6:15
    
Relevant: Totally sweet horizontal rules in LaTeX. –  Pål GD Aug 30 '13 at 8:18

2 Answers 2

up vote 8 down vote accepted

Here is a really old-school approach to reproduce the layout:

enter image description here

\documentclass{report}
\usepackage{graphicx,lipsum,lmodern}% http://ctan.org/pkg/{graphicx,lipsum,lm}
\makeatletter
\def\@makechapterhead#1{%
  \vspace*{50\p@}%
  \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}% Thick rule
  \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule
  \hspace{.1\linewidth}%
  {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright
    \ifnum \c@secnumdepth >\m@ne
        \normalfont\bfseries\fontsize{30\p@}{36\p@}\selectfont
        \@chapapp\space \scalebox{2}{\thechapter}
        \par\nobreak
        \vskip 30\p@
    \fi
    \interlinepenalty\@M
    \fontsize{45\p@}{55\p@} \bfseries #1
    }
  }\thispagestyle{empty}\clearpage}
\def\@makeschapterhead#1{%
  \vspace*{50\p@}%
  \noindent\hspace*{.1\linewidth}\smash{\rule[-2\textheight]{5pt}{3\textheight}}% Thick rule
  \hspace{.05\linewidth}\smash{\rule[-2\textheight]{2pt}{3\textheight}}% Thin rule
  \hspace{.1\linewidth}%
  {\parbox[t]{\dimexpr.75\linewidth-7pt}{\raggedright
    \fontsize{45\p@}{55\p@} \bfseries #1
    }
  }\thispagestyle{empty}\clearpage}
\makeatother
\begin{document}
\chapter{Name of the chapter}
\lipsum[1]
\chapter*{Name of the chapter}
\lipsum[1]
\end{document}

The chapter title macros \@makechapterhead and \@makeschapterhead are redefined (respectively used to set the header of a numbered and unnumbered/starred chapter). lmodern provides scaled fonts that can be enlarged beyond \Huge (the default for chapter titles), together with some graphicx scaling of the chapter number... why not.

Page numbers are removed using \thispagestyle{empty} (default used to be plain).

share|improve this answer
    
Would this work for the book class? –  Anthea Aug 30 '13 at 6:23
    
@Anthea: Absolutely! I am also confident there will be more flair added in the form of tikz solutions (hence my reference to going old-school). –  Werner Aug 30 '13 at 6:25
    
I tried pasting it into my document and I have the following error message: Missing \endcsname inserted. <to be read again>. \protect \lipsum[1] –  Anthea Aug 30 '13 at 6:30
    
@Anthea: It's hard to tell in comments what you're missing. You could edit your original post to include something that reproduces this error... –  Werner Aug 30 '13 at 6:37
    
Despite the error messages, the output is like I wanted it. –  Anthea Aug 30 '13 at 6:51

An alternative is to use tikzpicture.

\documentclass[a4paper]{book}
\usepackage{tikz,everypage,lipsum}
\usepackage[margin=1in]{geometry}
\makeatletter
\newcommand\bm@line{%
\begin{tikzpicture}[overlay, remember picture]  % book mark
\node (A) [xshift=5cm] at (current page.north west){};
\node (B) [xshift=5cm] at (current page.south west){};
\node (C) [xshift=6cm] at (current page.north west){};
\node (D) [xshift=6cm] at (current page.south west){};
\draw [black, line width=3pt] (A)--(B);
\draw [black, line width=1.5pt] (C)--(D);
\end{tikzpicture}
}
\makeatother
\begin{document}

\chapter*{\protect\hspace{5cm}First Chapter}
\makeatletter
\AddThispageHook{\bm@line}
\makeatother
\clearpage
\lipsum[1]
\end{document}

Here I define a bookmark line where the position can be changed. everypage package is also needed.

enter image description here

share|improve this answer

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.