我想制作一本摘要书,并希望将摘要标题设置为章节格式(例如)。如何获取章节格式,以便稍后让随机文本看起来像它,而本身不属于章节?
我想要这样的东西(虽然我也愿意接受其他建议):
\documentclass{article}
\usepackage[utf8]{inputenc}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Real title of the whole thing}
\author{Me (or whoever)}
\date{May 2021}
\begin{document}
\maketitle
\section{A real section}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\section{Abstracts}
\format_as_if_section{Title of abstract 1}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\format_as_if_section{Title of abstract 2}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{document}
答案1
在article
类中,节标题的字体相当于\normalfont\Large\bfseries
。在下面的例子中,我定义了两个类似的命令。第二个命令设置了相同的垂直间距\section
。如果您喜欢命令后的缩进,请删除\NoIndentAfterThis
。
平均能量损失
\documentclass{article}
\usepackage{lipsum}
\usepackage{noindentafter}
\newcommand{\myabstract}[1]{%
\bigskip
\noindent\textbf{\Large#1}
\bigskip
\NoIndentAfterThis
}
\newcommand{\myabstractX}[1]{%
\vspace{3.5ex plus 1ex minus .2ex}
\noindent\textbf{\Large#1}
\vspace{2.3 ex plus .2ex}
\NoIndentAfterThis
}
\begin{document}
\section{A real section}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\section{Abstracts}
\myabstract{Title of abstract 1}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah bla
\myabstractX{Title of abstract 2}
Blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah
\end{document}