献词怎样写才正确?

献词怎样写才正确?

我正在尝试在奉献中创建一些垂直空间。但是,我找不到如何操作。

以下是我正在使用的代码:

\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}可以使用\medskipbigskip等。另一个选择是使用

ABC \\[2\baselineskip]
DEF

正如上面的评论所述。

您可以通过等标准命令来更改字体样式\normalfont\sffamily

相关内容