4th presentation of the bib latex course
TRANSCRIPT
Introduction to LATEXSession #4
Oriol Borrega Pedro Tiago Martins
Universitat de Barcelona
February 18, 2013
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 1 / 26
This presentation
https://dl.dropbox.com/u/4636832/sessio4.pdf
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 2 / 26
Outline
1 Writing phonetics
2 Glosses
3 Trees
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 3 / 26
Writing phonetics
Outline
1 Writing phonetics
2 Glosses
3 Trees
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 4 / 26
Writing phonetics
[f@U"nEtIks]
In the preamble. . .
\usepackage{tipa}
In the text. . .
\LaTeX\ is pronounced \textipa{["leItEx]}
LATEX is pronounced ["leItEx]
Get a full chart of symbols and equivalences here.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 5 / 26
Writing phonetics
[f@U"nEtIks]
In the preamble. . .
\usepackage{tipa}
In the text. . .
\LaTeX\ is pronounced \textipa{["leItEx]}
LATEX is pronounced ["leItEx]
Get a full chart of symbols and equivalences here.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 5 / 26
Writing phonetics
[f@U"nEtIks]
In the preamble. . .
\usepackage{tipa}
In the text. . .
\LaTeX\ is pronounced \textipa{["leItEx]}
LATEX is pronounced ["leItEx]
Get a full chart of symbols and equivalences here.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 5 / 26
Writing phonetics
[f@U"nEtIks]
roman letters transcript for their phonetic counterparts: [abcdefgh]
capital roman letters transcript for related sounds: [ABCDEFGH]
some sounds need specific commands:
[ï] \textipa{[\:n]}[th] \textipa{[t\super h]}
[ì] \textipa{[\textbeltl]}
diacritics, suprasegmentals and tones require specific commands:
[A˚] \textipa{[\r*A]}
[A] \textipa{[\u{A}]}[>tS] \textipa{[\t{tS}]}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 6 / 26
Writing phonetics
[f@U"nEtIks]
roman letters transcript for their phonetic counterparts: [abcdefgh]
capital roman letters transcript for related sounds: [ABCDEFGH]
some sounds need specific commands:
[ï] \textipa{[\:n]}[th] \textipa{[t\super h]}
[ì] \textipa{[\textbeltl]}
diacritics, suprasegmentals and tones require specific commands:
[A˚] \textipa{[\r*A]}
[A] \textipa{[\u{A}]}[>tS] \textipa{[\t{tS}]}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 6 / 26
Writing phonetics
[f@U"nEtIks]
roman letters transcript for their phonetic counterparts: [abcdefgh]
capital roman letters transcript for related sounds: [ABCDEFGH]
some sounds need specific commands:
[ï] \textipa{[\:n]}[th] \textipa{[t\super h]}
[ì] \textipa{[\textbeltl]}
diacritics, suprasegmentals and tones require specific commands:
[A˚] \textipa{[\r*A]}
[A] \textipa{[\u{A}]}[>tS] \textipa{[\t{tS}]}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 6 / 26
Writing phonetics
[f@U"nEtIks]
roman letters transcript for their phonetic counterparts: [abcdefgh]
capital roman letters transcript for related sounds: [ABCDEFGH]
some sounds need specific commands:
[ï] \textipa{[\:n]}[th] \textipa{[t\super h]}
[ì] \textipa{[\textbeltl]}
diacritics, suprasegmentals and tones require specific commands:
[A˚] \textipa{[\r*A]}
[A] \textipa{[\u{A}]}[>tS] \textipa{[\t{tS}]}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 6 / 26
Writing phonetics
[f@U"nEtIks]
Can you transcribe your name and surnames? Like, for instance,. . .
[uRi"Olbu"rEG@"TEp@]\textipa{[uRi"Olbu"rEG@"TEp@]}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 7 / 26
Glosses
Outline
1 Writing phonetics
2 Glosses
3 Trees
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 8 / 26
Glosses
An example of glosses
(1) Cant.oSing.-1-sg-pres
un.aa.-fem
cancosong
‘I sing a song’
(2) a. * Jo cantes una canco
b. Tu cantes una canco
As we have seen in examples 1 and 2b,. . .
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 9 / 26
Glosses
Glosses
In the preamble. . .
\usepackage{gb4e}
In the text. . .
\begin{exe}
\ex This is an example
\ex[*]{This are a agrammatical example}
\end{exe}
(3) This is an example
(4) * This are a agrammatical example
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 10 / 26
Glosses
Glosses
In the preamble. . .
\usepackage{gb4e}
In the text. . .
\begin{exe}
\ex This is an example
\ex[*]{This are a agrammatical example}
\end{exe}
(5) This is an example
(6) * This are a agrammatical example
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 10 / 26
Glosses
Glosses
Glosses automatically align words:
\begin{exe}
\ex\gll A clause that serves as example \\
Una oracio que serveix d’ exemple \\
\end{exe}
(7) AUna
clauseoracio
thatque
servesserveix
asd’
exampleexemple
Notice the \gll and the linebreaks!
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 11 / 26
Glosses
Glosses
Using small caps for categories:
\begin{exe}
\ex\gll Li escric una carta \\
{\sc 3-sg-dat} write.{\sc 1-sg-pres} a.{\sc -fem} letter.{\sc -fem} \\
\end{exe}
(8) Li3-sg-dat
escricwrite.1-sg-pres
unaa.-fem
cartaletter.-fem
{\sc ...} is equivalent to \textsc{...}
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 12 / 26
Glosses
Glosses with translation
A third line with the translation can be added:
\begin{exe}
\ex\gll Li escric una carta \\
{\sc 3-sg-dat} write.{\sc 1-sg-pres} a.{\sc -fem} letter.{\sc -fem} \\
\trans ‘I write him/her a letter’\\
\end{exe}
(9) Li3-sg-dat
escricwrite.1-sg-pres
unaa.-fem
cartaletter.-fem
‘I write him/her a letter’
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 13 / 26
Glosses
Several levels in glosses
The xlist environment introduces a further level:
\begin{exe}
\ex
\begin{xlist}
\ex This is an example
\ex[*]{\gll This is a example} \\
[ ]{Aixo es un exemple} \\
\end{xlist}
\end{exe}
(10) a. This is an example
b. * This is a example
c. Aixo es un exemple
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 14 / 26
Glosses
Just for trying. . .
Examples can be labelled and refered to as usual. Give all this a try:
(11) Cant.oSing.-1-sg-pres
un.aa.-fem
cancosong
‘I sing a song’
(12) a. * Jo cantes una canco
b. Tu cantes una canco
As we have seen in examples 11 and 12b,. . .
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 15 / 26
Glosses
...solution
\begin{exe}
\ex\gll Cant.o un.a canco \label{canto} \\
Sing.{\sc-1-sg-pres} a.{\sc-fem} song \\
\trans ‘I sing a song’ \\
\end{exe}
\begin{exe}
\ex
\begin{xlist}
\ex[*]{Jo cantes una canco}
\ex[ ]{Tu cantes una canco} \label{cantes}
\end{xlist}
\end{exe}
As we have seen in examples \ref{canto} and \ref{cantes},\ldots
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 16 / 26
Trees
Outline
1 Writing phonetics
2 Glosses
3 Trees
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 17 / 26
Trees
An example of a tree
S
This VP
V
is
NP
a simple tree
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 18 / 26
Trees
Trees
In the preamble. . .
\usepackage{qtree}
In the text. . .
\Tree [.SX Spec [.X’ X^0 Compl ] ]
SX
Spec X’
X0 Compl
The spaces after the closing brackets are important!
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 19 / 26
Trees
Trees
In the preamble. . .
\usepackage{qtree}
In the text. . .
\Tree [.SX Spec [.X’ X^0 Compl ] ]
SX
Spec X’
X0 Compl
The spaces after the closing brackets are important!
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 19 / 26
Trees
Trees
In the preamble. . .
\usepackage{qtree}
In the text. . .
\Tree [.SX Spec [.X’ X^0 Compl ] ]
SX
Spec X’
X0 Compl
The spaces after the closing brackets are important!
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 19 / 26
Trees
Trees
\Tree [.SX Spec [.X’ X^0 Compl ] ]
Trees are written using bracketed notation.
Terminals do not have to be enclosed in brackets.
Node labels are written just before their opening bracket.
Node labels are preceded by a dot (.).
Superscript (X^0) and subscript (t_i) are supported natively.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 20 / 26
Trees
Trees
\Tree [.SX Spec [.X’ X^0 Compl ] ]
Trees are written using bracketed notation.
Terminals do not have to be enclosed in brackets.
Node labels are written just before their opening bracket.
Node labels are preceded by a dot (.).
Superscript (X^0) and subscript (t_i) are supported natively.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 20 / 26
Trees
Trees
\Tree [.SX Spec [.X’ X^0 Compl ] ]
Trees are written using bracketed notation.
Terminals do not have to be enclosed in brackets.
Node labels are written just before their opening bracket.
Node labels are preceded by a dot (.).
Superscript (X^0) and subscript (t_i) are supported natively.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 20 / 26
Trees
Trees
\Tree [.SX Spec [.X’ X^0 Compl ] ]
Trees are written using bracketed notation.
Terminals do not have to be enclosed in brackets.
Node labels are written just before their opening bracket.
Node labels are preceded by a dot (.).
Superscript (X^0) and subscript (t_i) are supported natively.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 20 / 26
Trees
Trees
\Tree [.SX Spec [.X’ X^0 Compl ] ]
Trees are written using bracketed notation.
Terminals do not have to be enclosed in brackets.
Node labels are written just before their opening bracket.
Node labels are preceded by a dot (.).
Superscript (X^0) and subscript (t_i) are supported natively.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 20 / 26
Trees
Let’s try this one. . .
SX
SYi X’
X0 SZ
Z0 ti
\Tree [.SX SY_i [.X’ X^0 [.SZ Z^0 t_i ] ] ]
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 21 / 26
Trees
Let’s try this one. . .
SX
SYi X’
X0 SZ
Z0 ti
\Tree [.SX SY_i [.X’ X^0 [.SZ Z^0 t_i ] ] ]
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 21 / 26
Trees
More on trees
We can use roofs:
\Tree [.SX X \qroof{Text in the roof}.SY ]
SX
X SY
Text in the roof
Notice how the label follows the \qroof{} command.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 22 / 26
Trees
More on trees
Nodes may have up to five children, or just one:
\Tree [.SX [.X’ X ] [ 1 2 3 4 5 ].SY ]
SX
X’
X
SY
1 2 3 4 5
Notice how they are enclosed in square brackets and the label follows.
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 23 / 26
Trees
More on trees
We can also build trees without labels
\Tree [ This [ is \qroof{an unlabeled tree}. ] ]
This
is
an unlabeled tree
You just have to leave the labels out.
But notice that \qroof still needs to be followed by a dot!
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 24 / 26
Trees
Our last exercise
CP
Whati C’
didj IP
SD
John and Maryk
I’
tj SV
tk V’
buy ti
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 25 / 26
Trees
Our last exercise
\Tree [.CP What_i [.C’ did_j [.IP \qroof{John and Mary_k}.SD
[.I’ t_j [.SV t_k [.V’ buy t_i ] ] ] ] ] ]
Borrega & Martins (UB) Introduction to LATEX Session #4 February 18, 2013 26 / 26