小册子和 pstricks 包

小册子和 pstricks 包

我正在同时使用bookletpstricks包,但遇到了布局问题。基本上,据我所知,pstricks和相关包需要 dvi 编译,所以我必须\setdivpstargetpagesbooklet包进行设置。

% !TEX TS-program = latex
\documentclass[12pt]{article}

\usepackage[print]{booklet}
\setdvipstargetpages

\usepackage{pstricks,pst-node,pst-asr}

\usepackage{lipsum}

\begin{document}

\lipsum[1]

\newpage

\lipsum[2]

\end{document}

但是,这会打印出奇怪的页面布局:

在此处输入图片描述 在此处输入图片描述

有人知道如何解决这个问题吗?提前谢谢您!

更新

根据 Bernard 的建议,我相应地修改了代码。但是,我的所有图表都缩小了!

\documentclass[12pt]{article}
\usepackage{tipa, pifont,fontawesome,wasysym,amssymb}
\usepackage{linguex}
\renewcommand{\firstrefdash}{}
\def\exr{\setcounter{ExNo}{0}\ex}
\usepackage[print]{booklet}
\setpdftargetpages

\usepackage{pst-node,pst-xkey,pst-asr,graphicx}
\newpsstyle{bigsyls}{extragap=.6ex,unitxgap=true,xgap=3.5ex,ts=0pt ($\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

\usepackage{auto-pst-pdf}

\newlength{\strikewidth}
           \newlength{\strikelength}
           \setlength{\strikewidth}{.5pt}

           \newcommand{\strike}[1]{%strikethrough
           \settowidth{\strikelength}{#1}%
           #1\hspace{-\strikelength}%
           \rule[0.5ex]{\strikelength}{\strikewidth}%
           }

\begin{document}

\ex. \a. \small \Rnode{I}{\textit{I}} \hspace{1.8cm} [\Rnode{DP}{$_{\rm  DP}$} \textit{\Rnode{THE}{the} only one who} \hspace{.2cm}  \textit{(only one) \Rnode{WHO}{who}} \hspace{.9cm} \Rnode{POSS}{\textsc{poss}} ]
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=-2pt]{-}{I}{DP}
\ncput*{\sc \small predication} 
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=2pt]{-}{THE}{WHO}
\ncput*{\sc \small relativization}
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=-2pt]{-}{WHO}{POSS}
\ncput*{\sc \small binding} 
\b.[] \hfill \small \checkmark H$_{PF}$ \\
\c. \small \Rnode{I}{\textit{I}} \hspace{1.8cm} [\Rnode{DP}{$_{\rm DP}$} \textit{\Rnode{THE}{the} only one who} \hspace{.2cm}  \textit{(only one) \Rnode{WHO}{who}} \hspace{.9cm} \Rnode{POSS}{\textsc{poss}} ]
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=-2pt]{-}{I}{DP}
\ncput*{\sc \small predication} 
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=2pt]{-}{THE}{WHO}
\ncput*{\sc \small relativization}
\d.[] \Rnode{BLANK1}{\phantom{w}} \hspace{9.3cm} \Rnode{BLANK2}{\phantom{w}} \\
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=0pt]{-}{BLANK1}{BLANK2}
\ncput*{\sc \small agree / share} \hfill *H$_{PF}$ \\
\d. \small \Rnode{I}{\textit{I}} \hspace{1.8cm} [\Rnode{DP}{$_{\rm DP}$} \textit{\Rnode{THE}{the} only one who} \hspace{.2cm}  \textit{(only one) \Rnode{WHO}{who}} \hspace{.9cm} \Rnode{POSS}{\textsc{poss}} ]
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=-2pt]{-}{I}{DP}
\ncput*{\sc \small predication} 
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=2pt]{-}{THE}{WHO}
\ncput*{\sc \small relativization}
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=-2pt]{-}{WHO}{POSS}
\ncput*{\sc \small binding} 
\d.[] \Rnode{BLANK1}{\phantom{w}} \hspace{9.25cm} \Rnode{BLANK2} {\phantom{w}} \\
\ncbar[arrowsize=4pt, nodesep=1pt, arm=7pt, linewidth=.5pt, angle=-90, offsetA=0pt, offsetB=0pt]{-}{BLANK1}{BLANK2}
\ncput*{\sc \small agree / share} \hfill (*)H$_{PF}$ 


\newtier{nuclear,rhyme,coda,onset}
\psset{xgap=2em,yunit=2em,
 phB=-1,nuclear=.9 (lg),coda=1.2 (dg),rhyme=2 (hy),
 onset=2 (tg),syB=3.2}
\DefList{\onsetpos{2},\nuclearpos{2},\rhymepos{2}, \nuclearposs{4}, \rhymeposs{4}}

\ex. \scantokens{
\a. \label{1} \asr pj{\textepsilon} |
\@(\nuclearpos,nuclear){N}
  \-(2,ts)
\@(\rhymepos,rhyme){R}
  \-(\nuclearpos,nuclear)
\@(2,sy){$\sigma$}
  \-(\onsetpos,onset)
    \-(1,ts)
    \-(0,ts)
  \-(\rhymepos,rhyme) |
de |
\@(\nuclearposs,nuclear){N}
  \-(4,ts)
\@(\rhymeposs,rhyme){R}
  \-(\nuclearposs,nuclear)
\@(4,sy){$\sigma$}
  \-(\rhymeposs,rhyme)
  \-(3,ts)
\endasr
\b. \label{2} \asr pj{\textepsilon}|
\@(\nuclearpos,nuclear){N}
  \-(2,ts)
  \-(1,ts)
\@(\rhymepos,rhyme){R}
 \-(\nuclearpos,nuclear)
\@(2,sy){$\sigma$}
  \-(\onsetpos,onset)
    \-(0,ts)
  \-(\rhymepos,rhyme) |
de |
\@(\nuclearposs,nuclear){N}
  \-(4,ts)
\@(\rhymeposs,rhyme){R}
  \-(\nuclearposs,nuclear)
\@(4,sy){$\sigma$}
  \-(\rhymeposs,rhyme)
  \-(3,ts)
\endasr }
\end{document}

在此处输入图片描述

这就是它应该的样子:

在此处输入图片描述

答案1

使用\setpdftargetpages、添加usepackage{auto-pst-pdf} 加载pst-asr(无需自己加载pstricks:这是自动完成的),然后用 进行编译pdflatex

与大多数人的想法相反,借助该auto-pst-pdf软件包,完全可以使用 pdflatex 编译 pstricks 代码。您必须添加--enable-write18MiKTeX 或-shell-escapeTeX LIve 和 MacTeX 的开关。

例子:

 \documentclass[x11names, 12pt]{article}

\usepackage[print]{booklet}
\setpdftargetpages
\usepackage{pst-plot, pst-asr}
\usepackage{auto-pst-pdf}
\usepackage{lipsum}

\begin{document}

\lipsum[1]
\begin{center}
  \psset{unit=2cm, algebraic, arrowinset=0.125, arrowsize=3pt, linejoin=1}
  \bigskip
  \begin{pspicture*}(-1,-1.9)(2.9,1.92)
    \psaxes[linecolor=LightSteelBlue3, tickcolor=LightSteelBlue3, arrows =-> ](0,0)(-0.9,-1.9)(2.86,1.9) [$x$,-135] [$y$,-135]
    \uput[dl](0,0){$O$}
    \psset{linestyle=dashed, dash=4pt 4pt}
    \psline[linewidth=0.3pt](0,-1)(1,-1)(1,1)(0,1)
    \psset{linewidth=1.2pt, linecolor=IndianRed3, plotpoints=100}
    \parametricplot{-1.5}{-1}{t² | t³}
    \parametricplot{1}{1.5}{t² | t³}
    \parametricplot[arrows=*-*, dotsize=3pt, linestyle=solid]{-1}{1}{t² | t³}
  \end{pspicture*}
\end{center}
\newpage

\lipsum[2]

\end{document} 

在此处输入图片描述

相关内容