答案1
\@afterheading\@afterindentfalse
您可以在命令末尾使用\myheading
:
\documentclass{article}
\makeatletter
\newcommand\myheading[1]{\par
\bigskip
\hrule height 1pt
\kern 2pt
\hbox to \textwidth{\textbf{#1}\hfill}
\kern 2pt
\hrule height 0.5pt
\kern\smallskipamount
\@afterheading\@afterindentfalse
}
\makeatother
\begin{document}
\myheading{Pseudocode for Alice's Key Generation}
1:
\end{document}