Debian Codegraph @

texmf-dist/doc/support/pst2pdf/README.md

raw
1 # pst2pdf – Running a PSTricks document with pdflatex
2
3 Release v0.19 \[2020-08-17\]
4
5 ## Description
6
7 `pst2pdf` is a Perl _script_ which isolates all `PostScript` or `PSTricks` related
8 parts of the TeX document, read all `postscript`, `pspicture`, `psgraph` and `PSTexample`
9 environments, extract source code in standalone files and converting them into image
10 format \(default `pdf`\). Create new file with all extracted environments converted to `\includegraphics`
11 and runs \(pdf/xe/lua\)latex.
12
13 ## Usage
14
15 ```
16 pst2pdf.pl [<options>] <texfile>[.tex|.ltx]
17 ```
18
19 or
20
21 ```
22 pst2pdf.pl <texfile>[.tex|.ltx] [<options>]
23 ```
24
25 Relative or absolute `paths` for directories and files is not supported. Options that accept
26 a _value_ require either a blank space or `=` between the option and the _value_. Some short
27 options can be bundling.
28
29 If used without `[<options>]` the extracted environments are converted to `pdf` image format
30 and saved in the `./images` directory using `latex>dvips>ps2pdf` and `preview` package to
31 process `<texfile>` and `pdflatex` to process the output file `<texfile-pdf>`.
32
33 ## Restrictions
34
35 The `pspicture` environment can be nested, the `postscript` one **NOT!** `pspicture` can be
36 inside of a `postscript` environment, but not vice versa.
37
38 ```latex
39 \begin{postscript}
40 ...
41 \begin{pspicture}
42 ....
43 \end{pspicture}
44 ...
45 \end{postscript}
46 ```
47
48 The `postscript` environment should be used for all other PostScript related commands, which
49 are not part of a `pspicture` environment, e.g. nodes inside normal text or `\psset{...}`
50 outside of environment.
51
52 ## Installation
53
54 The script `pst2pdf` is present in `TeXLive` and `MiKTeX`, use the package manager to install.
55
56 For manual installation, download [pst2pdf.zip](http://mirrors.ctan.org/graphics/pstricks/scripts/pst2pdf.zip) and unzip it
57 and move all files to appropriate locations:
58
59 ```
60 pst2pdf-doc.pdf -> TDS:doc/support/pst2pdf/pst2pdf-doc.pdf
61 pst2pdf-doc.tex -> TDS:doc/support/pst2pdf/pst2pdf-doc.tex
62 pst2pdf-doc.bib -> TDS:doc/support/pst2pdf/pst2pdf-doc.bib
63 test1.tex -> TDS:doc/support/pst2pdf/test1.tex
64 test2.tex -> TDS:doc/support/pst2pdf/test2.tex
65 test3.tex -> TDS:doc/support/pst2pdf/test3.tex
66 test1-pdf.tex -> TDS:doc/support/pst2pdf/test1-pdf.pdf
67 test2-pdf.tex -> TDS:doc/support/pst2pdf/test2-pdf.pdf
68 test3-pdf.tex -> TDS:doc/support/pst2pdf/test3-pdf.pdf
69 tux.jpg -> TDS:doc/support/pst2pdf/tux.jpg
70 README.md -> TDS:doc/support/pst2pdf/README.md
71 Changes -> TDS:doc/support/pst2pdf/Changes
72 pst2pdf.pl -> TDS:scripts/pst2pdf/pst2pdf.pl
73 ```
74
75 ## Documentation
76
77 For more documentation use:
78
79 ```
80 $ pst2pdf --help
81 ```
82
83 or
84
85 ```
86 $ texdoc pst2pdf
87 ```
88
89 To reproduce the documentation run `xelatex pst2pdf-doc.tex`.
90
91 ## Copyright
92
93 Copyright 2013 - 2020 by Herbert Voss `<[email protected]>` and Pablo González L `<[email protected]>`.