Skip to content

Commit 5e92187

Browse files
rrthomasjgm
authored andcommitted
common.latex: add RTL support for LuaTeX engine
1 parent 4c69f28 commit 5e92187

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

data/templates/common.latex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,12 @@ $if(dir)$
234234
\newenvironment{RTL}{\beginR}{\endR}
235235
\newenvironment{LTR}{\beginL}{\endL}
236236
\fi
237+
\ifluatex
238+
\newcommand{\RL}[1]{\bgroup\textdir TRT#1\egroup}
239+
\newcommand{\LR}[1]{\bgroup\textdir TLT#1\egroup}
240+
\newenvironment{RTL}{\textdir TRT\pardir TRT\bodydir TRT}{}
241+
\newenvironment{LTR}{\textdir TLT\pardir TLT\bodydir TLT}{}
242+
\fi
237243
$endif$
238244
$--
239245
$-- bibliography support support for natbib and biblatex

test/writers-lang-and-dir.latex

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
\newenvironment{RTL}{\beginR}{\endR}
6161
\newenvironment{LTR}{\beginL}{\endL}
6262
\fi
63+
\ifluatex
64+
\newcommand{\RL}[1]{\bgroup\textdir TRT#1\egroup}
65+
\newcommand{\LR}[1]{\bgroup\textdir TLT#1\egroup}
66+
\newenvironment{RTL}{\textdir TRT\pardir TRT\bodydir TRT}{}
67+
\newenvironment{LTR}{\textdir TLT\pardir TLT\bodydir TLT}{}
68+
\fi
6369
\usepackage{bookmark}
6470
\IfFileExists{xurl.sty}{\usepackage{xurl}}{} % add URL line breaks if available
6571
\urlstyle{same}

0 commit comments

Comments
 (0)