I would like to use \thesheetsequence in the trim area (sheet-number.tex) as described in the Memoir documentations but the counter does not increment (it always shows 1) and \thelastsheet is always 0. Any idea what may cause this?
[Update] I must also add that this happens in a big project with a lot of packages and small customized configurations. The packages loaded are available here: packages.tex. Unfortunately, ATM I cannot share the complete project or provide a minimal example.
[Update2] I have found that the problem is caused when bidi is loaded. Now the question is how to fix it.
[Update3] Example of code not working is added (also thanks to @daleif):
\documentclass[a4paper]{memoir}
\usepackage{etoolbox}
\usepackage{bidi}
\begin{document}
\def\do#1{\thesheetsequence\newpage}
\docsvlist{1,2,3,4,5,6,7,8,9}
\end{document}
– Shayanlinux Aug 26 '15 at 20:37\quarkmarks \renewcommand*{\tmarktl}{\registrationColour{% \begin{picture}(0,0) \setlength{\unitlength}{1bp}\thicklines \put(-36,0){\line(1,0){24}} \put(0,12){\line(0,1){24}} \put(3,27){\normalfont\ttfamily\fontsize{8bp}{10bp}\selectfont\ Sheet \thesheetsequence} \end{picture}}} \checkandfixthelayouttracepackage as suggested here useful, because looking at more verbose log sometimes gives more hints about what to disable. – Shayanlinux Aug 27 '15 at 09:12