Как правильно написать посвящение?

Как правильно написать посвящение?

Я пытаюсь сделать несколько вертикальных пробелов в посвящении. Но я не могу найти как.

Вот код, который я использую:

\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
  }

Когда я пытаюсь сделать это, чтобы получить одну пустую строку, я не получаю ни одной.

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

И как мне изменить стиль шрифта Johnв этом коде:

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

Большое спасибо!

решение1

\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}

введите описание изображения здесь

Вместо \vspace{2\baselineskip}можно также использовать \medskipили bigskipи т. д. Другой вариант — использовать

ABC \\[2\baselineskip]
DEF

как уже упоминалось в комментариях выше.

Вы можете изменить стиль шрифта с помощью стандартных команд, таких как \normalfontи \sffamilyт. д.

Связанный контент