28.06.2014 Views

GAViewer 0.43 manual (.pdf)

GAViewer 0.43 manual (.pdf)

GAViewer 0.43 manual (.pdf)

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

5.13. CUSTOM COMMANDS 59<br />

Figure 5.15: Color example.<br />

below. The default colors are: red, green, blue, magenta, yellow, cyan, black,<br />

white, grey and gray (these last two are synonyms).<br />

The draw text in one of these colors (the default is black by the way), do<br />

something like the following (output in figure 5.15):<br />

Black text, \red{red text}, \blue{blue text}<br />

\newline and a green \green{frog}.<br />

5.12.1 Custom colors<br />

Custom colors can be added using the newcolor command. The command<br />

takes one argument, which is a sentence that contains the name of the color,<br />

the red value (range: [0.0, 1.0]), the green value and the blue value, seperated<br />

by whitespace:<br />

\newcolor{brightpink 1.0 0.0 0.6}<br />

Once a new color is defined like this, it can be used as any other color:<br />

\brightpink{Some bright pink text.}<br />

If a color is already defined, issuing a newcolor command for it will override<br />

its current rgb value. Redefining an existing command as a color is possible<br />

but not recommended.<br />

5.13 Custom commands<br />

When you want to do the same thing a lot of times, it might be useful to create a<br />

custom command or ’macro’. A custom command defines a fixed input string,<br />

a<br />

b<br />

Figure 5.16: Custom command example.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!