-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL (Right-To-Left) latex environment not defined for xelatex #8460
Comments
I believe the RTL environment is provided by the bidi package. |
You could try adding |
Yes ! Adding Sorry I am not familiar with that topic, but at first glance I'd say that when |
Yes, I think that's probably right -- and probably it wasn't needed before, because polyglossia loaded it automatically. But let me see if anyone can confirm that. |
See https://tex.stackexchange.com/questions/392175/how-can-i-defer-the-loading-of-the-bidi-package for some hints on loading order for bidi. This also confirms that bidi is loaded by polyglossia, which is probably why we originally loaded it only for pdflatex. |
Sure, The workaround is easy and there's no hurry... Thanks again for your time and efforts |
Somewhat related: #8283. |
I tried the following patch to the latex template: diff --git a/data/templates/default.latex b/data/templates/default.latex
index bb752a680..e9c69537b 100644
--- a/data/templates/default.latex
+++ b/data/templates/default.latex
@@ -357,15 +357,6 @@ $endfor$
\ifLuaTeX
\usepackage{selnolig} % disable illegal ligatures
\fi
-$if(dir)$
-\ifPDFTeX
- \TeXXeTstate=1
- \newcommand{\RL}[1]{\beginR #1\endR}
- \newcommand{\LR}[1]{\beginL #1\endL}
- \newenvironment{RTL}{\beginR}{\endR}
- \newenvironment{LTR}{\beginL}{\endL}
-\fi
-$endif$
$if(natbib)$
\usepackage[$natbiboptions$]{natbib}
\bibliographystyle{$if(biblio-style)$$biblio-style$$else$plainnat$endif$}
@@ -392,6 +383,17 @@ $endif$
$if(verbatim-in-note)$
\VerbatimFootnotes % allow verbatim text in footnotes
$endif$
+$if(dir)$
+\ifPDFTeX
+ \TeXXeTstate=1
+ \newcommand{\RL}[1]{\beginR #1\endR}
+ \newcommand{\LR}[1]{\beginL #1\endL}
+ \newenvironment{RTL}{\beginR}{\endR}
+ \newenvironment{LTR}{\beginL}{\endL}
+\else
+ \usepackage{bidi}
+\fi
+$endif$
\hypersetup{
$if(title-meta)$
pdftitle={$title-meta$}, But this did not work. Tried with
With
So this isn't the solution. |
If we can't find a solution, we may need to document that |
I got decent result with |
Hi !
Thanks for this amazing software !
I am trying to build a document writtent in a Right-To-Left language
Here's a minimal example:
When I try to generate the PDF with this command
I get this error
Looking at the default template, I can see that the RTL env is only defined for
pdftex
https://github.com/jgm/pandoc-templates/blob/master/default.latex#L354
Is there's a specific reason for that ?
Would it be possible to this env for
xelatex
too ?The text was updated successfully, but these errors were encountered: