> For the complete documentation index, see [llms.txt](https://overleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://overleaf-pro.ayaka.space/latex/el/erotiseis-and-apantiseis/06-can-i-use-the-pstricks-package-on-overleaf.md).

# Μπορώ να χρησιμοποιήσω το πακέτο pstricks στο Overleaf;

## Εισαγωγή

Ιστορικά, ένας από τους ευκολότερους τρόπους για να χρησιμοποιήσετε το PSTricks στο Overleaf ήταν μέσω του μεταγλωττιστή XeLaTeX—δηλαδή, [ορίστε τον μεταγλωττιστή του έργου σας σε XeLaTeX](/latex/el/basi-gnoseon/026-changing-compiler.md). Τον Σεπτέμβριο του 2021, ο δημιουργός του PSTricks [ανακοίνωσε](https://tug.org/pipermail/pstricks/2021/011321.html) ότι το LuaLaTeX μπορούσε πλέον να χρησιμοποιηθεί για τη μεταγλώττιση εγγράφων που περιέχουν κώδικα PSTricks—προσφέροντας στους χρήστες μια ακόμη βολική λύση.

Όπως συζητείται στη [ιστοσελίδα του PSTricks](https://tug.org/PSTricks/main.cgi?file=pdf/pdfoutput#lualatex), το LuaLaTeX μπορεί να χρειαστεί πολύ χρόνο για να μεταγλωττίσει εξαιρετικά σύνθετα παραδείγματα PSTricks, ιδιαίτερα εκείνα που απαιτούν εκτεταμένους υπολογισμούς. Ο παρατεταμένος χρόνος μεταγλώττισης του LuaLaTeX μπορεί περιστασιακά να ενεργοποιήσει ένα [χρονικό όριο μεταγλώττισης του Overleaf](/latex/el/basi-gnoseon/038-fixing-and-preventing-compile-timeouts.md#what-is-a-e2809ccompile-timeoute2809d3f).

## Παραδείγματα

Τα ακόλουθα παραδείγματα μπορούν όλα να ανοίξουν απευθείας στο Overleaf και χρησιμοποιούν τον μεταγλωττιστή XeLaTeX· μπορείτε να αλλάξετε σε LuaLaTeX όταν ο κώδικας ανοίξει στο Overleaf. Όλα τα παραδείγματα δημοσιεύτηκαν αρχικά μόνο στο [Γκαλερί Overleaf](#overleaf-gallery-links) αλλά τώρα αναπαράγονται εδώ για να δείξουν κώδικα PSTricks μέσα στο κείμενο αυτού του άρθρου. Προήλθαν (αναπαράχθηκαν) από τον ιστότοπο `http://www.thelazymathematician.com/p/pstricks-examples.html` ο οποίος, τη στιγμή της συγγραφής, δεν φαίνεται πλέον προσβάσιμος.

* **ΣΥΜΒΟΥΛΗ**: Επισκεφθείτε τη [γκαλερί του PSTricks](https://tug.org/PSTricks/main.cgi?file=examples-list) για πολλά ακόμη παραδείγματα που μπορείτε να δοκιμάσετε στο Overleaf.

### Παράδειγμα 1: Σχεδίαση σημείων

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{article}
\usepackage{pst-all}	%φορτώνει το πακέτο pstricks
\begin{document}
\begin{pspicture}(-1,-1)(5,5)
\psaxes{->}(0,0)(-0.5,-0.5)(4.5,4.5)[$x$,0][$y$, 90]	%δημιουργεί άξονες
\psdot(2,1)	%σχεδιάζει το σημείο (2,1)
\uput[0](2,1){$A$}	%ετικετοποιεί το σημείο (2,1) ως A
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+1%3A+Plotting+points\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%09%25call+the+pstricks+package%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bpspicture%7D%28-1%2C-1%29%285%2C5%29%09%0A%5Cpsaxes%7B-%3E%7D%280%2C0%29%28-0.5%2C-0.5%29%284.5%2C4.5%29%5B%24x%24%2C0%5D%5B%24y%24%2C+90%5D%09%25creates+axes%0A%5Cpsdot%282%2C1%29%09%25plots+the+point+%282%2C1%29%0A%5Cuput%5B0%5D%282%2C1%29%7B%24A%24%7D%09%25labels+the+point+%282%2C1%29+as+A%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση σημείων με PStricks στο LaTeX στο Overleaf](/files/6a6b597d8c345ebe965e86012f96ea9244099787)

### Παράδειγμα 2: Σχεδίαση ενός διαστήματος

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{article}
\usepackage{pst-all}	%φορτώνει το πακέτο pstricks
\begin{document}
\psset{xunit=0.5cm, yunit=0.5cm, yAxis=false}	%κλιμακώνει την εικόνα, αφαιρεί τον άξονα y
\begin{pspicture}(-11,0)(11,0)
\psaxes[Dx=5, subticks=5]{<->}(0,0)(-11,0)(11,0)	%δημιουργεί άξονες
\psline[linewidth=3pt, linecolor=cyan]{o->}(-2,0)(11,0)	%δημιουργεί μια παχιά, μπλε γραμμή από το -2 (ανοιχτό) έως το άπειρο
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+2%3A+Graphing+an+interval\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%09%25call+the+pstricks+package%0A%5Cbegin%7Bdocument%7D%09%0A%5Cpsset%7Bxunit%3D0.5cm%2C+yunit%3D0.5cm%2C+yAxis%3Dfalse%7D%09%25scales+the+picture%2C+removes+the+y-axis%0A%5Cbegin%7Bpspicture%7D%28-11%2C0%29%2811%2C0%29%09%0A%5Cpsaxes%5BDx%3D5%2C+subticks%3D5%5D%7B%3C-%3E%7D%280%2C0%29%28-11%2C0%29%2811%2C0%29%09%25creates+axes%0A%5Cpsline%5Blinewidth%3D3pt%2C+linecolor%3Dcyan%5D%7Bo-%3E%7D%28-2%2C0%29%2811%2C0%29%09%25creates+a+thick%2C+blue+line+from+-2+%28open%29+to+infinity%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση ενός διαστήματος με PStricks στο LaTeX στο Overleaf](/files/a9a26ac798ca3f3d130623a8a83b26ef8c13d513)

### Παράδειγμα 3: Σχεδίαση μιας καμπύλης μέσα από συγκεκριμένα σημεία

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{article}
\usepackage{pst-all}
\begin{document}
\psset{xunit=.5cm,yunit=0.5cm,}
\begin{pspicture}(-11,-11)(11,11)
\psgrid[subgriddiv=1, gridcolor=gray,griddots=10,gridlabels=0pt](0,0)(-10,-10)(10,10)
\psaxes[labelFontSize=\scriptscriptstyle]{<->}(0,0)(-10.5,-10.5)(10.5,10.5)
\pscurve[linewidth=1.5pt, showpoints=true, dotstyle=o, fillcolor=cyan]{<->}(-9,4)(-8,1)(-4,-5)(0,-4)(5,-3)(9,1)
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+3%3A+Graphing+a+curve+through+specific+points\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cpsset%7Bxunit%3D.5cm%2Cyunit%3D0.5cm%2C%7D%0A%5Cbegin%7Bpspicture%7D%28-11%2C-11%29%2811%2C11%29%0A%5Cpsgrid%5Bsubgriddiv%3D1%2C+gridcolor%3Dgray%2Cgriddots%3D10%2Cgridlabels%3D0pt%5D%280%2C0%29%28-10%2C-10%29%2810%2C10%29%0A%5Cpsaxes%5BlabelFontSize%3D%5Cscriptscriptstyle%5D%7B%3C-%3E%7D%280%2C0%29%28-10.5%2C-10.5%29%2810.5%2C10.5%29%0A%5Cpscurve%5Blinewidth%3D1.5pt%2C+showpoints%3Dtrue%2C+dotstyle%3Do%2C+fillcolor%3Dcyan%5D%7B%3C-%3E%7D%28-9%2C4%29%28-8%2C1%29%28-4%2C-5%29%280%2C-4%29%285%2C-3%29%289%2C1%29%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση καμπύλης μέσα από συγκεκριμένα σημεία με PStricks στο LaTeX στο Overleaf](/files/ed4512f112db2eac0f096d11610e72998834b8b3)

### Παράδειγμα 4: Σχεδίαση μιας συνάρτησης

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{article}
\usepackage{pst-all}
\begin{document}
\psset{xunit=.5cm,yunit=0.5cm,algebraic=true}
\begin{pspicture}(-11,-11)(11,11)
\psaxes[Dx=2, Dy=2, subticks=2, labelFontSize=\scriptscriptstyle]{<->}(0,0)(-10.5,-10.5)(10.5,10.5)[$x$,0][$y$,90]
\psplot[linestyle=dotted, linewidth=2pt, linecolor=red, yMaxValue=10, yMinValue=-10]{0.1}{10} {ln(x)}
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+4%3A+Graphing+a+function\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cpsset%7Bxunit%3D.5cm%2Cyunit%3D0.5cm%2Calgebraic%3Dtrue%7D%0A%5Cbegin%7Bpspicture%7D%28-11%2C-11%29%2811%2C11%29%0A%5Cpsaxes%5BDx%3D2%2C+Dy%3D2%2C+subticks%3D2%2C+labelFontSize%3D%5Cscriptscriptstyle%5D%7B%3C-%3E%7D%280%2C0%29%28-10.5%2C-10.5%29%2810.5%2C10.5%29%5B%24x%24%2C0%5D%5B%24y%24%2C90%5D%0A%5Cpsplot%5Blinestyle%3Ddotted%2C+linewidth%3D2pt%2C+linecolor%3Dred%2C+yMaxValue%3D10%2C+yMinValue%3D-10%5D%7B0.1%7D%7B10%7D+%7Bln%28x%29%7D%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση μιας συνάρτησης με PStricks στο LaTeX στο Overleaf](/files/2d56a61938f2d2b9915d06e779d7d4b45f36728b)

### Παράδειγμα 5: Σχεδίαση τριγωνομετρικής συνάρτησης

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{amsart}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(-6.5,-2.5)(6.5,5.5)
\psaxes[trigLabelBase=2,dx=\pstPI2, xunit=\psPi,trigLabels, xsubticks=2]{<->}(0,0)(-1.2,-2.4)(1.2,5.4)[$x$,0][$y$,90]
\psplot[algebraic,linewidth=1.6pt,plotpoints=10000, linecolor=red]{-\psPi}{\psPi}{cos(2*x)+ 3}
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+5%3A+Graphing+a+trig+function\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Bamsart%7D%0A%5Cusepackage%7Bpst-all%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cbegin%7Bpspicture%7D%28-6.5%2C-2.5%29%286.5%2C5.5%29%0A%5Cpsaxes%5BtrigLabelBase%3D2%2Cdx%3D%5CpstPI2%2C+xunit%3D%5CpsPi%2CtrigLabels%2C+xsubticks%3D2%5D%7B%3C-%3E%7D%280%2C0%29%28-1.2%2C-2.4%29%281.2%2C5.4%29%5B%24x%24%2C0%5D%5B%24y%24%2C90%5D%0A%5Cpsplot%5Balgebraic%2Clinewidth%3D1.6pt%2Cplotpoints%3D10000%2C+linecolor%3Dred%5D%7B-%5CpsPi%7D%7B%5CpsPi%7D%7Bcos%282%2Ax%29%2B+3%7D%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση τριγωνομετρικής συνάρτησης με PStricks στο LaTeX στο Overleaf](/files/ed6c6b2fb66b51529080fdf6bf429fb2e941048a)

### Παράδειγμα 6: Σχεδίαση πολυγώνου

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass[11pt]{article}
\usepackage{pst-all}
\begin{document}
\psset{xunit=1cm,yunit=1cm,algebraic=true}
\begin{pspicture}(0,0)(3,3)
\pspolygon[linecolor=orange,fillcolor=blue!20, fillstyle=vlines*, hatchcolor=purple, showpoints=false, linearc=0.2](1,1)(2,1)(2.31,1.95)(1.5,2.54)(0.69,1.95)
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+6%3A+Drawing+a+polygon\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%5B11pt%5D%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cpsset%7Bxunit%3D1cm%2Cyunit%3D1cm%2Calgebraic%3Dtrue%7D%0A%5Cbegin%7Bpspicture%7D%280%2C0%29%283%2C3%29%0A%5Cpspolygon%5Blinecolor%3Dorange%2Cfillcolor%3Dblue%2120%2C+fillstyle%3Dvlines%2A%2C+hatchcolor%3Dpurple%2C+showpoints%3Dfalse%2C+linearc%3D0.2%5D%281%2C1%29%282%2C1%29%282.31%2C1.95%29%281.5%2C2.54%29%280.69%2C1.95%29%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση πολυγώνου με PStricks στο LaTeX στο Overleaf](/files/9814e5c911e537384660150188f43a08451b3fe6)

### Παράδειγμα 7: Σχεδίαση κύκλου

```latex
% Αρχική πηγή: http://www.thelazymathematician.com/p/pstricks-examples.html
\documentclass{article}
\usepackage{pst-all}
\begin{document}
\psset{xunit=0.15in, yunit=0.15in}
\begin{pspicture}(0,0)(11,11)
\psaxes[Dx=4,Dy=4, subticks=4]{->}(0,0)(0,0)(10,10)[$x$,0][$y$,0]
\pscircle[runit=0.15in, fillcolor=orange!50, fillstyle=solid,shadow=true](5,5){3}
\end{pspicture}
\end{document}
```

[Ανοίξτε αυτό το παράδειγμα στο Overleaf](https://www.overleaf.com/docs?engine=xelatex\&snip_name=PSTricks+LaTeX+Example+7%3A+Drawing+a+circle\&snip=%25+Original+source%3A+http%3A%2F%2Fwww.thelazymathematician.com%2Fp%2Fpstricks-examples.html%0A%5Cdocumentclass%7Barticle%7D%0A%5Cusepackage%7Bpst-all%7D%0A%5Cbegin%7Bdocument%7D%0A%5Cpsset%7Bxunit%3D0.15in%2C+yunit%3D0.15in%7D%0A%5Cbegin%7Bpspicture%7D%280%2C0%29%2811%2C11%29%0A%5Cpsaxes%5BDx%3D4%2CDy%3D4%2C+subticks%3D4%5D%7B-%3E%7D%280%2C0%29%280%2C0%29%2810%2C10%29%5B%24x%24%2C0%5D%5B%24y%24%2C0%5D%0A%5Cpscircle%5Brunit%3D0.15in%2C+fillcolor%3Dorange%2150%2C+fillstyle%3Dsolid%2Cshadow%3Dtrue%5D%285%2C5%29%7B3%7D%0A%5Cend%7Bpspicture%7D%0A%5Cend%7Bdocument%7D)

Αυτό το παράδειγμα παράγει το ακόλουθο αποτέλεσμα:

![Σχεδίαση κύκλου με PStricks στο LaTeX στο Overleaf](/files/c887adcf8f23741997714039cbb5131808756d75)

## Σύνδεσμοι της γκαλερί του Overleaf

* [Παράδειγμα 1: Σχεδίαση σημείων](https://www.overleaf.com/latex/examples/pstricks-latex-example-1-plotting-points/hrdgjvwpkwxc)
* [Παράδειγμα 2: Σχεδίαση ενός διαστήματος](https://www.overleaf.com/latex/examples/pstricks-latex-example-2-graphing-an-interval/pprsbgcxsqhh)
* [Παράδειγμα 3: Σχεδίαση μιας καμπύλης μέσα από συγκεκριμένα σημεία](https://www.overleaf.com/latex/examples/pstricks-latex-example-3-graphing-a-curve-through-specific-points/pptpxsjmdgym)
* [Παράδειγμα 4: Σχεδίαση μιας συνάρτησης](https://www.overleaf.com/latex/examples/pstricks-latex-example-4-graphing-a-function/dqcnbzcqzstp)
* [Παράδειγμα 5: Σχεδίαση τριγωνομετρικής συνάρτησης](https://www.overleaf.com/latex/examples/pstricks-latex-example-5-graphing-a-trig-function/pdbcbffynvgr)
* [Παράδειγμα 6: Σχεδίαση πολυγώνου](https://www.overleaf.com/latex/examples/pstricks-latex-example-6-drawing-a-polygon/zxydfzwzfvrc)
* [Παράδειγμα 7: Σχεδίαση κύκλου](https://www.overleaf.com/latex/examples/pstricks-latex-example-7-drawing-a-circle/qkvqwzcxmwrn)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://overleaf-pro.ayaka.space/latex/el/erotiseis-and-apantiseis/06-can-i-use-the-pstricks-package-on-overleaf.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
