3

I want to be able to print neat debugging messages through pstricks/postscript. In the code below, how do I make the gs interpreter display a new line?

\documentclass{article}
\usepackage{pstricks}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}(1,1)(1,1)
\pstVerb{
(This is a debug string.) print
(\n I want to print the next debug string in a new line.) print
}
\end{pspicture}
\end{document}

In other words, how do I execute the postscript code

(\n) print 

through pstricks?

Thanks!

P.S. I need to debug my 3d library. It's already working and can do cool stuff such as the picture below (including the picture 'cause a picture, even if irrelevant, doesn't hurt :)

an irrelevant but cool picture - two linked moebius bands. No lightning effects yet.

5
\documentclass{article}
\usepackage{pstricks}
\usepackage{auto-pst-pdf}
\begin{document}
\begin{pspicture}(1,1)(1,1)
\pstVerb{
(This is a debug string.) print
(\string\n I want to print the next debug string in a new line.) print
}
\end{pspicture}
\end{document}

produces

$ ps2pdf file.ps
This is a debug string.
I want to print the next debug string in a new line.

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.