문제

I am trying to adjust the horizontal spacing of letters in subscript in the postscript (enhanced) terminal. The default is to align the spacing as you would for normal letters, but for big letters such as P, the subscripted letter appears too far away. Is there a way to adjust the spacing of subscripted letters?

Edit: minimal example, as requested. My use case is with Times-Italic font, so that's what I've done here, but the look is similar with Times-Roman

set term post enh eps font "Times-Italic" 
set output "test.eps"
set title "{P_{/*0.75 C}}"
plot sin(x)
set output

Edit 2: I'm pretty sure the reason is that the typesetter is aligning the left side of the second letter at the right edge of the first letter, but for letters like P where there is a large space between the bottom left corner and furthest right point, it doesn't look very nice when a letter is subscripted next to the P (or T, etc.)

도움이 되었습니까?

해결책

If you are picky about typography, then maybe you should use LaTeX. Gnuplot has a variety of LaTeX terminal types, such as tikz, epslatex, and cairolatex. The downside is that you must then pass the generated plot through latex or pdflatex in order to render it, so plotting is not interactive. Also, you must learn some basic LaTeX.

There is a nice tutorial on using the TikZ terminal. That page gives the following example gnuplot script (xlabel added by me):

set term tikz standalone color solid size 5in,3in
set output 'sin.tex'
set xlabel '$t_{\alpha\beta}$'
set xrange [0:2*pi]
plot sin(x) with lines
exit

Note that the exit is important, otherwise sin.tex will be incomplete. To turn this into a PDF, run pdflatex sin.tex.

You still cannot control the positioning of the subscript (well, probably LaTeX will let you do this if you are expert enough), however the defaults were chosen by typographic experts who probably have a better eye than you or me.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top