1

I tried to frame texts in double lines following directions in the mdframed package manual. However, I cannot even load the mdframed package with the "pstricks" option. Following are my codes:

\documentclass{article}
\usepackage{amssymb}
\usepackage[framemethod=pstricks]{mdframed}
\begin{document}  
\begin{mdframed}
test
\end{mdframed}
\newpage
\end{document}

And this is the error message I am getting:

.......
("C:\Program Files\MiKTeX 2.9\tex\latex\mdframed\md-frame-2.mdf"))
(C:\Users\Jerry\Desktop\test.aux)
("C:\Program Files\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"
[Loading MPS to PDF converter (version 2006.09.02).]
)
! Undefined control sequence.
<recently read> \c@lor@to@ps 

l.7 \end{mdframed}**

Thank you very much for your kind assistance... ?

Jerry
  • 11
  • 1
    You can't use pstricks with pdflatex. Use the tikz-method instead. – Ulrike Fischer Jul 10 '14 at 08:17
  • run it with xelatex –  Jul 10 '14 at 08:22
  • Because it is common mistake for the newbies, why don't the PSTricks authors improve this error message such that it provides the newbies with more useful information? – kiss my armpit Jul 10 '14 at 12:52
  • @FifaEarthCup2014: Well, the error message is rather due to xcolor package, included by pstricks.sty –  Jul 11 '14 at 07:05
  • If you are using a LaTeX distribution such as MiKTeX, you can look for an output profile similar to LaTeX => PS => PDF in your editor (TeXnicCenter, Texmaker, etc.). Since this compilation method uses postscript (which requires the installation of GhostScript prior to use) as an intermediary, it will allow the compilation of LaTeX documents that use pstricks functionalities. It is also the only way within MiKTeX that I have been able to compile documents that utilize both tikz and pstricks. – feculededentier Jul 12 '14 at 03:43
  • Thank you all for your help. I am indeed a very very green newbie to LaTex. I do not know how xelatex works and decided to try the "tikz" method first. It works in that it created a boxed text. But how do I specify the box to be a "double-line" box?

    I tried using things like \begin{mdframed}[linestyle=double] or \begin{mdframed}[doubleline=true] without much success.

    – Jerry Jul 12 '14 at 06:23
  • @Jerry: This is another question about double line box. Please have a look by the search textfield on this site if a similar question has been asked before posting it yourself. –  Jul 12 '14 at 07:54

0 Answers0