Giter Site home page Giter Site logo

persiantex / bidi Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 0.0 2.33 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 bidi bidirectional bidirectional-typesetting right-to-left left-to-right xetex plain-tex

bidi's People

Contributors

vafakhalighi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

bidi's Issues

Problem in computeautoilg and extrafootnotefeatures


When I use computeautoilg and extrafootnotefeatures at the same time, the output is wrong.

Brief outline of the issue

Wrong in number of columns and place of footnotes

Check/indicate

Minimal example showing the issue

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

\documentclass[a4paper,12pt]{article}
\usepackage[computeautoilg=on,%
extrafootnotefeatures=on%
]{xepersian}
\settextfont{Amiri} % This font has been installed with TeX Live.
\fivecolumnfootnotes
\begin{document}
	\LTRfootnote{footnote}
	\LTRfootnote{footnote}
	\LTRfootnote{footnote}
	\LTRfootnote{footnote}
	\LTRfootnote{footnote}
	\LTRfootnote{footnote}
\end{document}

Expected behavior

Log and PDF files

Test.log
Test.pdf

bibitem.pdf in runtime?

Vafa - re the latest bidi update, if you need bibitem.pdf in the runtime (tex/xelatex vs. doc/xelatex), please rename it to bidi-bibitem.pdf or similar. The name is too generic otherwise. For now I refrained from making the update in TeX Live. --thanks, karl.

pdfencryptsetup


The password doesn't work when more than two letters are used

Check/indicate

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

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{xepersian}
\settextfont{Amiri}
\pdfencryptsetup{%
userpassword={123}%
}
\begin{document}
$ \ldots $
\end{document}

Expected behavior

I expect the password to be three-letter and more

Log and PDF files

Test.log
Test.pdf

The use of include is not written in the custom full banner section of the packages!

main.tex:

\documentclass{report}

\usepackage{xepersian}
\settextfont{Yas}

\begin{document}
استفاده از include در قسمت custom  فول بنیر بسته‌ها نوشته نمی‌شوند!
\include{chap1}
% با input مشکلی ندارد.
%\input{chap1}
  
\end{document} 

file chap1.tex

\chapter{عنوان}
متن

or main2.tex

\documentclass{report}

\usepackage{bidi} 

\begin{document}
The use of include is not written in the custom full banner section of the packages!

\include{chap1}
  
\end{document}

Prevent “helpful” redefinitions


Provide check to allow document classes to declare themselves bidi-aware

There should be a way for a document class to indicate to bidi that they do not need bidi to redefine things for R-L support. This often results in unexpected behavior, as indicated in the tex.se links below. Perhaps the most egregious is that a document class that builds on any of the common document classes might see its formatting overwritten because of, e.g., a few passages of Hebrew, Arabic or Persian that appear in the document.

Check/indicate

  • [x ] 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
  • Links to <qa.parsilatex.com> discussion if appropriate

https://tex.stackexchange.com/questions/596977/best-practice-for-dealing-with-bidis-redefinitions-for-class-authors
https://tex.stackexchange.com/questions/602037/titlesec-package-not-suppressing-chapter-number-from-section-in-xelatex

Minimal example

does not apply, exactly, but here's an minimal version of a document class that might find itself affected:

\LoadClass{book}
\renewcommand{\thesection}{\arabic{section}}

Expected behavior

\thesection should not be modified by bidi. Perhaps by doing something like

\providecommand{\@bidiawareclass}{}

and then having bidi do a check with

\ifdef\@bidiawareclass
\else
  all the redefinitions for assorted classes go here
\fi

or alternatively, using some mechanism like etoolbox's \patchcmd and/or the newer LaTeX hooks would be a more robust way of effecting changes without necessarily damaging existing document classes. If you're open to it, I'd be willing to do a proper PR for some of that code.

Incorrect result multicols in RTL context


Brief outline of the issue

I have version 1.9b of multicol package, bidi fail with this simple example

Check/indicate

Minimal example showing the issue

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

\documentclass{article}
\usepackage{multicol}
\usepackage{lipsum}
\usepackage[rldocument]{bidi}

\setlength\columnseprule{0.4pt}

\begin{document}


\begin{multicols}{2}
\lipsum
\end{multicols}

\end{document}

Log and PDF files

image1.log
image1.pdf

Bidi clash with scrbook (TOC)


Brief outline of the issue

there seems to be a clash with scrbook (and maybo other classes):

When activating the bidi package, the chapter formatting in TOC is lost and cannot be recovered. Can this be fixed or is there a quick workaround?

Check/indicate

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

Minimal example showing the issue

\documentclass{scrbook}
%\usepackage{bidi} % <-- uncomment to see bidi/scrbook clash

\begin{document}

\tableofcontents

\chapter{Chapter A}
%This is typeset by \textsf{bidi} package, \bidiversion, \bididate
\section{Section B}
\chapter{Chapter C}
\section{Section D}

\end{document}

Expected behavior

Log and PDF files

RTL text with bidi, manyfoot, and longtable

Dear Vafa Khalighi, Dear Ladies and Gentlemen,

After some recent update of LaTeX, unfortunately I do not know which one, I discovered that my files with RTL script (Arabic) which are using manyfoot and longtable do not compile any more. The Persian Tex Group had provided me in May 2013 with a special code that made it possible to use longtable and manyfoot.
I would like to ask you, please, if there is a possibility to make this work again. A minimal example with the needed features and the special code of the Persian Tex Group is attached. It compiles, but if the longtable in the document is commented in the file does not compile any more.
With best wishes and best regards,
Jens Bakker

\documentclass[11pt]{article}

\usepackage[driver=xetex,a4paper,twoside]{geometry}
\geometry{textwidth=130mm}
\geometry{outer=50mm,marginparsep=15mm,marginparwidth=25mm}
\geometry{headsep=15mm,headheight=20mm,footnotesep=7mm}

\usepackage{umoline}
\setlength\OverlineHeight{+1\baselineskip}

\usepackage{marginnote}

\usepackage{fancyhdr}
\pagestyle{fancy}
%\setlength\headheight{16.2pt}
%\renewcommand\headrulewidth{0pt}

\usepackage[para]{manyfoot}
\DeclareNewFootnote[para]{A}
\DeclareNewFootnote[para]{B}[alph]

\usepackage{multicol}

\usepackage{longtable}
\usepackage{array}
\usepackage{lipsum}%the use of this package was proposed by Persian TeX Group 01st May 2013 for the use with longtable

\usepackage{setspace}

\usepackage{addlines}

\usepackage[babelshorthands]{polyglossia}

%\usepackage{bidi-longtable}

\usepackage{bidipoem}

\usepackage[xetex]{hyperref}

\setmainlanguage{arabic}
\setmainfont[Script=Arabic,Scale=1.3]{Scheherazade}

\newfontfamily\hashiyah[Script=Arabic,Scale=1.1]{Amiri}
\newcommand{\حا}{\hashiyah}

\setotherlanguage[spelling=old,babelshorthands=true]{german}
\setotherlanguage{french}
\setotherlanguage{english}
\setotherlanguage{farsi}

\newfontfamily\arabicfont[Script=Arabic,Scale=1.4]{Scheherazade}
\newfontfamily\germanfont[Mapping=tex-text,Renderer=ICU]{Charis SIL}
\newfontfamily\frenchfont[Renderer=ICU]{Charis SIL}
\newfontfamily\englishfont[Renderer=ICU]{Charis SIL}
\newfontfamily\farsifont[Script=Arabic,Scale=1.4]{Scheherazade}

\let\arabicfonttt\ttfamily %proposed by salim bou on stackexchange on wednesday 17Aug2016 to solve the problem that polyglossia does not work with hyperref if the main language is rtl

%\makeatletter@Latintrue\makeatother
%proposed by Ulrike Fischer on 3June2016 on stackexchange http://tex.stackexchange.com/questions/312874/polyglossia-or-bidi-bug-d-gets-inverted-to-d/312881#312881, seen 16Aug2016, to solve the problem with inverted dot after number, it solves also the problem of inverted dates

\usepackage{perpage}%this command has to be placed after the other package commands

\MakePerPage{footnoteA}
\MakePerPage{footnoteB}

\makeatletter
\renewcommand@makefnmark{\mbox{\textsuperscript{\normalfont(@thefnmark)}}}
%to put brackets around the footnotemarks
%the following code was developed by Persian TeX Group 01st May 2013 to enable the use of manyfoot footnotes in longtable
\def\LT@startpbox#1{%
\bgroup
\let@footnotetext\LT@p@ftntext
\let@LTRfootnotetext\LT@p@LTRftntext
\let@RTLfootnotetext\LT@p@RTLftntext
\let\MFL@fnoteplain\LT@p@MFL@fnoteplain
\let\MFL@fnotepara\LT@p@MFL@fnotepara
\setlength\hsize{#1}%
@arrayparboxrestore
\vrule @height \ht@arstrutbox @width \z@}
\def\LT@p@MFL@fnoteplain#1#2#3{%
\edef@tempa{\the\LT@p@ftn\noexpand\footnotetextA[\the\c@footnoteA]}%
\global\LT@p@ftn\expandafter{@tempa{#3}}}%
\def\LT@p@MFL@fnotepara#1#2#3{%
\edef@tempa{\the\LT@p@ftn\noexpand\footnotetextB[\the\c@footnoteB]}%
\global\LT@p@ftn\expandafter{@tempa{#3}}}%
\makeatother

\textwidthfootnoterule

%\setlength{\evensidemargin}{22pt}
%\setlength{\oddsidemargin}{50pt}

\newcommand{\ض}{\char"200D}%ZeroWidthJoiner for abreviations
\newcommand{\ف}{,}
\newcommand{\ص}{~}
\newcommand{\ق}{\char"200C}%ZeroWidthNonJoiner, for example for Persian
\newcommand{\ه}{\char"0654}%ArabicHamzaAbove, for example to write ha’ with hamzah above
\newcommand{\قي}{\char"FD3F}%right bracket for citations from the Coran
\newcommand{\قش}{\char"FD3E}%left bracket for citations from the Coran
\newcommand{\ضرب}{\char"00D7}%multiplication sign
\newcommand{\وص}{ٱ}
\newcommand{\اص}{ٰ}
\newcommand{\لب}{\linebreak}
\newcommand{\دف}{\dotfill}
\newcommand{\سف}{\Overline}
\newcommand{
\رفع
}[1]{\raisebox{0.7ex}{#1}}

\newcommand{

}[1]{\marginpar{\large\raggedright #1}}

\newcommand{
\مص
}[1]{\marginpar{\small\raggedright #1}}

\newcommand{
\فن
}[1]{\footnoteA{\hspace{1ex}#1}}

\newcommand{
\فا
}[3]{\FootnotemarkA{#1}\FootnotetextA{#2}{\hspace{1ex}#3}}
\newcommand{
\فما
}{\footnotemarkA}
\newcommand{
\فتا
}[1]{\footnotetextA{\hspace{1ex}#1}}
\newcommand{
\فام
}[1]{\FootnotemarkA{#1}}
\newcommand{
\فات
}[2]{\FootnotetextA{#1}{\hspace{1ex}#2}}
\newcommand{
\فب
}[1]{\footnoteB{\hspace{1ex}#1}}
\newcommand{
\فمب
}{\footnotemarkB}
\newcommand{
\فتب
}[1]{\footnotetextB{\hspace{1ex}#1}}

\newcommand{
\فبم
}[1]{\FootnotemarkB{#1}}
\newcommand{
\فبت
}[2]{\FootnotetextB{#1}{\hspace{1ex}#2}}

\newcommand{
\هف
}{\hfill}
\newcommand{
\سج
}{\newline}
\newcommand{\شف}[1]{\parbox{0.375\textwidth}{#1}}
\newcommand{\أف}{\hspace{2em}}
\newcommand{\بف}{\hspace{1em}}

\newcommand{\من}[1]{\marginnote{#1}}

\sloppy

\setlength{\parskip}{0ex plus 0ex minus 0ex}

\begin{document}

\fancyhead{}
\fancyhead[CE]{\footnotesize
نسخة اختبارية
\vspace{3pt}}
\fancyhead[RE]{\thepage\vspace{3pt}}
\fancyhead[LO]{\thepage\vspace{3pt}}
\fancyhead[CO]{\footnotesize
نسخة اختبارية
\vspace{3pt}}
\fancyfoot{}

\begin{spacing}{1.4}

%\thispagestyle{empty}

كلمات\فا{١/٢٤}{١/٢٤}{ملاحظة}
%\begin{longtable}[r]{p{0.7\textwidth}p{0.3\textwidth}}
%كلمات\فا{٢/٢٤}{٢/٢٤}{تعليق} & كلمات\
%\end{longtable}

\end{spacing}
\end{document}

Redefining \scr@dte@tocline causes failure with xetex


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?
  • Issue tracker has been searched for similar issues?
  • Links to <tex.stackexchange.com> discussion if appropriate
  • Links to <qa.parsilatex.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.

Log and PDF files

Page dimension issue with wallpaper package


Brief outline of the issue

Page dimensions are off with wallpaper package and bidi. See MWE:

Check/indicate

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

Minimal example showing the issue

% !TeX TS-program = xelatex
\documentclass[a4paper]{book}%
\usepackage{wallpaper}
\usepackage{polyglossia}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}
\setdefaultlanguage{arabic}
\begin{document}
test
\ThisCenterWallPaper{1}{hya.png}
\end{document}

with example image from here.

Expected behavior

Log and PDF files

Right aligned align* environment inside minipage


Brief outline of the issue

If the align* environment is used inside minipage with [t], then the align* content is right aligned.

Check/indicate

Minimal example showing the issue

\documentclass{article}
\usepackage{amsmath}
\usepackage{xepersian}
\settextfont[Scale=1]{Yas}
\begin{document}
\begin{minipage}[t]{\textwidth}
\begin{align*}
4
\end{align*}
\end{minipage}
\end{document}

Expected behavior

The align* content should be centered.

Log and PDF files

LTRthanks undefined error


Brief outline of the issue

I am attempted to compile a document with the biditufte-book document class and receive the following error.

`("C:\Program Files\MiKTeX 2.9\tex\xelatex\bidi\bidituftetitle.sty"))

! LaTeX Error: \LTRthanks undefined.`

A smaller MWE of the same class does not produce this error. The command \LTRthanks is not present within the document.

Check/indicate

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

Minimal example showing the issue

% !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}

  % Demonstration of issue here
  
\end{document}

Expected behavior

Log and PDF files

XePersian incompatibility with animate and media9 packages


Brief outline of the issue

When I try to use media9 or animate packages alongside xepersian, I get this error:
Undefined control sequence. \end{document}.

Check/indicate

Minimal example showing the issue

\documentclass{standalone}
\usepackage{animate}
\usepackage{graphicx}
\usepackage{xepersian}
\settextfont{Arial}
\begin{document}
    \animategraphics[loop,controls,height=500pt]{2}{frame-}{1}{4}
\end{document}

Expected behavior

Log and PDF files

document.log

Hang footnote format


Brief outline of the feature request

Implement hang format for footnotes.

Check/indicate

Minimal example

\documentclass[10pt, oneside]{report}

\usepackage[extrafootnotefeatures]{xepersian}

\twocolumnfootnotes

\settextfont[Scale=1.2]{IRNazli}

\begin{document}

متن%
\LTRfootnote{this very very very very very very very long text explains}
	
متن%
\LTRfootnote{this very very very very very very very long text explains}
	
متن%
\LTRfootnote{this very very very very very very very long text explains}
	
متن%
\LTRfootnote{this very very very very very very very long text explains}

\end{document}

Expected behavior

The footnotes should have hanging format.

Incorrect order for side by side figures/ tables in list of figures / list of tables with RTL document

Brief outline of the issue

Order of figures (tables) appears in reverse order for side by side figures (tables) in LoF and LoT

Check/indicate

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{report} 
\usepackage{caption} 
\usepackage{fontspec} 
\usepackage[rldocument] {bidi}
\setmainfont[Script=Arabic] {Amiri}

\begin{document} 

\listoffigures
\begin{figure} 
\begin{minipage} {.48\textwidth} 
\centering
\rule{4cm} {4cm} 
\captionof{figure} {right} 
\end{minipage} 
\hfill
\begin{minipage} {.48\textwidth} 
\centering
\rule{4cm} {4cm} 
\captionof{figure} {left} 
\end{minipage} 
\end{figure} 

\end{document}

Contents of LOF file

\contentsline {figure}{\numberline {2}{\ignorespaces left\relax }}{1}%
\contentsline {figure}{\numberline {1}{\ignorespaces right\relax }}{1}%

If we add \beginL at the begenning of figure environment pictures inside figure env appears from left to right and order in LoF is correct.

Log and PDF files

test.log
test.pdf

Feature Request on Bidipoem Package


Brief outline of the feature request

I propose an option which will adjust the length of some consecutive poem environments automatically to the greatest length.

Check/indicate

Minimal example

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


\documentclass[b5paper,11pt]{article}

  % Any packages other than the bidi package must be loaded here
\usepackage[left=2.2cm,right=2.2cm,top=3cm]{geometry}
\usepackage[svgnames]{xcolor}
\usepackage{tcolorbox}
\usepackage[doublespacing]{setspace}

  % The bidi package must be loaded as the last package
\usepackage[%
    % Any bidi package option goes here
\usepackage{bidipoem}
\usepackage{xepersian}
  % Any preamble code goes here
  \settextfont{Yas}

%%%%%%%%%% ColorBox %%%%%%%%%%
\newtcolorbox[auto counter
, use counter=section
, list type=section
, list inside=toc]{sectionbox}[1]{colback=black!10!white, colframe=MidnightBlue,boxrule=0.5pt,fonttitle=\bfseries, title={
		% 		\thetcbcounter
		\ #1}, list entry={
		\thetcbcounter
		\quad
		#1}}

\newcommand{\BCF}[2]{\begin{sectionbox}{#1} #2 
\end{sectionbox}}
%%%%%%%%%% ColorBox %%%%%%%%%%


\newcommand{\BT}[1]{
\fontsize{12}{12}\selectfont
	\begin{traditionalpoem} #1 \end{traditionalpoem} }

\renewcommand\poemcolsepskip{1cm}
\begin{document}

  % Demonstration of the feature request here
  	\BCF{شعر‌های بخش اول}{
		\BT{
			خبری است نورسیده تو مگر خبر نداری‌&
			جگر حسود خون شد تو مگر جگر نداری\\
			قمری است رونموده پَرِ نور برگشوده&
			دل و چشم وام بستان ز کسی اگر نداری\\
			عجب از کمانِ پنهان، شب و روز تیر پران&
			بسپار جان به تیرش چه کنی سپر نداری\\
			مسِ هستی‌ات چو موسی نه ز کیمیاش زر شد&
			چه غم است اگر چو قارون به جوال زر نداری\\
			به درونِ توست مصری که تویی شکرستانش&
			چه غم است اگر ز بیرون مدد شکر نداری\\
		
}}
فرض کنید که شخصی هفتاد ساله، از شاگرداول بودن کلاس چهارم ابتدایی خود حرف می‌زند، چرا؟ برای آن‌که نمی‌گذارد که این خبر در او زنده شود. زمان حال، موقعِ زنده شدن آن خبر است و لازم نیست که ما برگردیم و از گذشته صحبت کنیم؛ زیرا خبر الآن دارد بروز می‌کند.
مولانا دارد می‌گوید مقاومت نکن:
\BT{
	خبری است نورسیده تو مگر خبر نداری&
	جگر حسود خون شد تو مگر جگر نداری\\
}
حتماً تو هم جگر داری. تو هم زنده شو و بگذار تا جگر حسادت، جگر و منِ مقایسه‌ات در درون این خبر ذوب شود و از بین برود.
\BT{
	قمری است رونموده پَرِ نور برگشوده&
	دل و چشم وام بستان ز کسی اگر نداری}
یک ماه است که خودش را نشان داده و رو نموده است. 
	\subsection{شعر‌های زیر‌بخش اول}
		\BT{
			روی تو کس ندید و هزارت رقیب هست&
			در غنچه‌ای هنوز و صدت عندلیب هست\\
			هرچند دورم از تو که دور از تو کس مباد&
			لیکن امید وصل توام عن‌قریب هست\\
			گر آمدم به کوی تو چندان غریب نیست&
			چون من درین دیار فراوان غریب هست\\
			عاشق که شد که یار به حالش نظر نکرد&
			ای خواجه درد نیست وگرنه طبیب هست\\
			در عشق خانقاه و خرابات فرق نیست&
			هر جا که هست پرتو روی حبیب هست\\
			آنجا که کار صومعه را جلوه می‌دهند&
			ناقوسِ دیر و راهب و نام صلیب هست\\
				}
			
			
	\subsection{شعر‌های زیر‌بخش دوم}

\BT{
	ای در طواف ماه تو ماه و سپهر مشتری&
	ای آمده در چرخ تو خورشید و چرخ چنبری\\
	یا ربّ منم جویان تو یا خود تویی جویان من&
	ای ننگ من تا من منم من دیگرم تو دیگری\\
	ای ما و من آویخته وی خون هر دو ریخته&
	چیزی دگر انگیخته نی آدمی و نی پری\\
	تا پا نباشد ز آنک پا ما را به خارستان برد&
	تا سر نباشد ز آنک سر کافر شود از دوسری\\
	آبی میان جو روان آبی لب جو بسته یخ&
	آن تیزرو این سست رو هین تیز رو تا نفسری\\
	خورشید گوید سنگ را زان تافتم بر سنگ تو&
	تا تو ز سنگی وارهی پا درنهی در گوهری\\
	خورشید عشق لم یزل زان تافته‌ست اندر دلت&
	کاول فزایی بندگی و آخر نمایی مهتری\\
	}


	\BCF{شعر‌های بخش دوم}{
	\BT{
		خبری است نورسیده تو مگر خبر نداری‌&
		جگر حسود خون شد تو مگر جگر نداری\\
		قمری است رونموده پَرِ نور برگشوده&
		دل و چشم وام بستان ز کسی اگر نداری\\
		عجب از کمانِ پنهان، شب و روز تیر پران&
		بسپار جان به تیرش چه کنی سپر نداری\\
		مسِ هستی‌ات چو موسی نه ز کیمیاش زر شد&
		چه غم است اگر چو قارون به جوال زر نداری\\
		
	}}
چون وقتی می‌گوییم زندگیِ من، ما از زندگی جدا می‌شویم و یک توهم و دید محدود در ذهنمان به‌وجود می‌آوریم و با همان زندگی می‌کنیم، با همان با انسان‌های دیگر و حتی با خودمان، برخورد می‌کنیم.
\BT{
	مسِ هستی‌ات چو موسی نه ز کیمیاش زر شد&
	چه غم است اگر چو قارون به جوال زر نداری}
مسِ هستی تو یعنی همان منِ ذهنی. مس در مقایسه با طلا است. در زمان‌های قدیم، کیمیاگری معمول بوده و کیمیاگران دنبال آن بودند که فلزات پست را به طلا تبدیل کنند.

	\subsection{شعر‌های زیر‌بخش اول}
	
\BT{
	گوید بلی فرمان برم جز در جمالت ننگرم&
جز بر خیالت نگذرم وز جان نمایم چاکری\\
گل باغ را گوید که من زان عرضه کردم رخت خود&
تا جمله رخت خویش را بفروشی و با ما خوری\\
آن کس کز این جا زر برد با دلبری دیگر خورد&
تو کژ نشین و راست گو آن از چه باشد از خری\\
آن آدمی باشد که او خر بدهد و عیسی خرد&
وین از خری باشد که تو عیسی دهی و خر خری\\
}
	

\end{document}

Expected behavior

It is desirable that all the consecutive poem environments including inter-poem texts and also poems over sections and subsections to be adjusted to the greatest length.

Footnote style on each page


Brief outline of the feature request

Implement a control sequence that lets the user to select several footnote styles such that
on each particular page a footnote style is used automatically depending on the number of footnotes on that page.

Check/indicate

Minimal example

\documentclass[a4paper,12pt]{article}
\usepackage[extrafootnotefeatures]{xepersian}
\settextfont{XB Zar}
\setlatintextfont{Times New Roman}
\begin{document}
\twocolumnfootnotes
این نوشته دارای پاورقی‌های شماره یک\LTRfootnote{footnote one}، شماره 
دو\LTRfootnote{footnote two} و شماره سه\LTRfootnote{footnote three} است.
\end{document}

Expected behavior

See outline.

Add bidi suport for beamer class


Brief outline of the feature request

Package bidi addapt many packages and classes for right to left writing and It does well. But why not with beamer? Are there obstacles to do so ( with xelatex)? It would be great if there a support of beamer with bidi.

Check/indicate

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

Minimal example

% !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}

  % Demonstration of the feature request here
  
\end{document}

Expected behavior

Footnotes on dedication page disappear when BIDI used anywhere in document


Brief outline of the issue

Just as the title says. Another KOMA/scrbook issue. See https://tex.stackexchange.com/questions/497786/bidi-package-causes-footnotes-not-to-appear-on-dedication-page for a test case.

Check/indicate

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

Minimal example showing the issue

% !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}

  % Demonstration of issue here
  
\end{document}

Expected behavior

Log and PDF files

bidi needs to be adapted to the next latex version

We just released a new development version of the next LaTeX version,
In this dev release we implemented a new hook system and extended the existing set of hooks.

Details can be found in the announcement:
https://www.latex-project.org/news/2020/07/22/latex-dev-2020-10-1b/

This changes break with bidi as biditools patches \document in an incompatible way.

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

gives when compiled with xelatex-dev and the format

  LaTeX2e <2020-10-01> pre-release-7 
! Extra \endgroup.
\document ->\endgroup 
                      \let \bidi@AtEndPreamble \@firstofone \bidi@endpreambl...
l.12 \begin{document}

Please adapt bidi so that is doesn't fail when the final release in October hits the streets.

The new hooks should allow bidi to add the needed code without patching \document. If you need help with the implementation or have questions please open an issue at the latex2e github.

Some suggestion about an implementation that allows the package to work with older and newer formats can be found here:
https://listserv.uni-heidelberg.de/cgi-bin/wa?A2=LATEX-L;22740d74.2007&S=

Ulrike Fischer, LaTeX team

Shifted frame with showframe package


Brief outline of the issue

When compiling this example: it becomes obvious that showframe does not recognize text area and margins correctly when
\setdefaultlanguage{arabic} is used.

This problem is not restricted to the showframe package but to packages using the information about the page layout in general, of course, for example the thumbs package.

Check/indicate

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

Minimal example showing the issue

% !TeX TS-program = xelatex
\documentclass{book}
\usepackage{xcolor}

\usepackage{polyglossia}
\setdefaultlanguage{arabic}
\newfontfamily\arabicfont[Script=Arabic]{Amiri}

\usepackage{showframe}
\begin{document}
A\newpage B\newpage C
\end{document}

Expected behavior

Log and PDF files

Issue in numbers with period after update


Brief outline of the issue

After some update (bidi,latex,xetex,...) I'm facing problem in numbers with . or - which is not happening previously, numbering direction is correct with maghrib form 0,1,2,...,9 but with mashriq form ٠,١,٢,٣,٤,٥,٦,٧,٨,٩ direction of numbering do not change with command (\setlatin - \setnonlatin)

I guess the problem come from this part (bidi) code do not work for mashriq form

Check/indicate

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

Minimal example showing the issue

% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{amsmath}
\usepackage{fontspec}
\usepackage{bidi}
\setmainfont[Script=Arabic]{Amiri}
\parindent=0pt

\begin{document}

\setRTL
\setnonlatin

\section{text}
\subsection{text text}
\subsection{text text}

1.23 % change direction with \setnonlatin - \setlatin 

١.٢٣ % do not change direction with \setnonlatin - \setlatin

\end{document}

Expected behavior

See outline.

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.