\documentclass{article}
\usepackage{fancybox,pst-all}
\begin{document}
\begin{LandScape}{\rotateleft}
\centerline{Standard}
\end{LandScape}
\end{document}
Why? Can't I use PSTricks with pdflatex?
--
Professor Edward M. Reingold Email: rein...@iit.edu
Department of Computer Science Voice: (312) 567-3309
Illinois Institute of Technology Fax: (312) 567-5067
Stuart Building, 228F
10 West 31st Street
Chicago, IL 60616-3729 U.S.A.
you may want to read this: http://www.tug.org/PSTricks/main.cgi?file=pdf/pdfoutput
>> Why? �Can't I use PSTricks with pdflatex?
p> you may want to read this:
p> http://www.tug.org/PSTricks/main.cgi?file=pdf/pdfoutput
That is not the point; I need pdflatex for other things not shown in the samll
sample.
Am 16.04.2010 22:44, schrieb Edward M. Reingold:
> That is not the point; I need pdflatex for other things not shown in the samll
> sample.
What is the point? pstricks is using the language postscript. So you
need the way latex-ps-pdf. The link of pluto shows you a way how to use
pdflatex with using pstricks.
An example of the site is the package pst-pdf.
\documentclass[12pt]{article}
\usepackage{pstricks}
\usepackage{pst-pdf}
\pagestyle{empty}
\begin{document}
\begin{pspicture}(-5.25,-5.25)(5.25,5.25)%
\pscircle*[linecolor=cyan]{5}
\psgrid[subgriddiv=0,gridcolor=lightgray,gridlabels=0pt]
\Huge\sffamily\bfseries
\rput(-4.5,4.5){A} \rput(4.5,4.5){B}
\rput(-4.5,-4.5){C}\rput(4.5,-4.5){D}
\rput(0,0){pst-pdf}
\rmfamily
\rput(0,-3.8){PSTricks}
\rput(0,3.8){\LaTeX}
\end{pspicture}
\end{document}
with the introduction to run:
latex <file.tex>
dvips -Ppdf -o <file-pics.ps> <file.dvi>
ps2pdf -dAutoRotatePages=/None <file-pics.ps> <file-pics.pdf>
pdflatex <file.tex>
regars
Marco
yes, you should re-read the link.
Not directly. PS stands for PostScript: PSTricks uses the programmable
features of PostScript that do not exist in PDF, so it is only for
producing PostScript output via .dvi files. But you can do just that,
and then convert the resulting PostScript to PDF with ps2pdf. There *is*
a PDFTricks, but I don't know if it has the same range of features as
PSTricks.
///Peter
or use tikz, which I prefer anyway (my preference is not shared by
all)
that is exactly the point ...
However, if you run Linux, you can use pst2pdf instead of pdflatex.
The script does all converting of the PostScript related code
and you can use jpeg and png images as usual.
Herbert
> and then convert the resulting PostScript to PDF with ps2pdf. There *is*
> a PDFTricks, but I don't know if it has the same range of features as
> PSTricks.
pdftricks is only a package which runs the PS code snippets
from within pdflatex via the -shell-escape option.
Herbert
HV> that is exactly the point ... However, if you run Linux, you can use
HV> pst2pdf instead of pdflatex. The script does all converting of the
HV> PostScript related code and you can use jpeg and png images as usual.
I should have described exactly what I am trying to: I need to create a single
pdf file with tooltips; the tooltips will be on points in a rather elaborate
plot created with PSTricks. So, I need PSTricks to get the drawing, but
pdflatex to get the tooltips (via cooltooltips). I would use fancytooltips,
but I need everything in a single pdf file.
So, what are my options?!
If you only need the tooltips and "comment boxes", but no hyperlinks,
you can also try pdfcomment.sty, which works also with the
latex->dvips->ps2pdf route.
Josef
--
Keine Sicherheit ohne Schäuble:
GNUPG/PGP-Key unter http://www.josef-kleber.de/pgp/Josef_Kleber_News.asc
DSA 1024 / 0xF4B1EA2A / F832 6058 319E FFD4 0EFF 088C 521B 40D4 F4B1 EA2A
use pst2pdf instead of latex, then the last run is always
a pdflatex one.
Herbert
JK> If you only need the tooltips and "comment boxes", but no hyperlinks,
JK> you can also try pdfcomment.sty, which works also with the
latex-> dvips->ps2pdf route.
That looks like it would do what I want, but I need the "live" areas for the
tooltips to be objects defined in PSTricks terms (rectangular regions,
circles, lines, etc). How do I do that?
do you have small example file?
Herbert
HV> do you have small example file?
Something like this:
\documentclass{article}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(0,0)(5,5)
\psgrid
\psframe*[linecolor=green](1,1) % Tooltip in this rectangle should say ``Origin''
\psframe*[linecolor=red](4,4)(5,5) % Tooltip in this rectangle should say
% ``Top right''
\pscircle*[linecolor=blue](1,4){1} % Tooltip in this circle should say
% ``Top left''
\psline[linewidth=3pt](0,2)(4,3) % Tooltip on this line should say ``Line''
\end{pspicture}
\end{document}
sorry, I meant one which uses also tooltips.
This example is only PSTricks code
Herbert
HV> sorry, I meant one which uses also tooltips. This example is only
HV> PSTricks code
The problem is that I don't know how to get the tooltips I want! So, I cannot
craft an example. All I could do is describe the effect I want.
> \begin{pspicture}(0,0)(5,5)
> \psgrid
> \psframe*[linecolor=green](1,1) % Tooltip in this rectangle should say ``Origin''
ok, I see. This is not possible with PSTricks because
the tooltips are part of the pspicture environment,
which itself is exported as an image and then reread
by pdflatex. But then it is too late for the tooltips
Herbert
So you only need a tooltip, right? A while ago i played with an example
presented by Alexander Grahn. It works only with the
latex->dvips->ps2pdf route, but that doen't semm to be a problem in your
case! ;-)
Maybe it also works in your case:
\documentclass{article}
\usepackage{pstricks-add}
\usepackage{hyperref}
\newcounter{tooltip}
\newcommand\tooltip[2]{%
% arg #1: text to put on the page
% arg #2: tooltip text
\pdfmark[#1]{
pdfmark=/ANN,
Subtype=/Widget,
Raw={
/TU (#2)/T (tooltip \thetooltip)
/FT/Btn/Ff 65536/H/N
}
}%
\stepcounter{tooltip}%
}
\begin{document}
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psaxes(0,0)(-2,-2)(2,2)
\rput(1,1){{\tooltip{\textcolor{red}{$\bullet$}}{1,1}}}
\rput(-1,-1){{\tooltip{\textcolor{red}{$\bullet$}}{-1,-1}}}
\end{pspicture}
\end{center}
Das ist ein kleiner \tooltip{\textcolor{red}{Test}}{Das ist ein
Test-Tooltip!} im Text!
Das funktioniert natürlich auch mit Formeln:
\tooltip{\textcolor{red}{$y = \frac{a^3}{a^2 + x^2}$}}{Witch of Agnesi /
Versiera der Agnesi}
\end{document}
> So you only need a tooltip, right? A while ago i played with an example
> presented by Alexander Grahn. It works only with the
> latex->dvips->ps2pdf route, but that doen't semm to be a problem in your
> case! ;-)
> Maybe it also works in your case:
works fine ...
\documentclass{article}
\usepackage{pstricks-add}
\usepackage{hyperref}
\newcounter{tooltip}
\newcommand\tooltip[2]{%
% arg #1: text to put on the page
% arg #2: tooltip text
\pdfmark[#1]{
pdfmark=/ANN,
Subtype=/Widget,
Raw={
/TU (#2)/T (tooltip \thetooltip)
/FT/Btn/Ff 65536/H/N
}
}%
\stepcounter{tooltip}%
}
\begin{document}
\begin{center}
\begin{pspicture}(-2,-2)(2,2)
\psaxes(0,0)(-2,-2)(2,2)
\psTextFrame[linestyle=none](-1,-1)(1,1){\tooltip{\space\space}{Origin}}
\end{pspicture}
\end{center}
\end{document}
Herbert
Perhaps it would be easier to make the diagram in TikZ, which then can
use the cooltooltips, which depend on pdflatex.
(I don't know if the diagram Ed posted was just super simple one or
not.) But most things you can do in pstricks you can also do in TikZ,
and if the cooltooltips is so necessary, it would probably be worth the
effort to try. Here's a version of what I think you want, Ed.
\documentclass{article}
\usepackage{tikz}
\usepackage{cooltooltips}
\begin{document}
\usetikzlibrary{decorations.text}
\begin{tikzpicture}
\setlength{\fboxrule}{0pt}
\setlength{\fboxsep}{0pt}
\draw[step=.2cm,gray] (0,0) grid (5,5);
\draw[step=1cm,very thick] (0,0) grid (5,5);
\draw (.5,.5) node (O) {{\cooltooltip [0 0 0] {Origin} {This is the
origin of the graph.} {}{} {\color{green}\rule{1cm}{1cm}}{}}} (1,1);
\draw (4.5,4.5) node (R) {{\cooltooltip [0 0 0] {Corner} {This is the
top right corner of the graph.} {}{} {\color{red}\rule{1cm}{1cm}}{}}}
(5,5);
\draw (1,4) node (L) {{\cooltooltip [0 .2 1] {Corner} {This is the top
left corner of the graph.} {}{} {\rule{1.3cm}{1.3cm}}{}}} (1,5);
\draw[fill,blue] (1,4) circle (1);
\draw[line width=3pt] (0,2) -- (4,3);
\foreach \x in {0,.1,...,4} {
\node at (\x,2+\x*.25) {{\cooltooltip [0 0 0] {Line} {This is a
line.} {}{} {\rule{2pt}{2pt}}{}}};}
\foreach \x in {0,1,...,5} {
\node[left=3pt] at (0,\x) {\sffamily\bfseries\x};
\node[below=3pt] at (\x,0) {\sffamily\bfseries\x};}
\end{tikzpicture}
\end{document}
Alan