当我尝试编译以下代码时:
%LuaLaTeX
\documentclass{article}
\usepackage{pst-asr}
\begin{document}
\asr \4ki:p\endasr
\end{document}
我明白了:
! Undefined control sequence.
\c@lor@to@ps ->\PSTricks
_Not_Configured_For_This_Format
l.7 \asr \4
ki:p\endasr
The control sequence at the end of the top line
of your error message was never \def'ed. If you have
misspelled it (e.g., `\hobx'), type `I' and the correct
spelling (e.g., `I\hbox'). Otherwise just continue,
and I'll forget about whatever was undefined.
ConTeXt 也发生了同样的事情:
%ConTeXt-mkiv
\input pst-asr
\starttext
\asr \4ki:p\endasr
\stoptext
我得到:
tex error > tex error on line 888 in file /usr/local/texlive/2019/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex: ! Missing \endcsname inserted
<to be read again>
\bgroup
\71>t #1->\bgroup
\let \nextnextnext \egroup \def \next #1#1{\def \next {\ac...
\pgfmath@namedef #1->\expandafter \def \csname #1
\endcsname
\pgfmathdeclareoperator ...th@operator@\string #1}
{#1}\pgfmath@namedef {pgfm...
l.888 ...areoperator{||}{or} {2}{infix} {200}
878 \pgfmathdeclareoperator{^}{pow} {2}{infix}{900}
879
880 \pgfmathdeclareoperator{<} {} {1}{prefix} {1}
881
882 \pgfmathdeclareoperator{>} {greater} {2}{infix} {250}
883 \pgfmathdeclareoperator{<} {less} {2}{infix} {250}
884 \pgfmathdeclareoperator{==}{equal} {2}{infix} {250}
885 \pgfmathdeclareoperator{>=}{notless} {2}{infix} {250}
886 \pgfmathdeclareoperator{<=}{notgreater}{2}{infix} {250}
887 \pgfmathdeclareoperator{&&}{and} {2}{infix} {200}
888 >> \pgfmathdeclareoperator{||}{or} {2}{infix} {200}
889 \pgfmathdeclareoperator{!=}{notequal} {2}{infix} {250}
890 \pgfmathdeclareoperator{!} {not} {1}{prefix}{975}
891 \pgfmathdeclareoperator{?} {ifthenelse}{3}{infix} {100}
892 \pgfmathdeclareoperator{:} {@@collect} {2}{infix}{101}
893
894 \pgfmathdeclareoperator{!}{factorial}{1}{postfix}{800}% Must be defined after prefix ! operator.
895 \pgfmathdeclareoperator{r}{deg} {1}{postfix}{600}
896
897 \pgfmathdeclareoperator{,}{@collect} {2}{infix} {10}
898 \pgfmathdeclareoperator{[}{@startindex}{2}{prefix} {7}
?
有没有办法解决这些问题,还是我应该放弃 pst-asr?
答案1
用来lualatex
%LuaLaTeX
\documentclass{article}
\usepackage{auto-pst-pdf-lua}
\usepackage{pst-asr}
\begin{document}
\begin{postscript}
\asr \4ki:p\endasr
\end{postscript}
\end{document}
然后运行它lualatex --shell-escape <filename>
对于 ConTeXt 使用
%ConTeXt-mkiv
\usemodule[pstricks]
\starttext
\startPSTRICKS
\input pst-asr
\asr \4ki:p\endasr
\stopPSTRICKS
\stoptext
然而,使用xelatex
是最简单的方法