헌신을 올바르게 쓰는 방법은 무엇입니까?

헌신을 올바르게 쓰는 방법은 무엇입니까?

나는 헌신적으로 몇 줄의 수직 공간을 만들려고 노력하고 있습니다. 하지만, 방법을 찾을 수 없었습니다.

내가 사용하는 코드는 다음과 같습니다.

\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

관련 정보