Giter Site home page Giter Site logo

tex-persian / bidi Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 1.0 3.12 MB

Bidirectional typesetting in plain TeX and LaTeX, using XeTeX

Home Page: https://ctan.org/pkg/bidi

TeX 99.91% Shell 0.09%
tex typography xetex bidirectional bidi right-to-left left-to-right bidirectional-typesetting plain-tex

bidi's Introduction

The bidi Package

The bidi package provides a convenient interface for typesetting bidirectional texts with plain TeX and LaTeX.

The package includes adaptations for use with many other commonly-used packages.

The official versions of the package is released on CTAN.

Using the Package

The following example illustrates how the package can be used.

\documentclass{article}
\usepackage{bidi}
\setRTL
\begin{document}
...
\end{document}

Reporting Issues

If you think that you have found an issue in the package, please use the package issue tracker to report it.

Discussions

You may also have conversations, ask questions and post answers without opening issues using the Discussions space.

Announcements

The announcements for the new releases of the package will also appear in the Discussions space under the Announcements category.

bidi's People

Contributors

vafa-khalighi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

Forkers

apteryks

bidi's Issues

Problem created in the new version of bidi with Beamer class!

% !TeX TS-program = xelatex
\documentclass[10pt]{beamer}
\usetheme{Warsaw}

\usepackage[RTLdocument]{bidi}
\title{Warsaw and bidi}
\author{M.Ahmadi}
\begin{document}

\section{section}
\begin{frame}{title}
test
\end{frame}

\end{document}

درود جناب وفا،
در نسخه 36.4 bidi تست شده و مشکل در کادر عنوان فریم هستش.
با تشکر از زحمات

tset-bem13.pdf

Problem created in the new version of bidi with eso-pic!

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass{article}
\usepackage{eso-pic,graphicx}

\usepackage[RTLdocument]{bidi} 

\begin{document}
test 
\AddToShipoutPictureBG*{\includegraphics[width=\paperwidth,height=\paperheight]{example-image}};
\clearpage
text
\end{document}

Expected behavior

Log and PDF files

eso-pic_bidi.pdf
eso-pic_bidi.log

Problem created in the new version of bidi with draftwatermark!

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass[12pt]{article}

\usepackage{draftwatermark}
\SetWatermarkText{M.Ahmadi}
\SetWatermarkScale{0.5}

\usepackage[RTLdocument]{bidi} 

\begin{document}
test
\end{document}

Expected behavior

Log and PDF files

draftwatermark_bidi.pdf
draftwatermark_bidi.log

clash with package tocbasic

Defining a new toc with \DeclareNewTOC fails with an error

Just declaring a new TOC (without actually using it) fails with

! LaTeX Error: Command \scr@tso@coding@linefill undefined.

This affects both version 36.7 (as included in TeXlive 2022) as well as the latest version from CTAN (39.7).

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{scrartcl}
\usepackage{tocbasic}
\usepackage{bidi}
\DeclareNewTOC[type=coding,types=codings,flooatfloatpos=t]{cod}
\begin{document}
foo
\end{document}

Expected behavior

Should compile without error.

Log and PDF files

(No PDF created.)

parenthesis direction in minted

After the recent update, the direction of parenthesis in minted environment is wrong

Minimal example showing the issue

\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{minted,color}

\usepackage{polyglossia,bidi}
\setmainlanguage{hebrew}
\setotherlanguage{english}

\setmainfont{Times New Roman}
\setmonofont{Courier New}

\begin{document}
\begin{minted}{python}
x = [x ]
\end{minted}
\end{document}

Expected behavior

x = [x ]

PDF file

min_example.pdf

Problem created in the new version of bidi with tikz!

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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

\documentclass{article}
\usepackage{tikz} 
\usepackage[RTLdocument]{bidi} 

\begin{document}
test
\begin{tikzpicture}[rounded corners,ultra thick]
\shade[ball color=green] (0,0) circle (1cm);
\end{tikzpicture}
\end{document}

Expected behavior

Log and PDF files

tikz_bidi.log
tikz_bidi.pdf

Problem created in the new version of bidi with AddToHook!

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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

\documentclass{article}
\usepackage{graphicx}
\usepackage{lipsum}

\AddToHook{shipout/background}{%
\put (0in,-\paperheight){\includegraphics[width=\paperwidth,height=\paperheight]{example-image}}%
}

\usepackage[RTLdocument]{bidi} 

\begin{document}
\lipsum[1-5]
\end{document}

Expected behavior

Log and PDF files

AddToHook_bidi.pdf
AddToHook_bidi.log

The problem of formula parentheses in bidi

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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

\documentclass{article}

\usepackage{amsmath} 
\usepackage{fontspec}
\setmainfont[Script=Arabic]{Yas} % error --> Script=Persian

\usepackage[RTLdocument]{bidi}

\begin{document}
این فقط یک آزمایش است.
\begin{equation}
\sum_{i=1}^n i=?
\end{equation}
تست
\begin{align}
ax+by&=p\\
cx+dy&=q
\end{align}

\end{document}

Expected behavior

Log and PDF files

exam_RTL_bidi.pdf
exam_RTL_bidi.log

Problem with longtable and caption packages in presence of bidi

Brief outline of the issue

There is a problem (= LT word is printing at beginning of the caption) when I use the longtable and caption packages in presence of the bidi.

Note: If I load the caption package before the longtable, there is not any problem. It will be useful if you check 105--125 lines in longtable-xetex-bidi.def.

Check/indicate

Minimal example showing the issue

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


\documentclass{article}
\usepackage{longtable}
\usepackage{caption}
\usepackage{bidi}
\begin{document}

\begin{longtable}{c}
	\caption{Text}\\
	1
\end{longtable}

\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.