我试图将我当前的章节号以标题格式显示为Book Chapter:Vese
,如果Book=Genesis
Chapter=5
,Verse=24
那么在标题中它应该显示为Genesis 5:24
,我无法在当前页面中显示当前章节号,我得到的是书名和最后一节,我当前的章节应该取自\jChapter
这是我的 MWE
\documentclass[oneside,letterpaper,11pt]{book}
\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage[english]{babel} %% This package make sure for hyphenation problem
\usepackage{ebgaramond}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
%\usepackage{luacolor}% load after xcolor
\usepackage{fixltx2e}
\usepackage{paracol}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\rightmark}
\fancyhead[RO,LE]{\leftmark} %% display chapter in header
\renewcommand{\headrulewidth}{.5pt}
\fancyhead[CO,CE]{\thepage} %% To display numbering on every page alternately left and right
% \fancyhead[LO]{\small\thetitle} % Odd page header and number to right top
% \fancyhead[RE]{\small\thetitle} % Even page header and number at left top
\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}
%\clubpenalty10000
%\widowpenalty10000
\usepackage[colorlinks]{hyperref}
%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{\z@}%
{.25ex \@plus.25ex \@minus.1ex}%
{-.5em}%
{\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
\setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
\gdef\currbook{#1}
\ltx@chapter{#1}}
\newcount\biblechap@svdopt
\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{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
{\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
\refstepcounter{bibleverse}
\markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
\ifnum\c@bibleverse=1\else
\ltx@paragraph*{#1}\fi}%
\makeatother
\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\markboth{\scshape\currbook\ :#1}{\scshape\currbook\ :#1}}
\newcommand{\story}[1]{\vspace*{2.5mm}\centering\it\textbf{#1}\vspace{-2.8mm}}
\title{Translation}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify
#1
\end{center}
\BookLine
\vspace{2mm}
}}
\newcommand{\ParallelLText}[2]{\begin{paracol}{2}\sloppy \switchcolumn[0]\noindent #1 \switchcolumn[1]\noindent #2 \end{paracol}}
\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\part*{The Old Testament}
\setlength{\columnseprule}{.5pt}
\book{Genesis}
\ParallelLText{\jChapter{5}Kechengsi, Arnam sining-heihei lapen pirthe kepinchong ahut, }{\jChapter{5}In the beginning when God created the heavens and the earth, }
\ParallelLText{\jverse{2}pirthe arje avelang lapen thangnatta ave, lapen lang-lom athak kangtingsi dolang; lapen Arnam Akarjong lang-heihei athak damlo. }{\jverse{2}the earth was a formless void and darkness covered the face of the deep, while a wind from God swept over the face of the waters. }
\ParallelLText{\jverse{3}Lapen Arnam pulo, “kethe-ang padonang;” lapen the-angdang-lo. }{\jverse{3}Then God said, “Let there be light”; and there was light. }
\ParallelLText{\jverse{4}Lapen Arnam thek-long-lo kethe-ang mesen; lapen Arnam kethe-ang pen kangting thak-lo. }{\jverse{4}And God saw that the light was good; and God separated the light from the darkness. }
\ParallelLText{\jverse{5}Kethe-ang aphan Anerlo pusi Arnam irlo, lapen kangting aphan Ajo pusi irlo. Lapen aningve lapen adap nangdolo, la kecheng arni lo. }{\jverse{5}God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day. }
\ParallelLText{\jverse{6}Anke Arnam pulo, “Lang-heihei angbong sining-inghun angpong padonang, lapen lang-heihei pen lang-heihei thakdak lonang.” }{\jverse{6}And God said, “Let there be a dome in the midst of the waters, and let it separate the waters from the waters.” }
\ParallelLText{\jverse{7}Lapen Arnam sining-inghun angpong selamsi la aber kedo alang-heihei lapen la athak kedo alang-heihei pen thakdak-lo. Lasi la plang-lo. }{\jverse{7}So God made the dome and separated the waters that were under the dome from the waters that were above the dome. And it was so. }
\ParallelLText{\jverse{8}Lapen Arnam angpong aphan “Sining-inghun” pusi irlo. Ningve apor jut si adap nangtheang-lo, la ke hini arnilo. }{\jverse{8}God called the dome Sky. And there was evening and there was morning, the second day. }
\ParallelLText{\jverse{9}Anke Arnam pulo, “sining-heihei kedo aber alang-heihei an elong adim padopet lonang, lapen kekrengdang alongle nangpaklang lonang.” Lapen la plang-lo. }{\jverse{9}And God said, “Let the waters under the sky be gathered together into one place, and let the dry land appear.” And it was so. }
\ParallelLText{\jverse{10}Kekrengdang alongle aphan Arnam Pirthe pusi irlo, lapen kechingrumtang alang-heihei aphan Alangli Talo-heihei pusi irlo. Lapen Arnam thek-long-lo la mesen. }{\jverse{10}God called the dry land Earth, and the waters that were gathered together he called Seas. And God saw that it was good. }
\ParallelLText{\jverse{11}Lapen Arnam pulo, “Pirthe athak bap-bi, arong kevang athengpi-thengphrang ason ason, lapen athe-kepathe lapen aklim-kevang athesere arong-heihei arong pavangnang, arongtin ta ajat ajat ateng le pirthe athak pavangnang.” Lapen la plang-lo. }{\jverse{11}Then God said, “Let the earth put forth vegetation: plants yielding seed, and fruit trees of every kind on earth that bear fruit with the seed in it.” And it was so. }
\ParallelLText{\jverse{12}Pirthe athak bap, ajat ateng arong kevang athengpi arong-heihei, aklim kevang athesere athengpi arong-heihei, arongtin ajat ateng pen arong vang-lo. Lapen Arnam thek-long-lo, la mesen. }{\jverse{12}The earth brought forth vegetation: plants yielding seed of every kind, and trees of every kind bearing fruit with the seed in it. And God saw that it was good. }
\ParallelLText{\jverse{13}Lapen ningvelo lapen adap nangklang-lo, la kethom arni lo. }{\jverse{13}And there was evening and there was morning, the third day. }
\ParallelLText{\jverse{14}Lapen Arnam pulo, “ajo pen anerlo kepaprekjisi sining-heihei a-archok along kethe-ang-heihei padonang; lapen lahei isi angthek-heihei aphan lapen asek aphan lapen arni arni aphanlo lapen aningkan-ningkan aphanlo, }{\jverse{14}And God said, “Let there be lights in the dome of the sky to separate the day from the night; and let them be for signs and for seasons and for days and years, }
\ParallelLText{\jverse{15}lapen pirthe athak kepathe-angjile sining-heihei archok along kethe-ang-heihei padonang.” Lapen la plang-lo. }{\jverse{15}and let them be lights in the dome of the sky to give light upon the earth.” And it was so. }
\ParallelLText{\jverse{16}Lapen Arnam kethedung akethe-ang-heihei pinchong-lo, thedung akethe-ang ke anerlo aputhak kepangriji aphan lapen bimuchot akethe-ang ke ajo kepangriji aphan lo; Alangli chiklolongso-heihei ta pinchong-lo. }{\jverse{16}God made the two great lights—the greater light to rule the day and the lesser light to rule the night—and the stars. }
\ParallelLText{\jverse{17}Pirthe athak kepathe-angjisi Arnam lahei sining-heihei archok along bilo, }{\jverse{17}God set them in the dome of the sky to give light upon the earth, }
\ParallelLText{\jverse{18}anerlo lapen ajo aputhak kepangrijisi lapen kangting pen kethe-ang kepaprekjisi bilo. Lapen Arnam thek-long-lo la mesen. }{\jverse{18}to rule over the day and over the night, and to separate the light from the darkness. And God saw that it was good. }
\ParallelLText{\jverse{19}Lapen arni ningvelo, lapen adap nangklang-lo, la phli arnilo. }{\jverse{19}And there was evening and there was morning, the fourth day. }
\ParallelLText{\jverse{20}Lapen Arnam pulo, “Lang-heihei arlo lang-api ahur-heihei padonang, lapen pirthe athak sining-heihei archok angbong vo atum pangjarnang.” }{\jverse{20}And God said, “Let the waters bring forth swarms of living creatures, and let birds fly above the earth across the dome of the sky.” }
\ParallelLText{\jverse{21}Lasi talo apithepi keklimvoi api-an, lang a-ok ahur lapen halatum ajat kedo-an avo-heihei Arnam thip-lo, lapen Arnam thek-long-lo, la langmesen. }{\jverse{21}So God created the great sea monsters and every living creature that moves, of every kind, with which the waters swarm, and every winged bird of every kind. And God saw that it was good. }
\ParallelLText{\jverse{22}Lapen latum aphan Arnam hirjume pisi pulo, “Chanri-chanjainon, ongdung-ra talo-heihei alang arlo dothipnon; lapen vo atum pirthe athak pachanlonang.” }{\jverse{22}God blessed them, saying, “Be fruitful and multiply and fill the waters in the seas, and let birds multiply on the earth.” }
\ParallelLText{\jverse{23}Ningvelo lapen adap nangklang-lo, la pho arnilo. }{\jverse{23}And there was evening and there was morning, the fifth day. }
\ParallelLText{\jverse{24}Anke Arnam pulo, “Pirthe athak ajat ajat amarat api padonang: Kepangreng lapen keklimjam marat api akethe lapen akebi ajat ajat pirthe athak padonang.” Lapen la plang-lo. }{\jverse{24}And God said, “Let the earth bring forth living creatures of every kind: cattle and creeping things and wild animals of the earth of every kind.” And it was so. }
\end{document}
答案1
我通过阅读手册和互联网搜索得到了答案,在这里我刚刚创建了一个名为jChapter
章节号的新计数器,为了显示我在这里使用的计数器值,\thejChapter
我修改了两个部分
\newcommand{\jChapter}[1]{\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}}
到
\newcounter{jChapter}
\newcommand{\jChapter}[1]{
\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}
\setcounter{jChapter}{#1}
}
和
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\markboth{\scshape\currbook\ :#1}{\scshape\currbook\ :#1}}
到
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\markboth{\scshape\currbook\ \thejChapter : #1}{} }
这是我修改后的代码
\documentclass[oneside,letterpaper,11pt]{book}
\usepackage[margin=1.5cm]{geometry}
\usepackage[T1]{fontenc}
%\usepackage[english]{babel} %% This package make sure for hyphenation problem
\usepackage{ebgaramond}
\usepackage{lipsum}
\usepackage[usenames,dvipsnames,svgnames,table]{xcolor}
%\usepackage{luacolor}% load after xcolor
\usepackage{fixltx2e}
\usepackage{paracol}
\usepackage{microtype}
\usepackage{graphicx}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[LE,RO]{\rightmark}
\fancyhead[RO,LE]{\leftmark} %% display chapter in header
\renewcommand{\headrulewidth}{.5pt}
\fancyhead[CO,CE]{\thepage} %% To display numbering on every page alternately left and right
% \fancyhead[LO]{\small\thetitle} % Odd page header and number to right top
% \fancyhead[RE]{\small\thetitle} % Even page header and number at left top
\setlength{\headwidth}{\textwidth}
\setlength{\headheight}{15pt}
\setlength{\headsep}{0pt}
\setlength{\columnseprule}{0pt}
%\clubpenalty10000
%\widowpenalty10000
\usepackage[colorlinks]{hyperref}
%%%% End Add
\makeatletter
\newcommand\versenumcolor{red}
\newcommand\chapnumcolor{red}
\renewcommand\paragraph{%
\@startsection{paragraph}{4}{\z@}%
{.25ex \@plus.25ex \@minus.1ex}%
{-.5em}%
{\normalfont\normalsize\bfseries\color{\versenumcolor}}}%
\newlength{\biblechapskip}
\setlength{\biblechapskip}{1em plus .33em minus .2em}
\newcounter{biblechapter}
\newcounter{bibleverse}[biblechapter]
\renewcommand\chaptername{Book}
\let\ltx@chapter=\chapter
\let\ltx@paragraph=\paragraph
\newcommand{\book}[1]{%
\gdef\currbook{#1}
\ltx@chapter{#1}}
\newcount\biblechap@svdopt
\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{\color{\chapnumcolor}\lower-6pt\hbox{\thebiblechapter}}{}\ignorespaces}
{\vspace{\biblechapskip}}
\renewcommand{\verse}[1][\thebibleverse]{%
\refstepcounter{bibleverse}
\markright{{\scshape\currbook} \thebiblechapter:\thebibleverse}
\ifnum\c@bibleverse=1\else
\ltx@paragraph*{#1}\fi}%
\makeatother
\newcounter{jChapter}
\newcommand{\jChapter}[1]{
\noindent\scalebox{2.5}{\color{red}\textbf{#1}\hspace{0.3mm}}
\setcounter{jChapter}{#1}
}
\newcommand{\jverse}[1]{\noindent\textcolor{cyan}{\scalebox{1.0}{\textbf{#1\hspace{1.0mm}}}}\markboth{\scshape\currbook\ \thejChapter : #1}{} }
\newcommand{\story}[1]{\vspace*{2.5mm}\centering\it\textbf{#1}\vspace{-2.8mm}}
\title{Translation}
\date{}
\author{}
\usepackage{lipsum}
\usepackage{ragged2e}
\newcommand{\BookLine}{ \centering\noindent\rule{19cm}{1pt}}
\newcommand{\BookNote}[1]{{\begin{center} \textbf{KEPACHINI} \justify
#1
\end{center}
\BookLine
\vspace{2mm}
}}
\newcommand{\ParallelLText}[2]{\begin{paracol}{2}\sloppy \switchcolumn[0]\noindent #1 \switchcolumn[1]\noindent #2 \end{paracol}}
\usepackage[perpage]{footmisc} %%% To restart footnote numbering on every new pages
\begin{document}
\renewcommand{\thefootnote}{\emph{\alph{footnote}}}
\frontmatter
\maketitle
\tableofcontents
\mainmatter
\part*{The Old Testament}
\setlength{\columnseprule}{.5pt}
\book{Genesis}
\ParallelLText{\jChapter{5}Kechengsi, Arnam sining-heihei lapen pirthe kepinchong ahut, }{\jChapter{5}In the beginning when God created the heavens and the earth, }
\ParallelLText{\jverse{2}pirthe arje avelang lapen thangnatta ave, lapen lang-lom athak kangtingsi dolang; lapen Arnam Akarjong lang-heihei athak damlo. }{\jverse{2}the earth was a formless void and darkness covered the face of the deep, while a wind from God swept over the face of the waters. }
\ParallelLText{\jverse{3}Lapen Arnam pulo, “kethe-ang padonang;” lapen the-angdang-lo. }{\jverse{3}Then God said, “Let there be light”; and there was light. }
\ParallelLText{\jverse{4}Lapen Arnam thek-long-lo kethe-ang mesen; lapen Arnam kethe-ang pen kangting thak-lo. }{\jverse{4}And God saw that the light was good; and God separated the light from the darkness. }
\ParallelLText{\jverse{5}Kethe-ang aphan Anerlo pusi Arnam irlo, lapen kangting aphan Ajo pusi irlo. Lapen aningve lapen adap nangdolo, la kecheng arni lo. }{\jverse{5}God called the light Day, and the darkness he called Night. And there was evening and there was morning, the first day. }
\ParallelLText{\jverse{6}Anke Arnam pulo, “Lang-heihei angbong sining-inghun angpong padonang, lapen lang-heihei pen lang-heihei thakdak lonang.” }{\jverse{6}And God said, “Let there be a dome in the midst of the waters, and let it separate the waters from the waters.” }
\ParallelLText{\jverse{7}Lapen Arnam sining-inghun angpong selamsi la aber kedo alang-heihei lapen la athak kedo alang-heihei pen thakdak-lo. Lasi la plang-lo. }{\jverse{7}So God made the dome and separated the waters that were under the dome from the waters that were above the dome. And it was so. }
\ParallelLText{\jverse{8}Lapen Arnam angpong aphan “Sining-inghun” pusi irlo. Ningve apor jut si adap nangtheang-lo, la ke hini arnilo. }{\jverse{8}God called the dome Sky. And there was evening and there was morning, the second day. }
\ParallelLText{\jverse{9}Anke Arnam pulo, “sining-heihei kedo aber alang-heihei an elong adim padopet lonang, lapen kekrengdang alongle nangpaklang lonang.” Lapen la plang-lo. }{\jverse{9}And God said, “Let the waters under the sky be gathered together into one place, and let the dry land appear.” And it was so. }
\ParallelLText{\jverse{10}Kekrengdang alongle aphan Arnam Pirthe pusi irlo, lapen kechingrumtang alang-heihei aphan Alangli Talo-heihei pusi irlo. Lapen Arnam thek-long-lo la mesen. }{\jverse{10}God called the dry land Earth, and the waters that were gathered together he called Seas. And God saw that it was good. }
\ParallelLText{\jverse{11}Lapen Arnam pulo, “Pirthe athak bap-bi, arong kevang athengpi-thengphrang ason ason, lapen athe-kepathe lapen aklim-kevang athesere arong-heihei arong pavangnang, arongtin ta ajat ajat ateng le pirthe athak pavangnang.” Lapen la plang-lo. }{\jverse{11}Then God said, “Let the earth put forth vegetation: plants yielding seed, and fruit trees of every kind on earth that bear fruit with the seed in it.” And it was so. }
\ParallelLText{\jverse{12}Pirthe athak bap, ajat ateng arong kevang athengpi arong-heihei, aklim kevang athesere athengpi arong-heihei, arongtin ajat ateng pen arong vang-lo. Lapen Arnam thek-long-lo, la mesen. }{\jverse{12}The earth brought forth vegetation: plants yielding seed of every kind, and trees of every kind bearing fruit with the seed in it. And God saw that it was good. }
\ParallelLText{\jverse{13}Lapen ningvelo lapen adap nangklang-lo, la kethom arni lo. }{\jverse{13}And there was evening and there was morning, the third day. }
\ParallelLText{\jverse{14}Lapen Arnam pulo, “ajo pen anerlo kepaprekjisi sining-heihei a-archok along kethe-ang-heihei padonang; lapen lahei isi angthek-heihei aphan lapen asek aphan lapen arni arni aphanlo lapen aningkan-ningkan aphanlo, }{\jverse{14}And God said, “Let there be lights in the dome of the sky to separate the day from the night; and let them be for signs and for seasons and for days and years, }
\ParallelLText{\jverse{15}lapen pirthe athak kepathe-angjile sining-heihei archok along kethe-ang-heihei padonang.” Lapen la plang-lo. }{\jverse{15}and let them be lights in the dome of the sky to give light upon the earth.” And it was so. }
\ParallelLText{\jverse{16}Lapen Arnam kethedung akethe-ang-heihei pinchong-lo, thedung akethe-ang ke anerlo aputhak kepangriji aphan lapen bimuchot akethe-ang ke ajo kepangriji aphan lo; Alangli chiklolongso-heihei ta pinchong-lo. }{\jverse{16}God made the two great lights—the greater light to rule the day and the lesser light to rule the night—and the stars. }
\ParallelLText{\jverse{17}Pirthe athak kepathe-angjisi Arnam lahei sining-heihei archok along bilo, }{\jverse{17}God set them in the dome of the sky to give light upon the earth, }
\ParallelLText{\jverse{18}anerlo lapen ajo aputhak kepangrijisi lapen kangting pen kethe-ang kepaprekjisi bilo. Lapen Arnam thek-long-lo la mesen. }{\jverse{18}to rule over the day and over the night, and to separate the light from the darkness. And God saw that it was good. }
\ParallelLText{\jverse{19}Lapen arni ningvelo, lapen adap nangklang-lo, la phli arnilo. }{\jverse{19}And there was evening and there was morning, the fourth day. }
\ParallelLText{\jverse{20}Lapen Arnam pulo, “Lang-heihei arlo lang-api ahur-heihei padonang, lapen pirthe athak sining-heihei archok angbong vo atum pangjarnang.” }{\jverse{20}And God said, “Let the waters bring forth swarms of living creatures, and let birds fly above the earth across the dome of the sky.” }
\ParallelLText{\jverse{21}Lasi talo apithepi keklimvoi api-an, lang a-ok ahur lapen halatum ajat kedo-an avo-heihei Arnam thip-lo, lapen Arnam thek-long-lo, la langmesen. }{\jverse{21}So God created the great sea monsters and every living creature that moves, of every kind, with which the waters swarm, and every winged bird of every kind. And God saw that it was good. }
\ParallelLText{\jverse{22}Lapen latum aphan Arnam hirjume pisi pulo, “Chanri-chanjainon, ongdung-ra talo-heihei alang arlo dothipnon; lapen vo atum pirthe athak pachanlonang.” }{\jverse{22}God blessed them, saying, “Be fruitful and multiply and fill the waters in the seas, and let birds multiply on the earth.” }
\ParallelLText{\jverse{23}Ningvelo lapen adap nangklang-lo, la pho arnilo. }{\jverse{23}And there was evening and there was morning, the fifth day. }
\ParallelLText{\jverse{24}Anke Arnam pulo, “Pirthe athak ajat ajat amarat api padonang: Kepangreng lapen keklimjam marat api akethe lapen akebi ajat ajat pirthe athak padonang.” Lapen la plang-lo. }{\jverse{24}And God said, “Let the earth bring forth living creatures of every kind: cattle and creeping things and wild animals of the earth of every kind.” And it was so. }
\end{document}