titlesec titlemarks 无法与 pdfcolparallel 配合使用

titlesec titlemarks 无法与 pdfcolparallel 配合使用

从屏幕截图中可以看出,显示诗句位置的数字仅显示titlemarks最后设置的值。如果您注释掉该行\usepackage{pdfcolparallel}并编译它并使用R参数跳过警告,您会发现它运行良好。所以这个pdfcolparallel包破坏了这一点。有人能告诉我为什么以及我应该如何修复它吗?

pdfcolparallel

在此处输入图片描述

在此处输入图片描述

在此处输入图片描述

没有pdfcolparallel

在此处输入图片描述

在此处输入图片描述

下列内容应贯穿始终XeLaTeX

梅威瑟:

\documentclass[pagesize=pdftex, fontsize=10]{scrbook}
\usepackage[paperwidth=10cm, paperheight=15cm, top=1.6cm,bottom=0.8cm, left=1cm, right=1cm]{geometry}
\usepackage[pagestyles]{titlesec}
\usepackage{xltxtra}
\usepackage{calc}
\usepackage{pdfcolparallel}

\newcommand\spanishText{El libro de la generación de Jesucristo, hijo de David, hijo de Abraham.}
\newcommand\hebrewText{זֶה סֵפֶר תּוֹלְדֹת הַמָּשִׁיחַ יֵשׁוּעַ בֶּן־דָּוִד בֶּן־אַבְרָהָם׃}

\sloppy

\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Times New Roman}
\newfontfamily\hebrewfont[Script=Hebrew]{Times New Roman}
\newfontfamily\hebrewfontsf[Script=Hebrew]{Times New Roman}

\usepackage{polyglossia}
\setmainlanguage{hebrew}
\setotherlanguage{english}
\setotherlanguage{spanish}

\renewcommand{\thesection}{\arabic{section}}
\renewcommand{\thesubsection}{\arabic{subsection}}

\setcounter{tocdepth}{0}
\setcounter{secnumdepth}{2}

% sets the marks to be used (section and subsection)
\setmarks{section}{subsection}

\newcounter{subsectionfv}%firstverse
\newcounter{sectionfv}%firstverse
\newcounter{subsectionlv}%lastverse
\newcounter{sectionlv}%lastverse

% definition of the page style with required headers
\newpagestyle{Biblestyle}{
  \setheadrule{0.8pt}
  \sethead[\thepage][\chaptertitle]%
[\thesectionlv:\thesubsectionlv---\thesectionfv:\thesubsectionfv]%
{\thesectionlv:\thesubsectionlv---\thesectionfv:\thesubsectionfv}%
{\chaptertitle}{\thepage}
}

\newlength\spaceBetweenNumberAndText
\setlength\spaceBetweenNumberAndText{0.5em}
\newlength\howwide

\newcommand\defhowwide{
    \setlength{\howwide}{\widthof{\Huge{\thesection}}}
}

% sections and subsections formatting
%\titleformat{command}[shape]{format}{label}{sep}{before-code}[after-code]
\titleformat{\section}{}{\Huge{\thesection}}{0pt}{}[\vskip-2.2\baselineskip]
\titleformat{\subsection}[runin]{\scriptsize}{\thesubsection}{1em}{}
%\titlespacing*{command}{left}{before-sep}{after-sep}[right-sep]
\titlespacing{\section}{0pt}{\spaceBetweenNumberAndText}{0pt}
\titlespacing{\subsection}{0pt}{0pt}{1em}

\begin{document}
\mainmatter
\setlength\columnseprule{0pt}
\pagestyle{Biblestyle}
\newlength{\myIndent}
\begin{Parallel}[p]{}{}
\ParallelLText{\noindent\begin{spanish}
\setcounter{section}{0}
\setcounter{sectionfv}{1}
\setcounter{subsectionfv}{1}
\section{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\setcounter{sectionlv}{1}
\setcounter{subsectionlv}{8}%end of page
\newpage
\setcounter{sectionfv}{1}%start of new page
\setcounter{subsectionfv}{9}
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\subsection{} \spanishText
\setcounter{sectionlv}{1}
\setcounter{subsectionlv}{15}
\end{spanish}}
\ParallelRText{\noindent\begin{large}\begin{hebrew}
\setcounter{section}{0}
\setcounter{sectionfv}{1}
\setcounter{subsectionfv}{1}
\section{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\setcounter{sectionlv}{1}
\setcounter{subsectionlv}{8}%end of page
\newpage
\setcounter{sectionfv}{1}%start of new page
\setcounter{subsectionfv}{9}
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\subsection{} \hebrewText
\setcounter{sectionlv}{1}
\setcounter{subsectionlv}{15}
\end{hebrew}\end{large}}
\end{Parallel}
\end{document}

答案1

在无法找到 TeX 解决方案后,我采取了不可思议的措施......非 TeX 解决方案!!!

我编写了一个脚本,在 TeX 之外开发文档的平行页面,然后通过 TeX 运行它以查看下一个分页符应该在哪里。然后,在我执行此操作的同时,我还计算并写下每个诗节的标题标记。所以最终结果就是我想要的,只是它需要很长时间才能完成。

由于这个问题已被多次赞成,如果有人需要,我可以稍微阐述一下最终的解决方案。

相关内容