音系结构

音系结构

我需要这样做:

在此处输入图片描述

对于非数字参考,深表歉意。:)

我的尝试pst-asr如下。我不知道它出了什么问题。有人能帮忙吗?

% !TEX TS-program = latex
\documentclass[12pt]{article}
\usepackage{pst-node,pst-asr,graphicx}
\newpsstyle{bigsyls}{extragap=.6ex,unitxgap=true,xgap=3.5ex,ts=0p ($\times$),sy=5.5ex ($\sigma$) .7ex,ph=-4.5ex (pf)}
\newpsstyle{dashed}{linestyle=dashed,dash=3pt 2pt}
\newpsstyle{crossing}{xed=true,xedtype=\xedcirc,style=dashed}
\newpsstyle{dotted}{linestyle=dotted,linewidth=1.2pt,dotsep=1.6pt}
\def\feat#1{$\rm [#1]$}
\def\crossing{\pscircle[linestyle=solid,linewidth=.5pt](0,0){.7ex}}%
\newdimen\dimpuba
\newdimen\dimpubb
\def\TO{\quad$\rightarrow$\quad}
\tiershortcuts

\begin{document}

\newtier{dorsal, high, back, low}
\psset{xgap=1.5in, yunit=3em, ts=0 (Pg), sy=1 ((),
 dorsal=-1 (Dg), high=-2 ([), back=-2.6 ([),
 low=-3.2 ([), sysym=\feat{-cons}, tssym=Place}
\DefList{\dorsalA{0}, \dorsalB{1}, \highoffsetA{-.3}, \highoffsetB{.8},%
\lowoffsetA{0}, \lowoffsetB{1}, \backoffsetA{.3}, \backoffsetB{1.3} }

\asr \X \X |
 \@(\dorsalA,dorsal){Dorsal}
    \-(0,ts)
 \@(\dorsalB,dorsal){Dorsal}
    \-(1,ts)
 \@[\highoffsetA](\dorsalA,high){\feat{$\alpha$high}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
 \@[\lowoffsetA](\dorsalA,low){\feat{$\beta$low}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
 \@[\backoffsetA](\dorsalA,back){\feat{$\gamma$back}}
    \-(\dorsalA, dorsal)    
    \-[style=dotted](\dorsalB, dorsal)
 \@[\highoffsetB](\dorsalB,high){\feat{-$\alpha$high}}
    \-(\dorsalB,dorsal)
    \-[style=dotted](\dorsalA,dorsal)
 \@[\lowoffsetB](\dorsalB,low){\feat{-$\beta$low}}
    \-(\dorsalB, dorsal)
    \-[style=dotted](\dorsalA,dorsal)
 \@[\backoffsetB](\dorsalB,back){\feat{-$\gamma$back}}
    \-(\dorsalB, dorsal)    
    \-[xed=true](\dorsalB,dorsal)
 \endasr

 \end{document}

答案1

首先,pst-asr文档需要latex+dvips编译,无法使用 进行处理pdflatex。以下行:

 % !TEX TS-program = pdflatex 

需要更改为

% !TEX TS-program = latex. 

其次,的定义\feat将内容包装在数学模式中,这意味着您不能在其中嵌入数学代码,因此结果是:

\feat{-$\alpha$high}  

失败。不幸的是,这个错误Missing $ inserted具有讽刺意味,毫无帮助,因为问题(从你的角度来看)实际上是多余的$符号,而不是缺少的符号。当然,正如 Gernot 在评论中所说,这个错误确实是有意义的,因为\feat{-$\alpha$high}展开为$\rm -$\alpha$high$产生两个中间带有一个的数学模式表达式\alpha,因此\alpha,结果最终是不是完全处于数学模式,因此缺少$错误。

因此,您不需要执行上面的代码,只需:

\feat{-\alpha high}  

最后,由于我不太理解的原因(因为我从未使用过该包),它pst-asr似乎对其命令中的空格非常敏感。例如:

  \-(\dorsalA, dorsal)

失败,而

 \-(\dorsalA,dorsal)

可以正常工作。删除这些多余的空格后,文档现在就可以编译了。输出结果与图片不太一样,但我认为既然有了可以工作的代码,您现在就可以自己想办法修复这个问题。

% !TEX TS-program = latex
\documentclass[12pt]{article}
\usepackage{pst-node,pst-asr,graphicx}
\newpsstyle{bigsyls}{extragap=.6ex,unitxgap=true,xgap=3.5ex,ts=0p ($\times$),sy=5.5ex ($\sigma$) .7ex,ph=-4.5ex (pf)}
\newpsstyle{dashed}{linestyle=dashed,dash=3pt 2pt}
\newpsstyle{crossing}{xed=true,xedtype=\xedcirc,style=dashed}
\newpsstyle{dotted}{linestyle=dotted,linewidth=1.2pt,dotsep=1.6pt}
\def\feat#1{$\rm [#1]$} % 
% Since this macro is already in mathmode you don't need $...$ inside its arguments
% i.e., instead of \feat{$\alpha$ voice} use \feat{\alpha voice}

\def\crossing{\pscircle[linestyle=solid,linewidth=.5pt](0,0){.7ex}}%
\newdimen\dimpuba
\newdimen\dimpubb
\def\TO{\quad$\rightarrow$\quad}
\tiershortcuts

\begin{document}

\newtier{dorsal, high, back, low}
\psset{xgap=1.5in, yunit=3em, ts=0 (Pg), sy=1 ((),
 dorsal=-1 (Dg), high=-2 ([), back=-2.6 ([),
 low=-3.2 ([), sysym=\feat{-cons}, tssym=Place}
\DefList{\dorsalA{0}, \dorsalB{1}, \highoffsetA{-.3}, \highoffsetB{.8},%
\lowoffsetA{0}, \lowoffsetB{1}, \backoffsetA{.3}, \backoffsetB{1.3} }

\asr \X \X |
 \@(\dorsalA,dorsal){Dorsal}
    \-(0,ts)
 \@(\dorsalB,dorsal){Dorsal}
    \-(1,ts)
 \@[\highoffsetA](\dorsalA,high){\feat{\alpha high}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
 \@[\lowoffsetA](\dorsalA,low){\feat{\beta low}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
 \@[\backoffsetA](\dorsalA,back){\feat{\gamma back}}
    \-(\dorsalA,dorsal) 
    \-[style=dotted](\dorsalB,dorsal)
 \@[\highoffsetB](\dorsalB,high){\feat{-\alpha high}}
    \-(\dorsalB,dorsal)
    \-[style=dotted](\dorsalA,dorsal)
 \@[\lowoffsetB](\dorsalB,low){\feat{-\beta low}}
    \-(\dorsalB,dorsal)
    \-[style=dotted](\dorsalA,dorsal)
 \@[\backoffsetB](\dorsalB,back){\feat{-\gamma back}}
    \-(\dorsalB,dorsal)    
    \-[xed=true](\dorsalB,dorsal)
 \endasr

 \end{document}

代码输出

答案2

这是使用伟大的forest包裹

该块有两种样式\forestsetasr样式使边离开父级的south锚点并设置树的打包尺寸,并在边上strike添加双删除线( )。

我创建了一个幻影(不可见)根节点(R),其子节点是两个[–cons]节点,以模拟两棵独立的树。然后我绘制了每棵树的主节点,并使用strike在相关边缘上使用了样式。要创建“多主导”效应south,我手动从另一个父节点到命名叶子绘制了虚线。

%!TEX TS-program = xelatex
\documentclass{article}

\usepackage{forest}

\begin{document}
\forestset{
asr/.style={
  for tree={
    align=center,
    parent anchor=south,
%   child anchor=north,
    s sep=4mm,
    l sep=6mm
  }
},
strike/.style={
  edge label={
    node[midway, sloped, rotate=90] {=}
  }
}
}

\begin{forest}asr
[R,phantom
  [{[–cons]}
    [Place
      [Dorsal
        [{[α high]},strike]
        [{[β low]},strike]
        [{[γ back]},name=g1]
      ]
        { \draw[dashed] (.south) -- (a2); }
        { \draw[dashed] (.south) -- (b2); }
    ]
  ]
  [{[–cons]}
    [Place
      [Dorsal
        [{[α high]},name=a2]
        [{[β low]},name=b2]
        [{[γ back]},strike]
      ]
        { \draw[dashed] (.south) -- (g1); }
    ]
  ]
]
\end{forest}

\end{document}

答案3

使用 xelatex 运行文档(可以从菜单中选择):

\documentclass[12pt]{article}
\usepackage{pst-node,pst-asr,graphicx}
\newpsstyle{bigsyls}{extragap=.6ex,unitxgap=true,xgap=3.5ex,
            ts=0p ($\times$),sy=5.5ex ($\sigma$) .7ex,ph=-4.5ex (pf)}
\newpsstyle{dashed}{linestyle=dashed,dash=3pt 2pt}
\newpsstyle{crossing}{xed=true,xedtype=\xedcirc,style=dashed}
\newpsstyle{dotted}{linestyle=dotted,linewidth=1.2pt,dotsep=1.6pt}
\def\feat#1{\rm [#1]}
\def\crossing{\pscircle[linestyle=solid,linewidth=.5pt](0,0){.7ex}}%
\newdimen\dimpuba
\newdimen\dimpubb
\def\TO{\quad$\rightarrow$\quad}
\tiershortcuts

\begin{document}

\newtier{dorsal, high, back, low}
\psset{xgap=1.5in, yunit=3em, ts=0 (Pg), sy=1 ((),
        dorsal=-1 (Dg), high=-2 ([), back=-2.6 ([),
        low=-3.2 ([), sysym=\feat{-cons}, tssym=Place}
\DefList{\dorsalA{0}, \dorsalB{1}, \highoffsetA{-.3}, \highoffsetB{.8},%
        \lowoffsetA{0}, \lowoffsetB{1}, \backoffsetA{.3}, \backoffsetB{1.3} }

\asr \X \X |
  \@(\dorsalA,dorsal){Dorsal}
    \-(0,ts)
  \@(\dorsalB,dorsal){Dorsal}
    \-(1,ts)
  \@[\highoffsetA](\dorsalA,high){\feat{$\alpha$high}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
  \@[\lowoffsetA](\dorsalA,low){\feat{$\beta$low}}
    \-(\dorsalA,dorsal)
    \-[xed=true](\dorsalA,dorsal)
  \@[\backoffsetA](\dorsalA,back){\feat{$\gamma$back}}
    \-(\dorsalA,dorsal)    
    \-[style=dotted](\dorsalB,dorsal)
  \@[\highoffsetB](\dorsalB,high){\feat{-$\alpha$high}}
    \-(\dorsalB,dorsal)
    \-[style=dotted](\dorsalA,dorsal)
  \@[\lowoffsetB](\dorsalB,low){\feat{-$\beta$low}}
    \-(\dorsalB,dorsal)
    \-[style=dotted](\dorsalA,dorsal)
  \@[\backoffsetB](\dorsalB,back){\feat{-$\gamma$back}}
    \-(\dorsalB,dorsal)    
    \-[xed=true](\dorsalB,dorsal)
\endasr

\end{document}

在此处输入图片描述

相关内容