texlive[51969] Master/texmf-dist: luabidi (28aug19)
commits+karl at tug.org
commits+karl at tug.org
Wed Aug 28 01:01:09 CEST 2019
Revision: 51969
http://tug.org/svn/texlive?view=revision&revision=51969
Author: karl
Date: 2019-08-28 01:01:08 +0200 (Wed, 28 Aug 2019)
Log Message:
-----------
luabidi (28aug19)
Added Paths:
-----------
trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md
trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md
trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/
trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/test.tex
trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/
trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/arabmaths.tex
trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/autofootnoterule.tex
trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/luabidi.sty
trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/textwidthfootnoterule.tex
Removed Paths:
-------------
trunk/Master/texmf-dist/doc/lualatex/luabidi/README
trunk/Master/texmf-dist/doc/lualatex/luabidi/test.tex
trunk/Master/texmf-dist/tex/lualatex/luabidi/
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,6 @@
+# MIT Licence
+
+Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019, Jürgen Spitzmüller 2019.
+
+The licence for all files within this package is (the MIT
+licence)[https://opensource.org/licenses/MIT] unless otherwise noted.
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/LICENCE.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/lualatex/luabidi/README
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/README 2019-08-27 23:00:54 UTC (rev 51968)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/README 2019-08-27 23:01:08 UTC (rev 51969)
@@ -1,4 +0,0 @@
-Luabidi is an attempt to offer the same functionality for LuaTeX as bidi
-does for XeTeX.
-
-Copyright (c) Vafa Khalighi 2009, and Arthur Reutenauer 2013
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,8 @@
+# luabidi
+Luabidi is an attempt to offer the same functionality for LuaTeX as bidi
+does for XeTeX.
+
+## CTAN Package
+https://www.ctan.org/pkg/luabidi
+
+Copyright (c) Vafa Khalighi 2009, Arthur Reutenauer 2013, 2019, Jürgen Spitzmüller 2019
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/README.md
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/test.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/test.tex 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,13 @@
+\documentclass[12pt]{article}
+\usepackage[arabmaths]{luabidi}
+\begin{document}
+\setRTLmain
+\section{ghesmate 1}
+
+in yek ghesmat ast ke an ra dar inja minevisam
+
+\begin{equation}
+1+2=3
+\end{equation}
+in ham dobare masalei ast ke man minevisam va shoma an ra mibinid.
+\end{document}
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/doc/test.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Deleted: trunk/Master/texmf-dist/doc/lualatex/luabidi/test.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/test.tex 2019-08-27 23:00:54 UTC (rev 51968)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/test.tex 2019-08-27 23:01:08 UTC (rev 51969)
@@ -1,13 +0,0 @@
-\documentclass[12pt]{article}
-\usepackage[arabmaths]{luabidi}
-\begin{document}
-\setRTLmain
-\section{ghesmate 1}
-
-in yek ghesmat ast ke an ra dar inja minevisam
-
-\begin{equation}
-1+2=3
-\end{equation}
-in ham dobare masalei ast ke man minevisam va shoma an ra mibinid.
-\end{document}
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/arabmaths.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/arabmaths.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/arabmaths.tex 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,2 @@
+\mathdir TRT
+\def\@eqnnum{{\normalfont \normalcolor \textdir TLT ({\textdir TRT\theequation})}}
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/arabmaths.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/autofootnoterule.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/autofootnoterule.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/autofootnoterule.tex 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,116 @@
+\ifx \CatEscape\undefined
+ \chardef\CatEscape=0
+ \chardef\CatOpen=1
+ \chardef\CatClose=2
+ \chardef\CatIgnore=9
+ \chardef\CatLetter=11
+ \chardef\CatOther=12
+ \chardef\CatActive=13 % is defined in Plain already
+
+ \chardef\CatUsCode=\catcode`\_
+\fi
+
+\catcode`\_=\CatLetter % top level macro file
+
+
+\def\l at fn{%
+ \hbox to \columnwidth
+ {\pagedir TLT\vbox{\kern -3\p@
+ \hrule width .4\columnwidth \kern2.6\p@}\hfil}}
+\def\r at fn{%
+ \hrule width .4\columnwidth\kern 2.6\p@}
+
+
+\def\@makefnmark{\hbox{$^{\hbox{\scriptsize\@thefnmark}}\m at th$}}
+
+
+\def\leftfootnoterule{\global\def\footnoterule{\l at fn}}
+\def\rightfootnoterule{\global\def\footnoterule{\r at fn}}
+\leftfootnoterule
+
+%%% \beginprog
+\newread\old_foot_file
+\newwrite\foot_file
+\def\foot_file_name{\jobname.fot\relax}
+\def\init_footnote{%
+ \openin\old_foot_file\foot_file_name
+ \ifeof\old_foot_file \closein\old_foot_file
+ \else \closein\old_foot_file
+ \read_foot_file
+ \fi
+ \immediate\openout\foot_file\foot_file_name
+ \immediate\write\foot_file{\relax}%
+ \global\let\init_footnote\relax
+ }
+
+\newcount\foot_name_no % for generating footnote mark names
+
+
+
+
+
+\newcount\autofootnote
+\def\fnpp_next_footnote{%
+ \init_footnote
+ \global\advance\foot_name_no\@ne
+ \global\advance\c at footnote\@ne
+ \edef\do_write{%
+ \immediate\write\foot_file{%
+ \string\advance\autofootnote\@ne
+ \string\expandafter\xdef
+ \string\csname\space f@\number\foot_name_no \endcsname{%
+ \string\number\autofootnote
+ }%
+ }%
+ }%
+ \do_write
+ \global\autofootnote 0\csname f@\number\foot_name_no \endcsname \relax
+ }
+
+\def\read_foot_file{%
+ \begingroup
+ \catcode`\@\CatLetter \catcode`\^^M\CatIgnore
+ \input \foot_file_name
+ \endgroup
+ }
+
+\let\fnpp_orig_outputpage=\@outputpage
+\def\@outputpage{%
+ \ifx \init_footnote\relax
+ \immediate\write\foot_file{\autofootnote\z@}%
+ \fi
+ \fnpp_orig_outputpage
+ }
+
+\let\FnppOrigFootnote=\footnote % save original bindings
+\let\FnppOrigFootnotemark=\footnotemark
+
+\def\footnote{%
+ \@ifnextchar[% % ] (Emacs)
+ \@xfootnote
+ {\fnpp_next_footnote \ifnum\autofootnote=1\rightfootnoterule\fi \@xfootnote[\the\c at footnote] %
+}%
+ }
+\def\footnotemark{%
+ \@ifnextchar[% % ] (Emacs)
+ \@xfootnotemark
+ {\fnpp_next_footnote \ifnum\autofootnote=1\rightfootnoterule\fi \@xfootnotemark[\the\c at footnote]}%
+ }
+
+
+
+
+\def\footnotemarkLR{%
+ \@ifnextchar[% % ] (Emacs)
+ \@xfootnotemark
+ {\fnpp_next_footnote \ifnum\autofootnote=1\leftfootnoterule\fi\@xfootnotemark[\the\c at footnote]}%
+ }
+
+
+\def\Footnote#1{%
+\begingroup
+\footnotemarkLR%
+\renewcommand{\thefootnote}{\@arabic\c at footnote}%
+\pardir TLT \textdir TLT\footnotetext{#1}%
+\endgroup
+}
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/autofootnoterule.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/luabidi.sty
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/luabidi.sty (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/luabidi.sty 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,56 @@
+%% This file is luabidi.sty
+%%
+%% Copyright © 2009 Vafa Khalighi, 2013--2019 Arthur Reutenauer, 2019 Jürgen Spitzmüller
+%%
+%%%% It may be distributed and/or modified under the
+%% conditions of the LaTeX Project Public License, either version 1.3c
+%% of this license or (at your option) any later version.
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{luabidi}[2019/08/24 v0.4
+ Bidirectional typesetting in LuaTeX]
+\newif\if at RTL
+\newif\if at RTLmain
+\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\endRTL{\@RTLfalse\endtrivlist}
+\def\LTR{\trivlist \pardir TLT \textdir TLT\item\relax}
+\def\endLTR{\endtrivlist}
+\def\@ensure at RTL#1{\if at RTL#1\else\RLE{#1}\fi}
+\def\@ensure at LTR#1{\if at RTL\LRE{#1}\else{#1}\fi}
+\def\@ensure at dir#1{\if at RTL\RLE{#1}\else{#1}\fi}
+\let\@ensure at maindir=\@ensuredir
+\@RTLmainfalse
+\DeclareOption{arabmaths}{\input{arabmaths}}
+\DeclareOption{textwidthfootnoterule}{\input{textwidthfootnoterule}}
+\let\n at xt=\
+\DeclareRobustCommand*\LRE{\protect\pLRE}
+\def\pLRE{\protect\afterassignment\moreLRE \let\n at xt= }
+\DeclareRobustCommand*\RLE{\protect\pRLE}
+\def\pRLE{\protect\afterassignment\moreRLE \let\n at xt= }
+\def\bracetext{\ifcat\n at xt{\else\ifcat\n at xt}\fi
+ \errmessage{Missing left brace has been substituted}\fi \bgroup}
+\def\moreLRE{\bracetext \aftergroup\unsetLTR \setLTR\@RTLfalse}
+\def\moreRLE{\bracetext \aftergroup\unsetRTL \setRTL\@RTLtrue}
+\let\LR=\LRE
+\let\RL=\RLE
+
+\def\Footnote#1{%
+\begingroup
+\footnotemark
+\renewcommand{\thefootnote}{\@arabic\c at footnote}%
+\pardir TLT \textdir TLT\footnotetext{#1}%
+\endgroup
+}
+
+\DeclareOption{autofootnoterule}{\input{autofootnoterule}}
+
+
+
+\ProcessOptions
+\endinput
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/luabidi.sty
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/textwidthfootnoterule.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/textwidthfootnoterule.tex (rev 0)
+++ trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/textwidthfootnoterule.tex 2019-08-27 23:01:08 UTC (rev 51969)
@@ -0,0 +1,2 @@
+\def\footnoterule{\kern-3\p@
+ \hrule \@width \textwidth \kern 2.6\p@}
Property changes on: trunk/Master/texmf-dist/doc/lualatex/luabidi/tex/textwidthfootnoterule.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
More information about the tex-live-commits
mailing list