下面是一个(较长的、不起作用的)使用 pdftricks 和回忆录文档类的最小示例。它直接基于在以下位置找到的(较短的、有效的)使用 pdftricks 的最小示例http://www.tug.org/pipermail/macostex-archives/2009-June/040498.html. 我得到如下错误:
! Undefined control sequence.
\psinputs ->\verbatimwrite
{tmp.inputs}
l.28 \begin{psinputs}
任何帮助都将不胜感激!
\documentclass[article, a4paper, 12pt, twoside]{memoir}
\setlrmarginsandblock{23mm}{23mm}{*}
\setulmarginsandblock{23mm}{28mm}{*}
\setheadfoot{\onelineskip}{2\onelineskip}
\setheaderspaces{*}{1mm}{*}
\checkandfixthelayout
\setcounter{secnumdepth}{1}
\setsecindent{1cm}
\let\footruleskip\relax % for compatibility of memoir and fancyhdr
\let\sl\ttfamily % for compatibility of memoir and blindtext (silly, but it works) ha ha \ttfamily
\let\sc\scshape
\let\bf\bfseries
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\cfoot{\thepage}
\renewcommand{\headrulewidth}{0pt}
%%% End of memoir stuff
\usepackage{ifpdf}
\ifpdf%
\usepackage{pdftricks}
\begin{psinputs}
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add} % <- added this line!
\end{psinputs}
\else
\usepackage{pstricks}
\usepackage{pst-plot}
\usepackage{pstricks-add} % <- added this line!
\newenvironment{pdfpic}{}{}
\fi
\begin{document}
\centering
\begin{pdfpic}
\begin{pspicture}(-1,-1)(6,6)
\psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2](6,6)
\end{pspicture}
\end{pdfpic}
\end{document}
答案1
顺便说一句,添加\DisemulatePackage{moreverb}
到序言中:您可以\sc
使用oldfontcommands
类选项重新引入
答案2
使用包auto-pst-pdf
而不是pdftricks
。它确实简化了 PSTricks 的使用:
...
\usepackage{auto-pst-pdf}
\usepackage{pstricks-add} % <- added this line!
\begin{document}
\centering
\begin{pspicture}(-1,-1)(6,6)
\psaxes[showOriginTick=false,showorigin=false,Dx=2,Dy=2,subticks=2](6,6)
\end{pspicture}
...
照常运行pdflatex -shell-escape <file.tex>