如何解决 \begin{poem} ---- \end{poem} 未定义的控制序列错误,并在每个诗歌环境中重置计数器

如何解决 \begin{poem} ---- \end{poem} 未定义的控制序列错误,并在每个诗歌环境中重置计数器

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 this is first verse

\verse this is 2nd verse

\section{section}

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

\verse this is third verse[![enter image description here][2]][2]

\begin{poem}

    \hspace{4em}“예컨대 주 하나님, 곧 전능하신 이시여,\\

    \hspace{4em}하시는 일이 크고 기이하시니이다.\\

    \hspace{4em}주의 보좌는 하늘 높이 있고,\\

\end{poem}

\end{document}

相关内容