summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/tipa/tipaman.sty
blob: 6196921b44942d3c0e1303c01b19271d0d9633e8 (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
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
% tipaman.sty
% Copyright 2002 FUKUI Rei
%
% This program may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.2
% of this license or (at your option) any later version.
% The latest version of this license is in
%   http://www.latex-project.org/lppl.txt
% and version 1.2 or later is part of all distributions of LaTeX 
% version 1999/12/01 or later.
%
% This program consists of all files listed in Manifest.txt.
%

% tipaman.sty for TIPA Manual

\usepackage{mflogo}
\usepackage[tone,extra]{tipa}
\usepackage{tipx}
\usepackage{codelist}
\usepackage{boxchar}
\usepackage{natbib}
\bibpunct{(}{)}{;}{a}{,}{,}

%\@twosidefalse
%\@mparswitchfalse

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% What follows is a format I used recently.
% Book size is approximately b5, with crop marks indicated
% on a a4 size of paper.
%
%\usepackage[cam,axes,a4center]{crop}
%\setlength\topmargin {22mm}
%\setlength\headheight{4mm}
%\setlength\headsep   {9mm}
%\setlength\footskip{11mm}
%\if@compatibility \setlength\maxdepth{5\p@} \else
%\setlength\maxdepth{.5\topskip} \fi
%\setlength\textwidth{126mm}
%\setlength\textheight{187mm}
%\setlength\paperheight {257mm}
%\setlength\paperwidth  {182mm}
%\@twosidetrue
%\@mparswitchtrue
%\setlength\oddsidemargin   {28mm}
%\setlength\evensidemargin  {28mm}
%\addtolength\topmargin{-1in}
%\addtolength\oddsidemargin{-1in}
%\addtolength\evensidemargin{-1in}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\footnotesep.8\baselineskip
\addtolength{\skip\footins}{2pt}

% to use float materials more easily
\renewcommand{\topfraction}{1}
\renewcommand{\bottomfraction}{0}
\renewcommand{\textfraction}{0}

\newif\ifmainitem 
\newif\iftimes \timesfalse

{\newcommand\@@ptm@@@{ptm}%
 \ifx\rmdefault\@@ptm@@@ \global\timestrue\fi}

\newskip\tipamanhskipamount
\tipamanhskipamount 1em plus .2em minus .6em
\def\tipamanhskip{\hskip\tipamanhskipamount}

\def\ip@item#1#2#3#4#5#6#7{{\leavevmode
  \hbox to \textwidth{%
    \setbox\z@\singleframebox{#1}{\hugeTipa}\dimen\z@\ht\z@
    \dimen\@ne\hsize \advance\dimen\@ne-\wd\z@ \advance\dimen\@ne-1.5em
    \setbox\@ne\hbox{\vbox{%\hsize=1.5em
      \edef\symcode{\ifx\empty#7\empty Macro\else#7\fi}%
      \ifmainitem\else\edef\symcode{\underline{\symcode}}\fi
      \hbox to\z@{\hss\scriptsize\textit{\symcode} }}}
    \setbox\tw@\hbox{\vbox{\hsize=\the\dimen\@ne
      {\large #2}%
      \ifx\empty#3\empty\else
        \tipamanhskip\textit{Usage}: #3\fi\par
      \ifx\empty#5\empty\textit{Input}: \texttt{#4}\else
      \textit{Input1}: \texttt{#4}\quad\textit{Input2}: \texttt{#5}\fi\par
      \textit{Sources}: #6
      }}%
    \dimen\@ne\dimen\z@ \advance\dimen\@ne-\ht\@ne
    \dimen\tw@\dimen\z@ \advance\dimen\tw@-\ht\tw@
    \raise\dimen\@ne\hbox{\unhbox\@ne}\unhbox\z@\hfill
    \raise\dimen\tw@\hbox{\unhbox\tw@}%
    }\par\medskip}}

\def\ipaitem{\mainitemtrue\ip@item}
\def\ipxitem{\mainitemfalse\ip@item}

\def\usage{\@ifstar{\nonipausage}{\ipausage}}
\def\nonipausage{Usage: }
\def\ipausage{{\itshape IPA usage:} }
\def\ipaall{IPA '49--'96}
\def\ipaold{IPA '49, '79}
\def\ipanew{IPA '89--'96}
\def\psg#1{\PSG\ p.\#1}

\def\tbs{{\ttfamily\char'134}}
\def\tbi{{\ttfamily\char'173}}
\def\tbii{{\ttfamily\char'175}}
\def\ttilde{{\ttfamily\char'176}}
\def\tcircum{{\ttfamily\char'136}}
\def\TT#1{\tbi #1\tbii}
\def\TD#1#2{\tbs #1\tbi #2\tbii}
\def\Td#1#2{\texttt{\TD{#1}{#2}}}
\def\Tt#1{\texttt{\tbs #1}}

\def\PSG{\textsl{PSG}}
\def\Handbook{\textsl{Handbook}}
\def\New{\textbf{\textsf{New!}}}

\newcount\excnt
\def\@inout{i}
\def\yitem{\if i\@inout
 \item[{\itshape Input\/}:]\def\@inout{o}\else
 \par\nobreak\item[{\itshape Output\/}:]\def\@inout{i}\fi}

\newenvironment{tipaexample}{%
  \begin{list}{}{\excnt=1%
  \setlength\labelsep{1em}%
  \setlength\labelwidth{5em}%
  \setlength\leftmargin{6.5em}%
  \setlength\parsep{0pt}}}%
  {\end{list}}

\def\xitem{\if i\@inout
 \item[{\itshape Input \the\excnt\/}:]\def\@inout{o}\else
 \par\nobreak\item[{\itshape Output \the\excnt\/}:]\def\@inout{i}%
 \global\advance\excnt by1\fi}

\def\labelenumi{(\theenumi)}
\newenvironment{Quote}{\begin{quote}}{\end{quote}}

\let\mc\multicolumn

\newskip\sloppyspaceamount
\newcommand\sloppyspace{\setbox0\hbox{ }%
  \sloppyspaceamount=\wd0 plus 2\wd0 minus .5\wd0
  \hskip\sloppyspaceamount}


%
% Below are modifications of LaTeX default styles.
%
% Chapter head

\renewcommand\chapter{%
  \if@openright\cleardoublepage\else\clearpage\fi
  \thispagestyle{empty}%
  \global\@topnum\z@
  \@afterindentfalse
  \secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
  \ifnum \c@secnumdepth >\m@ne
    \if@mainmatter
      \refstepcounter{chapter}%
      \typeout{\@chapapp\space\thechapter.}%
      \addcontentsline{toc}{chapter}%
        {\protect\numberline{\thechapter}#1}%
    \else
      \addcontentsline{toc}{chapter}{#1}%
    \fi
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \addtocontents{lof}{\protect\addvspace{10\p@}}%
  \addtocontents{lot}{\protect\addvspace{10\p@}}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
    \@afterheading
  \fi}
\def\@makechapterhead#1{%
%  \vspace*{50\p@}%
  \vspace*{5\p@}%
  {\parindent \z@ \raggedright \normalfont
    \ifnum \c@secnumdepth >\m@ne
      \if@mainmatter
%        \huge\bfseries \@chapapp\space \thechapter
        \huge\bfseries \huge\@chapapp\space \thechapter%
        \par\nobreak
        \vskip 10\p@
        \rule[.5ex]{\textwidth}{.8pt}
        \vskip 10\p@
      \fi
    \fi
    \interlinepenalty\@M
    \huge \bfseries #1\par\nobreak
    \vskip 40\p@
  }}
\def\@schapter#1{\if@twocolumn
    \@topnewpage[\@makeschapterhead{#1}]%
  \else
    \@makeschapterhead{#1}%
    \@afterheading
  \fi}
\def\@makeschapterhead#1{%
%  \vspace*{50\p@}%
  \vspace*{5\p@}%
  {\parindent \z@ \raggedright
    \normalfont
    \interlinepenalty\@M
    \huge \bfseries  #1\par\nobreak
    \vskip 40\p@
  }}

%
% heading.
%

\newcommand\clearemptydoublepage{%
  \newpage{\pagestyle{empty}\cleardoublepage}}

\def\ps@headings{%
    \def\@oddfoot{\hfil\thepage\hfil}%
    \def\@evenfoot{\hfil\thepage\hfil}%
    \def\@evenhead{\hfil\slshape\leftmark}%
    \def\@oddhead{{\slshape\rightmark}\hfil}%
    \let\@mkboth\markboth
  \def\chaptermark##1{%
    \markboth {%\MakeUppercase{%
      \ifnum \c@secnumdepth >\m@ne
        \if@mainmatter
          \@chapapp\ \thechapter. \ %
        \fi
      \fi
      ##1}{}}%
  \def\sectionmark##1{%
    \markright {%\MakeUppercase{%
      \ifnum \c@secnumdepth >\z@
        \thesection. \ %
      \fi
      ##1}}}

\pagestyle{headings}


%
% Commands for specimen.
%

\newcount\codecnt
\newcommand\tipaallchars[1]{{%
  \hrule width \textwidth \par\medskip
  \noindent\font\test=#1\test
  \codecnt=0 \loop \char\the\codecnt\sloppyspace
    \ifnum\codecnt<255 \advance\codecnt by 1 \repeat
  \par\medskip\hrule width \textwidth}}

\newcommand\tipxallchars[1]{{\par\medskip\sloppy
  \noindent\font\test=#1\test
  \codecnt=0 \loop \char\the\codecnt\sloppyspace
    \ifnum\codecnt<8 \advance\codecnt by 1 \repeat
  \codecnt=32 \loop \char\the\codecnt\sloppyspace
    \ifnum\codecnt<73 \advance\codecnt by 1 \repeat
  \codecnt=80 \loop \char\the\codecnt\sloppyspace
    \ifnum\codecnt<86 \advance\codecnt by 1 \repeat
  \codecnt=112 \loop \char\the\codecnt\sloppyspace
    \ifnum\codecnt<123 \advance\codecnt by 1 \repeat
  \par\medskip\hrule width \textwidth}}

\newcommand\sampletexti[1]{\begin{flushleft}#1
  D@ "nO;T "wInd @nd D@ "s2n w@ dIs"pju;tIN wItS w@z D@ "str6Ng5,
  wEn @ "tr\ae vl5 keIm @"l6N "r\ae pt In @ "wO:m "kloUk. DeI
  @"gri:d D@t D@ "w2n hu; f3;st s@k"si;dId In "meIkiN D@ "tr\ae vl5
  teIk hIz "kloUk 6f SUd bI k@n"sId@d "str6Ng@ D@n DI "2D@.
\end{flushleft}}

\newcommand\sampletextii[1]{\begin{flushleft}#1
  la bi:z e l sOlE:j s@ dispytE, Sak\~{\oe} asyr\~A k il etE l ply
  fO:r, k\~At iz \~O vy \~{\oe} vwajaZ\oe:r ki s av\~AsE, \~AvlOpe
  d\~A s\~O m\~Ato. i s\~O t\~Obe dakO:r, k@ s@lyi ki arivE
  l pr@mje a fEr ote s\~O m\~Ato o vwajaZ\oe:r, s@rE rgarde kOm
  l ply fO:r.
\end{flushleft}}

\newcommand\sampletextiii[1]{\begin{flushleft}#1
  "PaInst St\;RIt@n zI\c{c} "nOKtvInt PUnt "zOn@, "ve:\;R fOn Pi;n@n
  "baId@n vo:l d5K "StEKk5\;R@ vE:\;R@, PAls PaIn "vAnd5\;R5K, de:K
  PIn PaIn@n vAKm@n "mAnt@l g@"hYlt va:K, d@s ve:g@s da:"he:K ka:m.
  zi; vUKd@n "PaIni\c{c}, dAs "de:Kje:nIg@ fy:K d@n "StEKk5\;R@n
  gElt@n zOlt@, de:K d@n "vAnd5\;R5K "tsvIN@n vyKd@, zaIn@n "mAnt@l
  "PAptsu;ne:m@n.
\end{flushleft}}

\newcommand\sampletextiv[1]{\begin{flushleft}#1 \let\H\textcrh
  marra S Samsi wi r ri:\H\ ka:nu bi jitxanPum Pinhu l PaPwa fi:hum.
  u baQde:n Sa:fu ra:gil sa:ji\H\ gaj mim baQi:d mitlaffaQ bi
  Qaba:ja tPi:la. fa ttafaPum Qala Pin illi jixalli:h jiPlaQ il
  Qaba:ja fi l Pawwal jiku:n huwwa PaPwa mit ta:ni.
\end{flushleft}}

\newcommand\sampletextv[1]{\begin{flushleft}#1
  upepo ulikuwa uki\!biSana na \*fua kuwa nani mweNe Nguvu kupita
  mwenziwe, mara akapita masafiri alijekuwa amevaa \*fu\!ba. walipatana
  kuwa atakajemvua \*fu\!ba kwanza msafiri ndije mweNe Nguvu.
\end{flushleft}}

\newcommand\bseries{\fontseries{b}\selectfont}
\newcommand\rmtipa{\renewcommand\rmdefault{cmr}\renewcommand\sfdefault{cmss}}
\newcommand\rmxipa{\renewcommand\rmdefault{ptm}\renewcommand\sfdefault{phv}}

\newcount\rotatetextcnt \rotatetextcnt=0

\newcommand\sampletext{%
 \edef\@rotatetextcnt{\the\rotatetextcnt }%
 \ifcase\@rotatetextcnt\def\@sampletext{\sampletexti}\or
  \def\@sampletext{\sampletextii}\or\def\@sampletext{\sampletextiii}\or
  \def\@sampletext{\sampletextiv}\or\def\@sampletext{\sampletextv}\fi
 \global\advance\rotatetextcnt by 1
 \ifnum\the\rotatetextcnt=5 \global\rotatetextcnt=0 \fi
 \@sampletext}


\newcommand\commr[1]{\par\bigskip\begin{flushright}#1\end{flushright}}
\newcommand\comml[1]{\par\bigskip\begin{flushleft}#1\end{flushleft}}

\newcommand\betacomment{\commr{%
  For instance,\\
  the Greek letters included in the International Alphabet\\
  are cut in roman adaptations. Thus, since the ordinary shape of \\
  the Greek letter $\beta$ does not harmonise with roman type,\\
  in the International Phonetic Alphabet it is given the form \textipa{B}.\\
  (\emph{Principles}, 1949, p.~1)}}

\newcommand\thetacomment{\commr{%
  ... And of the two form of Greek theta, $\theta$ and $\vartheta$,\\ 
  it has been necessary to choose the first (in vertical form),\\
  since the second cannot be made to harmonise with\\
  roman letters. (\emph{Principles}, 1949, p.~2)}}

\newcommand\Sweet{\comml{%
  \textsc{Phonetics} is the \textbf{science} of speech-sounds.\\
  From a practical point of view it is the \textbf{art} of producing\\
  speech-sounds and recognizing them by ear.\par\medskip
  (Henry Sweet, \emph{A Primer of Phonetics}, 1906; Boldface by
  Sweet)}}

\newcommand\IPAshape{\comml{%
  The non-roman letters of the International Phonetic Alphabet\\
  have been designed as far as possible to harmonise well with \\
  the roman letters. The Association does not recognise\\
  makeshift letters; It recognises only letters which have been\\
  carefully cut so as to be in harmony with the other letters.\par\medskip
  (\emph{The Principles of the International Phonetic Association}, 1949)}}

\newcommand\upsiloncomment{\commr{%
    Some phoneticians refer to Upsilon by the name \emph{Bucket},\\
    but it looks more like an urn to us.\par\medskip
    (\emph{PSG}, 1996, p.~185)\par\bigskip

    ....................\\
    ....................\\
    O Attic shape! Fair attitude! with brede\\
    Of marble men and maidens overwrought,\\
    With forest branches and the trodden weed;\\
    Thou, silent form, dost tease us out of thought\\
    As doth eternity: Cold Pastoral!\\
    When old age shall this generation waste,\\
    Thou shalt remain, in midst of other woe\\
    Than ours, a friend to man, to whom thou say'st,\\
    ``Beauty is truth, truth beauty, ---that is all\\
    Ye know on earth, and all ye need to know.''\par\medskip
    (John Keats, \emph{Ode on a Grecian Urn})}}

\endinput

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "tipaman"
%%% End: