Skip to content

yuanheTian/ccg-latex

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ccg-latex

The commands in the ccg-latex.sty file can be used to typeset Combinatory Categorial Grammar (CCG) derivations in latex.

The example file shows how.

The basic command is \begin{ccg}{n}{data}{ders}\end{ccg}. It typesets derivations of data in n columns without glosses.

It has a variant, \begin{ccgg}{n}{data}{gloss}{ders}\end{ccgg}, which typesets glosses before the top lines are drawn.

Both are based on \cgex{n}{lines}, which is kept for legacy code, where n is the number of columns, and lines is the double-backslash-separated lines of at most that many columns.

Basic commands other than above:

\cgf{..} typesets the syntactic category.

\cat{..} typesets the syntactic category. It is an alias of \cgf{..}.

\lf{..} typesets the logical form, including the colon and math mode.

\fs is the forward slash. We also have \bs, \us, \fss, \bss as backslash, undirectional slash, double forward slash and backward, etc.

Some of these slashes have aliases. \fss, \bss, \uss are resp. \rds, \lds, \uds.

\combx typesets the combinator x in bold Curry and Feys notation.

\cgs{..}{..} typesets a subscripted category.

\cgline{n}{rulename} draws a CCG line across n columns, and indexes it with the rule.

Rule names are \cgfa, \cgba, \cgfc, \cgbc etc. Rulename need not be a pre-defined rule name.

\cgres{n}{..} typesets the material in .. across n columns. The ... is typeset as \cgf{...}. If there is math mode in it, that is typeset in math mode.

\cglines{n} typesets n undecorated lines separated by blanks, which is common practice after lexical assumptions.

\badline{n}{rulename} typesets a line spanning n columns with *** in the middle, with rule name at the end.

\mc{n}{text} typesets the text multi-column centered over n columns; useful for foreign language glossing.

\fstars is a forward slash with star modality, i.e. /*.

\bxs is a backward slash with crossing modality, i.e. \x.

Defined for all slashes and modalities.

About

latex style file for drawing Combinatory Categorial Grammar (CCG) derivations

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 100.0%