5

I am using Texmaker and MiKTeX to try and produce an autosegmental representation such as the one in this image:

hwari

The following code is given in John Frampton's pst-asr user's guide:

\asr[xgap=2em,syB=2.5em] hwari|
\@(1,sy){L}
    \-[xed=true,xedratio=.4](1,ts)\-[style=dotted](2,ts)
\@(2,sy){H}
    \-(2,sy)(2,ts)
\@(4,sy){L}
    \-(4,ts)
\endasr

No matter how I build the PDF document, the result is similar to this (i.e. not the autosegmental representation above):

hwari2

I am very new to this, so it is likely I am making a simple error. Any assistance would be greatly appreciated.

See also the full code of my document:

\documentclass[10pt,a4paper]{article}
\usepackage{pst-asr}
\begin{document}
\asr[xgap=2em,syB=2.5em] hwari|
\@(1,sy){L}
    \-[xed=true,xedratio=.4](1,ts)\-[style=dotted](2,ts)
\@(2,sy){H}
    \-(2,sy)(2,ts)
\@(4,sy){L}
    \-(4,ts)
\endasr
\end{document}

Thank you.

  • You need to compile using latex+dvips rather than pdflatex. See http://tex.stackexchange.com/questions/158952/using-pstricks-with-texmaker for how to do this I. TeXMaker. – Alan Munn May 12 '14 at 02:00
  • I configured the Quick Build Command to LaTeX + dvips + ps2pdf + View PDF and then LaTeX + dvips + View PS but neither worked; both the PDF and DVI file had the malformed output as in the second image. – user51527 May 12 '14 at 02:38

1 Answers1

5

The pst-asr documentation is somewhat difficult to read. In order to use the shortcuts \@ and \- you need to first execute the \tiershortcuts command. Following Stefano's comment, I've put this into a \psset command to apply it to each asr environment, which will ensure that the shortcuts don't interfere with any other packages' commands. Furthermore, the style=dotted should be linestyle=dotted. So the complete document should be:

\documentclass[10pt,a4paper]{article} 
\usepackage{pst-asr}
\psset{everyasr=\tiershortcuts}
\begin{document}
\asr[xgap=2em,syB=2.5em] hwari|
\@(1,sy){L}
    \-[xed=true,xedratio=.4](1,ts)\-[linestyle=dotted](2,ts)
\@(2,sy){H}
    \-(2,sy)(2,ts)
\@(4,sy){L}
    \-(4,ts)
\endasr
\end{document}

output of code

Alan Munn
  • 218,180
  • Including the \tiershortcuts command has fixed the problem. Thank you, @Alan Munn. – user51527 May 12 '14 at 10:28
  • 1
    I suggest to put \psset{everyasr=\tiershortcuts} which executes the command only inside the asr environments (and guarantees better compatibility with other packages). – Stefano May 13 '14 at 13:41
  • @Stefano Thanks, Stefano, I've updated my answer to reflect your suggestion. – Alan Munn May 13 '14 at 16:32