summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/phonrule/phonrule-doc.tex
blob: 6555a192e23a57021183a84ffa9aac93f1e283e9 (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
\documentclass[a4paper]{article}

\usepackage{fontspec}

\usepackage{polyglossia}
	\setmainlanguage{english}

\usepackage{phonrule}
\usepackage{gb4e}

\usepackage{natbib}
	\setcitestyle{aysep={},notesep={:}}

\title{The \texttt{phonrule} package}
\author{Stefano Coretta \\ \texttt{stefano.coretta@me.com}}

\reversemarginpar

\begin{document}
\maketitle

\section{Purpose}
This packages provides macros for typesetting phonological rules like those in Sound Pattern of English \citep{chomsky1968sound}.

\section{Usage}
\begin{quote}
\begin{verbatim}
\phon{〈input〉}{〈output〉}
\end{verbatim}
\end{quote}

The command \verb+\phon+ has two arguments: the first one is the input of the rule and the second is the output. Here is an example with code and result:

\begin{exe}
\ex \verb+\phon{z}{r}+
\ex \phon{z}{r}
\end{exe}

\section{Usage}
\begin{quote}
\begin{verbatim}
\phonc{〈input〉}{〈output〉}{〈context〉}
\end{verbatim}
\end{quote}

\verb+\phonc+ adds a third argument for the context:

\begin{exe}
\ex \verb+\phonc{a}{ə}{[–stressed]}+
\ex \phonc{a}{ə}{[–stressed]}
\end{exe}

The commands \verb+\phonl+, \verb+\phonr+ and \verb+\phonb+ add a place holder line and put the context, respectively, on the left (l), on the right (r) and on both sides (b):

\begin{exe}
\ex
	\begin{xlist}
	\ex \verb+\phonl{k}{t}{t}+
	\ex \phonl{z}{r}{}
	\end{xlist}
\ex
	\begin{xlist}
	\ex \verb+\phonr{t}{ts}{u}+
	\ex \phonr{t}{ts}{u}
	\end{xlist}
\ex
	\begin{xlist}
	\ex \verb+\phonb{s}{z}{V}{V}+
	\ex \phonb{s}{z}{V}{V}
	\end{xlist}
\end{exe}

The \verb+\oneof+ environment provides the possibility to compile several context, one per line, enclosed in curly brackets. You need to use a \verb+\mbox+.

\begin{exe}
\ex
\begin{verbatim}
\phonc{t}{ts}{
\begin{oneof}
\placehold \mbox{i} \\
\placehold \mbox{u}
\end{oneof}
}
\end{verbatim}
\ex \phonc{t}{ts}{
\begin{oneof}
\placehold \mbox{i} \\
\placehold \mbox{u}
\end{oneof}
}
\end{exe}

\verb+\placehold+ typeset a place holder line with spaces before and after. The \verb+\phonfeat+ environment allows you to insert feature specifications:

\begin{exe}
\ex
\begin{verbatim}
\phonc{t}{ts}{\phold 
\begin{phonfeat}
\mbox{–consonantal} \\
\mbox{+high} \\
\mbox{+front}
\end{phonfeat}
}
\end{verbatim}
\ex \phonc{t}{ts}{\phold 
\begin{phonfeat}
\mbox{– consonantal} \\
\mbox{+high} \\
\mbox{+front}
\end{phonfeat}
}
\end{exe}

\verb+\phold+ typeset a place holder line without spaces. The environments \verb+\oneofnest+ and \verb+\phonfeatnest+ allows one-of environments (inside curly brackets) and feature specifications (inside square brackets) to be nested inside a \verb+\oneof+ environment.




\bibliography{linguistics}
\bibliographystyle{unified}

\end{document}