\documentclass{article}
\usepackage{pstricks,pst-xkey,pst-asr,graphicx}\psset{everyasr=\tiershortcuts}
\usepackage{tipa}
\begin{document}
\asr \3p{\textepsilon}{\textltailm} \endasr
\end{document}
有没有什么办法我可以使用 CV 骨架代替 x?
答案1
在构造中设置符号\asr
:
\documentclass{article}
\usepackage{pst-asr,tipa}
\begin{document}
\newcommand{\xsymb}{}
\newcommand{\cons}{\renewcommand{\xsymb}{c}}% Consonant
\newcommand{\vowl}{\renewcommand{\xsymb}{v}}% Vowel
\asr[tssym=\xsymb] \3\cons p \vowl{\textepsilon}\cons{\textltailm} \endasr
\end{document}
这个想法是将键设置tssymb
为某个宏(\xsymb
在上述情况下)。然后,用每个辅音/元音转变您调用\cons
/\vowel
来更新宏\xsymb
。
答案2
您可以将默认计时槽符号设置为空,然后手动将 放置C
在V
计时槽层上。我在下面的代码中解释了更多内容,需要使用 XeLaTeX 运行。
\documentclass{article}
\usepackage{pst-asr}
\usepackage[bitstream-charter]{mathdesign} % selects a math font to match Charis SIL
\usepackage{fontspec} % for font declaration in XeLaTeX
\setmainfont{Charis SIL} % this needs to go after `\usepackage{mathdesign}
\begin{document}
\psset{everyasr=\tiershortcuts, % allows \@ to expand to \tierput and \- to expand to \assoc
tssym=, % the timing slot symbol ($\times$ by default) is set to be blank so that you can override it manually
ts=0pt (C) % C and V are taller than the default timing slot symbol, so this sets the height of this tier to the height of C
}
\asr
\3 % gives you a syllable with three timing slots
| % begins a stretch that the parser will ignore
\@(0,ts){C} % puts C in the 1st timing slot
\@(1,ts){V} % puts V in the 2nd timing slot
\@(2,ts){C} % puts C in the 3rd timing slot
| % finishes the stretch that the parser will ignore
pɛɱ
\endasr
\end{document}
简化版
\asr \3|\CVC|pɛɱ \endasr
通过为整个时隙层定义一个宏,此代码可以简化为:
\documentclass{article}
\usepackage{pst-asr}
\usepackage[bitstream-charter]{mathdesign} % selects a math font to match Charis SIL
\usepackage{fontspec} % for font declaration in XeLaTeX
\setmainfont{Charis SIL} % this needs to go after `\usepackage{mathdesign}
\begin{document}
\psset{everyasr=\tiershortcuts, % allows \@ to expand to \tierput and \- to expand to \assoc
tssym=, % the timing slot symbol ($\times$ by default) is set to be blank so that you can override it manually
ts=0pt (C) % C and V are taller than the default timing slot symbol, so this sets the height of this tier to the height of C
}
\newcommand{\CVC}{\@(0,ts){C}\@(1,ts){V}\@(2,ts){C}} % puts all of the timing slot tier into a macro
\asr \3|\CVC|pɛɱ \endasr % make sure to delimit the macro within ||, which makes the parser ignore it
\end{document}
多音节
请注意,如果您想将多个音节放在一起,则必须为整个 定义宏asr
,而不是逐个音节地定义,因为时隙索引会延续到 内的所有音节asr
。
以下是示例。\CCVC
宏将 CCVC 放在 的前四个位置asr
,位于宏放置的 CVC 之上\CVC
。
\newcommand{\CVC}{\@(0,ts){C}\@(1,ts){V}\@(2,ts){C}}
\newcommand{\CCVC}{\@(0,ts){C}\@(1,ts){C}\@(2,ts){V}\@(3,ts){C}}
\asr \4|\CCVC|pɾɔm\3|\CVC|pɛɱ \endasr
一种可能的解决方法是为整个定义一个宏asr
:
\newcommand{\CCVCCVC}{\@(0,ts){C}\@(1,ts){C}\@(2,ts){V}\@(3,ts){C}\@(4,ts){C}\@(5,ts){V}\@(6,ts){C}}
\asr |\CCVCCVC|\4pɾɔm\3pɛɱ \endasr