I am using a template for my linguistic stuff. one of my friends sent me an example of how to do some syntactic stuff. the code is this
Code: Select all
\documentclass[pdf,a4paper,11pt]{article}
%\usepackage{abbrev}
%\usepackage{lingmacros}
%\usepackage{latexsym}
\usepackage{agrclassmacros} %for fd
\usepackage{trees}
\usepackage{combine.sty}
%\usepackage{natbib}
%\bibliographystyle{cslipubs-natbib}
%\usepackage{pstricks}
%\usepackage{trees} %circlenode seems to need this
%\input{rgb} %these are the colour definitions
\usepackage{cgloss4e}
%%%for the handout version
%%use the following page settings
\setlength{\textheight}{9in}
\setlength{\textwidth}{6.4in}
\setlength{\oddsidemargin}{0in}
\setlength{\topmargin}{-.4in}
\setlength{\parindent}{0pt}
%\makeatletter
%\def\section{\@startsection {section}{1}{\z@}{-3.5ex plus -1ex minus%
%-.2ex}{2.3ex plus .2ex}{\normalsize\bf}}
%\def\subsection{\@startsection{subsection}{2}{\z@}{-3.25ex plus -1ex minus%
%-.2ex}{1.5ex plus .2ex}{\normalsize\bf}}
%\makeatother
\begin{document}
To draw this feature structures all you need is the macros {\em agrclassmacros.sty}
\fdand{
\feat{\pred}{\sc `man'}
\feat{\sc spec}{\fdand{
\feat{\pred}{`a'}
}}
\feat{\sc adj}{\fdand{
\feat{\pred}{\sc `dislike$<$(subj) (obj)$>$'}
\feat{\sc subj}{\fdand{\feat{\pred}{\sc `sam'}}}
\feat{\sc topic}{\fdand{\feat{\pred}{`pro'}}}
\feat{\sc obj}{\fdand{\feat{\pred}{`pro'}}}}} }
\\
To draw this one you additionally need {\em trees.sty}. It is also necessary to select the compilation option (under the Typeset menu) TeX and DVI (otherwise the lines do not get drawn)
\fdand{
\feat{\pred}{\sc `man'}
\feat{\sc spec}{\fdand{
\feat{\pred}{`a'}
}}
\feat{\sc adj}{\fdand{
\feat{\pred}{\sc `dislike$<$(subj) (obj)$>$'}
\feat{\sc subj}{\fdand{\feat{\pred}{\sc `sam'}}}
\feat{\sc topic}{\rnode{a}{\fdand{\feat{\pred}{`pro'}
\feat{\sc pntype}{\sc rel}}} }
\feat{\sc relpro}{\rnode{b}{\strut} }
\feat{\sc obj}{\rnode{c}{\strut} }
}}}
\tightrtor[.9]{a}{b}
\tightrtor[.9]{b}{c}
\\
There are several different glossing environments but the one which I use is {\em cgloss4e.sty}
\gll Mae 'r ferch yn fyr ei thymer.\\
is the girl.{\sc f.sg} {\sc pred} short.({\sc m.sg}) {\sc poss.3sg.f} temper.{\sc f.sg}\\
`The girl is short-tempered.'\\
For IPA symbols use {\em tipa.sty}
All of these except {\em agrclassmacros.sty} will already be available in any standard distribution of latex.
\end{document}
Code: Select all
This is pdfTeX, Version 3.1415926-1.40.11 (TeX Live 2010)
restricted \write18 enabled.
entering extended mode
(./avmex.tex
LaTeX2e <2009/09/24>
Babel <v3.8l> and hyphenation patterns for english, dumylang, nohyphenation, ge
rman-x-2009-06-19, ngerman-x-2009-06-19, afrikaans, ancientgreek, ibycus, arabi
c, armenian, basque, bulgarian, catalan, pinyin, coptic, croatian, czech, danis
h, dutch, ukenglish, usenglishmax, esperanto, estonian, farsi, finnish, french,
galician, german, ngerman, swissgerman, monogreek, greek, hungarian, icelandic
, assamese, bengali, gujarati, hindi, kannada, malayalam, marathi, oriya, panja
bi, tamil, telugu, indonesian, interlingua, irish, italian, kurmanji, lao, lati
n, latvian, lithuanian, mongolian, mongolianlmc, bokmal, nynorsk, polish, portu
guese, romanian, russian, sanskrit, serbian, slovak, slovenian, spanish, swedis
h, turkish, turkmen, ukrainian, uppersorbian, welsh, loaded.
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/article.cls
Document Class: article 2007/10/19 v1.4h Standard LaTeX document class
(/usr/local/texlive/2010/texmf-dist/tex/latex/base/size11.clo))
(/Users/muhammadalzaidi/Library/texmf/tex/latex/agrclassmacros/agrclassmacros.s
ty) (/Users/muhammadalzaidi/Library/texmf/tex/latex/avm/trees.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/pst-node/pst-node.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pstricks.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/pst-xkey.tex
(/usr/local/texlive/2010/texmf-dist/tex/latex/xkeyval/xkeyval.sty
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/xkeyval.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/xkeyval/keyval.tex))))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pst-fp.tex
`pst-fp' v0.05, 2010/01/17 (hv))
`PSTricks' v2.15 <2010/11/25> (tvz)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pstricks/pstricks.con))
v1.14, 2010/12/28)
! Undefined control sequence.
l.54 \avmhskip
{3pt}
?
Please,, I need your help
