aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReuben Thomas <[email protected]>2025-08-23 18:41:24 +0100
committerJohn MacFarlane <[email protected]>2025-08-24 09:59:48 +0200
commit5e92187c88b622c3f4186cc4ebcc4372c56445f5 (patch)
tree06e1a0949a93a548b5687d70553c0a12b7fdb0fc
parent4c69f288d91460ec4bd0b7588e2f489d1b650b79 (diff)
common.latex: add RTL support for LuaTeX engine
-rw-r--r--data/templates/common.latex6
-rw-r--r--test/writers-lang-and-dir.latex6
2 files changed, 12 insertions, 0 deletions
diff --git a/data/templates/common.latex b/data/templates/common.latex
index cb745941d..5f32758ed 100644
--- a/data/templates/common.latex
+++ b/data/templates/common.latex
@@ -234,6 +234,12 @@ $if(dir)$
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
+\ifluatex
+ \newcommand{\RL}[1]{\bgroup\textdir TRT#1\egroup}
+ \newcommand{\LR}[1]{\bgroup\textdir TLT#1\egroup}
+ \newenvironment{RTL}{\textdir TRT\pardir TRT\bodydir TRT}{}
+ \newenvironment{LTR}{\textdir TLT\pardir TLT\bodydir TLT}{}
+\fi
$endif$
$--
$-- bibliography support support for natbib and biblatex
diff --git a/test/writers-lang-and-dir.latex b/test/writers-lang-and-dir.latex
index 61ee63801..842ca98a6 100644
--- a/test/writers-lang-and-dir.latex
+++ b/test/writers-lang-and-dir.latex
@@ -60,6 +60,12 @@
\newenvironment{RTL}{\beginR}{\endR}
\newenvironment{LTR}{\beginL}{\endL}
\fi
+\ifluatex
+ \newcommand{\RL}[1]{\bgroup\textdir TRT#1\egroup}
+ \newcommand{\LR}[1]{\bgroup\textdir TLT#1\egroup}
+ \newenvironment{RTL}{\textdir TRT\pardir TRT\bodydir TRT}{}
+ \newenvironment{LTR}{\textdir TLT\pardir TLT\bodydir TLT}{}
+\fi
\usepackage{bookmark}
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
\urlstyle{same}