10

I'm trying to make some line vertical-spaces in dedication. But, I couldn't find how.

Here is the code that I'm using:

\newenvironment{dedication}
  {\clearpage           % we want a new page
   \thispagestyle{empty}% no header and footer
   \vspace*{\stretch{1}}% some space at the top 
   \itshape             % the text is in italics
   \raggedleft          % flush to the right margin
  }
  {\par % end the paragraph
   \vspace{\stretch{3}} % space at bottom is three times that at the top
   \clearpage           % finish off the page
  }

When I try this to get one empty lines. I get none.

\begin{dedication}
ABC \\ \\ DEF
\end{dedication}

And how do I please to change the font-style of John in this code:

\begin{dedication}
ABC \\ \\ DEF \\ \\
John
\end{dedication}

Thank you a lot!

dgs
  • 1,637

1 Answers1

13
\documentclass{book}
\usepackage{lmodern}
\usepackage[T1]{fontenc}
\newenvironment{dedication}
  {%\clearpage           % we want a new page          %% I commented this
   \thispagestyle{empty}% no header and footer
   \vspace*{\stretch{1}}% some space at the top
   \itshape             % the text is in italics
   \raggedleft          % flush to the right margin
  }
  {\par % end the paragraph
   \vspace{\stretch{3}} % space at bottom is three times that at the top
   \clearpage           % finish off the page
  }
\begin{document}
 \frontmatter              %% better to use this in book class
 \chapter{Dedication}
  \begin{dedication}
    ABC 
    \par   %% or a blank line
    \vspace{2\baselineskip}
    DEF

    \vspace{\baselineskip}
    \usefont{T1}{LobsterTwo-LF}{bx}{it}
    John
  \end{dedication}
%.
%.
%.
%.
\mainmatter             %% and use this for main chapters.
\chapter{Introduction}
\end{document}

enter image description here

Instead of \vspace{2\baselineskip}, you can also use \medskip or bigskip etc. Another option is to use

ABC \\[2\baselineskip]
DEF

as mentioned in the comments above.

You can change the font style, by standard commands like \normalfont, \sffamily etc.

  • PERFECT! Would you please help me to add a title to this chapter called Dedication? – dgs Mar 25 '14 at 00:54
  • @user3289501 Where do you want the title exactly? See the answer and let me know if it is OK. –  Mar 25 '14 at 01:00
  • 1
    @user3289501 Dedication pages have no title, most of the times; the page contents itself makes clear that it's a dedication. – egreg Mar 25 '14 at 07:44
  • @egreg, can I write "With all the gratitude to..." instead of "Dedication", cause these have not the same meaning? – dgs Mar 25 '14 at 23:43
  • @user3289501 You can simply write Dedicated to. –  Mar 26 '14 at 00:07