Open vafakhalighi opened 4 years ago
A simplified example:
(I am from TeX-SX quesion https://tex.stackexchange.com/q/549846 so table
instead of figure
is used.)
\documentclass{scrbook}
\usepackage{bidi}
\begin{document}
\contentsline{table}{\numberline {\relax 1.1}{\ignorespaces Table title}}{1}
\end{document}
Compared to the original definition of \scr@dte@tocline
in tocbasic.sty
, the following change seems to fix the problem.
diff --git a/bidi.dtx b/bidi.dtx
index f0192ef..340a03a 100755
--- a/bidi.dtx
+++ b/bidi.dtx
@@ -21128,6 +21128,8 @@ to\rtside{\box\bslice\hfil}}
{%
\normalfont\normalsize\@nameuse{scr@tso@#1@linefill}%
\nobreak
+ \expandafter\let\expandafter\scr@dte@pagenumberwidth
+ \csname scr@tso@#1@pagenumberwidth\endcsname
\@nameuse{scr@tso@#1@pagenumberbox}{%
\@nameuse{scr@tso@#1@pagenumberformat}{#3}%
}%
With #1 == table
in my simplified example, \@nameuse{scr@tso@#1@pagenumberbox}{...}
expands to \scr@tso@table@pagenumberbox{...}
, then expands to
\hb@xt@ \@nameuse {scr@dte@pagenumberwidth}{\hfil ...}
Here \scr@dte@pagenumberwidth
is never defined, hence
\hb@xt@\scr@dte@pagenumberwidth{\hfil ...}
raises error ! Missing number, treated as zero.
The proposed change fixes #14 as well.
Brief outline of the issue
Please see this thread: https://latex.org/forum/viewtopic.php?f=19&t=33483&p=112872#p112872 I have a document with figure wrap floats that define their width as percentage of the column. When compiling, Xetex throws errors like the following:
Check/indicate
xepersian
packagexepersian
package issue tracker has been searched for similar issues?Minimal example showing the issue
Expected behavior
The document actually compiles to a finished pdf, but compilation fails with the error given at the top. According to the linked thread, this is due to bidi definition of \scr@dte@tocline not having \scr@dte@pagenumberwidth defined before it's used.
I can just load the pdf, I guess, from the temp directory, but it'd be nice to get this fixed. I'm writing this with LyX, so some of the document has LyX's internal tex stuff.
Log and PDF files