[BACK]Return to eepic.trm CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / term

Diff for /OpenXM_contrib/gnuplot/term/Attic/eepic.trm between version 1.1.1.2 and 1.1.1.3

version 1.1.1.2, 2000/01/22 14:16:22 version 1.1.1.3, 2003/09/15 07:09:36
Line 63 
Line 63 
 /*  /*
  * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)   * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)
  */   */
   /* Additions by Gabriel Zachmann (Gabriel.Zachmann@gmx.net), Nov 2000:
    * - little bug fix in stacked (faked rotated) text
    * - color support
    * - true rotated text
    * - augmented line types set with dashed lines
    * - optionally small or tiny point symbols
    * - font size
    */
   
   
 #include "driver.h"  #include "driver.h"
   
 #ifdef TERM_REGISTER  #ifdef TERM_REGISTER
Line 71  register_term(eepic)
Line 80  register_term(eepic)
 #endif  #endif
   
 #ifdef TERM_PROTO  #ifdef TERM_PROTO
   
   #include <ctype.h>
   
 TERM_PUBLIC void EEPIC_init __PROTO((void));  TERM_PUBLIC void EEPIC_init __PROTO((void));
 TERM_PUBLIC void EEPIC_graphics __PROTO((void));  TERM_PUBLIC void EEPIC_graphics __PROTO((void));
 TERM_PUBLIC void EEPIC_text __PROTO((void));  TERM_PUBLIC void EEPIC_text __PROTO((void));
Line 87  TERM_PUBLIC void EEPIC_put_text __PROTO((unsigned int 
Line 99  TERM_PUBLIC void EEPIC_put_text __PROTO((unsigned int 
 TERM_PUBLIC int EEPIC_justify_text __PROTO((enum JUSTIFY mode));  TERM_PUBLIC int EEPIC_justify_text __PROTO((enum JUSTIFY mode));
 TERM_PUBLIC int EEPIC_text_angle __PROTO((int ang));  TERM_PUBLIC int EEPIC_text_angle __PROTO((int ang));
 TERM_PUBLIC void EEPIC_reset __PROTO((void));  TERM_PUBLIC void EEPIC_reset __PROTO((void));
   TERM_PUBLIC void EEPIC_options __PROTO((void));
   
 #define EEPIC_PTS_PER_INCH (72.27)  #define EEPIC_PTS_PER_INCH 72.27
 /* resolution of printer we expect to use */  /* resolution of printer we expect to use */
 #define DOTS_PER_INCH (300)  #define EEPIC_DOTS_PER_INCH 600
 /* dot size in pt */  /* dot size in pt */
 #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/DOTS_PER_INCH)  #define EEPIC_UNIT (EEPIC_PTS_PER_INCH/EEPIC_DOTS_PER_INCH)
   
 /* 5 inches wide by 3 inches high (default) */  /* 5 inches wide by 3 inches high (default) */
 /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0) */  #define EEPIC_XMAX (EEPIC_PTS_PER_INCH/EEPIC_UNIT*5.0)
 #define EEPIC_XMAX (5*DOTS_PER_INCH)  #define EEPIC_YMAX (EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0)
 /* (EEPIC_PTS_PER_INCH/EEPIC_UNIT*3.0) */  
 #define EEPIC_YMAX (3*DOTS_PER_INCH)  
   
 #define EEPIC_HTIC (5*DOTS_PER_INCH/72)         /* (5./EEPIC_UNIT) */  #define EEPIC_HTIC (5.0/EEPIC_UNIT)
 #define EEPIC_VTIC (5*DOTS_PER_INCH/72)         /* (5./EEPIC_UNIT) */  #define EEPIC_VTIC (5.0/EEPIC_UNIT)
 #define EEPIC_HCHAR (DOTS_PER_INCH*53/10/72)    /* (5.3/EEPIC_UNIT) */  #define EEPIC_VCHAR (10.0/EEPIC_UNIT)
 #define EEPIC_VCHAR (DOTS_PER_INCH*11/72)       /* (11./EEPIC_UNIT) */  #define EEPIC_HCHAR (EEPIC_VCHAR/2.0)
 #endif /* TERM_PROTO */  #endif /* TERM_PROTO */
   
 #ifndef TERM_PROTO_ONLY  #ifndef TERM_PROTO_ONLY
Line 111  TERM_PUBLIC void EEPIC_reset __PROTO((void));
Line 122  TERM_PUBLIC void EEPIC_reset __PROTO((void));
   
 static unsigned int EEPIC_posx;  static unsigned int EEPIC_posx;
 static unsigned int EEPIC_posy;  static unsigned int EEPIC_posy;
 enum JUSTIFY eepic_justify = LEFT;  static enum JUSTIFY eepic_justify = LEFT;
 static int eepic_angle = 0;  static int eepic_angle = 0;
   static int eepic_color_on = FALSE;              /* use \color */
   static int eepic_true_rotate = FALSE;           /* use \rotatebox */
   static int fontsize_set = FALSE;
   
 /* for DOTS point style */  /* for DOTS point style */
 #define EEPIC_TINY_DOT "\\rule{.1pt}{.1pt}"  #define EEPIC_TINY_DOT "\\rule{.1pt}{.1pt}"
   
 /* POINTS */  /* POINTS */
 #define EEPIC_POINT_TYPES 12    /* we supply more point types */  static int eepic_num_point_types[] = { 12, 10, 8 };
 static char GPFAR *GPFAR EEPIC_points[] =  static int eepic_pointsize = 0;
   static char GPFAR *GPFAR EEPIC_points[][12] =
 {  {
     "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Diamond$}}",          {
     "\\makebox(0,0){$+$}",                  "\\makebox(0,0){$\\Diamond$}",
     "\\raisebox{-1.2pt}{\\makebox(0,0){$\\Box$}}",                  "\\makebox(0,0){$+$}",
     "\\makebox(0,0){$\\times$}",                  "\\makebox(0,0){$\\Box$}",
     "\\makebox(0,0){$\\triangle$}",                  "\\makebox(0,0){$\\times$}",
     "\\makebox(0,0){$\\star$}",                  "\\makebox(0,0){$\\triangle$}",
     "\\circle{12}", "\\circle{18}", "\\circle{24}",                  "\\makebox(0,0){$\\star$}",
     "\\circle*{12}", "\\circle*{18}", "\\circle*{24}"                  "\\circle{12}", "\\circle{18}", "\\circle{24}",
                   "\\circle*{12}", "\\circle*{18}", "\\circle*{24}"
           },
           {
                   "\\makebox(0,0){$\\scriptstyle\\Diamond$}",
                   "\\makebox(0,0){$\\scriptstyle +$}",
                   "\\makebox(0,0){$\\scriptstyle\\Box$}",
                   "\\makebox(0,0){$\\scriptstyle\\times$}",
                   "\\makebox(0,0){$\\scriptstyle\\triangle$}",
                   "\\makebox(0,0){$\\scriptstyle\\star$}",
                   "\\circle{12}", "\\circle{18}",
                   "\\circle*{12}", "\\circle*{18}",
           },
           {
                   "\\makebox(0,0){$\\scriptscriptstyle\\Diamond$}",
                   "\\makebox(0,0){$\\scriptscriptstyle +$}",
                   "\\makebox(0,0){$\\scriptscriptstyle\\Box$}",
                   "\\makebox(0,0){$\\scriptscriptstyle\\times$}",
                   "\\makebox(0,0){$\\scriptscriptstyle\\triangle$}",
                   "\\makebox(0,0){$\\scriptscriptstyle\\star$}",
                   "\\circle{12}",
                   "\\circle*{12}",
           }
 };  };
   
 /* LINES */  /* LINES */
 #define EEPIC_NUMLINES 5        /* number of linetypes below */  static int eepic_numlines[] = { 5, 7, 8 };      /* number of linetypes below */
 static char GPFAR *GPFAR EEPIC_lines[] =  #define EEPIC_MAX_NUMLINES 8                            /* max of eepic_numlines[] */
   static int eepic_lineset = 0;
   static char GPFAR *GPFAR EEPIC_lines[][EEPIC_MAX_NUMLINES] =
 {  {
     "\\thicklines \\path",      /* -2 border */          {
     "\\thinlines \\drawline[-50]",      /* -1 axes */                  "\\thicklines \\path",  /* -2 border */
     "\\thinlines \\path",       /*  0 solid thin  */                  "\\thinlines \\drawline[-50]",  /* -1 axes */
     "\\thicklines \\path",      /*  1 solid thick */                  "\\thinlines \\path",   /*  0 solid thin  */
     "\\Thicklines \\path",      /*  2 solid Thick */                  "\\thicklines \\path",  /*  1 solid thick */
                   "\\Thicklines \\path"   /*  2 solid Thick */
           },
           {
                   "\\thicklines \\path",  /* -2 border */
                   "\\thinlines \\drawline[-50]",  /* -1 axes */
                   "\\thinlines \\path",   /*  0 solid thin  */
                   "\\thinlines \\dashline[90]{10}",
                   "\\thinlines \\dottedline{10}",
                   "\\thinlines \\dashline[60]{20}",
                   "\\thinlines \\dottedline{20}"
           },
           {
                   "\\thicklines \\path",  /* -2 border */
                   "\\thinlines \\drawline[-50]",  /* -1 axes */
                   "\\thinlines \\path",
                   "\\thinlines \\path",
                   "\\thinlines \\path",
                   "\\thinlines \\path",
                   "\\thinlines \\path",
                   "\\thinlines \\path"
           }
 };  };
 /* These are other possibilities  
     "\\thinlines \\dottedline{30}",  
     "\\thinlines \\drawline[-30]",  
     "\\thinlines \\dottedline{60}",  
     "\\thinlines \\drawline[-60]",  
     "\\thinlines \\dashline[-10]{20}[6]"  
 */  
 static int EEPIC_type;          /* current line type */  static int EEPIC_type;          /* current line type */
 static TBOOLEAN EEPIC_inline = FALSE;   /* are we in the middle of a line */  static TBOOLEAN EEPIC_inline = FALSE;   /* are we in the middle of a line */
 void EEPIC_endline __PROTO((void));     /* terminate any line in progress */  static void EEPIC_endline __PROTO((void)); /* terminate any line in progress */
 static int EEPIC_linecount = 0; /* number of points in line so far */  static int EEPIC_linecount = 0; /* number of points in line so far */
 #define EEPIC_LINEMAX 50        /* max value for linecount */  #define EEPIC_LINEMAX 50        /* max value for linecount */
   
   #define EEPIC_NUM_COLORS 7
   static int eepic_color = 0;
   static char GPFAR *GPFAR eepic_colors[EEPIC_NUM_COLORS] =
   {
           "\\color{black}\n",     /* border and axes (must be black!) */
           "\\color{red}\n",
           "\\color{blue}\n",
           "\\color{green}\n",
           "\\color{magenta}\n",
           "\\color{cyan}\n",
           "\\color{yellow}\n"
   };
   
 /* ARROWS */  /* ARROWS */
 /* we use the same code as for LATEX */  /* we use the same code as for LATEX */
 /* figure out the best arrow */  /* figure out the best arrow */
 void best_latex_arrow __PROTO((int sx, int sy, int ex, int ey, int who,  void best_latex_arrow __PROTO((int sx, int sy, int ex, int ey, int who, TBOOLEAN head));
                                TBOOLEAN head));  
   
 TERM_PUBLIC void EEPIC_init()  TERM_PUBLIC void
   EEPIC_init()
 {  {
     EEPIC_posx = EEPIC_posy = 0;      EEPIC_posx = EEPIC_posy = 0;
     EEPIC_linetype(-1);          EEPIC_type = 0;
     fprintf(gpoutfile, "%% GNUPLOT: LaTeX picture using EEPIC macros\n\          EEPIC_linecount = 0;
 \\setlength{\\unitlength}{%fpt}\n", EEPIC_UNIT);          EEPIC_inline = FALSE;
           eepic_color = 0;
       fprintf(gpoutfile, "\
   %% GNUPLOT: LaTeX picture using EEPIC macros\n\
   \\setlength{\\unitlength}{%fpt}\n",
               EEPIC_UNIT);
 }  }
   
   
 TERM_PUBLIC void EEPIC_graphics()  TERM_PUBLIC void
   EEPIC_graphics()
 {  {
     register struct termentry *t = term;      register struct termentry *t = term;
   
     fprintf(gpoutfile, "\\begin{picture}(%d,%d)(0,0)\n\      /* HBB 20001027: respect 'size' and 'offset' settings to modify
 \\footnotesize\n", t->xmax, t->ymax);       * picture box size and position */
       fprintf(gpoutfile, "\\begin{picture}(%d,%d)(%d,%d)\n",
               (int) (t->xmax * xsize),
               (int) (t->ymax * ysize),
               (int) (t->xmax * xoffset),
               (int) (t->ymax * xoffset));
       if ( fontsize_set )
       {
           float x = t->v_char * EEPIC_UNIT + 0.5;
           fprintf(gpoutfile,"\\fontsize{%d}{%g}\\selectfont\n",
                   (int) x,  1.2 * x );
       }
       else
           fprintf(gpoutfile,"\\footnotesize\n" );
   
 }  }
   
   
 TERM_PUBLIC void EEPIC_text()  TERM_PUBLIC void
   EEPIC_text()
 {  {
     EEPIC_endline();      EEPIC_endline();
     fputs("\\end{picture}\n", gpoutfile);      fputs("\\end{picture}\n", gpoutfile);
 }  }
   
   
 TERM_PUBLIC void EEPIC_linetype(linetype)  TERM_PUBLIC void
 int linetype;  EEPIC_linetype(linetype)
       int linetype;
 {  {
     EEPIC_endline();      EEPIC_endline();
   
     if (linetype >= EEPIC_NUMLINES - 2)      EEPIC_type = linetype % (eepic_numlines[eepic_lineset] - 2);
         linetype %= (EEPIC_NUMLINES - 2);  
   
     EEPIC_type = linetype;          if ( eepic_color_on )
           {
                   eepic_color = linetype;
                   if ( eepic_color < 0 )
                           eepic_color = 0;
                   else
                   {
                           eepic_color %= EEPIC_NUM_COLORS - 1;
                           eepic_color += 1;
                   }
                   fputs( eepic_colors[eepic_color], gpoutfile );
           }
 }  }
   
   
   
 TERM_PUBLIC void EEPIC_move(x, y)  TERM_PUBLIC void
 unsigned int x, y;  EEPIC_move(x, y)
       unsigned int x, y;
 {  {
     EEPIC_endline();      EEPIC_endline();
   
Line 209  unsigned int x, y;
Line 307  unsigned int x, y;
 }  }
   
   
 TERM_PUBLIC void EEPIC_point(x, y, number) /* version of line_and_point */  TERM_PUBLIC void
 unsigned int x, y;  EEPIC_point(x, y, number)       /* version of line_and_point */
 int number;                     /* type of point */      unsigned int x, y;
       int number;                 /* type of point */
 {  {
     EEPIC_move(x, y);      EEPIC_move(x, y);
   
Line 219  int number;   /* type of point */
Line 318  int number;   /* type of point */
        to use a dot, otherwise one of the defined points. */         to use a dot, otherwise one of the defined points. */
     fprintf(gpoutfile, "\\put(%d,%d){%s}\n", x, y,      fprintf(gpoutfile, "\\put(%d,%d){%s}\n", x, y,
             (number < 0 ? EEPIC_TINY_DOT              (number < 0 ? EEPIC_TINY_DOT
              : EEPIC_points[number % EEPIC_POINT_TYPES]));               : EEPIC_points[eepic_pointsize][number % eepic_num_point_types[eepic_pointsize]]));
 }  }
   
   
 TERM_PUBLIC void EEPIC_vector(ux, uy)  TERM_PUBLIC void
   EEPIC_vector(ux, uy)
 unsigned int ux, uy;  unsigned int ux, uy;
 {  {
     if (!EEPIC_inline) {          if (!EEPIC_inline) {
         EEPIC_inline = TRUE;                  EEPIC_inline = TRUE;
   
         /* Start a new line. This depends on line type */                  /* Start a new line. This depends on line type */
         fprintf(gpoutfile, "%s(%u,%u)",                  fprintf(gpoutfile, "%s(%u,%u)",
                 EEPIC_lines[EEPIC_type + 2],                                  EEPIC_lines[eepic_lineset][EEPIC_type + 2],
                 EEPIC_posx, EEPIC_posy);                                  EEPIC_posx, EEPIC_posy);
         EEPIC_linecount = 1;                  EEPIC_linecount = 1;
     } else {          } else {
         /* Even though we are in middle of a path,                  /* Even though we are in middle of a path,
          * we may want to start a new path command.                   * we may want to start a new path command.
          * If they are too long then latex will choke.                   * If they are too long then latex will choke.
          */                   */
         if (EEPIC_linecount++ >= EEPIC_LINEMAX) {                  if (EEPIC_linecount++ >= EEPIC_LINEMAX) {
             fprintf(gpoutfile, "\n%s(%u,%u)",                          fprintf(gpoutfile, "\n%s(%u,%u)",
                     EEPIC_lines[EEPIC_type + 2],                                          EEPIC_lines[eepic_lineset][EEPIC_type + 2],
                     EEPIC_posx, EEPIC_posy);                                          EEPIC_posx, EEPIC_posy);
             EEPIC_linecount = 1;                          EEPIC_linecount = 1;
                   }
         }          }
     }  
     fprintf(gpoutfile, "(%u,%u)", ux, uy);      fprintf(gpoutfile, "(%u,%u)", ux, uy);
     EEPIC_posx = ux;      EEPIC_posx = ux;
     EEPIC_posy = uy;      EEPIC_posy = uy;
 }  }
   
 void EEPIC_endline()  static void
   EEPIC_endline()
 {  {
     if (EEPIC_inline) {      if (EEPIC_inline) {
         putc('\n', gpoutfile);          putc('\n', gpoutfile);
Line 260  void EEPIC_endline()
Line 361  void EEPIC_endline()
 }  }
   
   
 TERM_PUBLIC void EEPIC_arrow(sx, sy, ex, ey, head)  TERM_PUBLIC void
   EEPIC_arrow(sx, sy, ex, ey, head)
 unsigned int sx, sy, ex, ey;  unsigned int sx, sy, ex, ey;
 TBOOLEAN head;  TBOOLEAN head;
 {  {
Line 271  TBOOLEAN head;
Line 373  TBOOLEAN head;
 }  }
   
   
 TERM_PUBLIC void EEPIC_put_text(x, y, str)  TERM_PUBLIC void
 unsigned int x, y;              /* reference point of string */  EEPIC_put_text(x, y, str)
 char str[];                     /* the text */      unsigned int x, y;          /* reference point of string */
       char str[];                 /* the text */
 {  {
       int i, l;
   
     EEPIC_endline();      EEPIC_endline();
   
     fprintf(gpoutfile, "\\put(%d,%d)", x, y);      fprintf(gpoutfile, "\\put(%d,%d)", x, y);
     if ((str[0] == '{') || (str[0] == '[')) {      if ((str[0] == '{') || (str[0] == '[')) {
         fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str);          fprintf(gpoutfile, "{\\makebox(0,0)%s}\n", str);
     } else      }
         switch (eepic_angle) {      else
         case 0:{      switch (eepic_angle)
                 switch (eepic_justify) {      {
                 case LEFT:{          case 0:
                         fprintf(gpoutfile,          {
                                 "{\\makebox(0,0)[l]{%s}}\n", str);             switch (eepic_justify) {
                         break;                 case LEFT:
                     }                     fputs("{\\makebox(0,0)[l]{",gpoutfile);
                 case CENTRE:{                     break;
                         fprintf(gpoutfile,                 case CENTRE:
                                 "{\\makebox(0,0){%s}}\n", str);                     fputs("{\\makebox(0,0){",gpoutfile);
                         break;                     break;
                     }                 case RIGHT:
                 case RIGHT:{                     fputs("{\\makebox(0,0)[r]{",gpoutfile);
                         fprintf(gpoutfile,                     break;
                                 "{\\makebox(0,0)[r]{%s}}\n", str);             }
                         break;             fprintf(gpoutfile,"%s}}\n", str);
                     }             break;
                 }  
                 break;  
             }  
         case 1:{                /* put text in a short stack */  
                 switch (eepic_justify) {  
                 case LEFT:{  
                         fprintf(gpoutfile,  
                                 "{\\makebox(0,0)[lb]{\\shortstack{%s}}}\n", str);  
                         break;  
                     }  
                 case CENTRE:{  
                         fprintf(gpoutfile,  
                                 "{\\makebox(0,0)[l]{\\shortstack{%s}}}\n", str);  
                         break;  
                     }  
                 case RIGHT:{  
                         fprintf(gpoutfile,  
                                 "{\\makebox(0,0)[lt]{\\shortstack{%s}}}\n", str);  
                         break;  
                     }  
                 }  
                 break;  
             }  
         }          }
           case 1:
           {
              if ( eepic_true_rotate )
              {
                  /* use \rotatebox */
                  switch (eepic_justify) {
                      case LEFT:
                          fputs("{\\makebox(0,0)[lb]{\\rotatebox[origin=c]{90}{",
                                gpoutfile);
                          break;
                      case CENTRE:
                          fputs("{\\makebox(0,0)[l]{\\rotatebox[origin=c]{90}{",
                                gpoutfile);
                          break;
                      case RIGHT:
                          fputs("{\\makebox(0,0)[lt]{\\rotatebox[origin=c]{90}{",
                                gpoutfile);
                          break;
                  }
                  fprintf(gpoutfile,"%s}}}\n", str);
              }
              else
              {
                  /* put text in a short stack */
                  switch (eepic_justify) {
                      case LEFT:
                          fputs("{\\makebox(0,0)[lb]{\\shortstack{",gpoutfile);
                          break;
                      case CENTRE:
                          fputs("{\\makebox(0,0)[l]{\\shortstack{",gpoutfile);
                          break;
                      case RIGHT:
                          fputs("{\\makebox(0,0)[lt]{\\shortstack{",gpoutfile);
                          break;
                  }
                  l = strlen(str)-1;
                  for ( i = 0; i < l; i ++ )
                      fprintf(gpoutfile, "%c\\\\", str[i] );
                  fputc(str[l],gpoutfile);
                  fputs("}}}\n",gpoutfile);
              }
              break;
          }
       }
 }  }
   
   
   
 TERM_PUBLIC int EEPIC_justify_text(mode)  TERM_PUBLIC int
   EEPIC_justify_text(mode)
 enum JUSTIFY mode;  enum JUSTIFY mode;
 {  {
     eepic_justify = mode;      eepic_justify = mode;
     return (TRUE);      return (TRUE);
 }  }
   
 TERM_PUBLIC int EEPIC_text_angle(ang)  TERM_PUBLIC int
   EEPIC_text_angle(ang)
 int ang;  int ang;
 {  {
     /* we can't really write text vertically, but this will  
        put the ylabel centred at the left of the plot, and  
        then we'll make a \shortstack */  
     eepic_angle = ang;      eepic_angle = ang;
     return (TRUE);      return (TRUE);
 }  }
   
 TERM_PUBLIC void EEPIC_reset()  TERM_PUBLIC void
   EEPIC_reset()
 {  {
     EEPIC_endline();      EEPIC_endline();
     EEPIC_posx = EEPIC_posy = 0;      EEPIC_posx = EEPIC_posy = 0;
 }  }
   
   TERM_PUBLIC void
   EEPIC_options()
   {
       float fontsize = 0;
   
       eepic_color_on =
       eepic_true_rotate = FALSE;
       eepic_lineset = 0;
       eepic_pointsize = 0;
   
       while (!END_OF_COMMAND)
       {
           if (almost_equals(c_token, "de$fault"))
           {
               fontsize_set = FALSE;
               eepic_color_on =
               eepic_true_rotate = FALSE;
               eepic_lineset = 0;
               eepic_pointsize = 0;
               c_token++;
           }
           else
           if (almost_equals(c_token, "c$olor") ||
               almost_equals(c_token, "c$olour"))
           {
               eepic_color_on = TRUE;
               eepic_lineset = 2;
               c_token++;
           }
           else
           if (almost_equals(c_token, "r$otate"))
           {
               eepic_true_rotate = TRUE;
               c_token++;
           }
           else
           if (almost_equals(c_token, "da$shed"))
           {
               if ( ! eepic_color_on )
                   eepic_lineset = 1;      /* ignore when color is on */
               c_token++;
           }
           else
           if (almost_equals(c_token, "s$mall"))
           {
               eepic_pointsize = 1;
               c_token++;
           }
           else
           if (almost_equals(c_token, "t$iny"))
           {
               eepic_pointsize = 2;
               c_token++;
           }
           if ( isdigit((unsigned char)
                        input_line[token[c_token].start_index]) )
           {
               /* stolen from pslatex.trm */
               struct value a;
               fontsize = real(const_express(&a));
               if ( fontsize < 1 || fontsize > 100 )
               {
                   int_error("font size out of bounds [1..100]", c_token);
                   fontsize_set = FALSE;
               }
               else
               {
                   fontsize_set = TRUE;
                   term->v_char = (unsigned int)(fontsize/EEPIC_UNIT);
                   term->h_char = (unsigned int)((fontsize/EEPIC_UNIT)/2);
               }
               c_token++;
           }
       }
   
       sprintf(term_options, "default%s%s%s%s",
               eepic_color_on ? " color" : "",
               eepic_lineset == 1 ? " dashed" : "",
               eepic_true_rotate ? " rotate" : "",
               eepic_pointsize == 1 ?
               " small" :
               eepic_pointsize == 2 ?
               " tiny" : "" );
       if ( fontsize_set )
           sprintf( term_options+strlen(term_options), " %d", (int) fontsize );
   }
   
 #endif  #endif
   
 #ifdef TERM_TABLE  #ifdef TERM_TABLE
Line 357  TERM_PUBLIC void EEPIC_reset()
Line 570  TERM_PUBLIC void EEPIC_reset()
 TERM_TABLE_START(eepic_driver)  TERM_TABLE_START(eepic_driver)
     "eepic", "EEPIC -- extended LaTeX picture environment",      "eepic", "EEPIC -- extended LaTeX picture environment",
     EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR,      EEPIC_XMAX, EEPIC_YMAX, EEPIC_VCHAR, EEPIC_HCHAR,
     EEPIC_VTIC, EEPIC_HTIC, options_null, EEPIC_init, EEPIC_reset,      EEPIC_VTIC, EEPIC_HTIC, EEPIC_options, EEPIC_init, EEPIC_reset,
     EEPIC_text, null_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector,      EEPIC_text, null_scale, EEPIC_graphics, EEPIC_move, EEPIC_vector,
     EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle,      EEPIC_linetype, EEPIC_put_text, EEPIC_text_angle,
     EEPIC_justify_text, EEPIC_point, EEPIC_arrow, set_font_null      EEPIC_justify_text, EEPIC_point, EEPIC_arrow, set_font_null
Line 386  START_HELP(eepic)
Line 599  START_HELP(eepic)
 " printer driver that supports the \"tpic\" \\specials.  If your printer driver",  " printer driver that supports the \"tpic\" \\specials.  If your printer driver",
 " doesn't support those \\specials, \"eepicemu.sty\" will enable you to use some",  " doesn't support those \\specials, \"eepicemu.sty\" will enable you to use some",
 " of them.",  " of them.",
   " dvips and dvipdfm do support the \"tpic\" \\specials.",
 "",  "",
 " Although dotted and dashed lines are possible with `eepic` and are tempting,",  " Syntax:",
 " they do not work well for high-sample-rate curves, fusing the dashes all",  "    set terminal eepic {color, dashed, rotate, small, tiny, default, <fontsize>}",
 " together into a solid line.  For now, the `eepic` driver creates only solid",  
 " lines.  There is another gnuplot driver (`tpic`) that supports dashed lines,",  
 " but it cannot be used if your DVI driver doesn't support \"tpic\" \\specials.",  
 "",  "",
   " Options:",
   " You can give options in any order you wish.",
   " 'color' causes gnuplot to produce \\color{...} commands so that the graphs are",
   " colored. Using this option, you must include \\usepackage{color} in the preambel",
   " of your latex document.",
   " 'dashed' will allow dashed line types; without this option, only solid lines",
   " with varying thickness will be used.",
   " 'dashed' and 'color' are mutually exclusive; if 'color' is specified, then 'dashed'",
   " will be ignored",
   " 'rotate' will enable true rotated text (by 90 degrees). Otherwise, rotated text",
   " will be typeset with letters stacked above each other. If you use this option",
   " you must include \\usepackage{graphicx} in the preamble.",
   " 'small' will use \\scriptsize symbols as point markers (Probably does not work",
   " with TeX, only LaTeX2e). Default is to use the default math size.",
   " 'tiny' uses \\scriptscriptstyle symbols.",
   " 'default' resets all options to their defaults = no color, no dashed lines,",
   " pseudo-rotated (stacked) text, large point symbols.",
   " <fontsize> is a number which specifies the font size inside the picture",
   " environment; the unit is pt (points), i.e., 10 pt equals approx. 3.5 mm.",
   " If fontsize is not specified, then all text inside the picture will be set",
   " in \\footnotesize.",
   "",
   " Notes:",
   " Remember to escape the # character (or other chars meaningful to (La-)TeX)",
   " by \\\\ (2 backslashes).",
   " It seems that dashed lines become solid lines when the vertices of a plot",
   " are too close. (I do not know if that is a general problem with the tpic specials,",
   " or if it is caused by a bug in eepic.sty or dvips/dvipdfm.)",
   " The default size of an eepic plot is 5x3 inches, which can be scaled ",
   " by 'set size a,b'",
   " Points, among other things, are drawn using the LaTeX commands \"\\Diamond\",",
   " \"\\Box\", etc.  These commands no longer belong to the LaTeX2e core; they are",
   " included in the latexsym package, which is part of the base distribution and",
   " thus part of any LaTeX implementation. Please do not forget to use this package.",
   " Instead of latexsym, you can also include the amssymb package."
 " All drivers for LaTeX offer a special way of controlling text positioning:",  " All drivers for LaTeX offer a special way of controlling text positioning:",
 " If any text string begins with '{', you also need to include a '}' at the",  " If any text string begins with '{', you also need to include a '}' at the",
 " end of the text, and the whole text will be centered both horizontally",  " end of the text, and the whole text will be centered both horizontally and",
 " and vertically by LaTeX. --- If the text string begins with '[', you need",  " vertically.  If the text string begins with '[', you need to follow this with",
 " to continue it with: a position specification (up to two out of t,b,l,r),",  " a position specification (up to two out of t,b,l,r), ']{', the text itself,",
 " ']{', the text itself, and finally, '}'. The text itself may be anything",  " and finally '}'.  The text itself may be anything LaTeX can typeset as an",
 " LaTeX can typeset as an LR-box. \\rule{}{}'s may help for best positioning.",  " LR-box.  '\\rule{}{}'s may help for best positioning.",
 "",  "",
 " The `eepic` terminal has no options.",  
 "",  
 " Examples:",  " Examples:",
   " set term eepic",
   "   output graphs as eepic macros inside a picture environment;",
   "   \\input the resulting file in your LaTeX document.",
   " set term eepic color tiny rotate 8",
   "   eepic macros with \\color macros, \\scripscriptsize point markers,",
   "   true rotated text, and all text set with 8pt.",
   "",
 " About label positioning:",  " About label positioning:",
 " Use gnuplot defaults (mostly sensible, but sometimes not really best):",  " Use gnuplot defaults (mostly sensible, but sometimes not really best):",
 "        set title '\\LaTeX\\ -- $ \\gamma $'",  "        set title '\\LaTeX\\ -- $ \\gamma $'",
Line 412  START_HELP(eepic)
Line 663  START_HELP(eepic)
 " Specify own positioning (top here):",  " Specify own positioning (top here):",
 "        set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'",  "        set xlabel '[t]{\\LaTeX\\ -- $ \\gamma $}'",
 " The other label -- account for long ticlabels:",  " The other label -- account for long ticlabels:",
 "        set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}'"  "        set ylabel '[r]{\\LaTeX\\ -- $ \\gamma $\\rule{7mm}{0pt}}'"
 END_HELP(eepic)  END_HELP(eepic)
 #endif /* TERM_HELP */  #endif /* TERM_HELP */

Legend:
Removed from v.1.1.1.2  
changed lines
  Added in v.1.1.1.3

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>