如何缩进新创建的环境下的所有行

如何缩进新创建的环境下的所有行

下面,每次我使用命令时prayerheading,紧跟该标题的每一行都不会缩进,而下一行都会缩进。

我宁愿让所有内容都缩进。因此,我正在使用该indentfirst包,但我不知道如何实现这一点。

\documentclass[fontsize=12pt]{scrbook}

\usepackage{amssymb}
\usepackage{framed}
\usepackage{indentfirst}
\usepackage{changes}
\usepackage[pagestyles]{titlesec}

\newcommand{\prayerheading}[1]{%
  \begin{center}
  \vspace{-1em}
      \indent\scshape\Large\textcolor{black}{#1}
  \end{center}
}

\begin{document}

\prayerheading{Evening Troparia-Tone 6}
 Have mercy on us, O Lord, have mercy on us, for laying aside all excuse,
 we sinners offer to Thee as to our Master this supplication: have mercy
 on us.\\

Glory to the Father, and to the Son, and to the Holy Spirit:\\

\end{document}

答案1

你的意思是标签后面的所有段落都\prayerheading应该缩进吗?如果是,只需在标签和段落之间给出一个回车符:

\prayerheading{Evening Troparia-Tone 6}

 Have mercy on us, O Lord, have mercy on us, for laying aside all excuse,...

如果我的猜测不正确,请告诉我...

答案2

\par除非您在 之后放置空白行或\prayerheading,否则它将成为您要缩进的段落的一部分。缩进每一行的最简单方法是使用\leftskip,它必须在段落开始之前定义。

由于center是使用 实现的trivlist,所以\leftskip对 本身没有影响\prayerheading。 或 也不\vspace影响\indent

\documentclass[fontsize=12pt]{scrbook}

\usepackage{amssymb}
%\usepackage{framed}
%\usepackage{indentfirst}
%\usepackage{changes}
\usepackage[pagestyles]{titlesec}
\usepackage{showframe}% debugging tool

\newcommand{\prayerheading}[1]{%
  \begin{center}
    \scshape\Large\textcolor{black}{#1}
  \end{center}
}

\begin{document}

\leftskip=\parindent
\prayerheading{Evening Troparia-Tone 6}
 Have mercy on us, O Lord, have mercy on us, for laying aside all excuse,
 we sinners offer to Thee as to our Master this supplication: have mercy
 on us.

Glory to the Father, and to the Son, and to the Holy Spirit:
\leftskip=0pt

\end{document}

相关内容