summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/cjhebrew
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-02-21 00:27:30 +0000
committerKarl Berry <karl@freefriends.org>2017-02-21 00:27:30 +0000
commit2f9e984bb3ef9f5eec3cf91d020412f4bcf4a317 (patch)
treec0a24f6d81471c134f529b6715f6811b89ec002c /Master/texmf-dist/tex/latex/cjhebrew
parentae587df3cc017af8deb1f84ce2a249b537c376ab (diff)
cjhebrew (20feb17)
git-svn-id: svn://tug.org/texlive/trunk@43276 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/cjhebrew')
-rw-r--r--Master/texmf-dist/tex/latex/cjhebrew/cjhebrew.sty63
1 files changed, 46 insertions, 17 deletions
diff --git a/Master/texmf-dist/tex/latex/cjhebrew/cjhebrew.sty b/Master/texmf-dist/tex/latex/cjhebrew/cjhebrew.sty
index cf4058d5513..887d37f4169 100644
--- a/Master/texmf-dist/tex/latex/cjhebrew/cjhebrew.sty
+++ b/Master/texmf-dist/tex/latex/cjhebrew/cjhebrew.sty
@@ -6,9 +6,11 @@
%
% http://www.latex-project.org/lppl.txt
%
+% Contains code provided by Axel Kielhorn (from lfgwluabidi.sty)
-\ProvidesPackage{cjhebrew}
- [2004/08/27 v. 0.1a cjhebrew Hebrew Typesetting System]
+\ProvidesPackage{xcjhebrew}
+ [2017/02/19 v. 0.2 cjhebrew Hebrew Typesetting System]
+\RequirePackage{ifluatex}
\DeclareFontFamily{U}{cjheb}{}
@@ -27,20 +29,47 @@
\chardef\zeronojoin=124
\chardef\dottedcircle=203
-\@ifundefined{eTeXrevision}%
- {%
- \PackageWarningNoLine{cjhebrew}{\MessageBreak
- Hebrew text will be typeset from left to right!\MessageBreak
- You really should use e-TeX}
- \newcommand{\cjRL}[1]{\bgroup\textcjheb{#1\endofword}\egroup}
- \newcommand{\cjLR}[1]{\bgroup\endofword#1\egroup}
- \newenvironment{cjhebrew}{\cjhebfamily}{}
- }%
- {%
- \TeXXeTstate=1
- \newcommand{\cjRL}[1]{\bgroup\beginR\textcjheb{#1\endofword}\endR\egroup}
- \newcommand{\cjLR}[1]{\bgroup\beginL\endofword#1\endL\egroup}
- \newenvironment{cjhebrew}{\parindent=0pt\cjhebfamily\everypar{\beginR}}{}
- }
+\ifluatex
+ \RequirePackage{luabidi}
+
+ % The following lines patch luabidi.sty. As soon as luabidi.sty
+ % itself is patched, these lines can and should be removed.
+ \def\setRTLmain{\pagedir TRT \bodydir TRT \pardir TRT \textdir TRT}
+ \def\setRTL{\@RTLtrue\pardir TRT \textdir TRT}
+ \let\setRL=\setRTL
+ \def\setLTR{\@RTLfalse\pardir TLT \textdir TLT}
+ \let\setLR=\setLTR
+ \let\unsetRTL=\setLTR
+ \let\unsetLTR=\setRTL
+ \def\RTL{\@RTLtrue\trivlist \pardir TRT \textdir TRT\item\relax}
+ \def\LTR{\trivlist \pardir TLT \textdir TLT\item\relax}
+ \def\Footnote#1{%
+ \begingroup
+ \footnotemark
+ \renewcommand{\thefootnote}{\@arabic\c@footnote}%
+ \pardir TLT \textdir TLT\footnotetext{#1}%
+ \endgroup
+ }
+
+ \newcommand{\cjRL}[1]{\RLE{\textcjheb{#1\endofword}}}
+ \newcommand{\cjLR}[1]{\LRE{\textcjheb{\endofword#1}}}
+ \newenvironment{cjhebrew}{\parindent=0pt\cjhebfamily\setRTL}{\unsetRTL}
+\else
+ \@ifundefined{eTeXrevision}%
+ {%
+ \PackageWarningNoLine{cjhebrew}{\MessageBreak
+ Hebrew text will be typeset from left to right!\MessageBreak
+ You really should use e-TeX}
+ \newcommand{\cjRL}[1]{\bgroup\textcjheb{#1\endofword}\egroup}
+ \newcommand{\cjLR}[1]{\bgroup\endofword#1\egroup}
+ \newenvironment{cjhebrew}{\cjhebfamily}{}
+ }%
+ {%
+ \TeXXeTstate=1
+ \newcommand{\cjRL}[1]{\bgroup\beginR\textcjheb{#1\endofword}\endR\egroup}
+ \newcommand{\cjLR}[1]{\bgroup\beginL\endofword#1\endL\egroup}
+ \newenvironment{cjhebrew}{\parindent=0pt\cjhebfamily\everypar{\beginR}}{}
+ }
+\fi
\def\<#1>{\cjRL{#1}}