Giter VIP home page Giter VIP logo

xepersian's Introduction

The xepersian Package

The xepersian package provides a convenient interface for typesetting Persian and English documents with LaTeX, using the XeTeX engine.

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{xepersian}
\settextfont{<fontname>}
\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.

xepersian's People

Contributors

vafa-khalighi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xepersian's Issues

Title of example, definition and theorem is not Persian

Brief outline of the issue

Title of example, definition and theorem is not Persian

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\begin{document}
	
	\begin{frame}
	
		\begin{example}
			متن مثال
		\end{example}
		
		\begin{definition}
			متن تعریف
		\end{definition}
		
		\begin{theorem}
			متن قضیه
		\end{theorem}
		
	\end{frame}
	
\end{document}

Expected behavior

Titles must be Persian.

Log and PDF files

test.log
test.pdf

Incorrect placing itemize and enumerate environments items in beamer

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\title{بیمر}
\subtitle{برای آزمایش}
\author{\textsf{\XePersian} و \textsf{bidi}}

\begin{document}
	
	\begin{frame}
		\maketitle
	\end{frame}
	
	\begin{frame}
		متن آزمایشی
		\begin{itemize}
			\item
			مورد اول
			\item
			مورد دوم
			\begin{itemize}
				\item
				مورد اول از دوم
				\item
				مورد دوم از دوم
			\end{itemize}
		\end{itemize}
		\begin{enumerate}
			\item
			مورد اول
			\item
			مورد دوم
			\begin{enumerate}
				\item
				مورد اول از دوم
				\item
				مورد دوم از دوم
			\end{enumerate}
		\end{enumerate}
	\end{frame}
	
\end{document}

Expected behavior

Items must be in right of slides.

Log and PDF files

test.log
test.pdf

Support cuted package

Brief outline of the feature request

It will be good if the cuted package is also supported.

Check/indicate

Minimal example

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


\documentclass[twocolumn]{article}

\usepackage{lipsum}
\usepackage{cuted}

\usepackage{xepersian}
\settextfont{IRXLotus}

\begin{document}
	
	\lipsum[1-2]
	
	\begin{strip} % from cuted package
		\lipsum[4]
	\end{strip}
	
	\lipsum[5-7]
	
\end{document}

Expected behavior

test.log

Character problem zero-width joiner with xecolor in font XB Zar

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass{article}
\usepackage{xecolor}
\usepackage{xepersian}
\settextfont{XB Zar}[Scale=1.5]
\chardef\myzwj="200D % zero-width joiner
\newenvironment{mycoloredtext}{%
\XeTeXinterchartokenstate = 1
\newXeTeXintercharclass \mycharclassi
\newXeTeXintercharclass \mycharclassii
\newXeTeXintercharclass \mycharclassiii
\XeTeXcharclass "0628 \mycharclassi 
\XeTeXcharclass "0627 \mycharclassii
\XeTeXcharclass "0631 \mycharclassiii
\XeTeXinterchartoks 255 \mycharclassi = {\xecolor{red}}
\XeTeXinterchartoks \mycharclassi \mycharclassii = {\myzwj\xecolor{blue}\myzwj}
\XeTeXinterchartoks \mycharclassii \mycharclassiii = {\xecolor{green}}
}{}
\begin{document}
\begin{mycoloredtext}
بار
\end{mycoloredtext}
\end{document}

Expected behavior

درود جناب وفا، حرف ب رنگ نشده و به حرف ا نچسبیده. در ضمن در فونت سری IR مشکلی در چسبیده شدن حروف نداره!
به نظر میرسه مشکل از xetex باشه

Log and PDF files

test_xecolor_char_TL2022.log

test_xecolor_char_TL2022.pdf

Incorrect direction and position for text after list environments.

Brief outline of the issue

The right-to-left text after list environment is left-to-right and is not centering.

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\begin{document}
	
	\begin{frame}
		متن آزمایشی
		\begin{itemize}
			\item
			مورد اول
			\item
			مورد دوم
		\end{itemize}
		متن از راست به چپ!
		\begin{enumerate}
			\item
			مورد اول
			\item
			مورد دوم
		\end{enumerate}
		متن از راست به چپ!
	\end{frame}
	
\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

The footnotes are not shown

Brief outline of the issue

The footnotes are not shown.

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\begin{document}
	
	\begin{frame}
		\footnote{فارسی}%
		\LTRfootnote{Latin}%
		\RTLfootnote{فارسی دیگر}
	\end{frame}
	
\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

Getting started with this package

Brief outline of the question

I just started using this package in Overleaf and I can use the commands \textit of \textbf. How can I implement and use these commands in persian document with XePersian?

Thanks,

Check/indicate

Minimal example

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


\documentclass{article}            % or some other class

  % Any packages other than the xepersian package must be loaded here

  % The xepersian package must be loaded as the last package
\usepackage[%
    % Any xepersian package option goes here
]{xepersian}
\settextfont{IRXLotus}

  % Any preamble code goes here
  
\begin{document}

  % Demonstration of question here
  
\end{document}

Expected behavior

Log and PDF files

problem-with-parenthesis-of-equation-label in xepersian v23.4

Brief outline of the issue

I have a problem with the parenthesis of the equation cross-reference. I have this problem even with old files well behaved in the previous versions of xepersian. The problem also extends to the label of the equation when the amsmath package is included.

Check/indicate

Minimal example showing the issue

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


\documentclass{article}            % or some other class

\usepackage[]{xepersian}
\settextfont{XB Niloofar}
\setmathdigitfont[Scale=1.1]{Yas}
  
\begin{document}

این متن برای بررسی کارکرد درست ارجاع به روابط نوشته شده است~(\ref{eq}) ببینید [مثال دیگر~(\ref{eq})].
\begin{equation}\label{eq}
a = 20.
\end{equation}
  
\end{document}

Expected behavior

این متن برای بررسی کارکرد درست ارجاع به روابط نوشته شده است (۱) ببینید [مثال دیگر (۱)].
a = ۲۰. (۱)

Log and PDF files

main2.pdf

main2.log

how to run xelatex --shell-escape

Brief outline of the question

Check/indicate

Minimal example

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


\documentclass{article}            % or some other class

  % Any packages other than the xepersian package must be loaded here

  % The xepersian package must be loaded as the last package
\usepackage[%
    % Any xepersian package option goes here
]{xepersian}
\settextfont{IRXLotus}

  % Any preamble code goes here
  
\begin{document}

  % Demonstration of question here
  
\end{document}

Expected behavior

Log and PDF files

Disappearing Persian text in beamer

Brief outline of the issue

Persian text not showing.

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

%\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\title{بیمر}
\subtitle{برای آزمایش}
\author{\textsf{\XePersian} و \textsf{bidi}}

\begin{document}
	
	\begin{frame}
		\maketitle
	\end{frame}
	
	\begin{frame}
		مقداری متن آزمایشی
	\end{frame}
	
\end{document}

Expected behavior

Persian text must been shown.

Log and PDF files

test.log
test.pdf

extrafootnotefeatures disables the footnotebackref package feature

Brief outline of the issue

The footnotebackref package works properly as long as the extrafootnotefeatures option is not activated; But when that option is enabled, the footer links at the bottom of the page are disabled.
A number of commands have been provided to fix the undefined control sequence BackrefFootnoteTag error so that the LTRfootnote command can be used.

Check/indicate

Minimal example showing the issue

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

\documentclass[12pt]{article}

\usepackage{footnotebackref}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% for using LTRfootnote
% https://tex.stackexchange.com/questions/78423
\makeatletter
\LetLtxMacro{\BHFN@Old@footnotemark}{\@footnotemark}
\renewcommand*{\@footnotemark}{%
	\refstepcounter{BackrefHyperFootnoteCounter}%
	\xdef\BackrefFootnoteTag{bhfn:\theBackrefHyperFootnoteCounter}%
	\label{\BackrefFootnoteTag}%
	\BHFN@Old@footnotemark
}
\makeatother
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\usepackage[%
	extrafootnotefeatures=off % enable this option
]{xepersian}
\settextfont{IRXLotus}

\setlength{\textheight}{3cm}

\begin{document}
	بازگشت%
	\LTRfootnote{return}
	 به پاورقی با آپشن
	\lr{extrafootnotefeatures}\footnote{ویژگی}
	کار نمی‌کند.
\end{document}

Expected behavior

I expect to works the footer links at the bottom of the page when extrafootnotefeatures option is on.

Log and PDF files

test.log
test.pdf

Incorrect indentation in table of contents

The indentations in table of contents are mistake.

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\begin{document}
	
	\begin{frame}
		\tableofcontents
	\end{frame}
	
	\section{بخش}
	\subsection{زیربخش}
	\subsubsection{زیرزیربخش}
	\begin{frame}
	 متن آزمایشی
	\end{frame}
	
\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

Extra space in table of contents with some tocloft package commands

Brief outline of the issue

I had already made changes to the table of contents with a series of tocloft batch commands, and there was no problem with older versions of the xepersian package; But in version 24.1, extra white space is added.

Check/indicate

Minimal example showing the issue

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


\documentclass{report}            % or some other class

  % Any packages other than the xepersian package must be loaded here
\usepackage{tocloft}
\renewcommand{\cftchappresnum}{\chaptername~}
\renewcommand{\cftchapaftersnum}{:}
\newlength{\chaplen}
\settowidth{\chaplen}{\chaptername~\cftchapaftersnum}
\addtolength{\cftchapnumwidth}{\chaplen}
\usepackage{lipsum}
  % The xepersian package must be loaded as the last package
\usepackage[%
    % Any xepersian package option goes here
]{xepersian}
\settextfont{IRXLotus}

  % Any preamble code goes here
  
\begin{document}

	\tableofcontents
	\chapter{One}
	\lipsum[1]
	\chapter{Two}
	\lipsum[2]
  
\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

Typo in user documentation (xepersian-doc.pdf)

I hereby report the typos & corrections that I run into when reading the user documentation provided at XePersian's CTAN repository.

Page 3, 1.1 Important Notes, paragraph 3

A verb missing in the sentence:
In previous versions (≤ 1.0.3) of XePersian, a thesis class provided for typesetting
thesis.

Perhaps, it was intended to be:
In previous versions (≤ 1.0.3) of XePersian, a thesis class was/is provided for typesetting
thesis.

Kashida problem with most of fonts (except IR series)

Brief outline of the issue

The letters are separated when Kashida is enable.

Check/indicate

Minimal example showing the issue

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

\documentclass{article}

\usepackage[Kashida]{xepersian}
 % problem with series: XB, HM FTX 3.8, HM SX2 3.8, Yas and so on...
\settextfont{XB Zar}

\begin{document}
این یک متن آزمایشی است.
\end{document}

Expected behavior

Log and PDF files

test.log
test.pdf

The symbol of items of list environments are out of block environments like block, example and so on.

Brief outline of the issue

Check/indicate

Minimal example showing the issue

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


\documentclass{beamer}

\usefonttheme{serif} % this is needed for showing persian alphabet
\usepackage{xepersian}
\settextfont{IRXLotus}
\setdigitfont{IRXLotus}

\begin{document}

	\begin{frame}
	 	\begin{block}{عنوان}
	 		 متن آزمایشی
	 		 \begin{itemize}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{itemize}
	 		 \begin{enumerate}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{enumerate}
	 	\end{block}
	\end{frame}

	\begin{frame}
	 	\begin{example}
	 		 متن آزمایشی
	 		 \begin{itemize}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{itemize}
	 		 \begin{enumerate}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{enumerate}
	 	\end{example}
	\end{frame}

	\begin{frame}
	 	\begin{definition}
	 		 متن آزمایشی
	 		 \begin{itemize}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{itemize}
	 		 \begin{enumerate}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{enumerate}
	 	\end{definition}
	\end{frame}

	\begin{frame}
	 	\begin{theorem}
	 		 متن آزمایشی
	 		 \begin{itemize}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{itemize}
	 		 \begin{enumerate}
				\item
				نماید آیتم، از راست بیرون رفته است.
			\end{enumerate}
	 	\end{theorem}
	\end{frame}
	
\end{document}

Expected behavior

Log and PDF files

test.pdf
test.log

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.