git.iko.soy/typeable/pandoc
on master help sign in
Merge pull request #120 from mb21/bidi
e5aacecJohn MacFarlane
default.context+4
@@ -5,6 +5,10 @@
5$if(context-lang)$
5$if(context-lang)$
6\mainlanguage[$context-lang$]
6\mainlanguage[$context-lang$]
7$endif$
7$endif$
8+$if(context-dir)$
9+\setupalign[$context-dir$]
10+\setupdirections[bidi=on,method=two]
11+$endif$
8
12
9% Enable hyperlinks
13% Enable hyperlinks
10\setupinteraction[state=start, color=middleblue]
14\setupinteraction[state=start, color=middleblue]
default.html+1−1
@@ -1,5 +1,5 @@
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2−<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$>
2+<html xmlns="http://www.w3.org/1999/xhtml"$if(lang)$ lang="$lang$" xml:lang="$lang$"$endif$$if(dir)$ dir="$dir$"$endif$>
3<head>
3<head>
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <meta http-equiv="Content-Style-Type" content="text/css" />
5 <meta http-equiv="Content-Style-Type" content="text/css" />
default.latex+17
@@ -139,6 +139,23 @@ $endif$
139$if(verbatim-in-note)$
139$if(verbatim-in-note)$
140\VerbatimFootnotes % allows verbatim text in footnotes
140\VerbatimFootnotes % allows verbatim text in footnotes
141$endif$
141$endif$
142+$if(dir)$
143+\ifxetex
144+ % load bidi as late as possible as it modifies e.g. graphicx
145+ $if(latex-dir-rtl)$
146+ \usepackage[RTLdocument]{bidi}
147+ $else$
148+ \usepackage{bidi}
149+ $endif$
150+\fi
151+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
152+ \TeXXeTstate=1
153+ \newcommand{\RL}[1]{\beginR #1\endR}
154+ \newcommand{\LR}[1]{\beginL #1\endL}
155+ \newenvironment{RTL}{\beginR}{\endR}
156+ \newenvironment{LTR}{\beginL}{\endL}
157+\fi
158+$endif$
142
159
143$if(title)$
160$if(title)$
144\title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$}
161\title{$title$$if(subtitle)$\\\vspace{0.5em}{\large $subtitle$}$endif$}