Open aarmn opened 1 year ago
A little check:
I use $ xelatex blabla.tex
, not $ xetex blabla.tex
. I don't know even if this is relevant, I don't know about XeTeX; just wanted to try my shot.
By the way, (always) share the source of a MWE (minimal working example) that generates your un-desired output.
A little check: I use
$ xelatex blabla.tex
, not$ xetex blabla.tex
. I don't know even if this is relevant, I don't know about XeTeX; just wanted to try my shot.
As far as I checked, they seem synonymous. my command is also xelatex; but look at first line of xelatex --version
XeTeX 3.141592653-2.6-0.999993 (Web2C 2021/nixos.org)
kpathsea version 6.3.3
Copyright 2021 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 71.1; using 71.1
Compiled with zlib version 1.2.13; using 1.2.13
Compiled with FreeType2 version 2.12.1; using 2.12.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 5.2.0; using 5.2.0
Compiled with libpng version 1.6.37; using 1.6.37
Compiled with pplib version v2.05 less toxic i hope
Compiled with fontconfig version 2.14.0; using 2.14.0
As we can see here, in xelatex command output its calling itself as xetex, so I assume its more of a naming (or backward compatibility) problem
It would be great if I knew your xelatex --version
output as well
By the way, (always) share the source of a MWE (minimal working example) that generates your un-desired output.
I did a deeper research, and found this page. following is the relevant part of answer
xetex xetex is a different executable file from tex and pdftex. It includes extensions to the original program to allow Unicode input and right-to-left typesetting, among other features. By default it has the Plain TeX format preloaded and produces PDF output.
xelatex The command xelatex calls the xetex engine but with the LaTeX format preloaded instead of Plain TeX and produces PDF output.
XeTeX 3.141592653-2.6-0.999994 (TeX Live 2022)
kpathsea version 6.3.4
Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny.
There is NO warranty. Redistribution of this software is
covered by the terms of both the XeTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the XeTeX source.
Primary author of XeTeX: Jonathan Kew.
Compiled with ICU version 70.1; using 70.1
Compiled with zlib version 1.2.11; using 1.2.11
Compiled with FreeType2 version 2.11.1; using 2.11.1
Compiled with Graphite2 version 1.3.14; using 1.3.14
Compiled with HarfBuzz version 3.4.0; using 3.4.0
Compiled with libpng version 1.6.37; using 1.6.37
Compiled with pplib version v2.05 less toxic i hope
Compiled with fontconfig version 2.13.0; using 2.13.1```
kpathsea version 6.3.4 Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny. There is NO warranty. Redistribution of this software is covered by the terms of both the XeTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the XeTeX source. Primary author of XeTeX: Jonathan Kew. Compiled with ICU version 70.1; using 70.1 Compiled with zlib version 1.2.11; using 1.2.11 Compiled with FreeType2 version 2.11.1; using 2.11.1 Compiled with Graphite2 version 1.3.14; using 1.3.14 Compiled with HarfBuzz version 3.4.0; using 3.4.0 Compiled with libpng version 1.6.37; using 1.6.37 Compiled with pplib version v2.05 less toxic i hope Compiled with fontconfig version 2.13.0; using 2.13.1```
I guess first line is omitted
kpathsea version 6.3.4 Copyright 2022 SIL International, Jonathan Kew and Khaled Hosny. There is NO warranty. Redistribution of this software is covered by the terms of both the XeTeX copyright and the Lesser GNU General Public License. For more information about these matters, see the file named COPYING and the XeTeX source. Primary author of XeTeX: Jonathan Kew. Compiled with ICU version 70.1; using 70.1 Compiled with zlib version 1.2.11; using 1.2.11 Compiled with FreeType2 version 2.11.1; using 2.11.1 Compiled with Graphite2 version 1.3.14; using 1.3.14 Compiled with HarfBuzz version 3.4.0; using 3.4.0 Compiled with libpng version 1.6.37; using 1.6.37 Compiled with pplib version v2.05 less toxic i hope Compiled with fontconfig version 2.13.0; using 2.13.1```
I guess first line is omitted
Updated
I gave it a try. I could compile some different fonts, but I'm not sure how to do that in XeLaTeX
(or even LaTeX
) for any arbitrary font. Can you share the source you're compiling and the output you get from it?
This is a sample xelatex MWE doc
\documentclass{article}
\usepackage[a4paper]{geometry}
\usepackage{hyperref}
\usepackage{xepersian}
\settextfont[Scale=1.2]{Vazirmatn}
\usepackage{quoting,xparse}
\NewDocumentCommand{\bywhom}{m}{% the Bourbaki trick
{\nobreak\hfill\penalty50\hskip1em\null\nobreak
\hfill\mbox{\normalfont(#1)}%
\parfillskip=0pt \finalhyphendemerits=0 \par}%
}
\NewDocumentEnvironment{pquotation}{m}
{\begin{quoting}[
indentfirst=false,
leftmargin=\parindent,
rightmargin=\parindent]\itshape}
{\bywhom{#1}\end{quoting}}
\begin{document}
\title{آزمایش ترکیب متن فارسی و انگلیسی در XeLaTeX}
\author{علیرضا محمّدنژاد}
\maketitle
\section{تست}
\paragraph{}
متن فارسی بی اشکال نمایش داده میشود
\lr{English text is visible as well, but the font differ when written in lr block}
And would be reversed words order when not
متن فارسی در کنار English Text
English Text در کنار متن فارسی
متن فارسی در کنار \lr{English Text} در دستور الآر
\end{document}
The default font name is Computer Modern. (since you asked.)
The default font name is Computer Modern. (since you asked.)
Thank you! It would be a great contribution for keeping English font consistant thought out; Not ideal, but it would be good enough for my usecase.
I would test and if it worked, I would close the issue, reopening only if a better solution become available.
Hello there,
Some days ago I noticed, XeTeX, with xepersian, have some serious issues with handling space separated English text blocks. After asking prof, I used
\lr
command, but it seems like\lr
command font is diff from main text font, and I found no field (yet) which set itWithout
\lr
command:Hello World
would be rendered asWorld Hello
If anyone noticed it before, I would be happy to hear about their experience on case
If not, I would submit my answer here in some time, If I found any