%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % This is a brief manual about including and manipulating % graphics and colors in LaTeX. It is based on the book: % [1] H.Kopka, P.W.Daly: A Guide to LaTeX 2epsilon, % second edition, 1995, pp.379-383. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Graphics and Color: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[dvips]{graphics,color} % graphics packages: graphics, graphicx, rotating, % epsfig % color package: color %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THE GRAPHICS PACKAGE: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Importing external graphics: \includegraphics[llx,lly][urx,ury]{filename} % llx,lly - lower left corner coordinates ... % urx,ury - upper right corner coordinates ... % of the bounding box containing the part % of the picture to be included, % units may be specified, % the lower left corner of a paper sheet has % coordinates (0,0); \includegraphics* % the figure is clipped, so that only the contents of % the specified frame are included; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Scaling: \scalebox{h_scale}[v_scale]{text} % applies horizontal and vertical scale factors to the % contents "text" (it may be an \includegraphics command); \resizebox{h_length}{v_length}{text} % adjusts the figure to fit into specified sizes, % if either length is given as !, the one scale factor % is used for both dimensions, % "text" may be an \includegraphics command; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Reflection: \reflectbox{text} % the contents reflected horizontally %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Rotation: \rotatebox{angle}{text} % rotates about the left-hand end of its baseline % counter-clockwise, "angle" is in degrees; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THE GRAPHICX PACKAGE: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % is more advanced version of the graphics package; \includegraphics[bb=llx lly urx ury,angle=ang, width=h_length,height=v_length,scale=factor,clip=true/false, draft=true/false]{filename} % the order of values is unimportant, not all have to % be present; \rotatebox % is similarly redefined; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THE ROTATING PACKAGE: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{sideways} text \end{sideways} \begin{turn}{angle} text \end{turn} \begin{rotate}{angle} text \end{rotate} \turnbox{angle}{text} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THE EPSFIG PACKAGE: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \epsfysize=y_size \epsfxsize=x_size \epsf[llx lly urx ury]{filename} \epsfig{file=filename,height=ht,width=wd,clip=,silent=, rotate=angle,bbllx=llx,bblly=lly,bburx=urx,bbury=ury} \psfig{file=filename,height=ht,width=wd,clip=,silent=, rotate=angle,bbllx=llx,bblly=lly,bburx=urx,bbury=ury} % the lower left corner of a paper sheet has % coordinates (0,0); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % THE COLOR PACKAGE: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % colors are specified either by a defined name or by % the following form: [model]{specs} % model = rgb (red,green,blue), % cmyk (cyan,magenta,yellow,black), % gray, % named (recognizes colors by their internal % names, depends on a driver, dvips % knows 68 colors - see dvips.def for % their names), % "specs" is a set of numbers from 0 to 1; % EXAMPLE: [rgb]{1,0,0} defines red; \definecolor{name}{model}{specs} % defines the name of a color, % certain colors are automatically predefined for all % drivers: red, green, blue, yellow, cyan, magenta, % black, white; \pagecolor col_spec % defines background color for the current and following % pages, % col_spec = {name_of_a_defined_color}, % {model]{spec}; \color col_spec % switches to setting text in the given color; \textcolor col_spec{text} % sets the "text" in the given color; \colorbox col_spec{text} % the given color is a background color of the "text"; \fcolorbox col_spec1 col_spec2{text} % similar to \colorbox, % col_spec1 is a color of a frame around a box with % background color col_spec2; \normalcolor % switches to the text color active at the end of % the preamble; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%