Typesetting linguistic rewrite rule
Here's a version that looks ok. I added a \twoof
command for the second brace and made a longer \phold
command \Phold
. Since the underlying commands are tabular you can pass any tabular specification to it so I removed the intercolumn space to make the alignment look a bit nicer.
\documentclass{article}
\usepackage{phonrule}
\usepackage{amsmath}
\newcommand*{\twoof}[2][c]{%
\ensuremath{%
\left\{
\begin{tabular}{#1#1}#2\end{tabular}
\right\}
}%
}
\newcommand*{\Phold}{\rule[-4pt]{2.5em}{.5pt}}
\begin{document}
\phonc
{\phonfeat{$-$cnt\\ +hi}}
{[$\alpha$grv]}
{\twoof[@{}c@{}]{%
\phonfeat{$-$cnt\\ $\alpha$grv} & \Phold\\
\Phold & \phonfeat{$-$cnt\\ $\alpha$vce}%
}}
\end{document}
You can look at the reimplementation of phonrule
I did for Alignment in \oneof from the phonrule package
We can now define a variant of \oneof
where the closing brace is added and the space between columns is removed.
\documentclass{article}
% BEGIN reimplementation of phonrule
\providecommand*{\textrightarrow}{\ensuremath{\rightarrow}}
\providecommand*{\textplus}{\ensuremath{+}}
\providecommand*{\textminus}{\ensuremath{-}}
\newcommand*{\phold}{\rule[-1.5pt]{1.5ex}{.5pt}}
\newcommand*{\phon}[2]{#1 \textrightarrow{} #2}
\newcommand*{\phonc}[3]{\phon{#1}{#2}~/~#3}
\newcommand*{\phonr}[3]{\phon{#1}{#2}~/~\phold#3}
\newcommand*{\phonl}[3]{\phon{#1}{#2}~/~#3\phold}
\newcommand*{\phonb}[4]{\phonl{#1}{#2}{#3}#4}
\makeatletter
\newcommand*{\env}{\@ifstar{\@env{&}}{\@env{~}}}
\newcommand*{\@env}[3]{#2~/#1#3}
\newcommand*{\envr}{\@ifstar{\@envr{&}}{\@envr{~}}}
\newcommand*{\@envr}[3]{\@env{#1}{#2}{\phold#3}}
\newcommand*{\envl}{\@ifstar{\@envl{&}}{\@envl{~}}}
\newcommand*{\@envl}[3]{\@env{#1}{#2}{#3\phold}}
\newcommand*{\envb}{\@ifstar{\@envb{&}}{\@envb{~}}}
\newcommand*{\@envb}[4]{\@env{#1}{#2}{#3\phold#4}}
% set environment for feature matrix with square brackets
\newcommand*{\phonfeat}[1]{%
\ensuremath{%
\left[\begin{tabular}{c}#1\end{tabular}\right]%
}%
}
\newcommand*{\oneof}[2][c]{%
\ensuremath{%
\left\{
\begin{tabular}{#1#1}#2\end{tabular}
\right.
}%
}
\makeatother
% END
\newcommand{\oneofvar}[2][c]{%
\ensuremath{%
\left\{
\begin{tabular}{#1@{}#1}#2\end{tabular}
\right\}
}%
}
\begin{document}
\phonc
{\phonfeat{$-$cnt\\ +hi}}
{[$\alpha$grv]}
{\oneofvar{%
\phonfeat{$-$cnt\\ $\alpha$grv} & \hrulefill \\
\hrulefill & \phonfeat{$-$cnt\\ $\alpha$vce}%
}}
\end{document}