![标题和摘要的格式应该如何设置?](https://linux22.com/image/259049/%E6%A0%87%E9%A2%98%E5%92%8C%E6%91%98%E8%A6%81%E7%9A%84%E6%A0%BC%E5%BC%8F%E5%BA%94%E8%AF%A5%E5%A6%82%E4%BD%95%E8%AE%BE%E7%BD%AE%EF%BC%9F.png)
我想更改标题(和摘要)的边距(或制表符),并将摘要放在两行之间。该怎么做?我想要制作的格式示例 -例子
\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{authblk}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{fancyhdr}
\pagestyle{fancy}
\begin{document}
%title and author details
\title{This is the title for my work}
\author[1]{Name1}
\author[1]{Name2}
\affil[1]{Address of author}
\date{} %remove date
\maketitle
\abstract{sdfsdf
sdfsdfsdfsdf
sdfsdfsdfsdf
sdfsdf}
\section{section}
\lipsum
\end{document}
答案1
这个怎么样?
\documentclass[12pt,a4paper]{article}
\usepackage{lipsum}
\usepackage{authblk}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{fancyhdr}
%
\pagestyle{fancy}
%
\renewenvironment{abstract}{%
\hfill\begin{minipage}{0.95\textwidth}
\rule{\textwidth}{1pt}}
{\par\noindent\rule{\textwidth}{1pt}\end{minipage}}
%
\makeatletter
\renewcommand\@maketitle{%
\hfill
\begin{minipage}{0.95\textwidth}
\vskip 2em
\let\footnote\thanks
{\LARGE \@title \par }
\vskip 1.5em
{\large \@author \par}
\end{minipage}
\vskip 1em \par
}
\makeatother
%
\begin{document}
%
%title and author details
\title{This is the title for my work}
\author[1]{Name1}
\author[2]{Name2}
\affil[1]{Address of author}
\affil[2]{Address of second author}
%
\maketitle
%
\begin{abstract}
\lipsum[1]
\end{abstract}
\section{section}
\lipsum
\end{document}