如何在“献词”中加上标题

如何在“献词”中加上标题

我想把标题放大一点,让它好看一些,我的代码有这个结果,但我需要更多的标题

在此处输入图片描述

\documentclass[a4paper,12pt]{article}
\usepackage[paper=a4paper,left=30mm,right=20mm,top=25mm,bottom=30mm]{geometry}

\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{document}
\begin{dedication}
Dedicated to google and wikipedia by models (SaaS, PaaS, and IaaS), the CP provides the storage and processing facilities
needed to support that service model, together with a cloud interface for cloud
service consumers. For SaaS, the CP deploy
\end{dedication}
\end{document}

答案1

看来您只需要\section*{Dedication}在定义中的正确位置添加即可。

请看下面的代码:

\documentclass[a4paper,12pt]{article}
\usepackage[paper=a4paper,left=30mm,right=20mm,top=25mm,bottom=30mm]{geometry}

\newenvironment{dedication}
  {\clearpage           % we want a new page
   \thispagestyle{empty}% no header and footer
   \vspace*{\stretch{1}}% some space at the top 
  \section*{Dedication} % <==========================================
   \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}
\begin{dedication}
Dedicated to google and wikipedia by models (SaaS, PaaS, and IaaS), the CP provides the storage and processing facilities
needed to support that service model, together with a cloud interface for cloud
service consumers. For SaaS, the CP deploy
\end{dedication}
\end{document}

结果:

有头衔的奉献精神

要让标题留在前面,只需\raggedleft移至\section*

\documentclass[a4paper,12pt]{article}
\usepackage[paper=a4paper,left=30mm,right=20mm,top=25mm,bottom=30mm]{geometry}

\newenvironment{dedication}
  {\clearpage           % we want a new page
   \thispagestyle{empty}% no header and footer
   \vspace*{\stretch{1}}% some space at the top 
   \raggedleft          % flush to the right margin <===============
   \section*{Dedication} % <========================================
   \itshape             % the text is in italics

  }
  {\par % end the paragraph
   \vspace{\stretch{3}} % space at bottom is three times that at the top
   \clearpage           % finish off the page
  }

\begin{document}
\begin{dedication}
Dedicated to google and wikipedia by models (SaaS, PaaS, and IaaS), the CP provides the storage and processing facilities
needed to support that service model, together with a cloud interface for cloud
service consumers. For SaaS, the CP deploy
\end{dedication}
\end{document}

结果是:

标题左

相关内容