📜 ⬆️ ⬇️

Graphics in LaTeX. Part II

At the end of last year, I published an article on graphics in LaTeX. Today here finally I am going to write a sequel. Due to the volume of material I had to break the article into several parts.
In this article, you will learn how to import raster and vector graphics.

Imported graphics


You can import ready images (both raster and vector) into our document. But for this we first need to connect the driver ( dvips , pdftex or others). To connect the driver, we use the following construction in the preamble of the document:
\ ifx \ pdfoutput \ undefined
\ usepackage {graphicx}
\ else
\ usepackage [pdftex]{graphicx}
\ fi

To insert an image, use the \ includegraphics command. The command syntax is:
\ includegraphics [keyval-list]{file} ,

where file is the name of the file, and keyval-list is the list of keys, which are specified as key = value , separated by commas.
The file extension with the picture in the \ includegraphics command can be omitted, since the driver itself knows which types of files it can process and which ones cannot. For the driver, dvips are files with the extension eps , ps , eps.gz , ps.gz , eps.Z , and for the pdftex driver - png , pdf , jpg , mps , tif . When the file extension in the command is not specified, the driver successively adds all the extensions known to it to the file name until it finds the first matching file. Example:
\ includegraphics {01}


Possible keys:

Useful links:



Original article: alex.kotomanov.com/2009/02/03/graph_in_latex_2

PS In the next part I will talk about the color in LaTeX.

')

Source: https://habr.com/ru/post/48122/


All Articles