-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathalpha.tex
147 lines (134 loc) · 2.99 KB
/
alpha.tex
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
% !TeX root = forth.tex
% !TeX spellcheck = en_US
% !TeX program = pdflatex
\annex{Alphabetic list of words} % F (informative annex)}}}
\label{annex:index}
In the following list, the last, four-digit, part of the reference
number establishes a sequence corresponding to the alphabetic ordering
of all standard words. The first two or three parts indicate the word
set and glossary section in which the word is defined.
At the end of the line, after the page number of the word defintion, are three
letters indicating if the word has a presence in the R (rational), T (testing) and
I (implementation) appenices (annex~\ref{annex:rationale}, \ref{annex:test}
and \ref{annex:implement} respectivly).
~\par
\makeatletter
% \indexentry{section}{number}{sub}{name}{wordset}{ext}{proposal}{label}[english]
\newcommand{\indexentry}{
\@starfalse
\@ifnextchar*{\alpha@star}{\alpha@entry}
}
\newcommand{\alpha@star}[1]{
\@startrue
\alpha@entry
}
\newlength{\alpha@length}
\ifshowref
\setlength{\alpha@length}{0.2\textwidth}
\else
\setlength{\alpha@length}{0.3\textwidth}
\fi
\newcommand{\alpha@annex}[4]{%
\expandafter\ifx\csname r@#2:#3:#4\endcsname\relax\else%
\gdef\alpha@letter{#1}%
\expandafter\expandafter\expandafter\alpha@annex@inline\csname r@#2:#3:#4\endcsname%
\fi%
}
\newcommand{\alpha@annex@inline}[4]{%
\hyperref{}{}{#4}{\alpha@letter}%
}
\newcommand{\alpha@entry}[9]{%
\def\Tmp{#7}
\ifx\Tmp\empty\else\@startrue\fi% x:reset
%
% Enable the change bar for * words
%
\if@star\cbstart\fi%
%
% Word Number - Hyper linked to its definition
%
\def\Tmp{#2}%
\makebox[5em][r]{\hyperref{}{#5}{#8}{%
#1.\ifx\Tmp\empty\rule[.8ex]{2em}{.5pt}\else#2\fi}}%
%
% The word sub-number
%
\def\Tmp{#3}% {12}%
\makebox[2em][l]{%
\ifx\Tmp\empty\else\hyperref{}{#5}{#8}{.#3}\fi}
%
% Standard Extension Proposal
%
\ifrelease\else
\def\Tmp{#7}%
\ifx\Tmp\empty\else
\marginpar{\textsf{\tiny #7}}
\fi%
\fi%
%
% Word Label - If we are showing reference
%
\ifshowref
\makebox[6em]{%
\def\Tmp{#8}%
\def\Tmpa{#4}%
\ifx\Tmp\Tmpa\else\texttt{\small #8}\fi
}%
\fi%
%
% Word Name - Hyperlinked to its definition
%
\makebox[\alpha@length][l]{%
\hyperref{}{#5}{#8}{\textbf{\texttt{#4}}}
\quad
\dotfill
}%
%
% English Pronunciation (if given)
%
\def\Tmp{#9}%
\ifx\Tmp\empty ~\else ``#9''\fi
\dotfill%
%
% Word list
%
\MakeUppercase{#5}%
\def\Tmp{#6}%
\ifx\Tmp\empty\else ~EXT\fi
%
% Page reference
%
\makebox[3em]{\dotfill\pageref{#5:#8}}%
%
% Annex letters
%
\makebox[2pt]{}%
\makebox[8pt]{\alpha@annex{R}{rat}{#5}{#8}}%
\makebox[7pt]{\alpha@annex{T}{test}{#5}{#8}}%
\makebox[4pt]{\alpha@annex{I}{imp}{#5}{#8}}%
%
% Disable the change bar
%
\if@star\cbend\fi%
\@starfalse
%
% End of line - \par is need to flush the marginpar
%
\par
}
\makeatother
\begingroup
\parskip=0pt
\IfFileExists{\jobname.wds}{
\input{\jobname.wds}
}{
\IfFileExists{\jobname.wrd}{
\begin{center}
\textbf{Unsorted List}
\end{center}
\input{\jobname.wrd}
}{
File not found !
}
}
\endgroup