2

Okay, a lot of questions have been asked about this already but I still couldn't really find the answers I was looking for.

There's this standard front page I need to use for my thesis that has these margins and a lot of text blocks.

\topmargin -10mm
\textwidth 160truemm
\textheight 240truemm
\oddsidemargin 0mm
\evensidemargin 0mm

Since this front page lay-out is absolutely horrible I'd like to use this style for the rest of my thesis.

style

\documentclass{book}
\usepackage{graphics}

\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\normalfont\Large\raggedleft}
  {\MakeUppercase{\chaptertitlename}%
    \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
  {10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\usepackage{lipsum}
\setcounter{chapter}{2}
\begin{document}

\chapter{Implementation}

But the margins stay the same like set for the front page and I'd like to change that to the way they look on the picture, but how?

Another thing related to this style that I was wondering about is how it is possible to change the appearance of the black rectangle. I'd like to have a grey version of it on my table of contents and introduction pages, but it simply disappears when there's i.e. \chapter*{Introduction}

Yes, thanks. The grey thing is what I wanted, but there's something weird with the formatting.

enter image description here enter image description here

I used the code you gave me, but how can I get rid of the number and make the titles show up in the right place? I also don't really get why the bar moved for my introduction. Everywhere else it is ok.

\titleformat{\chapter}[display]
  {\normalfont\Large\raggedleft}
  {\MakeUppercase{\chaptertitlename}%
    \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
  {10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\setcounter{chapter}{0}

\chapter*{Introduction}
\addcontentsline{toc}{chapter}{Introduction}
2

Something like that? Your problem with margins is not very clear to me. Margins can easily be set by the geometry package. I defined a layout for numberless chapters with \titleformat:

\documentclass{book}
\usepackage{graphics}
\usepackage{geometry}
\geometry{hmargin={3cm, 6cm}}
\usepackage{xcolor}
\usepackage[pagestyles, explicit]{titlesec}
\titleformat{\chapter}[display]
  {\normalfont\Large\raggedleft}
  {\MakeUppercase{\chaptertitlename}%
    \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
  {10pt}{\Huge#1}

\titleformat{name = \chapter, numberless}[block]
 {\normalfont\Large\filleft}
 {\MakeUppercase{\chaptertitle}
}%
 {10pt}{\Huge#1\rlap{\hskip0.5em\color{lightgray!50!}\rule[-0.5cm]{6cm}{1.5cm}}}

\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\usepackage{lipsum}
\begin{document}
\tableofcontents

\chapter*{Introduction}
\setcounter{chapter}{2}
\chapter{Implementation}
\lipsum[1-10]

\end{document} 

enter image description here

enter image description here

|improve this answer|||||
  • Yes, thanks. The grey thing is what I wanted, but there's something weird with the formatting. ![enter image description here][2] ![enter image description here][3] I used the code you gave me, but how can I get rid of the number and make the titles show up in the right place? I also don't really get why the bar moved for my introduction. Everywhere else it is ok. [2]: i.stack.imgur.com/N8ktv.png [3]: i.stack.imgur.com/SYlDs.png – Password Feb 20 '15 at 11:43
1

If I understood your question, you can use the geometry package to change the page layout in your document; the idea is to load geometry with the settings for the inner pages of your document, and use \newgeometry to set the layout for the titlepage; once this page has been shipped, you invoke \restoregeometry to have the settings previously declared; the following example illustrates this (I used the showframe option just to have a visual guide for the page layouts):

\documentclass{book}
\usepackage{graphics}
\usepackage[vmargin=2cm,hmargin=3cm,showframe]{geometry}

\usepackage{titlesec}
\titleformat{\chapter}[display]
  {\normalfont\Large\raggedleft}
  {\MakeUppercase{\chaptertitlename}%
    \rlap{ \resizebox{!}{1.5cm}{\thechapter} \rule{5cm}{1.5cm}}}
  {10pt}{\Huge}
\titlespacing*{\chapter}{0pt}{30pt}{20pt}

\usepackage{lipsum}
\setcounter{chapter}{2}

\author{The Author}
\title{The Title}
\begin{document}

\newgeometry{
  tmargin=-10mm,
  textwidth=160truemm,
  textheight=240truemm,
  lmargin=0mm,
  rmargin=0mm
}
\maketitle
\restoregeometry
\chapter{Implementation}

\end{document}

The result:

enter image description here

|improve this answer|||||

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.