kvafa / bidi Goto Github PK
View Code? Open in Web Editor NEWBidirectional typesetting in plain TeX and LaTeX, using XeTeX
Home Page: https://ctan.org/pkg/bidi
Bidirectional typesetting in plain TeX and LaTeX, using XeTeX
Home Page: https://ctan.org/pkg/bidi
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[usenames,dvipsnames,t]{beamer}
%\useinnertheme{rounded}
\useinnertheme{circles}
%\useinnertheme{rectangles}
\usepackage{listings}
\colorlet{bakcolor}{yellow!15}
\lstset{
language=Matlab,
backgroundcolor=\color{bakcolor},
linewidth=\textwidth ,
frameround=ttff,
frame=trBL,
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{blue}\bfseries,
% framexleftmargin=-1mm, frame=shadowbox, rulesepcolor=\color{red},
stringstyle=\ttfamily\color{Magenta}, % typewriter type for strings
commentstyle=\color{Green},
lineskip = 0pt,
numberstyle=\scriptsize,
numbersep=7pt,
numbers=left,
%numbers=none,
captionpos=t,
breaklines=true,
showstringspaces=true,
xleftmargin=60pt,
xrightmargin=60pt}
\usepackage{xepersian}
\settextfont{Yas}
\begin{document}
\begin{frame}[fragile]{لیستینگز}%
در اینجا کد متلب وارد می کنیم
\begin{block}{کد متلب}
\begin{latin}
\begin{lstlisting}
%============================
%=== Test Program ==========
%============================
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
\end{lstlisting}
\end{latin}
\end{block}
\end{frame}
\begin{frame}[fragile]{لستینگز بدون بلاک}
\begin{latin}
\begin{lstlisting}
%============================
%=== Test Program ==========
%============================
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
\end{lstlisting}
\end{latin}
\end{frame}
\end{document}
listings should has same behavior In Block and outside Block.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[usenames,dvipsnames,t]{beamer}
\usetheme{Bergen}
\usepackage{listings}
\colorlet{bakcolor}{yellow!15}
\usepackage{xepersian}
\settextfont{Yas}
\lstset{
language=Matlab,
backgroundcolor=\color{bakcolor},
linewidth=\textwidth ,
frameround=ttff,
frame=trBL,
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{blue}\bfseries,
% framexleftmargin=-1mm, frame=shadowbox, rulesepcolor=\color{red},
stringstyle=\ttfamily\color{Magenta}, % typewriter type for strings
commentstyle=\color{Green},
lineskip = .5pt,
numberstyle=\scriptsize,
numbersep=7pt,
numbers=left,
%numbers=none,
captionpos=t,
breaklines=true,
showstringspaces=true,
xleftmargin=30pt,
xrightmargin=30pt}
\author{نویسنده}
\title{تست بیمر با زیپرشین}
\date{\today}
\begin{document}
\maketitle
\begin{frame}{فهرست}
\tableofcontents
\end{frame}
\section{بخش1}
\subsection{زیربخش}
\begin{frame}{\secname}
درود
\begin{theorem}
فیثاغورث
\begin{equation}\label{eq:1}
a^2+b^2 = c^2
\end{equation}
\begin{itemize}
\item یک
\item دو
\item سه
\end{itemize}
\end{theorem}
\begin{enumerate}
\item یک
\item دو
\item سه
\end{enumerate}
\end{frame}
\begin{frame}[fragile]{لیستینگز درون بلوک}%
در اینجا کد متلب وارد می کنیم
\begin{block}{کد متلب رسم تابع سینوسی}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{block}
\end{frame}
\section{بخش2}
\subsection{زیر بخش 2}
\begin{frame}[fragile]{لیستینگز خارج از بلوک}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{frame}
\section{بخش3}
\subsection{زیر بخش 3}
\begin{frame}{تست پانویس و زیرنویس در داخل بلوک}
\begin{block}{\textbf{تست \lr{footnote} در بلوک}}
\begin{itemize}
\item یک
\item دو\footnote{دو}
\end{itemize}
\end{block}
\begin{block}{\textbf{تست \lr{LTRfootnote} در بلوک}}
\begin{itemize}
\item یک
\item دو
\LTRfootnote{two}
\end{itemize}
\end{block}
\end{frame}
\end{document}
Lines 140-144 of latex-xetex-bibdi.def
%\bidi@newrobustcmd*{\XeTeX}{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
% \hbox{\kern-.125em\bidi@reflect@box{E}}\kern-.1667em \TeX}}$}}
%\bidi@newrobustcmd*{\XeLaTeX}{\LR{\leavevmode$\smash{\hbox{X\lower.5ex
% \hbox{\kern-.125em\bidi@reflect@box{E}}\kern-.1667em \LaTeX}}$}}
are causing an error message for me of the type,
[\XeTeX | \XeLaTeX ] already defined
I have a multilingual document using a special journal style and class that's pretty stable (HSSA), so it's hard for me to give an MWE. I've eliminated the obvious things: xltextra, fontspec. I'm not using arabtex. I am using polyglossia with other languages (greek, sanskrit, chinese). This issue arises when I add
\setotherlanguage{persian}
\newfontfamily\persianfont{Noto Sans Arabic}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{hssa}
\usepackage{hssa}
%
\setotherlanguage{persian} % this line alone produces the error message
%\newfontfamily\persianfont{Noto Sans Arabic}
\begin{document}
Hello world!
\end{document}
With TeX Live 2024 updated to 2024-06-14, using the bidi
package (or invoking \setotherlanguage
with any language that loads bidi
) disables hyphenation in the output of polyglossia
's \text.…
and \foreignlanguage
commands. Hyphenation still works in \begin{language}…\end{language}
environments.
This may be yet another consequence of the recent update to array
. I have also reported this problem to the polyglossia
maintainers: reutenauer/polyglossia#648
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?\documentclass{article}
\usepackage{polyglossia}
\setdefaultlanguage{german}
\setotherlanguage{persian} % or just \usepackage{bidi}
\begin{document}
% Hyphenation works outside of any command or environment:
\parbox{0pt}{\hspace{0pt}Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz}
% Hyphenation works in a {language} environment:
\parbox{0pt}{\hspace{0pt}\begin{german}Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz\end{german}}
% Hyphenation doesn't work in \foreignlanguage:
\parbox{0pt}{\hspace{0pt}\foreignlanguage{german}{Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz}}
% Hyphenation doesn't work in \text…:
\parbox{0pt}{\hspace{0pt}\textgerman{Rindfleischetikettierungsüberwachungsaufgabenübertragungsgesetz}}
\end{document}
Hyphenation should not be disabled.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usepackage[RTLdocument=on]{bidi}
\begin{document}
\begin{frame}
one
\pause
two
\pause
three
\end{frame}
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usetheme{PaloAlto}
\usepackage[RTLdocument=on]{bidi}
\title{test}
\author{m.ahmadi}
\begin{document}
\begin{frame}[plain]
test bidi version=\bidiversion
probleam place navigation symbols for plain frame
\end{frame}
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[10pt]{beamer}
\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}
\setlatintextfont{Times New Roman}
\begin{document}
\begin{frame}{فونت اعداد محیط لاتین در محیط لیست}
تست
\begin{itemize}
\begin{latinitems}
\item[10] latinitems itemize
\end{latinitems}
\end{itemize}
%+++++++
\begin{enumerate}
\begin{latinitems}
\item latinitems enumerate
\end{latinitems}
\end{enumerate}
%++++++
\begin{latin}
\begin{enumerate}
\item latin enumerate
\end{enumerate}
%
\begin{itemize}
\item[20] latin itemize
\end{itemize}
\end{latin}
\end{frame}
\end{document}
Spurious space after new commands footnotes in text.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article} % or some other class
\usepackage[%
extrafootnotefeatures,%
]{xepersian}
\settextfont{IRXLotus}
\ParagraphFootnotes
\begin{document}
|\footnote{درود}|
\TwoColumnFootnotes
|\footnote{درود}|
\ThreeColumnFootnotes
|\footnote{درود}|
\FourColumnFootnotes
|\footnote{درود}|
\FiveColumnFootnotes
|\footnote{درود}|
\SixColumnFootnotes
|\footnote{درود}|
\SevenColumnFootnotes
|\footnote{درود}|
\NineColumnFootnotes
|\footnote{درود}|
\TenColumnFootnotes
\twocolumnfootnotes
|\footnote{درود}|
\end{document}
Wrong places of section and subsection in top two-parted mini frame in Beamer themes AnnArbor, CambridgeUS, and EastLansing
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[usenames,dvipsnames,t]{beamer}%,dvipsnames
\usetheme{AnnArbor}
%\usetheme{CambridgeUS}
%\usetheme{EastLansing}
\usepackage{listings}
\colorlet{bakcolor}{yellow!15}
\usepackage{xepersian}
\settextfont{Yas}
\lstset{
language=Matlab,
backgroundcolor=\color{bakcolor},
linewidth=\textwidth ,
frameround=ttff,
frame=trBL,
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{blue}\bfseries,
% framexleftmargin=-1mm, frame=shadowbox, rulesepcolor=\color{red},
stringstyle=\ttfamily\color{Magenta}, % typewriter type for strings
commentstyle=\color{Green},
lineskip = .5pt,
numberstyle=\scriptsize,
numbersep=7pt,
numbers=left,
%numbers=none,
captionpos=t,
breaklines=true,
showstringspaces=true,
xleftmargin=30pt,
xrightmargin=30pt}
\author{نویسنده}
\title{تست بیمر با زیپرشین}
\date{\today}
\begin{document}
\maketitle
\begin{frame}{فهرست}
\tableofcontents
\end{frame}
\section{بخش1}
\subsection{زیربخش}
\begin{frame}{\secname}
درود
\begin{theorem}
فیثاغورث
\begin{equation}\label{eq:1}
a^2+b^2 = c^2
\end{equation}
\begin{itemize}
\item یک
\item دو
\item سه
\end{itemize}
\end{theorem}
\begin{enumerate}
\item یک
\item دو
\item سه
\end{enumerate}
\end{frame}
\begin{frame}[fragile]{لیستینگز درون بلوک}%
در اینجا کد متلب وارد می کنیم
\begin{block}{کد متلب رسم تابع سینوسی}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{block}
\end{frame}
\section{بخش2}
\subsection{زیر بخش 2}
\begin{frame}[fragile]{لیستینگز خارج از بلوک}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{frame}
\section{بخش3}
\subsection{زیر بخش 3}
\begin{frame}{تست پانویس و زیرنویس در داخل بلوک}
\begin{block}{\textbf{تست \lr{footnote} در بلوک}}
\begin{itemize}
\item یک
\item دو\footnote{دو}
\end{itemize}
\end{block}
\begin{block}{\textbf{تست \lr{LTRfootnote} در بلوک}}
\begin{itemize}
\item یک
\item دو
\LTRfootnote{two}
\end{itemize}
\end{block}
\end{frame}
\end{document}
In the two-parted top mini frame ,section should be place left side of right part and subsection should be place right side of the left part!
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[RTLdocument]{bidi}
\begin{document}
\part{Test}
\part*{Test}
\end{document}
Both titles should be aligned the same.
Should be fixed by #28
When some footnotes place at last/first line of page, the footers goes next/previous page.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article} % or some other class
\newcount\footCounter
\newcommand{\mfootnote}[1]{%
\loop
\ifnum\footCounter<#1
\footnote{تست}%
\advance\footCounter by 1
\repeat\footCounter0%
}
\usepackage{ptext}
\usepackage[%
extrafootnotefeatures,%
perpagefootnote%
]{xepersian}
\settextfont{IRXLotus}
\ParagraphFootnotes
\begin{document}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]\mfootnote{5}
\ptext[1-2]
\end{document}
See the pages: 2--6
when bidi is loaded with nomencl
package, the following errors are appeared in the console:
Command \scr@tso@table@pagenumberformat undefined.
Command \scr@tso@figure@pagenumberformat undefined.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article} % or some other class
% Any packages other than the bidi package must be loaded here
\usepackage{nomencl}
% The bidi package must be loaded as the last package
\usepackage[%
% Any bidi package option goes here
]{bidi}
% Any preamble code goes here
\begin{document}
Test
% Demonstration of issue here
\end{document}
It should work without any errors.
With a recent (2024-06-01-ish) release of LaTeX, use of the bidi
package in conjunction with the memoir
class causes the @-expressions of longtable
environments to be printed extraneously. It seems that using a \multicolumn
command is necessary to trigger the bug.
According to the discussion at Issue latex3/latex2e#1368, this may be because the array
package, whose definitions bidi
redefines, was recently changed.
I can reproduce the problem only with memoir
; the standard article
and book
classes seem to be unaffected.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?\documentclass{memoir}
\usepackage{longtable}
\usepackage{bidi}
\begin{document}
\begin{longtable}{l}
\multicolumn{1}{c}{foo} \\
\end{longtable}
\begin{longtable}{r@{x}l@{x}r@{x}l@{x}r@{x}l}
a & b & c & d & e & f \\
\end{longtable}
\end{document}
The second longtable
environment should print something like the following:
axbxcxdxexf
Instead it prints the following:
axbxcxdxexf
x
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !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}
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}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usepackage[RTLdocument=on]{bidi}
\begin{document}
\begin{frame}[label=frame1]
test
\end{frame}
\begin{frame}
test
\hyperlink{frame1}{\beamerbutton{Click}}
\end{frame}
\end{document}
centered section and subsection in Beamer themes with a tree-like navigation bar at top of frames
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[usenames,dvipsnames,t]{beamer}%,dvipsnames
%\numberwithin{equation}{section}
%
% Themes with a Tree-Like Navigation Bar
\usetheme{Antibes}
%\usetheme{JuanLesPins}
%\usetheme{Montpellier}
\usepackage{listings}
\colorlet{bakcolor}{yellow!15}
\usepackage{xepersian}
\settextfont{Yas}
\lstset{
language=Matlab,
backgroundcolor=\color{bakcolor},
linewidth=\textwidth ,
frameround=ttff,
frame=trBL,
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{blue}\bfseries,
% framexleftmargin=-1mm, frame=shadowbox, rulesepcolor=\color{red},
stringstyle=\ttfamily\color{Magenta}, % typewriter type for strings
commentstyle=\color{Green},
lineskip = .5pt,
numberstyle=\scriptsize,
numbersep=7pt,
numbers=left,
%numbers=none,
captionpos=t,
breaklines=true,
showstringspaces=true,
xleftmargin=30pt,
xrightmargin=30pt}
\author{نویسنده}
\title{تست بیمر با زیپرشین}
\date{\today}
\begin{document}
\maketitle
\begin{frame}{فهرست}
\tableofcontents
\end{frame}
\section{بخش1}
\subsection{زیربخش}
\begin{frame}{\secname}
درود
\begin{theorem}
فیثاغورث
\begin{equation}\label{eq:1}
a^2+b^2 = c^2
\end{equation}
\begin{itemize}
\item یک
\item دو
\item سه
\end{itemize}
\end{theorem}
\begin{enumerate}
\item یک
\item دو
\item سه
\end{enumerate}
\end{frame}
\begin{frame}[fragile]{لیستینگز درون بلوک}%
در اینجا کد متلب وارد می کنیم
\begin{block}{کد متلب رسم تابع سینوسی}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{block}
\end{frame}
\section{بخش2}
\begin{frame}[fragile]{لیستینگز خارج از بلوک}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{frame}
\section{بخش3}
\begin{frame}{تست پانویس و زیرنویس در داخل بلوک}
\begin{block}{\textbf{تست \lr{footnote} در بلوک}}
\begin{itemize}
\item یک
\item دو\footnote{دو}
\end{itemize}
\end{block}
\begin{block}{\textbf{تست \lr{LTRfootnote} در بلوک}}
\begin{itemize}
\item یک
\item دو
\LTRfootnote{two}
\end{itemize}
\end{block}
\end{frame}
\end{document}
Section and subsection in tree-like navigation bar should be right to left.
When I use \psscalebox{<value>}{}
in presence of bidi
, the output pdf is not valid!
In the log file I see this error:
Error 35584 (driver return code) generating output;
file exam-LaTeX.pdf may not be valid.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{pstricks}
\usepackage[RTLdocument]{bidi}
\begin{document}
\psscalebox{1.2}{\pscircle{1.5}}
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[10pt]{beamer}
\usepackage[RTLdocument=on]{bidi}
\setbeamertemplate{caption}[caption name own line]
\begin{document}
\begin{frame}{caption name own line}
test bidi version=\bidiversion
\begin{table}
\caption{test title}
\begin{tabular}{cc}
1&2\\
3&4
\end{tabular}
\end{table}
\end{frame}
\end{document}
solve with add beamerbaseauxtemplates-xetex-bidi.def
\bidi@csundef{beamer@@tmpop@caption@caption name own line}
\defbeamertemplate{caption}{caption name own line}
{%
\begin{minipage}{\textwidth}
\bidi@beamer@ragged%
{\leavevmode%
\usebeamercolor[fg]{caption name}%
\usebeamerfont*{caption name}%
\insertcaptionname%
}\\
\insertcaption
\end{minipage}
}
A right-to-left document containing a wide TikZ picture with a fitted node (i.e. a node using the "fit" option from the "fit" TikZ library) cannot be displaced to the left if the displacement pushes the node beyond the text margin.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?\documentclass{article}
\usepackage{lipsum,tikz}
\usetikzlibrary{fit}
\usepackage[RTLdocument]{bidi}
\begin{document}
\lipsum[1-1]
\noindent\hspace{0cm}\tikz \node [ draw, fit={(0,0) (12,1)} ] {};
\noindent\hspace{3cm}\tikz \node [ draw, fit={(0,0) (12,1)} ] {};
\end{document}
The lower rectangle should be set 3cm to the left of the text's right margin.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[fleqn]{article}
\usepackage{bidi}
\begin{document}
\meaning\[
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% xetex test
\input bidi
\nobidilogo
test
\bye
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{fancyhdr}
\renewcommand\headruleskip{10cm} %<< doesn't change anything
\let\footrule\hrulefill %<< doesn't change anything
\pagestyle{fancy}
\usepackage[RTLdocument]{bidi}
\begin{document}
Test
\end{document}
The headrule should be under "Test", there should be another rule at the bottom of the page.
Whenever I use the bidi.sty
package/style file, I get a long banner (25 lines!) introducing it. This boilerplate is:
Please remove it entirely, or at the very list - limit yourself to a single package-describing line.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article} % or some other class
% Any packages other than the bidi package must be loaded here
% The bidi package must be loaded as the last package
\usepackage[%
% Any bidi package option goes here
]{bidi}
% Any preamble code goes here
\begin{document}
Hello world
\end{document}
Log should say:
(/usr/share/texlive/texmf-dist/tex/xelatex/bidi/bidi.sty)
and that's it.
Relevant part:
(/usr/share/texlive/texmf-dist/tex/xelatex/bidi/bidi.sty
****************************************************
*
* bidi package (Bidirectional typesetting in
* plain TeX and LaTeX, using XeTeX engine)
*
* Description: A convenient interface for
* typesetting bidirectional texts in plain TeX
* and LaTeX. The package includes adaptations
* for use with many other commonly-used packages.
*
* Copyright (c) 2007--2023 Vafa Khalighi
* Copyright (c) 2018--2020 bidi-tex GitHub organization
*
* v39.7 (Release Serge Lang), 2023/01/18
*
* License: LaTeX Project Public License, version
* 1.3c or higher (your choice)
*
* Location on CTAN: /macros/xetex/latex/bidi
*
* Issue tracker: https://github.com/kvafa/bidi/issues
*
* Discussions: https://github.com/kvafa/bidi/discussions
*
* Primary author of bidi package: Vafa Khalighi.
*
****************************************************
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usepackage[RTLdocument=on]{bidi}
%\setbeamertemplate{background}{\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a.png}}
\setbeamertemplate{background}[grid][color=red]
\begin{document}
\begin{frame}{title}{subtitle}
test background
\end{frame}
\end{document}
Adding bidi
package to 2-column paper with line numbers on the sides using the lineno package with switch
option produce line number to appears on the left side of the right column.
https://tex.stackexchange.com/q/712502/54817
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[11pt,twocolumn]{article}
\usepackage[switch,mathlines]{lineno}
\usepackage{bidi}
\usepackage{lipsum}
\linenumbers
\begin{document}
\lipsum
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?
bidi's documentation says it supports lettrine, but I'm having trouble.
MWE:
% !TeX TS-program = xelatex
% !TeX encoding = UTF-8
\documentclass{article}
\usepackage{lettrine}% position 1
\usepackage{bidi}
%\usepackage{lettrine} % position 2
\begin{document}
\lettrine{H}{ere is a nice beginning} to a paragraph. The current document contains no
words, but we need some phrases as a base to create the random text from. The current
document contains no words, but we need some phrases as a base to create the random
text from.
\end{document}
When lettrine is invoked at position 1, I get
Package bidi Error: Oops! you have loaded package lettrine after bidi package on your document again.
\begin{document}
And at position 2, I get
Undefined control sequence. \lettrine{H}{ere is a nice beginning}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{bidi}
\begin{document}
\meaning\leftline
\meaning\rightline
\meaning\centerline
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{bidi}
\begin{document}
Hello!
\end{document}
The pdf and xdv produced by the minimal example contains in it the line
BIDI.Fullbanner(This is the bidi package, Version 39.8 (Release Donald Ervin Knuth) Released August 2, 2023. ),
(it is inserted to the pdf via the docinfo
key). It can create problems if the the establishment to whom the pdf is created
does not accept it because of that fact. It would nice to have an appropriate way to disable that.
Today, thanks to LaTeX's new hook management system one can remove with
\documentclass{article}
\usepackage{bidi}
\RemoveFromHook{enddocument}[bidi]
\begin{document}
Hello!
\end{document}
But that removes bidi's enddocument hook entirely, which might be undesirable.
\underline
has been made robust in LaTeX's kernel. Should be fixed by #28
I'm experiencing an issue where using the xepersian
/bidi
package breaks the functionality of the currfile
package.
I have a main tex file and several subdirectories where I store my other files, and I have some helper macros that facilitate inclusion of these files in the subdirectories, and those rely on \currfilebase
and \currfilename
. But for some reason I'm always getting the main file's name even inside the other files. This only happens when the xeperian
package is imported and without it everything works fine.
The issue seems to be related to the bidi
package redefining some of the underlying commands (like InputIfFileExists
) and breaking the hooks (see the discussion under the thread on tex.stackexchange).
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?I created a small example that shows the behavior I'm experiencing:
main file content [main.tex
]:
\documentclass[10pt]{book}
\usepackage[parent]{currfile}
\usepackage{xepersian}
\settextfont{Vazirmatn}
\setdigitfont{Vazirmatn}
\begin{document}
\begin{latin}
This is from the main file:
currfilepath: \currfilepath
currfilename: \currfilename
CurrentFile: \CurrentFile
CurrentFilePath: \CurrentFilePath
\input{dir/inside_dir}
\end{latin}
\end{document}
Then create a dir
directory in the above directory and inside it create this inside_dir.tex
file:
This is from the inside\_dir file:
currfilebase: \currfilebase
currfilepath: \currfilepath
currfilename: \currfilename
CurrentFile: \CurrentFile
CurrentFilePath: \CurrentFilePath
And then compile in the main dir using xelatex
to see the output below:
xelatex main
If I don't have the xepersian
package, the output looks like below, which is the correct behavior:
Screenshots are provided above.
There are a few number of accounts, orgs and repos that are for the same projects.
In the case bidi, I found the following developed by https://github.com/vafakhalighi:
I'd suggest to remove the deprecate or at least link them to the new repository and stop the trend of moving repositories as it hurts the already super small community.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usetheme{PaloAlto}
\usepackage[RTLdocument=on]{bidi}
\setbeamersize{sidebar width right=0.4cm}
\setbeamertemplate{sidebar canvas right}[horizontal shading][left=cyan!70,right=cyan!70]
\title{test sidebar canvas with bidi}
\author{M.Ahmadi}
\begin{document}
\begin{frame}{title}
test bidi version=\bidiversion
\end{frame}
\end{document}
xepersian
packagebidi
package issue tracker](https://github.com/kvafa/bidi/issues) has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?Today, with LaTeX's new hook system it is possible to define \bidi@isloaded
in such a way that bidi
could be load in any order with respect to other packages. one option could be
\newcommand\bidi@isloaded[1]{
\@ifpackageloaded{#1}%
{\input{#1-xetex-bidi.def}}%
{\AddToHook{package/#1/after}{\input{#1-xetex-bidi.def}}}
}
and removing the the begindocument hook from lodingorder-xetex-bidi.def
and also removing the loading of the .def files from ltx-xetex-bidi.def (or moving \bidi@isloaded to there).
This is just a suggestion, I'm not sure if anything else would also be needed, but I hope this demonstrate the idea, it could make things much simpler...
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer}
\usetheme{Warsaw}
\useoutertheme{tree} %smoothtree, smoothbars
\usepackage[RTLdocument]{bidi}
\title{title}
\author{M.Ahmadi}
\begin{document}
\section{section}
\subsection{joy}
\begin{frame}{frametitle}
test
\end{frame}
\end{document}
درود جناب وفا، عنوان فریم به نظر میرسد که فاصله عمودی منفی دارد در فایل
beamerouterthemeshadow-xetex-bidi.def
When I use tocloft package with bidi package, page numbers are not left alignment in ToC, LoF, and LoT.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{showframe}
\usepackage{tocloft}
\usepackage[%
RTLdocument%
]{bidi}
\begin{document}
\tableofcontents
\listoffigures
\listoftables
\section{Test}
\subsection{Other}
\subsection{Other}
\begin{figure}[!htb]
\caption{Test}
\end{figure}
\begin{table}[!htb]
\caption{Test}
\end{table}
\end{document}
In beamer themes with mini frame navigation, direction of section in top mini frame should be right to left not left to right
and subsection also be right to left not centered
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[usenames,dvipsnames,t]{beamer}
% Themes with a Mini Frame Navigation
\usetheme{Berlin}
%\usetheme{Ilmenau}
%\usetheme{Dresden}
%\usetheme{Darmstadt}
%\usetheme{Frankfurt}
%\usetheme{Singapore}
%\usetheme{Szeged}
\usepackage{listings}
\colorlet{bakcolor}{yellow!15}
\usepackage{xepersian}
\settextfont{Yas}
\lstset{
language=Matlab,
backgroundcolor=\color{bakcolor},
linewidth=\textwidth ,
frameround=ttff,
frame=trBL,
basicstyle=\ttfamily\footnotesize,
keywordstyle=\color{blue}\bfseries,
stringstyle=\ttfamily\color{Magenta},
commentstyle=\color{Green},
lineskip = .5pt,
numberstyle=\scriptsize,
numbersep=7pt,
numbers=left,
%numbers=none,
captionpos=t,
breaklines=true,
showstringspaces=true,
xleftmargin=30pt,
xrightmargin=30pt}
\author{نویسنده}
\title{تست بیمر با زیپرشین}
\date{\today}
\begin{document}
\maketitle
\begin{frame}{فهرست}
\tableofcontents
\end{frame}
\section{بخش1}
\subsection{زیربخش}
\begin{frame}{\secname}
درود
\begin{theorem}
فیثاغورث
\begin{equation}\label{eq:1}
a^2+b^2 = c^2
\end{equation}
\begin{itemize}
\item یک
\item دو
\item سه
\end{itemize}
\end{theorem}
\begin{enumerate}
\item یک
\item دو
\item سه
\end{enumerate}
\end{frame}
\begin{frame}[fragile]{لیستینگز درون بلوک}%
در اینجا کد متلب وارد می کنیم
\begin{block}{کد متلب رسم تابع سینوسی}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{block}
\end{frame}
\section{بخش2}
\begin{frame}[fragile]{لیستینگز خارج از بلوک}
\setLTR
\begin{lstlisting}[captiondirection=RTL,caption={رسم نمودار سینوسی}]
%============================
%=== Test Program ==========
clc
clear
close all
t=0:0.1:2*pi;
y=sin(t);
plot(t,y)
title('sin(t)')
\end{lstlisting}
\end{frame}
\section{بخش3}
\begin{frame}{تست پانویس و زیرنویس در داخل بلوک}
\begin{block}{\textbf{تست \lr{footnote} در بلوک}}
\begin{itemize}
\item یک
\item دو\footnote{دو}
\end{itemize}
\end{block}
\begin{block}{\textbf{تست \lr{LTRfootnote} در بلوک}}
\begin{itemize}
\item یک
\item دو
\LTRfootnote{two}
\end{itemize}
\end{block}
\end{frame}
\end{document}
lettrine-xetex-bidi.def patches an old definition of the internal command @lettrine of the lettrine package leading to issues with the current implementation.
Rather than updating the patched definition in lettrine-xetex-bidi.def, I suggest to include the RTL flag mechanism for the \parshape command in the original definition of @lettrine. I have an experimental version of lettrine.sty, appended here. Please let me know
lettrine.sty.gz
if something like that would enable to get rid of lettrine-xetex-bidi.def?
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article} % or some other class
% Any packages other than the bidi package must be loaded here
\usepackage{lettrine}
% The bidi package must be loaded as the last package
\usepackage{bidi}
% Any preamble code goes here
\begin{document}
\lettrine{V}{oici} un exemple
\end{document}
! Undefined control sequence.
\LettrineFont \L@initial
With a recent (2024-06-01-ish) release of LaTeX, use of the bidi
package seems to break nicematrix
>= 6.28. According to the discussion at Issue latex3/latex2e#1368, this may be because the array
package, whose definitions bidi
redefines, was recently changed.
I also reported this issue by e-mail to the nicematrix
maintainer.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?\documentclass{article}
\usepackage{nicematrix}
\usepackage{bidi}
\begin{document}
\begin{NiceTabular}{lllll}
a & b & c & d & e \\
\end{NiceTabular}
\end{document}
The minimal example should compile, but instead produces the following error message:
(./test.aux) (/opt/texlive/2024/texmf-dist/tex/latex/base/ts1cmr.fd)
! Extra alignment tab has been changed to \cr.
<template> \endtemplate
l.9 \end{NiceTabular}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[10pt]{beamer}
\usepackage[RTLdocument=on]{bidi}
\setbeamertemplate{section in toc}[sections numbered]
\setbeamertemplate{subsection in toc}[subsections numbered]
\begin{document}
\begin{frame}{contents}
\tableofcontents
\end{frame}
\section{test for title section}
\subsection{test for title subsection}
\begin{frame}{title}
test bidi version=\bidiversion
\end{frame}
\end{document}
solve: add in beamerbaseauxtemplates-xetex-bidi.def
\bidi@csundef{beamer@@tmpop@section in toc@sections numbered}
\bidi@csundef{beamer@@tmpop@subsection in toc@sections numbered}
\bidi@csundef{beamer@@tmpop@subsubsection in toc@sections numbered}
\defbeamertemplate{section in toc}{sections numbered}{%
\leavevmode%
% prevents the period to be printed with the first/last section option
\ifnum\beamer@tempcount>\beamer@toclastsection
\else
\ifnum\beamer@tempcount>0
\inserttocsectionnumber.
\fi\fi%
\inserttocsection\par%
}
\defbeamertemplate{subsection in toc}{sections numbered}
{\leavevmode\bidi@beamer@leftskip=2.5em\inserttocsubsection\par}
\defbeamertemplate{subsubsection in toc}{sections numbered}
{\leavevmode\normalsize\usebeamerfont{subsection in toc}\bidi@beamer@leftskip=3.5em\usebeamerfont{subsubsection in toc}%
\inserttocsubsubsection\par}
\bidi@csundef{beamer@@tmpop@section in toc@subsections numbered}
\bidi@csundef{beamer@@tmpop@subsection in toc@subsections numbered}
\bidi@csundef{beamer@@tmpop@subsubsection in toc@subsections numbered}
\defbeamertemplate{section in toc}{subsections numbered}
{\leavevmode\bidi@beamer@leftskip=2em\inserttocsection\par}
\defbeamertemplate{subsection in toc}{subsections numbered}
{\leavevmode\bidi@beamer@leftskip=2em\rlap{\hskip-2em\inserttocsectionnumber.\inserttocsubsectionnumber}\inserttocsubsection\par}
\defbeamertemplate{subsubsection in toc}{subsections numbered}
{\leavevmode\normalsize\usebeamerfont{subsection in
toc}\bidi@beamer@leftskip=3em\usebeamerfont{subsubsection in toc}%
\inserttocsubsubsection\par}
Add one or more environment that each use a their own respective method of
automatically detecting text direction.
This will greatly improve the UX and noob-friendlyness of LaTeX as a whole
alongside the code readability.
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?\usepackage{bidi}
\begin{document}
\begin{autodir}{unicode,base=ltr}
This is a bidi text that has a phrase in it like سلام دنیا.
Which would likely be rendered as دنیا سلام if not for this environment.
With this `autodir` environment, the bidi direction will
automatically add the `rl` macro to it before processing.
\end{autodir}
\end{document}
xepersian
packagebidi
package issue tracker has been searched for similar issues?xepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[10pt]{beamer}
\usepackage[RTLdocument=on]{bidi}
\setbeamertemplate{sections/subsections in toc}[ball unnumbered]
\begin{document}
\begin{frame}{contents}
\tableofcontents
\end{frame}
\section{test for title section}
\subsection{test for title subsection}
\begin{frame}{title}
test bidi version=\bidiversion
\end{frame}
\end{document}
solve with add in beamerbaseauxtemplates-xetex-bidi.def
\bidi@csundef{beamer@@tmpop@section in toc@ball unnumbered}
\bidi@csundef{beamer@@tmpop@subsection in toc@ball unnumbered}
\bidi@csundef{beamer@@tmpop@subsubsection in toc@ball unnumbered}
\defbeamertemplate{section in toc}{ball unnumbered}
{\leavevmode\bidi@beamer@leftskip=2.25ex%
\llap{%
\raise0.1ex\beamer@usesphere{section number projected}{bigsphere}\kern1.25ex}%
\inserttocsection\par}
\defbeamertemplate{subsection in toc}{ball unnumbered}
{\leavevmode\bidi@beamer@leftskip=5.1ex\llap{%
\raise0.2ex\beamer@usesphere{subsection number projected}{smallsphere}\kern1ex}\inserttocsubsection\par}
\defbeamertemplate{subsubsection in toc}{ball unnumbered}
{\leavevmode\normalsize\usebeamerfont{subsection in
toc}\bidi@beamer@leftskip=8.2ex\usebeamerfont{subsubsection in toc}%
\llap{%
\beamer@usesphere{subsubsection number projected}{smallsphere}\kern0.75ex}\inserttocsubsubsection\par}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.