Graphics, Figures & Tablespstricks and greek letters

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
valefor
Posts: 12
Joined: Wed Sep 01, 2010 5:24 pm

pstricks and greek letters

Post by valefor »

Hi

I have made a figure with pstricks that contains some points. In the brackets { } i put greek letters as the names of the points but the dvi output keeps giving them englsh letters as names. The code is:

Code: Select all

\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
.....
{
\begin{pspicture}(0,-1.889375)(2.8096876,1.889375)
\psline[linewidth=0.04cm](2.26,1.3684375)(0.2,-0.8515625)
\psline[linewidth=0.04cm](1.84,1.6684375)(1.48,-1.5515625)
\psline[linewidth=0.04cm](2.32,-1.3315625)(0.0,0.4484375)
\usefont{T1}{ptm}{m}{n}
\rput(1.5878125,1.7984375){y}
\usefont{T1}{ptm}{m}{n}
\rput(1.59375,-1.6615624){y'}
\usefont{T1}{ptm}{m}{n}
\rput(2.6625,-1.1215625){x'}
\usefont{T1}{ptm}{m}{n}
\rput(0.22546875,0.7184375){x}
\usefont{T1}{ptm}{m}{n}
\rput(0.2853125,-0.9615625){ω}
\usefont{T1}{ptm}{m}{n}
\rput(2.6182814,1.4584374){ω'}
\usefont{T1}{ptm}{m}{n}
\rput(2.0465624,0.7984375){Α}
\usefont{T1}{ptm}{m}{n}
\rput(0.8871875,-0.4015625){Β}
\usefont{T1}{ptm}{m}{n}
\rput(1.8560938,-0.5615625){Γ}
\psdots[dotsize=0.16,fillstyle=solid,dotstyle=o](1.76,0.8484375)
\psdots[dotsize=0.16,fillstyle=solid,dotstyle=o](0.8,-0.1715625)
\psdots[dotsize=0.16,fillstyle=solid,dotstyle=o](1.6,-0.7715625)
\end{pspicture} 
}
For example the point Γ keeps appearing as G.
Should i do something special to include greek letters?

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pstricks and greek letters

Post by CrazyHorse »

valefor wrote:Hi

I have made a figure with pstricks that contains some points. In the brackets { } i put greek letters as the names of the points but the dvi output keeps giving them englsh letters as names. The code is:

For example the point Γ keeps appearing as G.
Should i do something special to include greek letters?
i do not see where you put a greek letter in the code?

\rput(3,3){$\lambda$}

Herbert
User avatar
localghost
Site Moderator
Posts: 9201
Joined: Fri Feb 02, 2007 12:06 pm

pstricks and greek letters

Post by localghost »

CrazyHorse wrote: i do not see where you put a greek letter in the code?[…]
For example the last \rput command tries to place a big Greek gamma (»Γ«) in the picture. And there are small omegas, too (»ω«).
valefor wrote:[…] In the brackets { } i put greek letters as the names of the points but the dvi output keeps giving them englsh letters as names. […] For example the point Γ keeps appearing as G. Should i do something special to include greek letters?
Please get used to posting always a full but minimal example [1]. Code snippest are completely useless. Nobody knows what the ellipsis stands for so there can be many probable causes for the misbehaviour.

If I try to supplement your code snippet with the fontenc and inputenc package and appropriate settings, I'm not even able to compile the document without errors.

[1] View topic: Avoidable mistakes


Thorsten
How to make a "Minimal Example"
Board Rules
Avoidable Mistakes[/size]

¹ System: openSUSE 42.2 (Linux 4.4.52), TeX Live 2016 (vanilla), TeXworks 0.6.1
valefor
Posts: 12
Joined: Wed Sep 01, 2010 5:24 pm

pstricks and greek letters

Post by valefor »

ok, i am sorry for the example
here's a minimal example of my siuation:

Code: Select all

\documentclass[12pt]{report}
\usepackage[greek]{babel}
\usepackage[iso-8859-7]{inputenc}
\newcommand{\en}[1]{\textlatin{#1}}
\usepackage[usenames,dvipsnames]{pstricks}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{pst-grad} % For gradients
\usepackage{pst-plot} % For axes
\begin{document}

\scalebox{1} % Change this value to rescale the drawing.
{
\begin{pspicture}(0,-0.46921876)(6.4109373,0.46921876)
\psdots[dotsize=0.12](3.7953124,-0.02921875)
\psdots[dotsize=0.12](4.7953124,-0.02921875)
\usefont{T1}{ptm}{m}{n}
\rput(3.8314064,0.30078125){Γ}
\usefont{T1}{ptm}{m}{n}
\rput(4.7821875,0.26078126){Δ}
\end{pspicture} 
}

\end{document}

As for the packages i use,let me explain. I am greek so these packages let me write greeklish(greek words with english letters) at my code and the output automatically is with greek letters. I tried modifying packages as well as adding utf8-inputenc package but it won't work.

Also if you try to test the code use only dvi output.

I have tested this code (0 errors) and the output is two points named G and D instead of Γ and Δ.
CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

pstricks and greek letters

Post by CrazyHorse »

valefor wrote:
As for the packages i use,let me explain. I am greek so these packages let me write greeklish(greek words with english letters) at my code and the output automatically is with greek letters. I tried modifying packages as well as adding utf8-inputenc package but it won't work.

Also if you try to test the code use only dvi output.

I have tested this code (0 errors) and the output is two points named G and D instead of Γ and Δ.
it has nothing to do with PSTricks, because this also didn't work for me:

Code: Select all

\documentclass[12pt]{report}
\usepackage[greek]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}

Γ
Δ

\end{document}
I have no idea how the encoding has to be set.

Herbert
valefor
Posts: 12
Joined: Wed Sep 01, 2010 5:24 pm

pstricks and greek letters

Post by valefor »

CrazyHorse wrote:
valefor wrote:
As for the packages i use,let me explain. I am greek so these packages let me write greeklish(greek words with english letters) at my code and the output automatically is with greek letters. I tried modifying packages as well as adding utf8-inputenc package but it won't work.

Also if you try to test the code use only dvi output.

I have tested this code (0 errors) and the output is two points named G and D instead of Γ and Δ.
it has nothing to do with PSTricks, because this also didn't work for me:

Code: Select all

\documentclass[12pt]{report}
\usepackage[greek]{babel}
\usepackage[iso-8859-7]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}

\begin{document}

Γ
Δ

\end{document}
I have no idea how the encoding has to be set.

Herbert
The code you posted worked for me. Anyway,since it is not a problem of pstricks i will search a bit more my code.
Post Reply