5

I am using stock book template and would like to create a dedication page. I have used this answer to align the text vertically and my current code is the following:

\cleardoublepage
\vspace*{\stretch{3}}
\textbf{DEDICATION}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam bibendum nisl et elementum placerat. Vivamus placerat, erat sed pretium malesuada, est lacus ultricies nibh, id rutrum quam lacus et enim. Nunc imperdiet pretium sagittis. Quisque mattis pharetra enim at scelerisque. Quisque id ornare orci. In sit amet leo non leo commodo viverra in ut ipsum.

Aliquam scelerisque, urna nec elementum pharetra, ipsum tellus luctus elit, non malesuada sem nunc vitae tortor. Cras lorem magna, faucibus a magna id, tincidunt euismod turpis. Vestibulum viverra suscipit nibh, at sollicitudin orci. Aliquam mollis nisi lacinia suscipit volutpat. Nunc velit sem, sagittis vitae lacus.
\vspace{\stretch{1}}
\clearpage

The code produces this page

enter image description here

Now, what I would like to do is to add some left padding to the text (say 3 or 4 cm). I have made an extensive search and have found no easy way to do it. Is this really that complicated?

6

Easy to do with \newgeometry and \restoregeometry from the geometry package:

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage[showframe, nomarginpar]{geometry}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\cleardoublepage
\newgeometry{left=6cm,right=3.8cm}
\vspace*{\stretch{3}}
\textbf{DEDICATION}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam bibendum nisl et elementum placerat. Vivamus placerat, erat sed pretium malesuada, est lacus ultricies nibh, id rutrum quam lacus et enim. Nunc imperdiet pretium sagittis. Quisque mattis pharetra enim at scelerisque. Quisque id ornare orci. In sit amet leo non leo commodo viverra in ut ipsum.

Aliquam scelerisque, urna nec elementum pharetra, ipsum tellus luctus elit, non malesuada sem nunc vitae tortor. Cras lorem magna, faucibus a magna id, tincidunt euismod turpis. Vestibulum viverra suscipit nibh, at sollicitudin orci. Aliquam mollis nisi lacinia suscipit volutpat. Nunc velit sem, sagittis vitae lacus.
\vspace{\stretch{1}}
\clearpage
\restoregeometry
\lipsum[1]

\end{document} 

enter image description here

Another method: modify, then restore the value of \leftskip:

\documentclass[a4paper,11pt]{book}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\cleardoublepage
\leftskip=4cm
\newgeometry{left=6cm}
\vspace*{\stretch{3}}
\textbf{DEDICATION}

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam bibendum nisl et elementum placerat. Vivamus placerat, erat sed pretium malesuada, est lacus ultricies nibh, id rutrum quam lacus et enim. Nunc imperdiet pretium sagittis. Quisque mattis pharetra enim at scelerisque. Quisque id ornare orci. In sit amet leo non leo commodo viverra in ut ipsum.

Aliquam scelerisque, urna nec elementum pharetra, ipsum tellus luctus elit, non malesuada sem nunc vitae tortor. Cras lorem magna, faucibus a magna id, tincidunt euismod turpis. Vestibulum viverra suscipit nibh, at sollicitudin orci. Aliquam mollis nisi lacinia suscipit volutpat. Nunc velit sem, sagittis vitae lacus.
\vspace{\stretch{1}}
\clearpage
\leftskip=0cm
\lipsum[1]

\end{document} 

enter image description here

|improve this answer|||||
  • I have a double sided document and your solution seems to confuse the page margins - they are the same as other left-side pages, but should be as right-side pages. – alesc May 25 '15 at 9:52
  • The book class, that I use, is two--sided by default, and I have no problem. Wich class of document do you use? Geometry might interfere with it. – Bernard May 25 '15 at 9:59
  • I am using the standard class: \documentclass[a4paper]{book}. The dedication page appears on the right-hand side, but the margins are as the left-hand side. – alesc May 25 '15 at 10:01
  • I don't quite understand. Do you mean the outer margin on the dedication page is the same as the inner margin on other pages? I added another solution without geometry, based on the value of \leftskip. – Bernard May 25 '15 at 10:13
  • Thanks, the solution with \leftskip worked. Regarding the margins: the dedication page is on the right side. It's outer (right) margin is the same as the inner (right) margin on other left-side pages. So it does not look like a right side page, although it is displayed on the right-hand side. – alesc May 25 '15 at 10:32
4

You can fudge this using list environment (this is how quote etc work):

\documentclass{book}
\usepackage{lipsum}
\newenvironment{dedication}{\cleardoublepage\vspace*{\stretch{3}}%
     \list{}{}\item\relax\textbf{Dedication}\newline}%
    {\endlist\vspace*{\stretch{1}}\clearpage}

\begin{document}
  \begin{dedication}
    \lipsum[1]
  \end{dedication}
\end{document}

Just for fun I've wrapped this into a "dedication" environment. Here's an image:

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.