Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

As you can see from the screenshot the numbers showing the verse locations in the titlemarks only show the very last values which were set. If you comment out the line \usepackage{pdfcolparallel} and compile it and use the R parameter to skip the warnings, you would see that it works fine. So the pdfcolparallel package is breaking this. Would someone please tell me why and how I should fix it?

With pdfcolparallel:

enter image description here

enter image description here

enter image description here

without pdfcolparallel:

enter image description here

enter image description here

The following should be run through XeLaTeX.

MWE:

\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}
share|improve this question

1 Answer 1

up vote 1 down vote accepted

After not being able to find a TeX solution, I have resorted to the unthinkable... a non-TeX solution!!!

I've written a script to develop my document's parallel pages outside of TeX and then running it through TeX to see where the next page break should be. Then as I am doing this I am also calculating and writing the title marks per each verse. So the end result is what I want, except that it takes ages to complete.

Since this question has been upvoted a few times, I can expound a bit on the end solution should someone require it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.