1

I am using booklet and pstricks packages together, but I am encountering layout issues. Basically, as far as my understanding goes, pstricks and related packages require dvi compiling, so I had to set up \setdivpstargetpages for the booklet package.

% !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}

However, this print out a weird page layout:

enter image description here enter image description here

Does anybody know how to fix this? Thank you in advance!

UPDATE

After Bernard's suggestion, I edited the code accordingly. Although, all my graphs got shrunken!

\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}

enter image description here

That's how it is supposed to be:

enter image description here

  • Note that \rm etc. are deprecated for use in LaTeX (20+ years) and ought not be used. \newcommand* is safer than \def. Also, for whatever it is worth, booklet has not worked properly for me (and others) for some years. If you need relevant features, you should consider an alternative approach. If not, then good luck to you! – cfr Aug 3 '16 at 22:33
  • Thank you for your comment. I'd be happy to go for an alternative to the booklet. Any suggestion? – RobertP. Aug 4 '16 at 6:41
  • There's no need if it works. If not, search this site. There are a couple of questions on this. Basically, I use pdfpages with 2 files. – cfr Aug 4 '16 at 16:28
3

Use \setpdftargetpages, add usepackage{auto-pst-pdf} after loading pst-asr (needless to loadpstricks yourself : this is automatically done), and compile with pdflatex.

Contrary to what most people think, it is perfectly possible to compile pstricks code with pdflatex, thanks to the auto-pst-pdf package. You have to add the --enable-write18 switch for MiKTeX, or -shell-escape for TeX LIve and MacTeX.

Example:

 \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} 

enter image description here

  • Thank you replying, that was helpful! Although, I think you tweak caused another issue: all my graphs are now compacted! Please take a look at the screenshots and the code above - thank you! – RobertP. Aug 3 '16 at 22:04
  • @RobertP.: I'm sorry, but I have an error message with your code, due to \ncbar (Missing }. The \Rnodes do not produce an error message, but they do not appear in the final pdf. As \ncbar is supposed to connect two \Rnodes, the error message is not surprising. – Bernard Aug 3 '16 at 23:57
  • Correct, but with this does not happen when using the \setdivpstargetpages command, so I guess the error does have something to do with what you suggested. – RobertP. Aug 4 '16 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.