summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/arabtex/afoot.sty
blob: 2d0bde03ce113be536a1827d88607acb87000fd4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% afoot.sty
% ArabTeX footnotes
% 12.05.2003
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% (c) Klaus Lagally
%     Institut fuer Formale Methoden der Informatik
%     Universitaet Stuttgart
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\ifx \undefined \LaTeX \xpa \endinput \fi

\a@ident {afoot.sty} {3.11 ArabTeX footnotes} {12.05.2003}

%%%%%%%%%%%%%%%%%%% \footnote in an arabic environment %%%%%%%%%%%%%%%
% footnotes inside an Arabic environment, Roman document style

\let \a@@footnotemark \@footnotemark
\let \a@@footnotetext \@footnotetext

\def \a@footnotemark {% inside Arabic environment
\iftrans \unskip \unskip \nobreak \@makefnmark \fi 
\ifarab \a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \fi }

\long\def \a@footnotetext #1{\a@@footnotetext {#1}\arab@tail }

\at@arabtext {% inside Arabic environments
\let \@footnotemark \a@footnotemark 
\let \@footnotetext \a@footnotetext }

\def \a@c@footnote {% ArabTeX-LaTeX version
\let \@footnotemark \a@footnotemark 
\unarab@codes \footnote }

\def \a@c@footnotemark {% ArabTeX-LaTeX version
\def \@footnotemark {\a@footnotemark \arab@tail }%
\unarab@codes \footnotemark }

\long\def \a@c@footnotetext {% ArabTeX-LaTeX version
\unarab@codes \footnotetext }

\def \LRfootnotes {% left to right footnotes
\def \a@fnhook {\a@@mkfntext }% Roman document
%\def \a@fnhook {\a@rmfntext }% Roman document
\def \a@@fnhook {\a@rmfntext }% Arabic document
}

\all@wcmd \LRfootnotes			\LRfootnotes	% default

%%%%%%%%%%%%%%%%%%% \footnote in an arabic environment %%%%%%%%%%%%%%%
% footnotes inside an Arabic environment, Arabic document style

\iffalse
\def \a@@footnote {% ArabTeX-LaTeX version
\def \@footnotemark {%
	\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue }%
\def \a@@fntext ##1{% common part for footnote text
	\def \end {\a@par \egroup \test@token }%
	\hsize \columnwidth \@parboxrestore 
	\initlineb@x \@footnotemark \test@token ##1 \end }
}

\def \a@@footnotemark {%
\def \@footnotemark % ArabTeX-LaTeX version
	{\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue \test@token }%
\footnotemark }
\fi

\long\def \a@@fntext #1{% common part for footnote text
%\def \@footnotemark {%
%	\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue }%
\def \end {\a@par \egroup \test@token }%
	\a@hsize \columnwidth \hsize \columnwidth \@parboxrestore 
	\initlineb@x \putwordb@x \@makefnmark \a@spacetrue
\set@arabfont
	\arabtrue \test@token #1 \end }

\long\def \a@@@fntext #1{% common part for RL footnote text, Roman mode
%\def \@footnotemark {%
%	\a@spacefalse \putwordb@x \@makefnmark \a@spacetrue }%
\def \end {\a@par \egroup }%
	\a@hsize \columnwidth \hsize \columnwidth \@parboxrestore 
	\the\arabtext@hook \putwordb@x \@makefnmark \a@spacetrue
	\test@token #1 \end }

%%%%%%%%%%%%%%%%%%% \footnote in an arabic environment %%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%w%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\def \RLfootnotes {% right to left footnotes
\def \a@fnhook {\a@@@fntext }% Roman document
\def \a@@fnhook {\a@@fntext }% Arabic document
}

\all@wcmd \RLfootnotes

\let \arabfootnotes \RLfootnotes	\all@wcmd \arabfootnotes

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\endinput
%%%%%%%%%%%%%%%%%%%%%%%%%%%%% EOF %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%