Document ClassesBest way to arrange pstricks figures

Information and discussion about specific document classes and how to create your own document classes.
Post Reply
tsurreal
Posts: 15
Joined: Sat Aug 02, 2008 6:48 pm

Best way to arrange pstricks figures

Post by tsurreal »

Hi! Yet another question. What is the best way to arrange figures in a document? I was thinking of perhaps having all figures in a separate document (like bibtex bibliography) and then calling them in the main document. Is it a good idea, or is there a better way? Can you please give an example on how can I call the figures from a file? As usual, thanks a ton in advance! :)

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

tsurreal
Posts: 15
Joined: Sat Aug 02, 2008 6:48 pm

Best way to arrange pstricks figures

Post by tsurreal »

I face another problem that colors and gradients are not recognized. For example in the following code:

Code: Select all

\begin{pspicture}(0,0)(3,3)
\psframe[linestyle=none, fillstyle=solid,fillcolor=Apricot](0,0)(2,2)
\pspolygon[linestyle=none,fillstyle=solid,fillcolor=Tan](0,2)(2,2)(3,3)(1,3)
\pspolygon[linestyle=none,fillstyle=solid,fillcolor=Mahogany]
(2,0)(3,1)(3,3)(2,2)
\end{pspicture}
I get an error: ! Color `apricot' not defined.

I get the same when I use 'gradient'. Any tips? I am using: \usepackage{pstcol}

Sorry if these questions are basic or if I may find answers by reading into some manuals. I am in press of time therefore I seek your help. Thanks for understanding.
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Best way to arrange pstricks figures

Post by CrazyHorse »

tsurreal wrote:I face another problem that colors and gradients are not recognized. For example in the following code:

Code: Select all

\begin{pspicture}(0,0)(3,3)
\psframe[linestyle=none, fillstyle=solid,fillcolor=Apricot](0,0)(2,2)
\pspolygon[linestyle=none,fillstyle=solid,fillcolor=Tan](0,2)(2,2)(3,3)(1,3)
\pspolygon[linestyle=none,fillstyle=solid,fillcolor=Mahogany]
(2,0)(3,1)(3,3)(2,2)
\end{pspicture}
I get an error: ! Color `apricot' not defined.

I get the same when I use 'gradient'. Any tips? I am using: \usepackage{pstcol}

Sorry if these questions are basic or if I may find answers by reading into some manuals. I am in press of time therefore I seek your help. Thanks for understanding.
\usepackage[dvipsnames]{pstricks}

Herbert
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

Best way to arrange pstricks figures

Post by T3. »

Regarding your original question, I think the most common way is to keep graphical material in separate files, one file per picture, and include them with the '\input' command in your document. I've also found this page describing how to handle TikZ graphics inclusion but I think that a lot of ideas from there could be applied to PSTricks as well.

Cheers,

Tomek
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Best way to arrange pstricks figures

Post by CrazyHorse »

T3. wrote:Regarding your original question, I think the most common way is to keep graphical material in separate files, one file per picture, and include them with the '\input' command in your document. I've also found this page describing how to handle TikZ graphics inclusion but I think that a lot of ideas from there could be applied to PSTricks as well.
the most common way is to have all code of images inside the document.
Only for large pieces of code it makes sense to use the input command.

Herbert
Post Reply