kvafa / bidi

Bidirectional typesetting in plain TeX and LaTeX, using XeTeX
https://ctan.org/pkg/bidi
6 stars 1 forks source link

Problem with long section title in table of contents, square #21

Closed Tex-Ahmadi closed 1 year ago

Tex-Ahmadi commented 1 year ago

Brief outline of the issue

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode

\documentclass[10pt]{beamer}

\usepackage[RTLdocument=on]{bidi}

\setbeamertemplate{sections/subsections in toc}[square]

\begin{document}
\begin{frame}{contents}
\tableofcontents
\end{frame}

\section{test for title section. This is a long text for testing. This is a long text for testing.}

\subsection{test for title subsection}
\begin{frame}{title}
test bidi version=\bidiversion
\end{frame}

\end{document}

Expected behavior

solve with edit: beamerbaseauxtemplates-xetex-bidi.def

\defbeamertemplate{section in toc}{square}
{\leavevmode\bidi@beamer@leftskip=1.75ex%
  \llap{{%
    \usebeamerfont*{section number projected}%
    \usebeamercolor[bg]{section number projected}%
    \if@RTL
    \else
      \vrule width2.25ex height1.85ex depth.4ex%
      \hskip-2.25ex%
    \fi
    \hbox to2.25ex{{\hfil\color{fg}\inserttocsectionnumber\hfil}}%
    \if@RTL
      \hskip-2.25ex%
      \vrule width2.25ex height1.85ex depth.4ex%
    \fi
    }\kern1.25ex}%
  \inserttocsection\par}

Log and PDF files

beamer_toc_square.pdf

kvafa commented 1 year ago

Thanks for your bug report; please accept my apologies for the very late reply. I have resolved this in my own private repository (not publicly available). The new release will appear on CTAN at September 10, 2023 (about a month).