Download presentation
Presentation is loading. Please wait.
Published byΞενία Πρωτονοτάριος Modified over 5 years ago
1
Graphics in TeX CONTENTS Sung-Ju Kang Department Of Physics
Kangwon National University When putting together a large document, TeX will help you with some special features like including EPS graphics, index, bibliography. CONTENTS Including EPS Graphics Bibliography Indexing
2
(1) Including EPS Graphics
A easy way to get graphics into a document, is to generate them with a specialized software package and then include the finished graphics into the document. In this presentation, only the use of Encapsulated PostScript(EPS) graphics will be discussed. Export the picture from your graphics program in EPS format. Load the graphicx package in the preamble of the input file. \usepackage[driver]{graphicx} driver : The name of “dvi to postscript” converter program. The most widely used program is called “dvips”. Use the command \includegraphics[key=value,…]{file} The key can be used to alter the width, height and rotation of the include graphic. width scale graphic to the specified width height scale graphic to the specified height angle rotate graphic counterclockwise scale scale graphic
3
• The document includes the graphic stored in the file graph.eps
\documentclass[12pt,a4paper]{article} \usepackage[dvips]{graphicx} \begin{document} \begin{figure} \includegraphics [width=8cm, height=8cm]{graph} \end{figure} Width = 8cm, Height = 8cm, center of the document. \end{document} [key=value,…] {file} • The document includes the graphic stored in the file graph.eps
4
The number of the entries is generated automatically.
(2) Bibliography 1) You can produce a bibliography with the thebibliography environment. Each entry starts with \bibitem{marker} 2) The marker is used to cite the book, article or paper within the document. \cite{marker} The number of the entries is generated automatically. Tells TeX to expect that none of the bibliography item number will be wider than the number 99. Partl \cite{pa} has proposed that \ldots \begin{thebibliography}{99} \bibitem{pa} H.~Partl:\emph{German \TeX},TUGboat Volume~9, Issue~1 (1988) \end{thebibliography}
5
(3) Indexing To enable the indexing feature of TeX, the makeidx package must be loaded in the preamble with \usepackage{makeidx} 2) And the special indexing commands must be enabled by putting the \makeindex command into the input file preamble. 3) The content of the index is specified with \index{key} commands, where key is the index entry. 4) When the input file is processed with TeX, the file has the same name as the TeX input file, but a different extension (.idx). 5) This .idx file can then be processed with the makeindex program. makeindex filename The makeindex program generates a sorted index with the same base file name, but this time with the extension (.ind). 6) If now the TeX input file is processed again, this sorted index gets included into the document at the point where TeX finds \printindex
6
\usepackage{makeidx}
\makeindex \begin{document} Yesterday\index{yesterday}, all\index{yesterday!all} my seemed so far away\index{away|textbf} Now it looks as though they're here to stay Oh, I believe in yesterday. \printindex \end{document} Index Key Syntax example - Plain entry - Subentry under ‘yesterday’ - Formatted entry Formatted page number When input file is processed again
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.