[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Size of fonts in coordinatesystem



On Tue, 8 Jun 2004, Gunnar wrote:

> How can I change the size of the labels in the coordinate axis?
> I think they are too big.
>
A quick-and-dirty approach:

Surround the text you want to shrink with raw output, e.g.

  fprintf (stdout, "\n\\begin{scriptsize}");
  h_axis_labels(4, P(0,-2), b);
  fprintf (stdout, "\n\\end{scriptsize}");

(using whatever font size you want, naturally:) Paths are unaffected by
font size, so you can enclose large portions of your file if you want most
or all of the text to be smaller.

If you want to do lots of font size changing, the next-easiest method may
be to write function wrappers for the axis-labeling commands. Finally, if
you usually want all fonts to be a specific size, the best solution may be
to write wrappers for begin() and end() that set and unset the font size,
e.g.

#include <string>

  inline void Begin(std::string fontsize = "scriptsize")
    {
      begin();
      std::cout << "\n\\begin{" << fontsize << "}";
    }

  inline void End(std::string fontsize = "scriptsize")
    {
      std::cout << "\n\\end{" << fontsize << "}";
      end();
    }

The next major version (which is in progress but long overdue...) will
handle fonts more flexibly and systematically.

Regards, Andy

Andrew D. Hwang			ahwang@mathcs.holycross.edu
Department of Math and CS	http://mathcs.holycross.edu/~ahwang
College of the Holy Cross	(508) 793-2458 (Office: 320 Swords)
Worcester, MA, 01610-2395	(508) 793-3530 (fax)