1 \documentclass[a4paper,10pt]{article}
2 \usepackage[T1]{fontenc}
8 %\usepackage[width=18cm,height=24cm]{geometry}
9 \addtolength{\textwidth}{40mm}
10 \addtolength{\oddsidemargin}{-15mm}
12 \let\orgcaption\caption
14 \newcommand{\captionabove}{%
15 \setlength{\tmplength}{\abovecaptionskip}%
16 \setlength{\abovecaptionskip}{\belowcaptionskip}%
17 \setlength{\belowcaptionskip}{\tmplength}%
35 \def\dez#1#2#3\empty{\setcounter{dezcnt}{64*#1+8*#2+#3}\thedezcnt}
38 \global\let\zus=\empty
104 \gdef\zus{303}% and \200
107 \fi\fi\fi\fi\fi\fi\fi
108 \fi\fi\fi\fi\fi\fi\fi
109 \fi\fi\fi\fi\fi\fi\fi
110 \fi\fi\fi\fi\fi\fi\fi
127 \ifodd\rownum \else\qquad\fi
128 \global\advance\rownum 1
129 {\raisebox{1.7ex}[0mm][1ex]{\cmex\char'#1}} &
135 \expandafter\dez#1\empty
138 , \expandafter\dez\zus\empty
143 \title{Using \TeX\ Fonts in the Gnuplot Postscript Terminal}
144 \author{Harald Harders, {\ttfamily h.harders@tu-bs.de}}
149 The Postscript terminal can embed Postscript Type\,1 fonts (with
150 extensions \verb|.pfa| and \verb|.pfb|) and TrueType fonts (extension
151 \verb|.ttf|)\footnote{If \texttt{.pfb} and \texttt{.ttf} fonts really
152 can be embedded depends on your gnuplot installation: It needs to be
153 able to handle pipes.} using the command
155 set terminal postscript fontfile '<filename>'
157 The \verb|fontfile| option can be used multiple times.
158 See the sections \emph{set terminal postscript} and \emph{set
159 fontpath} in the Gnuplot documentation for further description.
161 The embedded font can be used by
163 set terminal postscript '<fontname>' <size>
165 or in postscript enhanced terminal as following example:
167 set xlabel '{/CMMI10 x}'
170 Among other things, the font embedding is useful for generating plots
171 to be included in \LaTeX\ documents.
172 For normal text, the \emph{cm-super} Postscript Type\,1 fonts are a
174 They are available from CTAN servers, e.g.
176 ftp://ftp.dante.de/tex-archive/fonts/ps-type1/cm-super/
178 The normal upright font with serifes is defined in
179 \verb|sfrm1000.pfb|, and the font name is \verb|SFRM1000|\footnote{If you
180 have an old version of the cm-super font, prior 2001-10-14, the font
181 name is in lowercase letters: \texttt{sfrm1000}. You should update
182 to a new version.} (The \verb|1000| means that this font is designed
184 Replace the \verb|rm| by \verb|it|, \verb|bx| or other combinations in
185 both the file name and the font name (here, in uppercase letters) in order
186 to get other font shapes.
187 The encoding of these fonts is ordinary and thus is not described
189 Table~\ref{tab:fontnames} shows some examples of fonts contained in
190 the cm-super font bundle.
194 \captionabove{Some fonts in the cm-super font bundle (for a
195 designsize of 10\,pt)}%
196 \label{tab:fontnames}%
197 \begin{tabular}{>{\ttfamily}l>{\ttfamily}ll}
199 \multicolumn{1}{l}{File name}&
200 \multicolumn{1}{l}{Full font name} &
202 & \multicolumn{1}{l}{(all preceded by \texttt{Computer Modern})} & \\
204 sfrm1000.pfb& Roman &
205 {\rmfamily\upshape Example} \\
206 sfbx1000.pfb& Bold Extended &
207 {\rmfamily\bfseries\upshape Example} \\
208 sfti1000.pfb& Italic &
209 {\rmfamily\itshape Example} \\
210 sfbi1000.pfb& Bold Extended Italic &
211 {\rmfamily\bfseries\itshape Example} \\
212 sfsl1000.pfb& Slanted &
213 {\rmfamily\slshape Example} \\
214 sfbl1000.pfb& Bold Extended Slanted &
215 {\rmfamily\bfseries\slshape Example} \\
216 sfcc1000.pfb& Caps and Small Caps &
217 {\rmfamily\bfseries\scshape Example} \\
219 sfss1000.pfb& Sans Serif &
220 {\sffamily\upshape Example} \\
221 sfsi1000.pfb& Sans Serif Slanted &
222 {\sffamily\slshape Example} \\
223 sfsx1000.pfb& Sans Serif Bold Extended &
224 {\sffamily\bfseries\upshape Example} \\
225 sfso1000.pfb& Sans Serif Bold Extended Slanted &
226 {\sffamily\bfseries\slshape Example} \\
228 sftt1000.pfb& Typewriter &
229 {\ttfamily\upshape Example} \\
230 sfit1000.pfb& Typewriter Italic &
231 {\ttfamily\itshape Example} \\
232 sfst1000.pfb& Typewriter Slanted &
233 {\ttfamily\slshape Example} \\
234 sftc1000.pfb& Typewriter Caps and Small Caps &
235 {\ttfamily\scshape Example} \\
240 For mathematics the Type\,1 versions of the Computer Modern fonts are
242 They should be installed in most \TeX\ implementations and are also
243 available from CTAN servers, e.g.
245 ftp://ftp.dante.de/tex-archive/fonts/cm/ps-type1/bluesky/pfb/
247 Here, the font name is the base of the file name in uppercase letters,
248 e.g.\ the file \verb|cmmi10.pfb| contains the font \verb|CMMI10|.
249 Since the encoding of these fonts is strange, a table containing all
250 characters for some fonts follows.
251 The font \verb|CMEX10| contains large symbols for mathematics. They
252 overlap sometimes in the table. Since the baseline of the
253 \verb|CMEX10| font is at the top of the signs, Gnuplot defines a font
254 \verb|CMEX10-Baseline| with a different baseline if \verb|CMEX10| is
255 embedded (normally by using \verb|fontfile 'cmex10.pfb'|.
256 In contrast to the other fonts, \verb|CMEX10| is only available in the
259 You can access all characters of the fonts by typing their octal code.
260 To get a $\heartsuit$ symbol, you may type:
262 set label '{/CMSY10 \176}' at graph 0.5,0.5
264 Since characters with an octal number below \textbackslash 040 can't
265 be displayed by some postscript interpreters, these characters are
266 repeated in the Computer Modern Fonts with a larger code.
267 Thus, you should use the larger number, where two octal numbers are
268 given (e.g.\ \textbackslash 000, \textbackslash 241).
269 For example, you better use
271 set xlabel '{/CMR10 \242}'
275 set xlabel '{/CMR10 \001}'
277 to get an upright uppercase Delta $\Delta$.
279 \begin{longtable}{lllllllllllllr}
281 Oct& \rotatebox{90}{CMR10}& \rotatebox{90}{CMTI10}&
282 \rotatebox{90}{CMTT10}& \rotatebox{90}{CMMI10}&
283 \rotatebox{90}{CMU10}& \rotatebox{90}{CMSS10}&
284 \rotatebox{90}{CMTEX10}& \rotatebox{90}{CMFF10}&
285 \rotatebox{90}{CMSY10}& \rotatebox{90}{LASY10}&
286 \rotatebox{90}{CMEX10-Baseline}& Oct& Dec\\
291 \row{000}\row{001}\row{002}\row{003}\row{004}\row{005}\row{006}\row{007}
292 \row{010}\row{011}\row{012}\row{013}\row{014}\row{015}\row{016}\row{017}
293 \row{020}\row{021}\row{022}\row{023}\row{024}\row{025}\row{026}\row{027}
294 \row{030}\row{031}\row{032}\row{033}\row{034}\row{035}\row{036}\row{037}
295 \row{040}\row{041}\row{042}\row{043}\row{044}\row{045}\row{046}\row{047}
296 \row{050}\row{051}\row{052}\row{053}\row{054}\row{055}\row{056}\row{057}
297 \row{060}\row{061}\row{062}\row{063}\row{064}\row{065}\row{066}\row{067}
298 \row{070}\row{071}\row{072}\row{073}\row{074}\row{075}\row{076}\row{077}
300 \row{100}\row{101}\row{102}\row{103}\row{104}\row{105}\row{106}\row{107}
301 \row{110}\row{111}\row{112}\row{113}\row{114}\row{115}\row{116}\row{117}
302 \row{120}\row{121}\row{122}\row{123}\row{124}\row{125}\row{126}\row{127}
303 \row{130}\row{131}\row{132}\row{133}\row{134}\row{135}\row{136}\row{137}
304 \row{140}\row{141}\row{142}\row{143}\row{144}\row{145}\row{146}\row{147}
305 \row{150}\row{151}\row{152}\row{153}\row{154}\row{155}\row{156}\row{157}
306 \row{160}\row{161}\row{162}\row{163}\row{164}\row{165}\row{166}\row{167}
307 \row{170}\row{171}\row{172}\row{173}\row{174}\row{175}\row{176}\row{177}