LaTeX Document Preparation LaTeX Resources and Guides in the University of Gaziantep Contents Local LaTeX resources (HTML) Local LaTeX resources (pdf and ps) lshort.pdf - (new) 153 page guide india.pdf - 304 page guide journal-guide.pdf - 11 page reference latex.ps - 82 page LaTeX guide latex.pdf (converted to pdf) latex2e.pdf - 104 page guide ltxcrib.ps - 14 page reference ltxcrib.pdf (converted to pdf) math-guide.pdf - 15 page math guide mil.ps - 101 page 'math into latex' guide mil.pdf (coverted to pdf) simplified.ps - 146 guide simplified.pdf (converted to pdf) authors.ps - 33 pages author guide authors.pdf (converted to pdf) symbols-a4.pdf - 141 pages symbol list What is LaTeX ? LaTeX is a typesetting language for document preparation, it is particularly useful for documents which contain mathematical expressions and for writing theses. Most technical journals accept (many prefer) submissions in the form of LaTeX documents, since LaTeX is a de facto standard for the expression of mathematical formulae. LaTeX offers the following advantages over other document preparation systems such as MS Word: Quality: the final product of a LaTeX'ed document is a PostScript file that can be printed on a PostScript laser printer to a high quality. Quality PostScript images such as plots and diagrams can be included easily in a LaTeX document. Mathematical formulae: LaTeX is a de facto standard for the expression of mathematical formulae. Formatting: LaTeX imposes and automates document formatting leaving the author free to concentrate on the content. Basic document formats (classes) provided by a LaTeX system are: the book class, the article class, the report class, the slides class, and the letter class - there are many more. In addition, a thesis class and a phd-report class are available for Master and Doctoral thesis, and PhD report preparation in the University of Gaziantep. See also http://www.colorado.edu/ITS/docs/latex/ Composing, Compiling, Viewing, and Printing LaTeX documents Composing documents in LaTeX The author types the content, annotated by LaTeX script, directly into a .tex file. An example of a short LaTeX script, example.tex, created with the command: $edit example.tex , is shown below:  \documentclass[12pt]{report} \begin{document} To first order,$\alpha_s$is given by Equation \ref{ALPHAS}: $$\label{ALPHAS} \alpha_{s}(Q^2) = \frac{12\pi}{(33 - 2n_f)ln(Q^2/\Lambda^2)}$$ where$Q^2$is the momentum transfer (on the$Z$peak$Q^2$= (91.2$GeV$)$^2$,$n_f$is the available number of quark flavours ($n_f$= 5 at LEP), and$\Lambda$is a parameter determined by experiment. \end{document}  If you are familiar with other scripting languages, for example HTML, then you will find it easy to write in LaTeX. LaTeX is a simple scripting language to learn at a basic level - the easiest way to learn LaTeX is to refer to a relevant example document (for example your friend's thesis). Compiling LaTeX LaTeX scripts require compiling; on a Linux(Unix) system the command is latex. For example:$ latex example.tex The result of this command is the file  example.dvi . Viewing The result of the command  latex example.tex  is the file  example.dvi  which can be viewed with the xdvi or xdvi programs as follows:     $xdvi example.dvi &or$ kdvi example.dvi & . For this you need a graphical interface to the linux(unix) system, either a graphical desktop on workstation or if you are viewing remotely from an MS Windows PC then you can use an X-server. Printing For printing the LaTeX'ed document you can convert  example.dvi  into PostScript using the dvips program as follows:      $dvips example.dvi -o example.ps If you only require, for example, pages 5 to 8 then use the -pp option:$ dvips example.dvi -o example.ps -pp 5-8 You now have a PostScript file,  example.ps , for printing; remember that a very high quality hard copy can be obtained using a PostScript laser printer (a desktop printer such as a Deskjet will not give good quality output - though this is fine for drafts). Previewing PostScript Windows: GhostView Linux; Various programs: gv, ggv, kghostview, ... Summary of commands: All the commands you need for composing, compiling, viewing and printing a LaTeX document:     $edit example.tex$ latex example.tex     $xdvi example.dvi &$ dvips example.dvi -o example.ps Spell Checking LaTeX Documents To spell check a LaTeX document the spell check must be able to recognize and ignore the embedded LaTeX commands. The standard Linux spell check program, ispell has this feature. Here is an example of how to spell check a LaTeX document file:    $ispell chapter3.tex ispell allows you to replace or accept spellings it considers to be wrong, you can also Insert new spellings into the ispell dictionary (for example new technical terms or names). You can also use ispell with HTML. The thesis LaTeX Class (University of Gaziantep) This LaTeX thesis document class has been created for students in the University of Gaziantep who wish to prepare their Master or Doctoral thesis in LaTeX. Indeed, the thesis class makes formatting a thesis very simple and prepares preliminary pages such as the signature pages. The thesis class (currently) conforms to the University of Gaziantep Graduate School of Natural and Applied Sciences specification for preparation of theses. The easiest way to obtain and use thesis class is to download the following example thesis to your central Linux server account and replace its contents with your own thesis: Browse the Example Thesis (please read the README.TXT at the end of the listing). Download the latest gzip'ed tar distribution ThesisClass-2.2.0.tgz (03/05/2007) Instructions Assuming you are on a Linux(Unix) system, type the following commands: To download:$ wget http://wwwacs.gantep.edu.tr/guides/programming/latex/ ThesisClass/ThesisClass-2.2.0.tgz To unzip: $tar -xzf ThesisClass-2.2.0.tgz or if you are using MS Windows then the WinZip program supports tar-zip files.$ cd ThesisClass-2.2.0/ To Compile: $latex thesis.tex and again to get the cross-references$ latex thesis.tex To view: $xdvi thesis.dvi and$ dvips thesis.dvi -o thesis.ps to obtain a PostScript version. and $ps2pdf thesis.ps to obtain a PDF version (thesis.pdf). To modify (for your own thesis):$ edit thesis.tex of course you need to edit all other .tex files as well. The files well commented so it should be clear what you need to do. Acknowledgments We like to thank The University of Colorado for the original version of thesis class, and the kind permission for its adaptation, for the University of Gaziantep. Contact Address Comments/Questions to: system@gantep.edu.tr or bidb@gantep.edu.tr 01/07/2003 The  phd-report  LaTeX Class (University of Gaziantep) This LaTeX phd-report document class has been created for students in the University of Gaziantep who wish to prepare a PhD Report in LaTeX. This class has been created directly from the thesis class described above thus allowing latexing in the thesis to be copied directly to the PhD report and from PhD report to the thesis. The easiest way to obtain and use phd-report class is to download the following example report to your central Linux server account and replace its contents with your own report: Browse the Example Report (please read the README.TXT at the end of the listing). Download the latest gzip'ed tar distribution PhdReportClass-2.1.1.tgz View the example phd-report.ps / phd-report.pdf Instructions Assuming you are on a Linux(Unix) system, type the following commands: To download: $wget http://wwwacs.gantep.edu.tr/guides/programming/latex/ PhdReportClass/PhdReportClass-2.1.1.tgz To unzip:$ tar -xzf PhdReportClass-2.1.1.tgz or if you are using MS Windows then the WinZip program supports tar-zip files. $cd PhdReportClass/ To Compile:$ latex phd-report.tex and again to get the cross-references $latex phd-report.tex To view:$ xdvi phd-report.dvi and $dvips phd-report.dvi -o phd-report.ps to obtain a PostScript version. To modify (for your own report):$ edit phd-report.tex of course you need to edit all other .tex files as well. The files well commented so it should be clear what you need to do. Acknowledgments We like to thank The University of Colorado for the original version of thesis class, and the kind permission for its adaptation, for the University of Gaziantep. Contact Address Comments/Questions to: andrew@gantep.edu.tr or ozer@gantep.edu.tr 02/07/2003 Appendix 1: Rotating Figures and Tables Figures and Tables can be inserted sideways by using the commands available in the rotating package. To load the package put \usepackage{rotating} in the head of your main LaTeX file. You then replace the standard table environment:  \begin{table} . . . \end{table}  with:  \begin{sidewaystable} . . . \end{sidewaystable}  Similarly for figures (replace the word table with figure). Appendix 2: Frequently Asked Questions Q. The viewing quality of gv (ghostview) is not good, can anything be done about this? A. Yes, use the kghostview or ggv programs instead. See also http://amath.colorado.edu/documentation/LaTeX/reference/faq/