Trying things out without relying on pstricks to see if I can write my own postscript code embedded within a LaTeX document.
\documentclass{article}
\begin{document}
Hello world!
\special{ps:
/inch { 72 mul } def
gsave
0 0 1 setrgbcolor
1 inch 0 rlineto
0 1 inch rlineto
-1 inch 0 rlineto
closepath
4 setlinewidth
stroke
grestore
}%%
Followed by something else.
\rule{1in}{4pt}
\end{document}
The box is placed where I expect it to be, but the dimensions are all wrong:

But I can easily write an eps file
%!PS-Adoboe-3.0 EPSF-3.0
%%BoundingBox: 0 0 72 72
/inch { 72 mul } def
newpath
0 0 moveto
1 inch 0 rlineto
0 1 inch rlineto
-1 inch 0 rlineto
closepath
stroke
showpage
And import it to get a square of the right size
\documentclass{article}
\usepackage{graphicx}
\begin{document}
Hello world!
Followed by something else.
\includegraphics{square}
\rule{1in}{4pt}
\end{document}
resulting in

So what do I need to do to get the dimensions correct within \special{ps:....}?
I've tried looking through pstricks.sty, pstricks.tex, and pstricks.con but not finding anything useful to explain why pstricks is able to get things right, but I'm not.
By the way, with both of the above examples I'm compiling via
latex --> dvips --> ps2pdf
\specialandepsfile better resemble each other. – A.Ellett May 06 '15 at 22:1972should equal an inch. It seems to do it fine out of the box for theepsfile, why not in the\special? How do I set the coordinate matrix to be what I want? – A.Ellett May 06 '15 at 22:20ps:rather than"as the special prefix it is inserted into the postscript that dvips is constructing so is influenced by any changes to the graphics state dvips has made (and it makes a lot) – David Carlisle May 06 '15 at 22:23\pstverb? Where do I read up on what the"does? I noticed it, but didn't understand what purpose it served. – A.Ellett May 06 '15 at 22:26\pstverbdid the trick. Could you either explain the difference between\special{"and\special{ps:or point me to a reference where I could read up on it (or both). :) – A.Ellett May 06 '15 at 22:30texdoc dvips, page 30:-) – David Carlisle May 06 '15 at 22:30