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'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!

share|improve this question
    
Try ABC\\ \ \\ DEF. What font do you want? \textsl{}? –  Sigur Mar 25 at 0:43
    
Or ABC\\[extra space] DEF. –  Manuel Mar 25 at 0:43
    
@Sigur, any font style. –  dgs Mar 25 at 0:47

1 Answer 1

up vote 5 down vote accepted
\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.

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

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.