1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesPackage{extaccent}%
3 [2003/10/11 v1.0 Accent Commands extension for Unicode (Omega/CHISE Team)]
5 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
7 %% Special Accent Commands for Sanskrit %%
8 %% version 1.0 (C) 1996 Toru Tomabechi %%
9 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \DeclareRobustCommand{\DoubleAccent}[5]{%
12 \setbox1=\hbox{\char#1}\dimen1=\wd1%
13 \setbox1=\hbox{\char#2}\dimen2=\wd1\dimen3=\ht1%
14 \advance\dimen1 by\dimen2\dimen1=.5\dimen1%
15 \setbox1=\hbox{#5}\dimen2=\wd1\dimen4=\ht1%
17 \setbox2=\hbox to \dimen2{\hss\raisebox{-\dimen3}{{\char#2}%
18 \kern-\dimen1{\raisebox{#4}{\char#1}}}\hss}%
19 \leavevmode\rlap{\hbox to\dimen2{\raisebox{\dimen4}{\box2}}}{\box1}}
21 %%% For T1 encoding %%%
22 \DeclareTextCommand{\MacAcute}{T1}[1]{\DoubleAccent{1}{9}{.4ex}{.45ex}{#1}}
23 \DeclareTextCommand{\MacGrave}{T1}[1]{\DoubleAccent{0}{9}{.4ex}{.45ex}{#1}}
24 \DeclareTextCommand{\MacBreve}{T1}[1]{\DoubleAccent{8}{9}{.4ex}{.45ex}{#1}}
25 \DeclareTextCommand{\MacTilde}{T1}[1]{\DoubleAccent{3}{9}{.4ex}{.45ex}{#1}}
26 \DeclareTextCommand{\MacDiaresis}{T1}[1]{\DoubleAccent{4}{9}{.4ex}{.45ex}{#1}}
27 \DeclareTextCommand{\DiaAcute}{T1}[1]{\DoubleAccent{1}{4}{.2ex}{.45ex}{#1}}
28 \DeclareTextCommand{\TilAcute}{T1}[1]{\DoubleAccent{1}{3}{.2ex}{.45ex}{#1}}
29 \DeclareTextCommand{\TilDiaresis}{T1}[1]{\DoubleAccent{4}{3}{.4ex}{.45ex}{#1}}
30 \DeclareTextCommand{\CaronDot}{T1}[1]{\DoubleAccent{10}{7}{.4ex}{.45ex}{#1}}
31 \DeclareTextCommand{\CandraBindu}{T1}[1]{\DoubleAccent{10}{8}{.4ex}{.15ex}{#1}}
32 \DeclareTextCommand{\ucirc}{T1}[1]{%
33 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
34 \vbox to.2ex{\hbox{\char6}\vss}\hidewidth}}}
35 \DeclareTextCommand{\ucircumflex}{T1}[1]{%
36 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
37 \vbox to.2ex{\hbox{\char2}\vss}\hidewidth}}}
38 \DeclareTextCommand{\udiaresis}{T1}[1]{%
39 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
40 \vbox to.2ex{\hbox{\char4}\vss}\hidewidth}}}
41 \DeclareTextCommand{\utilde}{T1}[1]{%
42 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
43 \vbox to.2ex{\hbox{\char3}\vss}\hidewidth}}}
44 \DeclareTextCommand{\ubreve}{T1}[1]{%
45 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
46 \vbox to.2ex{\hbox{\char8}\vss}\hidewidth}}}
47 \DeclareTextCommand{\udot}{T1}[1]{%
48 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
49 \vbox to.2ex{\hbox{.}\vss}\hidewidth}}}
51 %%% For OT1 encoding %%%
52 \DeclareTextCommand{\MacAcute}{OT1}[1]{\DoubleAccent{19}{22}{.4ex}{.45ex}{#1}}
53 \DeclareTextCommand{\MacGrave}{OT1}[1]{\DoubleAccent{18}{22}{.4ex}{.45ex}{#1}}
54 \DeclareTextCommand{\MacBreve}{OT1}[1]{\DoubleAccent{21}{22}{.4ex}{.45ex}{#1}}
55 \DeclareTextCommand{\MacTilde}{OT1}[1]{\DoubleAccent{126}{22}{.4ex}{.45ex}{#1}}
56 \DeclareTextCommand{\MacDiaresis}{OT1}[1]{\DoubleAccent{127}{22}{.4ex}{.45ex}{#1}}
57 \DeclareTextCommand{\DiaAcute}{OT1}[1]{\DoubleAccent{19}{127}{.4ex}{.45ex}{#1}}
58 \DeclareTextCommand{\TilAcute}{OT1}[1]{\DoubleAccent{19}{126}{.4ex}{.45ex}{#1}}
59 \DeclareTextCommand{\CaronDot}{OT1}[1]{\DoubleAccent{95}{20}{.4ex}{.45ex}{#1}}
60 \DeclareTextCommand{\TilDiaresis}{OT1}[1]{\DoubleAccent{127}{126}{.4ex}{.45ex}{#1}}
61 \DeclareTextCommand{\CandraBindu}{OT1}[1]%
62 {\DoubleAccent{95}{21}{.4ex}{.15ex}{#1}}
63 \DeclareTextCommand{\ucirc}{OT1}[1]{%
64 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
65 b \vbox to.2ex{\hbox{\char23}\vss}\hidewidth}}}
66 \DeclareTextCommand{\ucircumflex}{OT1}[1]{%
67 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
68 \vbox to.2ex{\hbox{\char94}\vss}\hidewidth}}}
69 \DeclareTextCommand{\udiaresis}{OT1}[1]{%
70 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
71 \vbox to.2ex{\hbox{\char127}\vss}\hidewidth}}}
72 \DeclareTextCommand{\utilde}{OT1}[1]{%
73 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
74 \vbox to.2ex{\hbox{\char126}\vss}\hidewidth}}}
75 \DeclareTextCommand{\ubreve}{OT1}[1]{%
76 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
77 \vbox to.2ex{\hbox{\char21}\vss}\hidewidth}}}
78 \DeclareTextCommand{\udot}{OT1}[1]{%
79 {\o@lign{\relax#1\crcr\hidewidth\sh@ft{29}%
80 \vbox to.2ex{\hbox{.}\vss}\hidewidth}}}