persiantex / xepersian Goto Github PK
View Code? Open in Web Editor NEWPersian for LaTeX, using XeTeX
Home Page: https://ctan.org/pkg/xepersian
Persian for LaTeX, using XeTeX
Home Page: https://ctan.org/pkg/xepersian
When I use some themes such as Warsaw that has shadow rounded inner theme, the block texts direction and their boxes around the texts in the blocks are messed up; But there is no problem with other innertheme.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{beamer} % or some other class
\usetheme{Warsaw}
% 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}
\begin{frame}[t]{بلوکها در ستونها}
\begin{columns}[t]
\column{0.5\textwidth}
\begin{block}{Block 1}
متن مربوط به بلوک 1
\end{block}
\column{0.5\textwidth}
\begin{block}{Block 2}
متن مربوط به بلوک 2
\end{block}
\end{columns}
\end{frame}
\end{document}
The Awami Nastaliq font (also attached) requires the Graphite rendering engine to be displayed properly. The font commands provided by XePersian do not appear to allow this to be configured correctly. I am assuming this is not unique to Awami.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage[]{xepersian}
\settextfont[Renderer=Graphite]%
{AwamiNastaliq-Regular.ttf}
\newfontfamily\awami[Renderer=Graphite]%
{AwamiNastaliq-Regular.ttf}
\begin{document}
یک دو سه چهار پنخ شش هفت هشت نه ده
\awami
یک دو سه چهار پنخ شش هفت هشت نه ده
\end{document}
XePersian's settextfont
should behave the same as the corresponding fontspec command. However, it produces a warning that the font does not contain the requested Persian script, and does not render the Persian text correctly.
The issue appears to be with the explicit indication of a script---any script. When we add Script=Persian
, Script=Arabic
, or even Script=
to the newfontfamily
command, the results are identical to those of XePersian, and the text does not render correctly.
xepersian-graphite-awami.pdf
xepersian-graphite-awami.txt
AwamiNastaliq-2.000.zip
main code:
\documentclass{report}
\usepackage{xepersian}
\settextfont[Scale=1.2]{Yas}
\begin{document}
\begin{center}
\LRE{[a=b]}
\\
\LRE{[a=\lr{b}]}
\\
\LRE{\setlatin[a=\lr{b}]}
\\
\LRE{[a=\lr{b}c]}
\end{center}
\end{document}
output:
[a=b]
[a=b[
[a=b[
[a=bc]
Through a lot of trial and error, I seem to have found out that settextfont does not pass Ligatures=Rare (or RawFeature=+dlig) to fontspec when package class option Kashida is used.
Is this a bug or a feature ?
Upon further inspection, the issue is not related to package option Kashida per se, but with Kashida activation within text which disables ligatures as a side effect.
In the latter case, then the documentation should specify that using Kashida excludes using discretionary ligatures.
bidi
packagebidi
package issue tracker has been searched for similar issues?%%!TEX TS-program = xelatex
%!TEX encoding = UTF-8 Unicode
\documentclass[12pt,a4paper]{article}
\usepackage{polyglossia}
\setdefaultlanguage{persian}
\usepackage[Kashida]{xepersian}
\settextfont{Noto Sans Arabic}[Ligatures=Rare]
\begin{document}
\begin{latin}
With KashidaOn:
\end{latin}
\KashidaOn
فرجالله نیکنژاد.
\begin{latin}
With KashidaOff:
\end{latin}
\KashidaOff
فرجالله نیکنژاد.
\end{document}
Note: The source code does not contain the kasra that is shown on Github site (where ligatures are activated !!).
Same issue appears with other fonts such as Adobe Arabic.
The TeX--XeT algorithm reverses whatsits and as a result, the \special
pairs will be placed in the wrong order. For instance, color or links or any other thing which is achieved via driver is fundamentally broken in right to left mode.
For instance, the following minimal Plain TeX document illustrates the issue with color.
\TeXXeTstate=1
This is \beginR\special{color push rgb 1 0 0}RED COLOR\special{color pop}\endR{} as you can see.
\bye
As mentioned above, this is Engine issue. Peter was working towards fixing this (See this TeXLive commit and this one.
The bidi
package fixes this in a limited way; if the colored text only is on a single line then text will be colored correctly. However, if the colored text is more than a line (it breaks across several lines), then the resulting colored text is wrong.
This can be fixed in the macro level as the following example illustrates.
\documentclass{article}
\usepackage{xepersian}
\settextfont{Yas}
\makeatletter
\long\def\bidi@addto#1#2{\expandafter\def\expandafter#1\expandafter{#1#2}}
\bgroup \catcode`!=3 \catcode`?=3
\gdef\bidi@replacestrings#1#2{\long\def\bidi@replacestringsA##1#1##2!{%
\ifx!##2!\bidi@addto\bidi@tmpb{##1}\else\bidi@addto\bidi@tmpb{##1#2}\bidi@replacestringsA##2!\fi}%
\edef\bidi@tmpb{\expandafter}\expandafter\bidi@replacestringsA\bidi@tmpb?#1!%
\long\def\bidi@replacestringsA##1?{\def\bidi@tmpb{##1}}\expandafter\bidi@replacestringsA\bidi@tmpb
}
\egroup
\newbox\bidi@color@start@box \newbox\bidi@color@end@box
\setbox\bidi@color@start@box=\hbox{\special{color pop}}
\setbox\bidi@color@end@box=\hbox{\special{color push rgb 1 0 0}}%
\def\bidicolor#1{\def\bidi@tmpb{#1}\bidi@replacestrings{ }{\bidi@specialspace}%
{\copy\bidi@color@start@box\bidi@tmpb\copy\bidi@color@end@box}%
}
\def\bidi@specialspace{%
\discretionary{\copy\bidi@color@end@box}{\copy\bidi@color@start@box}{\kern\fontdimen2\font}%
\nobreak\hskip 0pt plus\fontdimen3\font minus\fontdimen4\font
}
\makeatother
\begin{document}
این یک متن معمولی است
\bidicolor{این متن با رنگ قرمز نوشته میشود که در یک سطر قرار میگیرد}
و این متن بعد آن است که به سطر بعد میرود و
\bidicolor{%
حالا یک متن رنگی مینویسیم که در چندین سطر قرار بگیرید تا کارایی رنگی کردن متن را ببینیم کنون ای خردمند وصف خرد بدین جایگه گفتن اندرخورد
کنون تا چه داری بیار از خرد که گوش نیوشنده زو برخورد
خرد بهتر از هر چه ایزد بداد ستایش خرد را به از راه داد
خرد رهنمای و خرد دلگشای خرد دست گیرد به هر دو سرای
ازو شادمانی وزویت غمیست وزویت فزونی وزویت کمیست
خرد تیره و مرد روشن روان نباشد همی شادمان یک زمان
چه گفت آن خردمند مرد خرد که دانا ز گفتار از برخور
}
و ادامه متن که با رنگ سیاه نوشته میشود همانطوری که میبینید هیچ مشکلی ندارد و رنگ چکه نمیکند.
\end{document}
The only disadvantage of this is that there is no hyphenation but that is rarely a problem since we do not really have hyphenation in right to left text.
Perhaps this approach can be extended to support any packages which uses \special
(e.g. color
, xcolor
, hyperref
, etc).
% !TeX TS-program = xelatex
\documentclass{beamer}
\setbeamertemplate{background canvas}[vertical shading][bottom=blue!50,top=blue!1]
\usepackage{xepersian}
\settextfont{Yas}
\title{background}
\author{M.Ahmadi}
\date{\today}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
\end{document}
output:
background-canvas-xepersian.log
background-canvas-xepersian.pdf
output Without xepersian:
background-canvas.log
In question parsilatex
Minimal code:
\PassOptionsToPackage{urlcolor=link-text,colorlinks=true,linkcolor=link-text,setpagesize=false,pdfpagemode=FullScreen}{hyperref}
\documentclass[12pt,oneside]{bidipresentation}
\usepackage{xcolor}
\usepackage{tikz}
\def\theTitle{آشنایی با نرمافزار حروفچینی لاتک و بستهٔ زیپرشین}
\def\theAuthor{محمود امینطوسی}
\def\theAuthorUrl{http://profs.hsu.ac.ir/mamintoosi}
\def\theCompany{دانشگاه حکیم سبزواری، دانشکده ریاضی و علوم کامپیوتر}
\def\theCompanyUrl{http://www.parsilatex.com}
\def\theDate{ مهر ۱۳۹۲}
\def\Logo{HSU-logo}
\usepackage{saahel}
\usepackage{xepersian}
\settextfont{Yas}
\title{\theTitle}
\author{\href{\theAuthorUrl}{\theAuthor}}
\date{\theDate}
\selectThemeColor{NavyBlue}
\linespread{2}
\pagestyle{pres}
\begin{document}
\setTextTL{\bfseries\theTitle}
\setTextBR{گروه پارسیلاتک \hfill \lr{$\qquad$ www.parsilatex.com} }
\setcounter{tocdepth}{1}
\begin{plainslide}
اسلاید اول
\end{plainslide}
\begin{plainslide}
اسلاید دوم
\end{plainslide}
\subsection{زیربخش}
\begin{plainslide}
اسلاید سوم
\end{plainslide}
\end{document}
If the class is written before the document:
\RequirePackage{tikz}
output:
با افزودن بسته تیکز قبل داکیومنت کلاس در تک لایو 2015 تا 2020 خروجی زیر هست.
exam.pdf
Dear Vafa
First I would like to thank you for your superb work that brings us the XePersian package!
After the recent update, the two macros of \DefaultMathsDigits and \PersianMathsDigits have stopped working. I encountered this issue with both MikTex and Tex Live on Windows platform. Here is a MWE:
\documentclass[a4paper,twoside,fleqn]{report}
\usepackage[a4paper]{geometry}
\usepackage{amsmath}
\usepackage{mathspec}
\usepackage{xepersian}
\settextfont{XB Zar}
\setlatintextfont{Times New Roman}
\setlength{\mathindent}{1cm}
\setmathdigitfont{XB Zar}
\DefaultMathsDigits
\newenvironment{parsimath}{\PersianMathsDigits}{}
\newgeometry{left=2.5cm,right=3cm,top=3cm,bottom=2.5cm}
\begin{document}
\begin{equation}
{P_{QN}} = 10\log \left( {\frac{{V_{LSB}^2}}{{12{f_s}}}} \right) = 20\log \left( {{V_{ref}}} \right) - 6.02N - 10.79 - 10\log \left( {{f_s}} \right)
\end{equation}
\begin{parsimath}
\begin{equation}
{P_{QN}} = 10\log \left( {\frac{{V_{LSB}^2}}{{12{f_s}}}} \right) = 20\log \left( {{V_{ref}}} \right) - 6.02N - 10.79 - 10\log \left( {{f_s}} \right)
\end{equation}
\end{parsimath}
\end{document}
The output: MWE.pdf
The comiler gives errors as "Undefined control sequence. \DefaultMathsDigits" and "Undefined control sequence. \PersianMathsDigits" while both equations are typeset via Persian digits, though the first one should be in English.
I appreciate your help on this matter.
tlmgr paper a4
.I should use [a4paper]
after documentclass
to solve this issue
But when I use xelatex
without including xepersian, there's no problem.
XeTeX, Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex 2020.8.13)
Incorrect typesetting (direction) in math environment with nicematrix package.
TeX Live: 2021 up to date (Mid-July)
nicematrix: version 5.18 2021/07/15
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass[12pt]{article}
\usepackage{nicematrix}
\usepackage{xepersian}
\settextfont{IRXLotus}
\begin{document}
\[
%\setLTR % enable this command for correct output!
\begin{NiceArray}{ccc}
1 & 2 & 3 \\
4 & 5 & 6
\end{NiceArray}
\]
\end{document}
1 2 3
4 5 6
Not:
3 2 1
6 5 4
I am using xepersian with hyperref and natbib (bibliograpgystyle: chicago-fa). The problem is this:
If a reference with two authors is cited in a way that the first author's namepositioned is at the end of one line and the second author's name at the beginning of the next line, the whole text in these two lines (instead of the names and the year) will be linked to the bib entry.
P.S. I am using the texlive distribution included in Debian Buster.
bidi
packagebidi
package issue tracker has been searched for similar issues?\documentclass[12pt,a4paper]{article}
\usepackage{natbib}
\usepackage[pdfusetitle]{hyperref}
\usepackage{xepersian}
\settextfont[
Script=Arabic,
ItalicFont=Nazli,
ItalicFeatures={FakeSlant=0.25},
]{Nazli}
\setlatintextfont{Liberation Serif}
\begin{document}
سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام
\cite{Staniforth2012Horizontal}
سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام سلام
\bibliographystyle{chicago-fa}
\bibliography{main}
\end{document}
main.bib
@Article{Staniforth2012Horizontal,
author = {Staniforth, Andrew and Thuburn, John},
title = {Horizontal grids for global weather and climate prediction models: a review},
journal = {Quarterly Journal of the Royal Meteorological Society},
year = {2012},
volume = {138},
number = {662},
pages = {1-26},
authorfa = { استنیفورث and توبرن },
doi = {10.1002/qj.958},
eprint = {https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1002/qj.958},
}
Margin display with xepersian and showframe is not correct.
xepersian
packagexepersian
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article} % Also report and book
\usepackage{showframe}
\usepackage{xepersian}
\settextfont{Amiri}
\begin{document}
سلام
\end{document}
Hi Vafa!
Different difficulties have been known for using Kashida options. With recent changes, many of them seems to be fixed.
It seems that recent unreleased commit a91d9bc will make some of the fixed problem reappear.
\documentclass{article}
\usepackage{bidipoem}
\usepackage[localise, Kashida]{xepersian}
\settextfont{XB Niloofar}
\begin{document}
\begin{traditionalpoem}
من آن مرغ سخندانم که در خاکم رود صورت&
هنوز آواز میآید به معنی از گلستانم
\end{traditionalpoem}
\end{document}
(Seen in v23.1, 2020/05/17)
(Seen after patching a91d9bc)
When the ocg-p package is used to create different PDF layers, the PDF layers are in the wrong order in the right to left mode.
bidi
packagebidi
package issue tracker has been searched for similar issues?\documentclass{article}
\usepackage{ocg-p}
\usepackage{xepersian}
\settextfont{Yas}
\begin{document}
پایتخت ایران کجاست؟
\begin{ocg}{result layer}{rela1}{0}
تهران
\end{ocg}
\end{document}
\documentclass[border=3mm]{standalone}
\usepackage{amsmath,tkz-fct}
\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}
\begin{document}
\begin{tikzpicture}[scale=2.5]
\tkzInit[xmin=-1,xmax=4,ymin=0,ymax=5]
\tkzGrid
\tkzAxeXY
\tkzFct[domain = -.5:4]{ 4*x-x**2+4/(x**2+1)**2}
\tkzFct[domain = -.5:4]{x-1+4/(x**2+1)**2}
\tkzDrawAreafg[color=green,domain = 1:4]
\tkzDrawAreafg[pattern=north west lines,domain = -.5:1]
\tkzRep
\tkzText(2.5,4.5){$C_f$}
\tkzText(2.5,1){$C_g$}
\end{tikzpicture}
\end{document}
output:
tkz-fct-xepersian-TL2020.log
output Without xepersian:
tkz-fct-TL2020.log
The horizontal lines produced by Kashida feature do not follow the color of the font.
Related to this parsilatex post.
%In the Name of God, Most Gracious, Most Merciful
\documentclass[11pt, a4paper]{book}
\usepackage{xecolor}
\usepackage[Kashida]{xepersian}
\settextfont[Scale=2]{IRNazanin}
\begin{document}
\def\sampletext{وی دهقان و دهقانزاده بود. او آغاز زندگی را در روزگار سامانیان و همزمان با جنبش استقلالخواهی و هویتطلبی در میان ایرانیان سپری کرد.}
\noindent
\sampletext
\\
{\xecolor{red} \sampletext}
\end{document}
As per the documentation, XePersian should be loaded last. However, loading the catchfilebetweentags package before XePersian causes a bunch of errors. Loading it after XePersian works, but with a warning.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{catchfilebetweentags}
\usepackage{xepersian}
\settextfont[ExternalLocation]{XB Niloofar.ttf}
\begin{document}
سلام
\end{document}
Compilation without errors or warnings.
xepersian-catchfilebetweentags.log
xepersian-catchfilebetweentags.pdf
Hi There,
I am trying to use XePersian to write Farsi documents. When compiling the source file, Texmaker
returns the error message "File xepersian-persiancal not found" . Inside the XePersian style file
I see the command \RequirePackage{xepersian-persiancal}. How can I get this package?
bidi
packagebidi
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 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}
\setmathdigitfont
Recently when I updated all packages (especially xepersian-hm), gives an error for \setmathdigitfont command.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{xepersian}
\settextfont{Amiri}
\setmathdigitfont{Amiri}
\begin{document}
Test
\end{document}
When LaTeX cannot fit all words neatly on one line of text, it pushes some words beyond the margins. Using XePersian, it is always the right-hand margin that is violated, regardless of text direction. With right-to-left text, I would expect text to extend beyond the left-hand margin instead.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{xepersian}
\settextfont[ExternalLocation, Scale=1.25]{XB Niloofar.ttf}
\begin{document}
\leftskip6em\rightskip\leftskip
نیما در سال ۱۲۷۶[۷] هجری شمسی در روستای یوش، از توابع بخش بلده شهرستان نور، بهدنیا آمد. پدرش، ابراهیمخان اِعظامالسلطنه، متعلق به خانوادهای قدیمی در مازندران بود و به کشاورزی و گلهداری مشغول بود.[۸] بنابر بسیاری از منابع و از جمله کتاب تاریخ خانواده اسفندیاری تألیف اسدالله اسفندیاری چاپ ۱۳۲۹،[۹] نیما یوشیج (علی اسفندیاری) و خاندان اسفندیاری از خاندانهای معروف ایران و نور استان مازندران در دوره قاجار و پهلوی است که نسب ایشان به شاخهای از اسپهبدان طبرستان موسوم به پادوسبانیان میرسد. پادوسبانیان سلسلهای ساسانیتبار بودند که از حدود سال ۴۰هجری تا دوران شاه عباس کبیر صفوی بر بخشهایی از طبرستان (بعداً مازندران) حکمرانی میکردند. علی اسفندیاری (نیما یوشیج) و محتشمالسلطنه از مشهورترین اعضای این خاندان هستند. در عصر قاجار و پهلوی، وزرا و نمایندگان مجلس و چهرههای سیاسی و علمی و هنرمندان متعددی از میان افراد این خانواده برخاستند.حتی پس از درگذشت حسن اسفندیاری (محتشم السلطنه) در سال ۱۳۲۳ شمسی که از صاحب منصبان مشهور و وزیر چند وزارتخانه بود، کتابی به عنوان زندگی حسن اسفندیاری به چاپ رسید. نیما یوشیج در آغاز کتاب نسب و تبار خاندانش را شرح می دهد[۱۰].نیما یوشیج در کتاب زندگی حسن اسفندیاری نسب و تبار خاندانش را به پادوسبانیان طبرستان میرساند[۱۱][۱۲]
% Text CC BY-SA 3.0 https://fa.wikipedia.org/wiki/نیما_یوشیج
\end{document}
Lines that do not fit within textwidth
are extended beyond the margins on the left side.
Using columns inside a xepersian
latin
environment, the columns are in the wrong order (i.e., the first column is on the right-hand side of the page). In some cases, adding \LTRdblcol
fixes this, but not always.
Specifically, when using makeidx
's \printindex
command, which prints a two-column index, in a latin
environment, the columns are in the wrong order. The same problem occurs when using a multicols
environment. In the case of makeidx
, this can be resolved by using bid
i's \LTRdblcol
--- but this should not be necessary. Furthermore, \LTRdblcol
does not fix the same issue in the multicols
environment.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{makeidx}
\usepackage{multicol}
\usepackage{xepersian}
\settextfont{IRXLotus}
\makeindex
\begin{document}
\begin{latin}
\index{a}
\index{b}
% \LTRdblcol
\printindex
\begin{multicols}{2}
First column
\vfill\columnbreak
Second column
\end{multicols}
\end{latin}
\end{document}
The first page should have an automatically generated two-column index, where the columns are populated left-to-right. The second page should have a two-column multicols environment, where the columns are populated left-to-right.
Instead, both are populated right-to-left. The \LTRdblcol
command only solves the index, not the multicols
environment.
It was indeed my expectation that any columns started in a latin
environment would default to LTR. Using a single global option works fine for my document, where I only need one and the same column order throughout. I can see how switching between different column orders within the same document may actually be really confusing, but a RTL column order with LTR text (and vice versa) is, too. Perhaps it's best to leave the choice to the user, but emphasise that this choice exists --- e.g. \begin{...}[LTRcols]
and \begin{...}[RTLcols]
as additional, optional arguments for the latin
and persian
environments.
کاربرد جمع مکسر (مانند موارد، مدارس، تفاسیر، جداول، و غیره) ویژهی زبان عربی است و برای فارسینویسی باید تا جایی که ممکن است واژههای عربی را با نشانه فارسی جمع ببندیم. بنابراین موردها، مدرسهها، تفسیرها، جدولها، کتابها، و غیره درستتر است. نتیجه این که کاربرد «فهرست جدولها» درستتر است.
من به کاربرد دستور
\renewcommand{\listtablename}{فهرست جدولها}
آگاه هستم؛ اما پیشنهاد میکنم این تغییر در بسته زیپرشین انجام شود.
باتشکر – فرشاد رسولی
Hi,
I write a simple tex file. When I enter the command \setmathdigitfont is see the following error:
_xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ...
\l_fontspec_font "#1\scan...
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{book}
\usepackage{xepersian}
\setlength{\textheight}{25cm}
\settextfont{Persian Modern}
%\setlatintextfont{Persian Modern}
\setmathdigitfont{Tahoma}
%\setmathsfdigitfont{Persian Modern}
%\setmathttdigitfont{Persian Modern}
\begin{document}
سلام 123456790
\[1023\]
$1234567890$
\end{document}
I have a table with a number of columns and rows in which the title row has both text and math. I'd like to make all of the titles appear in bold shape. Clearly, I can add \textbf or \mathbf, etc. to each of them. However, I'm looking for a nicer way of doing this, particularly for tables with many columns. Tabu package provides \rowfont command which works perfectly with \bfseries and \boldmath as it's font specification. It would be awesome to have a similar command in bidi / xepersian packages to make first row / column of tabular environment.
bidi
packagebidi
package issue tracker has been searched for similar issues?\documentclass{article}
\usepackage{amsmath}
\usepackage{bm,tabu,array}
\usepackage{xepersian}
\settextfont{Yas}
\newcolumntype{+}{>{\global\let\currentrowstyle\relax}}
\newcolumntype{^}{>{\currentrowstyle}}
\newcommand{\rowstyle}[1]{\gdef\currentrowstyle{#1}%
#1\ignorespaces
}
\begin{document}
\begin{table}[!h]
\centering
\caption{جدول ساخته شده در محیط \lr{tabular}}
\begin{tabular}{|*{11}{c|}}
\hline
\textbf{صفر}
& یک & دو &
$\bm{\Delta\mu\nabla\sigma}$
& سه & \% &
\textbf{چهار}
& $\boldsymbol{n=10}$ & $\mathbf{n=15}$ & $\boldsymbol{\Delta\mu\nabla\sigma}$ & $\mathbf{\Delta\mu\nabla\sigma}$
\\ \hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
\end{tabular}
\end{table}
\begin{table}[!h]
\caption{جدول ساخته شده در محیط \lr{tabu}}
\centering
\begin{tabu}{|*{11}{c|}}
\hline
\rowfont{\bfseries\boldmath}
صفر & یک & دو & $\Delta\mu\nabla\sigma$ & سه & \% & چهار
& $n=10$ & $n=15$ & $\Delta\mu\nabla\sigma$ & $\Delta\mu\nabla\sigma$
\\ \hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
\end{tabu}
\end{table}
\begin{table}[!h] % https://tex.stackexchange.com/questions/4811
\caption{جدول ساخته شده در محیط \lr{tabular} با دستورات تعریف شده بسته \lr{array}}
\centering
\begin{tabular}{|+c|*{10}{^c|}}
\hline
\rowstyle{\bfseries\boldmath}
صفر & یک & دو & $\Delta\mu\nabla\sigma$ & سه & \% & چهار
& $n=10$ & $n=15$ & $\Delta\mu\nabla\sigma$ & $\Delta\mu\nabla\sigma$
\\ \hline
0 & 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ \hline
\end{tabular}
\end{table}
اعداد در متن 1234 و در فرمول $1234$
\[ 1 2 3 4 \]
\end{document}
It seems siunitx
package is not compatible xepersian
package. The decimal point does not change to the Persian decimal separator i.e. momayyez in \SI
or \num
sequences. Also \SIlist
and \SIrange
sequences have incorrect direction and should change words "and" and "to" into proper equivalents. Finally, xepersian
package eliminates the degree symbol ° even in the latin
environment.
bidi
packagebidi
package issue tracker has been searched for similar issues?% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{article}
\usepackage{siunitx}
%\sisetup{detect-mode} %detect-all
\usepackage{xepersian}
\settextfont{Yas}
\setmathdigitfont{Yas}
%\usepackage{fontspec}
%\setmainfont[Script=Arabic]{Yas}
%\usepackage{bidi}
\DeclareSIUnit{\calorie}{cal}
\begin{document}
یک کالری کوچک تقریباً برابر است با $4.2$ ژول (بهطور دقیق $4.1868$ ژول)
\[\SI{1}{\calorie} = \SI{4.1868}{\joule}\]
\SIlist{0.13;0.67;0.80}{\milli\metre}
\SIrange{0.13}{0.67}{\milli\metre}
\num{3.45d-4}
\ang{4,5}
\ang{1;2;3} $\ang{1;2;3}$
\begin{latin}
\[\SI{1}{\calorie} = \SI{4.1868}{\joule}\]
\SIlist{0.13;0.67;0.80}{\milli\metre}
\SIrange{0.13}{0.67}{\milli\metre}
\num{3.45d-4}
\ang{4,5} Where is the $^{\circ}$ (degree) symbol?!
\ang{1;2;3} $\ang{1;2;3}$
\end{latin}
\end{document}
See outline.
Hi Vafa - requiring your written permission to use a feature makes a package nonfree. I understand you have good reason to do this, but I have no alternative but to remove it from TeX Live as a result, which I just did. Just wanted to let you know. Hope the situation gets better one day. --best, karl.
TeX users in Afghanistan may want to use xepersian
for typesetting their Persian documents. I would be very grateful If you add an option to xepersian
to handle it. In the attached pdf you can find the differences between the Persian language in Iran and Afghanistan.
bidi
packagebidi
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 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 feature request here
\end{document}
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{shadows.blur}
\usepackage{xepersian}
\settextfont{Yas}
%استفاده از 2 دستور زیر با گزینه مثال shadows.blur خطا دارد!
\setdigitfont{Yas}
%\settextdigitfont{Yas}
% استفاده از دستور زیر مشکلی ندارد.
%\setmathdigitfont{Yas}
\begin{document}
تست
\begin{tikzpicture}
\filldraw[fill=white, draw=black,blur shadow](0,0) rectangle (1,1);
\end{tikzpicture}
\end{document}
output:
shadows-blur-TL2020.log
After updating to the latest version of TeXLive
[Version 3.14159265-2.6-0.999992 (TeX Live 2020) (preloaded format=xelatex 2020.7.22)], \setdigitfont
and its family doesn't work resulting in an error like below:
! Undefined control sequence.
\__xepersian_mathsdigitspec_primitive_font_char_if_exist:nF ...
\l_fontspec_font "#1\scan_...
MWE:
\documentclass{article}
\usepackage{xepersian}
\settextfont{Yas}
\setdigitfont{Yas}
\begin{document}
سلام این یک متن آزمایشی با عدد ۰۱۲۳۴۵۶۷۸۹ است.
\end{document}
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.