Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > e8b7ce893d130f732758286a15c74b5e > files > 59

hevea-1.10-4mdv2010.0.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>

<META http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<META name="GENERATOR" content="hevea 1.10">
<META name="Author" content="Luc Maranget">
<LINK rel="stylesheet" type="text/css" href="manual.css">
<TITLE>Pictures and Colors</TITLE>
</HEAD>
<BODY >
<A HREF="manual035.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual037.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
<HR>
<H2 CLASS="section"><A NAME="htoc115">B.14</A>&#XA0;&#XA0;Pictures and Colors</H2><UL>
<LI><A HREF="manual036.html#toc90">The <TT>picture</TT> environment and the <TT>graphics</TT>
Package</A>
</LI><LI><A HREF="manual036.html#toc91">The <TT>color</TT> Package</A>
</LI></UL>
<H3 CLASS="subsection"><A NAME="toc90"></A><A NAME="htoc116">B.14.1</A>&#XA0;&#XA0;The <TT>picture</TT> environment and the <TT>graphics</TT>
Package</H3><P>It is possible to have pictures and graphics processed by
<TT>imagen</TT> (see section&#XA0;<A HREF="manual008.html#image:file">6.1</A>).
In the case of the <TT>picture</TT> environment
it remains users responsability to explicitly choose
source chunks that will get rendered as GIF images.
In the case of the commands from the <TT>graphics</TT> package,
this choice is made by H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A.</P><P>For instance consider the following picture:
</P><PRE CLASS="verbatim">\newcounter{cms}
\setlength{\unitlength}{1mm}
\begin{picture}(50,10)
\put(0,7){\makebox(0,0)[b]{cm}}
\multiput(10,7)(10,0){5}{\addtocounter{cms}{1}\makebox(0,0)[b]{\arabic{cms}}}
\multiput(1,0)(1,0){49}{\line(0,1){2.5}}
\multiput(5,0)(10,0){5}{\line(0,1){5}}
\thicklines
\put(0,0){\line(1,0){50}}
\multiput(0,0)(10,0){6}{\line(0,1){5}}
\end{picture}
</PRE><P>Users should enclose <EM>all</EM> picture elements in a <CODE>toimage</CODE>
environment (or inside <CODE>%BEGIN IMAGE</CODE>&#X2026; <CODE>%END IMAGE</CODE> comments) and insert an <CODE>\imageflush</CODE> command, where they want
the image to appear in HTML output:
</P><PRE CLASS="verbatim">%BEGIN IMAGE
\newcounter{cms}
\setlength{\unitlength}{1mm}
\begin{picture}(50,10)
  ...
\end{picture}
%END IMAGE
%HEVEA\imageflush
</PRE><P>This will result in normal processing by L<sup>A</sup>T<sub>E</sub>X and image inclusion
by H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A:</P><P><IMG SRC="manual008.gif"></P><P><A NAME="graphics"></A><A NAME="@default182"></A>
All commands from the graphics package are implemented using the
automatic image inclusion feature.
More precisely, the outermost invocations of
the <CODE>\includegraphics</CODE>, <CODE>\scalebox</CODE>,
etc. commands are sent to the image <I>image</I> file and there will
be one GIF image per outermost invocation of these commands.</P><P>For instance, consider a document <TT>doc.tex</TT> that
loads the <TT>graphics</TT> package and that includes some (scaled)
images by:
</P><PRE CLASS="verbatim">\begin{center}
\scalebox{.5}{\includegraphics{round.ps}}
\scalebox{.75}{\includegraphics{round.ps}}
\includegraphics{round.ps}
\end{center}
</PRE><P>Then, issuing the following two commands:
</P><PRE CLASS="verbatim"># hevea doc.tex
# imagen doc
</PRE><P>yields HTML that basically consists in three image links,
the images being generated by <TT>imagen</TT>.
</P><BLOCKQUOTE CLASS="quote"><HR NOSHADE SIZE=1 ALIGN=center>
<DIV CLASS="center">
<IMG SRC="manual009.gif">
<IMG SRC="manual010.gif">
<IMG SRC="manual011.gif">
</DIV>
<HR NOSHADE SIZE=1 ALIGN=center></BLOCKQUOTE><H3 CLASS="subsection"><A NAME="toc91"></A><A NAME="htoc117">B.14.2</A>&#XA0;&#XA0;The <TT>color</TT> Package</H3><P><A NAME="color"></A><A NAME="@default183"></A><A NAME="color:package"></A>H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A partly implements the <TT>color</TT> package.
Implemented commands are <CODE>\definecolor</CODE>, <CODE>\color</CODE>,
<CODE>\colorbox</CODE> and
<CODE>\textcolor</CODE>. Other commands from the <TT>color</TT> package do
not exist.
At startup,
colors <FONT COLOR="black"><TT>black</TT></FONT>, <FONT COLOR="white"><TT>white</TT></FONT>,
<FONT COLOR="red"><TT>red</TT></FONT>, <FONT COLOR="lime"><TT>green</TT></FONT>, <FONT COLOR="blue"><TT>blue</TT></FONT>,
<FONT COLOR="aqua"><TT>cyan</TT></FONT>, <FONT COLOR="yellow"><TT>yellow</TT></FONT> and <FONT COLOR="fuchsia"><TT>magenta</TT></FONT> are
pre-defined.</P><P>Colors are defined by
<CODE>\definecolor{</CODE><I>name</I><CODE>}{</CODE><I>model</I><CODE>}{</CODE><I>spec</I><CODE>}</CODE>,
where <I>name</I> is the color name, <I>model</I> is the color
model used, and <I>spec</I> is the color specification according to
the given model.
Defined colors are used by the declaration
<CODE>\color{</CODE><I>name</I><CODE>}</CODE> and by the command
<CODE>\textcolor{</CODE><I>name</I><CODE>}{</CODE><I>text</I><CODE>}</CODE>, which
change text color.
Please note that, the <CODE>\color</CODE> declaration
accepts color specifications directly
when invoked as
<CODE>\color[</CODE><I>model</I><CODE>]{</CODE><I>spec</I><CODE>}</CODE>.
The <CODE>\textcolor</CODE> command has a similar feature.</P><P>As regards color models, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A implements the <TT>rgb</TT>,
<TT>cmyk</TT>, <TT>hsv</TT> and <TT>hls</TT> color models.
In those models, color specifications are floating point numbers less
than one.
For instance, here is the definition for the <TT>red</TT> color:
</P><PRE CLASS="verbatim">\definecolor{red}{rgb}{1, 0, 0}
</PRE><P>The <TT>named</TT> color model is also supported, in this model color
specification are just names&#X2026;
Named colors are the ones of <TT>dvips</TT>.
</P><DIV CLASS="flushleft">
<FONT COLOR="#D8FF4F">GreenYellow</FONT>,
<FONT COLOR="yellow">Yellow</FONT>,
<FONT COLOR="#FFE528">Goldenrod</FONT>,
<FONT COLOR="#FFB528">Dandelion</FONT>,
<FONT COLOR="#FFAD7A">Apricot</FONT>,
<FONT COLOR="#FF7F4C">Peach</FONT>,
<FONT COLOR="#FF897F">Melon</FONT>,
<FONT COLOR="#FF9300">YellowOrange</FONT>,
<FONT COLOR="#FF6321">Orange</FONT>,
<FONT COLOR="#FF7C00">BurntOrange</FONT>,
<FONT COLOR="#C13000">Bittersweet</FONT>,
<FONT COLOR="#FF3A21">RedOrange</FONT>,
<FONT COLOR="#A51815">Mahogany</FONT>,
<FONT COLOR="#AD1637">Maroon</FONT>,
<FONT COLOR="#B7140B">BrickRed</FONT>,
<FONT COLOR="red">Red</FONT>,
<FONT COLOR="#FF007F">OrangeRed</FONT>,
<FONT COLOR="#FF00DD">RubineRed</FONT>,
<FONT COLOR="#FF0A9B">WildStrawberry</FONT>,
<FONT COLOR="#FF779E">Salmon</FONT>,
<FONT COLOR="#FF5EFF">CarnationPink</FONT>,
<FONT COLOR="fuchsia">Magenta</FONT>,
<FONT COLOR="#FF30FF">VioletRed</FONT>,
<FONT COLOR="#FF2DFF">Rhodamine</FONT>,
<FONT COLOR="#A418F9">Mulberry</FONT>,
<FONT COLOR="#9C10A8">RedViolet</FONT>,
<FONT COLOR="#7C15EA">Fuchsia</FONT>,
<FONT COLOR="#FF84FF">Lavender</FONT>,
<FONT COLOR="#E068FF">Thistle</FONT>,
<FONT COLOR="#AD5BFF">Orchid</FONT>,
<FONT COLOR="#9932CC">DarkOrchid</FONT>,
<FONT COLOR="#8C23FF">Purple</FONT>,
<FONT COLOR="#7F00FF">Plum</FONT>,
<FONT COLOR="#351EFF">Violet</FONT>,
<FONT COLOR="#3F19FF">RoyalPurple</FONT>,
<FONT COLOR="#2216F4">BlueViolet</FONT>,
<FONT COLOR="#6D72FF">Periwinkle</FONT>,
<FONT COLOR="#606DC4">CadetBlue</FONT>,
<FONT COLOR="#59DDFF">CornflowerBlue</FONT>,
<FONT COLOR="#027E91">MidnightBlue</FONT>,
<FONT COLOR="#0F75FF">NavyBlue</FONT>,
<FONT COLOR="#007FFF">RoyalBlue</FONT>,
<FONT COLOR="blue">Blue</FONT>,
<FONT COLOR="#0FE2FF">Cerulean</FONT>,
<FONT COLOR="aqua">Cyan</FONT>,
<FONT COLOR="#0AFFFF">ProcessBlue</FONT>,
<FONT COLOR="#60FFE0">SkyBlue</FONT>,
<FONT COLOR="#26FFCC">Turquoise</FONT>,
<FONT COLOR="#22F9A4">TealBlue</FONT>,
<FONT COLOR="#2DFFB2">Aquamarine</FONT>,
<FONT COLOR="#26FFAA">BlueGreen</FONT>,
<FONT COLOR="#00FF7F">Emerald</FONT>,
<FONT COLOR="#02FF7A">JungleGreen</FONT>,
<FONT COLOR="#4FFF7F">SeaGreen</FONT>,
<FONT COLOR="lime">Green</FONT>,
<FONT COLOR="#14E01A">ForestGreen</FONT>,
<FONT COLOR="#0FBF4E">PineGreen</FONT>,
<FONT COLOR="#7FFF00">LimeGreen</FONT>,
<FONT COLOR="#8EFF42">YellowGreen</FONT>,
<FONT COLOR="#BCFF3D">SpringGreen</FONT>,
<FONT COLOR="#379907">OliveGreen</FONT>,
<FONT COLOR="#8C2700">RawSienna</FONT>,
<FONT COLOR="#4C0D00">Sepia</FONT>,
<FONT COLOR="#661300">Brown</FONT>,
<FONT COLOR="#DB9370">Tan</FONT>,
<FONT COLOR="#7F7F7F">Gray</FONT>,
<FONT COLOR="black">Black</FONT>,
<FONT COLOR="white">White</FONT>.
</DIV><P>There are at least three ways to use colors from the <TT>named</TT>
model.
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
Define a color name for them.
</LI><LI CLASS="li-enumerate">Specify the named color model as an optional argument to
<CODE>\color</CODE> and <CODE>\textcolor</CODE>.
</LI><LI CLASS="li-enumerate">Use the names directly
(H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A implements the <TT>color</TT> package with
the <TT>usenames</TT> option given).
</LI></OL><P>
That is:
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">
<CODE>\definecolor{rouge-brique}{named}{BrickRed}\textcolor{rouge-brique}{Text as a brick}</CODE>.
</LI><LI CLASS="li-enumerate"><CODE>\textcolor[named]{BrickRed}{Text as another brick}</CODE>.
</LI><LI CLASS="li-enumerate"><CODE>\textcolor{BrickRed}{Text as another brick}</CODE>.
</LI></OL><P>
Which yields:
</P><OL CLASS="enumerate" type=1><LI CLASS="li-enumerate">

<FONT COLOR="#B7140B">Text as a brick</FONT>.
</LI><LI CLASS="li-enumerate"><FONT COLOR="#B7140B">Text as another brick</FONT>.
</LI><LI CLASS="li-enumerate"><FONT COLOR="#B7140B">Text as another brick</FONT>.
</LI></OL><P>Colors should be used carefully. Too many colors
hinders clarity and some of the colors may not be readable on the
document background color.</P><H4 CLASS="subsubsection">B.14.2.1&#XA0;&#XA0;The <TT>bgcolor</TT> environment</H4><P>
<A NAME="@default184"></A><A NAME="bgcolor"></A>
With respect to the L<sup>A</sup>T<sub>E</sub>X <TT>color</TT> package, H<FONT SIZE=2><sup>E</sup></FONT>V<FONT SIZE=2><sup>E</sup></FONT>A features
an additional
<TT>bgcolor</TT> environment, for changing the backgroud color of some
subparts of the document.
The <TT>bgcolor</TT> environment is a displayed environment and it
normally starts a new line.
Simple usage is <CODE>\begin{bgcolor}{</CODE><I>color</I><CODE>}</CODE>&#X2026;
<CODE>\end{bgcolor}</CODE>, where
<I>color</I> is a color defined with <CODE>\definecolor</CODE>.
Hence the following source yield a paragraph with a red background:
</P><PRE CLASS="verbatim">\begin{bgcolor}{red}
\color{yellow}Yellow letters on a red backgroud
\end{bgcolor}
</PRE><TABLE CELLPADDING=10><TR><TD BGCOLOR="red">
<FONT COLOR="yellow">Yellow letters on a red backgroud
</FONT></TD></TR>
</TABLE><P>The <TT>bgcolor</TT> environment is implemented by a <CODE>TABLE</CODE>
element, it takes an
optional argument that is used as an attribute for this <CODE>TABLE</CODE>
element (default value is <CODE>CELLPADDING=10</CODE>).
For instance, the following source:
</P><PRE CLASS="verbatim">\begin{bgcolor}[CELLPADDING=0]{yellow}
\color{red}Red letters on a yellow backgroud
\end{bgcolor}
</PRE><P>will be typeset on a yellow background and without padding:

</P><TABLE CELLPADDING=0><TR><TD BGCOLOR="yellow">
<FONT COLOR="red">Red letters on a yellow backgroud
</FONT></TD></TR>
</TABLE><H4 CLASS="subsubsection">B.14.2.2&#XA0;&#XA0;From High-Level Colors to Low-Level Colors</H4><P><A NAME="getcolor"></A>
<A NAME="@default185"></A>
<A NAME="@default186"></A>
High-level colors are color names
defined with <CODE>\definecolor</CODE>.
Low-level colors are HTML-style colors.
That is, they are either one of the sixteen conventional colors black,
silver etc., or a RGB hexadecimal color specification of the form
<CODE>"#XXXXXX"</CODE>.</P><P>One changes the high-level <EM>high-color</EM> into a low-level color by
<CODE>\@getcolor{</CODE><EM>high-color</EM><CODE>}</CODE>.
Low-level colors are appropriate inside HTML attributes and as
arguments to the <CODE>\@fontcolor</CODE> internal macro.
An example of <CODE>\@getcolor</CODE> usage can be found at the end of
section&#XA0;<A HREF="manual018.html#getcolor:usage">8.5</A>.</P><P>There is also <CODE>\@getstylecolor</CODE> command that acts
like<CODE>\@getcolor</CODE>, except that it does not output the double
quotes around RGB hexadecimal color specifications.
Such low-level colors are appropriate for style definitions in
cascading style sheets&#XA0;[<A HREF="manual047.html#css">CSS-2</A>]. See
Section&#XA0;<A HREF="manual019.html#getstylecolor:example">9.3</A> for an example.</P><HR>
<A HREF="manual035.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A>
<A HREF="manual022.html"><IMG SRC="contents_motif.gif" ALT="Up"></A>
<A HREF="manual037.html"><IMG SRC="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>