Initial release of Maemo 5 port of gnuplot
[gnuplot] / term / eepic.trm
1 /* Hello, Emacs! This is -*-C-*- !*/
2 /*
3  * $Id: eepic.trm,v 1.29 2006/07/21 02:35:46 sfeam Exp $
4  *
5  */
6
7 /* GNUPLOT - eepic.trm */
8
9 /*[
10  * Copyright 1990 - 1993, 1998, 2004
11  *
12  * Permission to use, copy, and distribute this software and its
13  * documentation for any purpose with or without fee is hereby granted,
14  * provided that the above copyright notice appear in all copies and
15  * that both that copyright notice and this permission notice appear
16  * in supporting documentation.
17  *
18  * Permission to modify the software is granted, but not the right to
19  * distribute the complete modified source code.  Modifications are to
20  * be distributed as patches to the released version.  Permission to
21  * distribute binaries produced by compiling modified sources is granted,
22  * provided you
23  *   1. distribute the corresponding source modifications from the
24  *    released version in the form of a patch file along with the binaries,
25  *   2. add special version identification to distinguish your version
26  *    in addition to the base release version number,
27  *   3. provide your name and address as the primary contact for the
28  *    support of your modified version, and
29  *   4. retain our contact information in regard to use of the base
30  *    software.
31  * Permission to distribute the released version of the source code along
32  * with corresponding source modifications in the form of a patch file is
33  * granted with same provisions 2 through 4 for binary distributions.
34  *
35  * This software is provided "as is" without express or implied warranty
36  * to the extent permitted by applicable law.
37 ]*/
38
39 /*
40  * This file is included by ../term.c.
41  *
42  * This terminal driver supports:
43  *   The EEPIC macros for LaTeX.
44  *
45  * AUTHORS
46  *   David Kotz
47  *
48  * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).
49  *
50  */
51 /*
52  *  This file contains the eepic terminal driver, intended for use with the
53  *  eepic.sty macro package for LaTeX. This is an alternative to the
54  *  latex driver. You need eepic.sty, epic.sty, and a printer driver that
55  *  supports the tpic \specials.
56  *
57  * Although dotted and dashed lines are possible with EEPIC, and are
58  * tempting, they do not work well for high-sample-rate curves, mushing
59  * the dashes all together into a solid line. For now anyway, the EEPIC
60  * driver will have only solid lines. Anyone got a solution?
61  *
62  * LATEX must also be defined.
63  */
64 /*
65  * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
66  */
67 /* Additions by Gabriel Zachmann (Gabriel.Zachmann@gmx.net), Nov 2000:
68  * - little bug fix in stacked (faked rotated) text
69  * - color support
70  * - true rotated text
71  * - augmented line types set with dashed lines
72  * - optionally small or tiny point symbols
73  * - font size
74  */
75
76
77 #include "driver.h"
78
79 #ifdef TERM_REGISTER
80 register_term(eepic)
81 #endif
82
83 #ifdef TERM_PROTO
84
85 #include <ctype.h>
86
87 TERM_PUBLIC void EEPIC_init __PROTO((void));
88 TERM_PUBLIC void EEPIC_graphics __PROTO((void));
89 TERM_PUBLIC void EEPIC_text __PROTO((void));
90 TERM_PUBLIC void EEPIC_linetype __PROTO((int linetype));
91 TERM_PUBLIC void EEPIC_move __PROTO((unsigned int x, unsigned int y));
92 TERM_PUBLIC void EEPIC_point __PROTO((unsigned int x, unsigned int y,
93                                       int number));
94 TERM_PUBLIC void EEPIC_vector __PROTO((unsigned int ux, unsigned int uy));
95 TERM_PUBLIC void EEPIC_arrow __PROTO((unsigned int sx, unsigned int sy,
96                                       unsigned int ex, unsigned int ey,
97                                       int head));
98 TERM_PUBLIC void EEPIC_put_text __PROTO((unsigned int x, unsigned int y,
99                                          const char str[]));
100 TERM_PUBLIC int EEPIC_justify_text __PROTO((enum JUSTIFY mode));
101 TERM_PUBLIC int EEPIC_text_angle __PROTO((int ang));
102 TERM_PUBLIC void EEPIC_reset __PROTO((void));
103 TERM_PUBLIC void EEPIC_options __PROTO((void));
104
105 #define EEPIC_PTS_PER_INCH 72.27
106 /* resolution of printer we expect to use */
107 #define EEPIC_DOTS_PER_INCH 600
108 /* dot size in pt */
109 #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/EEPIC_DOTS_PER_INCH)
110
111 /* 5 inches wide by 3 inches high (default) */
112 #define EEPIC_XMAX (EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0)
113 #define EEPIC_YMAX (EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0)
114
115 #define EEPIC_HTIC (5.0/EEPIC_UNIT)
116 #define EEPIC_VTIC (5.0/EEPIC_UNIT)
117 #define EEPIC_VCHAR (10.0/EEPIC_UNIT)
118 #define EEPIC_HCHAR (EEPIC_VCHAR/2.0)
119 #endif /* TERM_PROTO */
120
121 #ifndef TERM_PROTO_ONLY
122 #ifdef TERM_BODY
123
124 static unsigned int EEPIC_posx;
125 static unsigned int EEPIC_posy;
126 static enum JUSTIFY eepic_justify = LEFT;
127 static int eepic_angle = 0;
128 static int eepic_color_on = FALSE;              /* use \color */
129 static int eepic_true_rotate = FALSE;           /* use \rotatebox */
130 static int fontsize_set = FALSE;
131
132 /* for DOTS point style */
133 #define EEPIC_TINY_DOT "\\rule{.1pt}{.1pt}"
134
135 /* POINTS */
136 static int eepic_num_point_types[] = { 12, 10, 8 };
137 static int eepic_pointsize = 0;
138 static const char GPFAR *GPFAR EEPIC_points[][12] =
139 {
140         {
141                 "\\makebox(0,0){$\\Diamond$}",
142                 "\\makebox(0,0){$+$}",
143                 "\\makebox(0,0){$\\Box$}",
144                 "\\makebox(0,0){$\\times$}",
145                 "\\makebox(0,0){$\\triangle$}",
146                 "\\makebox(0,0){$\\star$}",
147                 "\\circle{12}", "\\circle{18}", "\\circle{24}",
148                 "\\circle*{12}", "\\circle*{18}", "\\circle*{24}"
149         },
150         {
151                 "\\makebox(0,0){$\\scriptstyle\\Diamond$}",
152                 "\\makebox(0,0){$\\scriptstyle +$}",
153                 "\\makebox(0,0){$\\scriptstyle\\Box$}",
154                 "\\makebox(0,0){$\\scriptstyle\\times$}",
155                 "\\makebox(0,0){$\\scriptstyle\\triangle$}",
156                 "\\makebox(0,0){$\\scriptstyle\\star$}",
157                 "\\circle{12}", "\\circle{18}",
158                 "\\circle*{12}", "\\circle*{18}",
159         },
160         {
161                 "\\makebox(0,0){$\\scriptscriptstyle\\Diamond$}",
162                 "\\makebox(0,0){$\\scriptscriptstyle +$}",
163                 "\\makebox(0,0){$\\scriptscriptstyle\\Box$}",
164                 "\\makebox(0,0){$\\scriptscriptstyle\\times$}",
165                 "\\makebox(0,0){$\\scriptscriptstyle\\triangle$}",
166                 "\\makebox(0,0){$\\scriptscriptstyle\\star$}",
167                 "\\circle{12}",
168                 "\\circle*{12}",
169         }
170 };
171
172 /* LINES */
173 static int eepic_numlines[] = { 5, 7, 8 };      /* number of linetypes below */
174 #define EEPIC_MAX_NUMLINES 8                            /* max of eepic_numlines[] */
175 static int eepic_lineset = 0;
176 static char GPFAR *GPFAR EEPIC_lines[][EEPIC_MAX_NUMLINES] =
177 {
178         {
179                 "\\thicklines \\path",  /* -2 border */
180                 "\\thinlines \\drawline[-50]",  /* -1 axes */
181                 "\\thinlines \\path",   /*  0 solid thin  */
182                 "\\thicklines \\path",  /*  1 solid thick */
183                 "\\Thicklines \\path"   /*  2 solid Thick */
184         },
185         {
186                 "\\thicklines \\path",  /* -2 border */
187                 "\\thinlines \\drawline[-50]",  /* -1 axes */
188                 "\\thinlines \\path",   /*  0 solid thin  */
189                 "\\thinlines \\dashline[90]{10}",
190                 "\\thinlines \\dottedline{10}",
191                 "\\thinlines \\dashline[60]{20}",
192                 "\\thinlines \\dottedline{20}"
193         },
194         {
195                 "\\thicklines \\path",  /* -2 border */
196                 "\\thinlines \\drawline[-50]",  /* -1 axes */
197                 "\\thinlines \\path",
198                 "\\thinlines \\path",
199                 "\\thinlines \\path",
200                 "\\thinlines \\path",
201                 "\\thinlines \\path",
202                 "\\thinlines \\path"
203         }
204 };
205 static int EEPIC_type;          /* current line type */
206 static TBOOLEAN EEPIC_inline = FALSE;   /* are we in the middle of a line */
207 static void EEPIC_endline __PROTO((void)); /* terminate any line in progress */
208 static int EEPIC_linecount = 0; /* number of points in line so far */
209 #define EEPIC_LINEMAX 50        /* max value for linecount */
210
211 #define EEPIC_NUM_COLORS 7
212 static int eepic_color = 0;
213 static char GPFAR *GPFAR eepic_colors[EEPIC_NUM_COLORS] =
214 {
215         "\\color{black}\n",     /* border and axes (must be black!) */
216         "\\color{red}\n",
217         "\\color{blue}\n",
218         "\\color{green}\n",
219         "\\color{magenta}\n",
220         "\\color{cyan}\n",
221         "\\color{yellow}\n"
222 };
223
224 /* ARROWS */
225 /* we use the same code as for LATEX */
226 /* figure out the best arrow */
227 static void best_latex_arrow __PROTO((int sx, int sy, int ex, int ey, int who, int head));
228
229 TERM_PUBLIC void
230 EEPIC_init()
231 {
232     EEPIC_posx = EEPIC_posy = 0;
233         EEPIC_type = 0;
234         EEPIC_linecount = 0;
235         EEPIC_inline = FALSE;
236         eepic_color = 0;
237     fprintf(gpoutfile, "\
238 %% GNUPLOT: LaTeX picture using EEPIC macros\n\
239 \\setlength{\\unitlength}{%fpt}\n",
240             EEPIC_UNIT);
241 }
242
243
244 TERM_PUBLIC void
245 EEPIC_graphics()
246 {
247     register struct termentry *t = term;
248
249     /* HBB 20001027: respect 'size' and 'offset' settings to modify
250      * picture box size and position */
251     fprintf(gpoutfile, "\\begin{picture}(%d,%d)(%d,%d)\n",
252             (int) (t->xmax * xsize),
253             (int) (t->ymax * ysize),
254             (int) (t->xmax * xoffset),
255             (int) (t->ymax * xoffset));
256     if (fontsize_set) {
257         float x = t->v_char * EEPIC_UNIT + 0.5;
258
259         fprintf(gpoutfile, "\\fontsize{%d}{%g}\\selectfont\n",
260                 (int) x,  1.2 * x );
261     } else
262         fprintf(gpoutfile,"\\footnotesize\n" );
263
264 }
265
266
267 TERM_PUBLIC void
268 EEPIC_text()
269 {
270     EEPIC_endline();
271     fputs("\\end{picture}\n", gpoutfile);
272 }
273
274
275 TERM_PUBLIC void
276 EEPIC_linetype(int linetype)
277 {
278     EEPIC_endline();
279
280     EEPIC_type = linetype % (eepic_numlines[eepic_lineset] - 2);
281
282         if ( eepic_color_on )
283         {
284                 eepic_color = linetype;
285                 if ( eepic_color < 0 )
286                         eepic_color = 0;
287                 else
288                 {
289                         eepic_color %= EEPIC_NUM_COLORS - 1;
290                         eepic_color += 1;
291                 }
292                 fputs( eepic_colors[eepic_color], gpoutfile );
293         }
294 }
295
296
297
298 TERM_PUBLIC void
299 EEPIC_move(unsigned int x, unsigned int y)
300 {
301     EEPIC_endline();
302
303     EEPIC_posx = x;
304     EEPIC_posy = y;
305 }
306
307
308 TERM_PUBLIC void
309 EEPIC_point(unsigned int x, unsigned int y, int number)
310 {
311     EEPIC_move(x, y);
312
313     /* Print the character defined by 'number'; number < 0 means
314        to use a dot, otherwise one of the defined points. */
315     fprintf(gpoutfile, "\\put(%d,%d){%s}\n", x, y,
316             (number < 0 ? EEPIC_TINY_DOT
317              : EEPIC_points[eepic_pointsize][number % eepic_num_point_types[eepic_pointsize]]));
318 }
319
320
321 TERM_PUBLIC void
322 EEPIC_vector(unsigned int ux, unsigned int uy)
323 {
324     if (!EEPIC_inline) {
325         EEPIC_inline = TRUE;
326
327         /* Start a new line. This depends on line type */
328         fprintf(gpoutfile, "%s(%u,%u)",
329                 EEPIC_lines[eepic_lineset][EEPIC_type + 2],
330                 EEPIC_posx, EEPIC_posy);
331         EEPIC_linecount = 1;
332     } else {
333         /* Even though we are in middle of a path,
334          * we may want to start a new path command.
335          * If they are too long then latex will choke.
336          */
337         if (EEPIC_linecount++ >= EEPIC_LINEMAX) {
338             fprintf(gpoutfile, "\n%s(%u,%u)",
339                     EEPIC_lines[eepic_lineset][EEPIC_type + 2],
340                     EEPIC_posx, EEPIC_posy);
341             EEPIC_linecount = 1;
342         }
343     }
344     fprintf(gpoutfile, "(%u,%u)", ux, uy);
345     EEPIC_posx = ux;
346     EEPIC_posy = uy;
347 }
348
349 static void
350 EEPIC_endline()
351 {
352     if (EEPIC_inline) {
353         putc('\n', gpoutfile);
354         EEPIC_inline = FALSE;
355     }
356 }
357
358
359 TERM_PUBLIC void
360 EEPIC_arrow(
361     unsigned int sx, unsigned int sy,
362     unsigned int ex, unsigned int ey,
363     int head)
364 {
365     best_latex_arrow(sx, sy, ex, ey, 2, head);  /* call latex routine */
366
367     EEPIC_posx = ex;
368     EEPIC_posy = ey;
369 }
370
371
372 TERM_PUBLIC void
373 EEPIC_put_text(unsigned int x, unsigned y, const char str[])
374 {
375     int i, l;
376
377     EEPIC_endline();
378
379     fprintf(gpoutfile, "\\put(%d,%d)", x, y);
380     if ((str[0] == '{') || (str[0] == '[')) {
381         fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str);
382     }
383     else
384     switch (eepic_angle)
385     {
386         case 0:
387         {
388            switch (eepic_justify) {
389                case LEFT:
390                    fputs("{\\makebox(0,0)[l]{",gpoutfile);
391                    break;
392                case CENTRE:
393                    fputs("{\\makebox(0,0){",gpoutfile);
394                    break;
395                case RIGHT:
396                    fputs("{\\makebox(0,0)[r]{",gpoutfile);
397                    break;
398            }
399            fprintf(gpoutfile,"%s}}\n", str);
400            break;
401         }
402         case 1:
403         {
404            if ( eepic_true_rotate )
405            {
406                /* use \rotatebox */
407                switch (eepic_justify) {
408                    case LEFT:
409                        fputs("{\\makebox(0,0)[lb]{\\rotatebox[origin=c]{90}{",
410                              gpoutfile);
411                        break;
412                    case CENTRE:
413                        fputs("{\\makebox(0,0)[l]{\\rotatebox[origin=c]{90}{",
414                              gpoutfile);
415                        break;
416                    case RIGHT:
417                        fputs("{\\makebox(0,0)[lt]{\\rotatebox[origin=c]{90}{",
418                              gpoutfile);
419                        break;
420                }
421                fprintf(gpoutfile,"%s}}}\n", str);
422            }
423            else
424            {
425                /* put text in a short stack */
426                switch (eepic_justify) {
427                    case LEFT:
428                        fputs("{\\makebox(0,0)[lb]{\\shortstack{",gpoutfile);
429                        break;
430                    case CENTRE:
431                        fputs("{\\makebox(0,0)[l]{\\shortstack{",gpoutfile);
432                        break;
433                    case RIGHT:
434                        fputs("{\\makebox(0,0)[lt]{\\shortstack{",gpoutfile);
435                        break;
436                }
437                l = strlen(str)-1;
438                for ( i = 0; i < l; i ++ )
439                    fprintf(gpoutfile, "%c\\\\", str[i] );
440                fputc(str[l],gpoutfile);
441                fputs("}}}\n",gpoutfile);
442            }
443            break;
444        }
445     }
446 }
447
448
449
450 TERM_PUBLIC int
451 EEPIC_justify_text(enum JUSTIFY mode)
452 {
453     eepic_justify = mode;
454     return (TRUE);
455 }
456
457 TERM_PUBLIC int
458 EEPIC_text_angle(int ang)
459 {
460     eepic_angle = (ang ? 1 : 0);
461     return (TRUE);
462 }
463
464 TERM_PUBLIC void
465 EEPIC_reset()
466 {
467     EEPIC_endline();
468     EEPIC_posx = EEPIC_posy = 0;
469 }
470
471 TERM_PUBLIC void
472 EEPIC_options()
473 {
474     float fontsize = 0;
475
476     eepic_color_on =
477     eepic_true_rotate = FALSE;
478     eepic_lineset = 0;
479     eepic_pointsize = 0;
480
481     while (!END_OF_COMMAND) {
482         if (almost_equals(c_token, "de$fault")) {
483             fontsize_set = FALSE;
484             eepic_color_on = FALSE;
485             eepic_true_rotate = FALSE;
486             eepic_lineset = 0;
487             eepic_pointsize = 0;
488             c_token++;
489         } else if (almost_equals(c_token, "c$olor") ||
490                    almost_equals(c_token, "c$olour")) {
491             eepic_color_on = TRUE;
492             eepic_lineset = 2;
493             c_token++;
494         } else if (almost_equals(c_token, "r$otate")) {
495             eepic_true_rotate = TRUE;
496             c_token++;
497         } else if (almost_equals(c_token, "da$shed")) {
498             if (! eepic_color_on)
499                 eepic_lineset = 1;      /* ignore when color is on */
500             c_token++;
501         } else if (almost_equals(c_token, "s$mall")) {
502             eepic_pointsize = 1;
503             c_token++;
504         } else if (almost_equals(c_token, "t$iny")) {
505             eepic_pointsize = 2;
506             c_token++;
507         } else if (isdigit((unsigned char)
508                            gp_input_line[token[c_token].start_index])) {
509             struct value a;
510             fontsize = real(const_express(&a));
511
512             if (fontsize < 1 || fontsize > 100)
513                 int_error(c_token, "font size out of bounds [1..100]");
514             else {
515                 fontsize_set = TRUE;
516                 term->v_char = (unsigned int)(fontsize/EEPIC_UNIT);
517                 term->h_char = (unsigned int)((fontsize/EEPIC_UNIT)/2);
518             }
519         } else
520             int_error(c_token, "unrecognized option");
521     } /* while(command) */
522
523     sprintf(term_options, "default%s%s%s%s",
524             eepic_color_on ? " color" : "",
525             eepic_lineset == 1 ? " dashed" : "",
526             eepic_true_rotate ? " rotate" : "",
527             eepic_pointsize == 1 ? " small"
528             : eepic_pointsize == 2 ? " tiny" : "" );
529     if (fontsize_set)
530         sprintf( term_options+strlen(term_options), " %d", (int) fontsize );
531 }
532
533 #endif
534
535 #ifdef TERM_TABLE
536
537 TERM_TABLE_START(eepic_driver)
538     "eepic", "EEPIC -- extended LaTeX picture environment",
539     EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR,
540     EEPIC_VTIC, EEPIC_HTIC, EEPIC_options, EEPIC_init, EEPIC_reset,
541     EEPIC_text, null_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector,
542     EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle,
543     EEPIC_justify_text, EEPIC_point, EEPIC_arrow, set_font_null,
544     0, /* pointsize */
545     0, /* flags */
546     0, 0, /* suspend, resume */
547     0, /* fillbox */
548     0  /* linewidth */
549 TERM_TABLE_END(eepic_driver)
550
551 #undef LAST_TERM
552 #define LAST_TERM eepic_driver
553
554 #endif
555 #endif
556
557 #ifdef TERM_HELP
558 START_HELP(eepic)
559 "1 eepic",
560 "?commands set terminal eepic",
561 "?set terminal eepic",
562 "?set term eepic",
563 "?terminal eepic",
564 "?term eepic",
565 "?eepic",
566 " The `eepic` terminal driver supports the extended LaTeX picture environment.",
567 " It is an alternative to the `latex` driver.",
568 "",
569 " The output of this terminal is intended for use with the \"eepic.sty\" macro",
570 " package for LaTeX.  To use it, you need \"eepic.sty\", \"epic.sty\" and a",
571 " printer driver that supports the \"tpic\" \\specials.  If your printer driver",
572 " doesn't support those \\specials, \"eepicemu.sty\" will enable you to use some",
573 " of them.",
574 " dvips and dvipdfm do support the \"tpic\" \\specials.",
575 "",
576 " Syntax:",
577 "    set terminal eepic {color, dashed, rotate, small, tiny, default, <fontsize>}",
578 "",
579 " Options:",
580 " You can give options in any order you wish.",
581 " 'color' causes gnuplot to produce \\color{...} commands so that the graphs are",
582 " colored. Using this option, you must include \\usepackage{color} in the preambel",
583 " of your latex document.",
584 " 'dashed' will allow dashed line types; without this option, only solid lines",
585 " with varying thickness will be used.",
586 " 'dashed' and 'color' are mutually exclusive; if 'color' is specified, then 'dashed'",
587 " will be ignored.",
588 " 'rotate' will enable true rotated text (by 90 degrees). Otherwise, rotated text",
589 " will be typeset with letters stacked above each other. If you use this option",
590 " you must include \\usepackage{graphicx} in the preamble.",
591 " 'small' will use \\scriptsize symbols as point markers (Probably does not work",
592 " with TeX, only LaTeX2e). Default is to use the default math size.",
593 " 'tiny' uses \\scriptscriptstyle symbols.",
594 " 'default' resets all options to their defaults = no color, no dashed lines,",
595 " pseudo-rotated (stacked) text, large point symbols.",
596 " <fontsize> is a number which specifies the font size inside the picture",
597 " environment; the unit is pt (points), i.e., 10 pt equals approx. 3.5 mm.",
598 " If fontsize is not specified, then all text inside the picture will be set",
599 " in \\footnotesize.",
600 "",
601 " Notes:",
602 " Remember to escape the # character (or other chars meaningful to (La-)TeX)",
603 " by \\\\ (2 backslashes).",
604 " It seems that dashed lines become solid lines when the vertices of a plot",
605 " are too close. (I do not know if that is a general problem with the tpic specials,",
606 " or if it is caused by a bug in eepic.sty or dvips/dvipdfm.)",
607 " The default size of an eepic plot is 5x3 inches, which can be scaled ",
608 " by 'set size a,b'.",
609 " Points, among other things, are drawn using the LaTeX commands \"\\Diamond\",",
610 " \"\\Box\", etc.  These commands no longer belong to the LaTeX2e core; they are",
611 " included in the latexsym package, which is part of the base distribution and",
612 " thus part of any LaTeX implementation. Please do not forget to use this package.",
613 " Instead of latexsym, you can also include the amssymb package.",
614 " All drivers for LaTeX offer a special way of controlling text positioning:",
615 " If any text string begins with '{', you also need to include a '}' at the",
616 " end of the text, and the whole text will be centered both horizontally and",
617 " vertically.  If the text string begins with '[', you need to follow this with",
618 " a position specification (up to two out of t,b,l,r), ']{', the text itself,",
619 " and finally '}'.  The text itself may be anything LaTeX can typeset as an",
620 " LR-box.  '\\rule{}{}'s may help for best positioning.",
621 "",
622 " Examples:",
623 " set term eepic",
624 "   output graphs as eepic macros inside a picture environment;",
625 "   \\input the resulting file in your LaTeX document.",
626 " set term eepic color tiny rotate 8",
627 "   eepic macros with \\color macros, \\scripscriptsize point markers,",
628 "   true rotated text, and all text set with 8pt.",
629 "",
630 " About label positioning:",
631 " Use gnuplot defaults (mostly sensible, but sometimes not really best):",
632 "        set title '\\LaTeX\\ -- $ \\gamma $'",
633 " Force centering both horizontally and vertically:",
634 "        set label '{\\LaTeX\\ -- $ \\gamma $}' at 0,0",
635 " Specify own positioning (top here):",
636 "        set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'",
637 " The other label -- account for long ticlabels:",
638 "        set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'"
639 END_HELP(eepic)
640 #endif /* TERM_HELP */