Skip to content
This repository was archived by the owner on May 14, 2020. It is now read-only.
This repository was archived by the owner on May 14, 2020. It is now read-only.

redefining \scr@dte@tocline causes failure with xetex #14

@ExecutorElassus

Description

@ExecutorElassus

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:

`! Missing number, treated as zero.

\scr@dte@pagenumberwidth
\scr@tso@figure@pagenumberbox ...@pagenumberwidth}
{\hfil #1}
...scr@tso@figure@pagenumberformat}{9}}
}@Par
\scr@tso@figure@entryformat #1->#1

\scr@dte@tocline ...pagenumberformat}{#3}}}@Par }
}}\tocbasic@SetPenaltyByTO...

\l@figure ...ure}\scr@dte@tocline {figure}{#1}{#2}
\TOC@EntryEndHook {figure}
\contentsline ...L \endR \fi }\hyper@linkend }{#3}
\or \csname l@#1\endcsname...
l.65 ...el of narrative rhetoric.}}{9}{figure.2.1}
%
A number should have been here; I inserted 0'. (If you can't figure out why I needed to see a number, look up weird error' in the index to The TeXbook.)

! Illegal unit of measure (pt inserted).`

Check/indicate

  • Relevant to the xepersian package
  • The xepersian package issue tracker has been searched for similar issues?
  • [ x] Issue tracker has been searched for similar issues?
  • [x ] Links to <tex.stackexchange.com> discussion if appropriate

Minimal example showing the issue

\usepackage{fontspec}
\setmainfont[Mapping=tex-text,Numbers=OldStyle]{Linux Libertine O}
\setsansfont[Mapping=tex-text]{Linux Biolinum O}
\usepackage[a4paper]{geometry}
\geometry{verbose,tmargin=2cm,bmargin=2cm,lmargin=2cm,rmargin=2cm}
\usepackage{fancyhdr}
\pagestyle{fancy}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{1}
\setlength{\parskip}{\smallskipamount}
\setlength{\parindent}{0pt}
\usepackage{graphicx}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\newcommand{\noun}[1]{\textsc{#1}}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
\newlength{\lyxlabelwidth}      % auxiliary length 

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands.
\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\usepackage{bidi}
\errorcontextlines=10

\makeatother

\begin{document}
\frontmatter

\tableofcontents{}

\listoffigures


\subsection{Event-Space Ephemera}

The page of score from the work \noun{Treatise} by Cornelius Cardew,
presented in Figure \ref{fig:Page-183-from-cardews-treatise-1}, serves
as a practical example of the role secondary or ephemeral score materials
may take in the analysis. As is evident from the page, and from other
sources among Cardew's \emph{œvre},\footnote{See, for example, the work \noun{Autumn '60}, discussed in some books.}
the empty staff lines are provided as a space for performers to record
any notations they might deem pertinent to the realization. As already
noted, a diligent analysis addresses the specific instance of performance,
and this is nonsensical without including whatever notations may have
been added by the participants.\footnote{This is, for example, a notable strength of the analysis of David
Tudor's realization of \noun{Variations Ⅱ} in another book.} Such ephemera also comprise the additional materials commonly described
as sketch and manuscript sources, as well as any documentary materials
derived from rehearsal or preparatory work. 

\begin{figure}
\begin{centering}
\includegraphics[width=0.45\columnwidth]{/home/elassus/carrier1/Images/not_my_real_mom_cat}
\par\end{centering}
\caption{\label{fig:Page-183-from-cardews-treatise-1}Page 183 from \noun{Treatise}
by Cornelius Cardew}
\end{figure}

\end{document}

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.

Thanks for the help,

EE

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions