我如何隐藏第一个 \verse 编号,同时从 2 开始计算下一节

我如何隐藏第一个 \verse 编号,同时从 2 开始计算下一节

在此处输入图片描述

MWE 在这里;

% 样本:https://i.stack.imgur.com/WrLSu.jpg

\documentclass[twoside,a5paper,10pt]{book}

\usepackage[T1]{fontenc}
\usepackage{helvet}
\usepackage{palatino}
\usepackage{lipsum}
\usepackage{fixltx2e}
\usepackage{subfiles}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}

\usepackage{lettrine}

\usepackage{kotex}
\usepackage{titlesec}
%\usepackage{poemscol}

\titleformat{\chapter}[display]

  {\normalfont\bfseries}{}{0pt}{\Huge}

\usepackage{fancyhdr}

  \pagestyle{fancy}
  \fancyhf{}
  \fancyhead[RO,LE]{\rightmark}
  \fancyfoot[RO,LE]{\thepage}

  \renewcommand{\headrulewidth}{.5pt}

\setlength{\headwidth}{1.27\textwidth}

\setlength{\headheight}{15pt}

\setlength{\headsep}{1em}

\setlength{\columnseprule}{0pt}

\clubpenalty10000

\widowpenalty10000

\usepackage[margin=0.5in]{geometry}

\makeatletter

\newcommand\versenumcolor{gray}

\newcommand\chapnumcolor{gray}

\renewcommand\paragraph{%

  \@startsection{paragraph}{4}{\z@}%

                {.25ex \@plus.25ex \@minus.1ex}%

                {-.5em}%set the verse text up and down

                {\normalsize\bfseries\color{\versenumcolor}}}%

\newlength{\biblechapskip}

  \setlength{\biblechapskip}{1em plus .3em minus .2em}

\newcounter{biblechapter}

\newcounter{bibleverse}[biblechapter]

\renewcommand\chaptername{Book}

\let\ltx@chapter=\chapter

\let\ltx@paragraph=\paragraph


\definecolor{NameBlue}{cmyk}{1,.5,0,0.60}

%\newcommand{\propernoun}[1]{\textcolor{NameBlue}{#1}}%

\newcommand{\propernoun}[1]{\fontfamily{sfdefault}\selectfont{#1}}

%Define Book

\newcommand{\book}[1]{%

  \gdef\currbook{#1}

  \ltx@chapter{#1}}

\newcount\biblechap@svdopt


%Define Chapter

\newenvironment{biblechapter}[1][\thebiblechapter]

  {\biblechap@svdopt=#1

  \ifnum\c@biblechapter=\biblechap@svdopt\else

    \advance\biblechap@svdopt by -1\fi

 \setcounter{biblechapter}{\the\biblechap@svdopt}

  \refstepcounter{biblechapter}

  \lettrine[lines=3, lhang=-0.23, loversize=-.1, findent=0em]

{\color{\chapnumcolor}\lower-.1em\hbox{\thebiblechapter}}{}\ignorespaces}

  {\vspace{\biblechapskip}}

%Define Verse

\renewcommand{\verse}[1][\thebibleverse]{%

  \refstepcounter{bibleverse}

  %heading

  \textsuperscript{\sffamily\tiny\textcolor{gray}\thebibleverse}

  \markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}

  %\ifnum\c@bibleverse=1\else

%   {#1}\hspace{1em}\fi

}%

\makeatother

\setcounter{secnumdepth}{-1}

\renewcommand{\footnoterule}{%

  \kern -3pt

  \hrule width \textwidth height 0.3pt

  \kern 2pt

}

\usepackage{mathastext}

%define poem


\title{title}

\date{}
\author{}

\begin{document}

\frontmatter

\maketitle

\renewcommand{\contentsname}{목록}

\tableofcontents


\mainmatter

\begin{biblechapter} \verse no number

\verse this should have number 2

\section{section}

%\addcontentsline{toc}{section}{section}

\verse this should have number 3

\end{document}

答案1

经过一番思考,我意识到在章节开头将诗节编号初始化为 1,然后仅标记第 2 节及以后的诗节并非在所有情况下都有效。例如,在新教的英文诗篇译本中,有些诗篇有一些文字第 1 节。在这些情况下,您可能希望打印第 1 节。

这是诗句命令(将其命名为 \myverse 以避免与 Latex 内置的 \verse 名称冲突)。带星号的版本会增加诗句编号并执行 \markright,但不会打印。常规版本会打印。两者都允许使用可选参数明确设置诗句编号。

\documentclass{article}
\makeatletter

\newcounter{biblechapter}
\setcounter{biblechapter}{1}

\newcounter{bibleverse}
\setcounter{bibleverse}{1}

\def\myverse{\@ifstar\@myverse\@@myverse}

% starred version doesn't print
\newcommand*{\@myverse}[1][\value{bibleverse}]{%
  \setcounter{bibleverse}{#1}%
  \markright{{\scshape} \thebiblechapter:\thebibleverse}%
  \refstepcounter{bibleverse}%
}

\newcommand*{\@@myverse}[1][\value{bibleverse}]{%
  \setcounter{bibleverse}{#1}%
  \textsuperscript{\sffamily\tiny\thebibleverse}{\kern 1pt}%
  \markright{{\scshape} \thebiblechapter:\thebibleverse}%
  \refstepcounter{bibleverse}%
}
\makeatother
\begin{document}
\myverse* The Lord is my shepherd; I shall not want.

\myverse He maketh me to lie down in green pastures: he
leadeth me beside the still waters.

\myverse He restoreth my soul: he leadeth me in the paths of
righteousness for his name's sake.
\end{document}

在此处输入图片描述

答案2

可以使用 来解决这个问题poemscol,利用其对句子和段落进行编号的功能。为此,请\setprosebysentence在您的序言中发出。同时发出\suppressfirstparatrue\suppressfirstsentencetrue(它们是poemscol3.141 中的新命令)。在文本中,将文本括在pmsection环境中。每个段落都以 开头\pmpara。每个句子都以 开头\pmsentence。这是一个最小的工作示例:

\documentclass{article}
\usepackage{fancyhdr,geometry,keyval,ifthen,mparhack}
\usepackage{poemscol}
\raggedbottom
\maketextnotes
\setprosebysentence
\setpmmodulo{1}
\runningsentencenumberstrue
\marginsentencenumbersfalse
\pmsentencebyparatrue
\pmparainmartrue
\pmpararunningtrue
\suppressfirstparatrue
\suppressfirstsentencetrue
\begin{document}

\prosesectiontitle{Job}
\begin{pmsection}
\pmpara
\pmsentence There was a man in the land of Uz, whose name was Job; and that man was blameless and upright, one who feared God, and turned away from evil.\pmsentence There were born to him seven sons and three daughters. \pmsentence He had seven thousand sheep, three thousand camels, five hundred yoke of oxen, and five hundred she-asses, and very many servants; so that this man was the greatest of all the people of the east. \pmsentence His sons used to go and hold a feast in the house of each on his day; and they would send and invite their three sisters to eat and drink with them. \pmsentence And when the days of the feast had run their course, Job would send and sanctify them, and he would rise early in the morning and offer burnt offerings according to the number of them all; for Job said, ``It may be that my sons have sinned, and cursed God in their hearts.'' Thus Job did continually. \pmsentence Now there was a day when the sons of God came to present themselves before the Lord, and Satan[a] also came among them. \pmsentence The Lord said to Satan, ``Whence have you come?'' Satan answered the Lord, ``From going to and fro on the earth, and from walking up and down on it.'' \pmsentence And the Lord said to Satan, ``Have you considered my servant Job, that there is none like him on the earth, a blameless and upright man, who fears God and turns away from evil?'' \pmsentence Then Satan answered the Lord, ``Does Job fear God for nought? \pmsentence Hast thou not put a hedge about him and his house and all that he has, on every side? Thou hast blessed the work of his hands, and his possessions have increased in the land. \pmsentence But put forth thy hand now, and touch all that he has, and he will curse thee to thy face.'' \pmsentence And the Lord said to Satan, ``Behold, all that he has is in your power; only upon himself do not put forth your hand.'' So Satan went forth from the presence of the Lord.\pmsentence Now there was a day when his sons and daughters were eating and drinking wine in their eldest brother’s house; \pmsentence and there came a messenger to Job, and said, ``The oxen were plowing and the asses feeding beside them; \pmsentence and the Sab\'{e}ans fell upon them and took them, and slew the servants with the edge of the sword; and I alone have escaped to tell you.'' \pmsentence While he was yet speaking, there came another, and said, ``The fire of God fell from heaven and burned up the sheep and the servants, and consumed them; and I alone have escaped to tell you.'' \pmsentence While he was yet speaking, there came another, and said, ``The Chald\'{e}ans formed three companies, and made a raid upon the camels and took them, and slew the servants with the edge of the sword; and I alone have escaped to tell you.'' \pmsentence While he was yet speaking, there came another, and said, ``Your sons and daughters were eating and drinking wine in their eldest brother’s house; \pmsentence and behold, a great wind came across the wilderness, and struck the four corners of the house, and it fell upon the young people, and they are dead; and I alone have escaped to tell you.'' \pmsentence Then Job arose, and rent his robe, and shaved his head, and fell upon the ground, and worshiped. \pmsentence And he said, ``Naked I came from my mother’s womb, and naked shall I return; the Lord gave, and the Lord has taken away; blessed be the name of the Lord.''
\pmsentence In all this Job did not sin or charge God with wrong.

\pmpara
\pmsentence  Again there was a day when the sons of God came to present themselves before the Lord, and Satan also came among them to present himself before the Lord.  \pmsentence And the Lord said to Satan,``Whence have you come?''Satan answered the Lord,``From going to and fro on the earth, and from walking up and down on it.''\pmsentence  And the Lord said to Satan,``Have you considered my servant Job, that there is none like him on the earth, a blameless and upright man, who fears God and turns away from evil? He still holds fast his integrity, although you moved me against him, to destroy him without cause.''\pmsentence  Then Satan answered the Lord,``Skin for skin! All that a man has he will give for his life. \pmsentence  But put forth thy hand now, and touch his bone and his flesh, and he will curse thee to thy face.''\pmsentence  And the Lord said to Satan,``Behold, he is in your power; only spare his life.”
\pmsentence  So Satan went forth from the presence of the Lord, and afflicted Job with loathsome sores from the sole of his foot to the crown of his head. \pmsentence  And he took a potsherd with which to scrape himself, and sat among the ashes.\pmsentence  Then his wife said to him,``Do you still hold fast your integrity? Curse God, and die.''\pmsentence  But he said to her,``You speak as one of the foolish women would speak. Shall we receive good at the hand of God, and shall we not receive evil?''In all this Job did not sin with his lips.
\pmsentence  Now when Job’s three friends heard of all this evil that had come upon him, they came each from his own place, El\'{\i}phaz the T\'{e}manite, Bildad the Shuhite, and Zophar the N\'{a}mathite. They made an appointment together to come to condole with him and comfort him. \pmsentence  And when they saw him from afar, they did not recognize him; and they raised their voices and wept; and they rent their robes and sprinkled dust upon their heads toward heaven. \pmsentence  And they sat with him on the ground seven days and seven nights, and no one spoke a word to him, for they saw that his suffering was very great.



\end{pmsection}

\end{document}

相关内容