我正在尝试制作一种包含缩进的诗篇的祈祷书,例如这里
我目前所做的就是每隔两节就手动缩进一次。如下所示:
\documentclass[12pt,a4paper,oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\noindent O God, you are my God, for you I long; *\\
for you my soul is thirsting.\\
\indent My body pines for you *\\
\indent like a dry, weary land without water.\\
So I gaze on you in the sanctuary *\\
to see your strength and your glory.\\
\indent For your love is better than life, *\\
\indent my lips will speak your praise.\\
So I will bless you all my life, *\\
in your name I will lift up my hands.\\
\indent My soul shall be filled as with a banquet, *\\
\indent my mouth shall praise you with joy.\\
On my bed I remember you. *\\
On you I muse through the night\\
\indent for you have been my help; *\\
\indent in the shadow of your wings I rejoice.\\
My soul clings to you; *\\
your right hand holds me fast.\\
\indent Glory to the Father, and to the Son, *\\
\indent and to the Holy Spirit:\\
as it was in the beginning, is now, *\\
and will be for ever. Amen.
\end{document}
看起来不错,但需要做很多无用功。
有人知道如何自动化这项工作吗?提前谢谢。
答案1
\documentclass[12pt,a4paper,oneside]{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\begin{document}
\begingroup
\setlength\parskip{0pt}
\def\par{\ifvmode\noindent\else\endgraf\fi}
\obeylines
O God, you are my God, for you I long; *
for you my soul is thirsting.
My body pines for you *
like a dry, weary land without water.
So I gaze on you in the sanctuary *
to see your strength and your glory.
For your love is better than life, *
my lips will speak your praise.
So I will bless you all my life, *
in your name I will lift up my hands.
My soul shall be filled as with a banquet, *
my mouth shall praise you with joy.
On my bed I remember you. *
On you I muse through the night
for you have been my help; *
in the shadow of your wings I rejoice.
My soul clings to you; *
your right hand holds me fast.
Glory to the Father, and to the Son, *
and to the Holy Spirit:
as it was in the beginning, is now, *
and will be for ever. Amen.
\endgroup
\end{document}
答案2
使用scripture
包。在内部,这使用与 David 的答案相同的技术,但具有额外的功能和配置选项。
\documentclass[12pt,a4paper]{article}
\usepackage{scripture}
\scripturesetup{
poetry/leftmargin=0pt
}
\begin{document}
\begin{scripture}
\begin{poetry}
O God, you are my God, for you I long; *
for you my soul is thirsting.
My body pines for you *
like a dry, weary land without water.
So I gaze on you in the sanctuary *
to see your strength and your glory.
For your love is better than life, *
my lips will speak your praise.
So I will bless you all my life, *
in your name I will lift up my hands.
My soul shall be filled as with a banquet, *
my mouth shall praise you with joy.
On my bed I remember you. *
On you I muse through the night
for you have been my help; *
in the shadow of your wings I rejoice.
My soul clings to you; *
your right hand holds me fast.
Glory to the Father, and to the Son, *
and to the Holy Spirit:
as it was in the beginning, is now, *
and will be for ever. Amen.
\end{poetry}
\end{scripture}
\end{document}