상단 표시의 왼쪽 부분을 현재 절과 동기화하는 방법은 무엇입니까? 예를 들어, 페이지 #2에서 상단 표시는 B1 3:1 -- B1 5:1'', not
B1 3:2 -- B1 5:1''이어야 합니다. 감사해요
\documentclass[a5paper]{article}
\usepackage[left=1.5cm, right=1.5cm, top=0.5cm, bottom=0.3cm, includeheadfoot] {geometry}
\usepackage[maxfloats=1000]{morefloats}% pour les marginnotes
\usepackage{pgffor}
\usepackage[extramarks]{titleps}
\usepackage[colaction]{multicol}
\makeatletter
\newcommand\curbook{}
\newcommand{\bbook}[1]{
\setcounter{section}{0}
\renewcommand\curbook{#1}
}
\newcommand\bchapter{
\addtocounter{section}{1}
\textbf{Chapitre \arabic{section}}\\%
}
\newcounter{verse}
\def\bref{}
\newmarkset{bref}
\newextramark{bref}{\bref}
\newcommand\bverse[1]{
\textbf{(\arabic{section}:#1)}%
\def\bref{\curbook~\arabic{section}:#1}\extramark{bref}%
}
\newcommand*{\cadr}{\nobreak~\nobreak\mbox{---}\nobreak~\nobreak}
\newpagestyle{Pagestyle}{%
\setheadrule{0.5pt}\setfootrule{0.0pt}%
\sethead[][\textsc{\topextramarks{bref}\bref\cadr\botextramarks{bref}\bref}][]{}{\textsc{\topextramarks{bref}\bref\cadr\botextramarks{bref}\bref}}{}%
\setfoot[][\thepage][]{}{\thepage}{}%
}
\makeatother
\newcommand{\bv}{This is a sample of a text.}
\newcommand{\bvn}[2]{\foreach \n in {#1,...,#2} { \bv }}
\begin{document}
\pagestyle{Pagestyle}
\begin{multicols}{2}
\bbook{B1}
\addcontentsline{toc}{section}{Book-1}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}\\\bverse{4}\bvn{2}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{1}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}\\\bverse{3}\bvn{2}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}\\\bverse{3}\bvn{2}{20}
\addcontentsline{toc}{section}{Book-2}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}
\bchapter
\bverse{1}\bvn{1}{20}\\\bverse{2}\bvn{2}{20}
\end{multicols}
\end{document}