1 / 35

Stijn De Jonge, Eddy Schoeters & Jeroen Buijs

Stijn De Jonge, Eddy Schoeters & Jeroen Buijs. What is TeX?. TeX is essentially a Markup Language (like HTML, XML and RTF) TeX written in 70´s TEX is a typesetting language written by Donald Knuth. Original format of TEX called: “plain TEX".

rafer
Download Presentation

Stijn De Jonge, Eddy Schoeters & Jeroen Buijs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stijn De Jonge, Eddy Schoeters & Jeroen Buijs

  2. What is TeX? • TeX is essentially a Markup Language (like HTML, XML and RTF) • TeX written in 70´s • TEX is a typesetting language written by Donald Knuth. • Original format of TEX called: “plain TEX". • Plain TEX easy for simple documents (without equations, chapters etc). • Otherwise very tricky. • LaTeX is an extension of TeX • Macro packages to make TeX easier to use

  3. What is LaTeX? • Leslie Lamport wrote a format of TeX called LaTeX. • Simple documents slightly harder to produce in LaTeX than plain TeX. • Otherwise much easier to use. • We will be using LaTeX2 version.

  4. Latex vs. Word Processors • WYSIWYG - WYMIWYG • High typeset quality • Easy to include math formulas • Source file format is not bounded to a particular OS or platform • Latex implementations exists for all platforms (DOS, Windows, Unix,..) • Latex is free

  5. Latex vs. Word Processors

  6. Pros and cons for LaTeX • Can only view your document once you have LaTeXed your source code • Can't see how things appear while you type. • Tend to spend more time writing the actual text. • Need to remember command names • Unless you are using a front-end. • Tricky to start with • But once you get the hang of it, it becomes a lot easier to do more complicated things. • Source code for large documents comparatively small compared with word processors even if document contains many pictures. Can easily transfer file onto disk - useful if co-authoring a document.

  7. Pros and cons for LaTeX • Large documents don't usually affect your typing speed (as long as you have a decent text editor). With word processors the whole document is constantly being reformatted as you type. • Automatically follows most laws of typography, particularly when typesetting mathematics. Many word processors don't do a very good job typesetting equations. • Documents created using LaTeX tend to have a more professional look than those created using a word processor. • Free! (Although some front-ends, such as WinEdt, are shareware.)

  8. How to make a document • Writer only makes source • Software creates document source compiler document

  9. How to make a document source compiler document

  10. How to make a document source compiler document

  11. How to make a document source compiler document

  12. LaTeX File Structure • Preamble • Document Class • Predefined Formats (article, report, book,..). • Packages used • Added Functionality (graphics, reference style,...). • … • Main Body • Text and Bibliography References.

  13. LaTeX file structure

  14. Body of Text • Start with \begin{document} • End with \end{document} • Typesetting Text • \\ or \newline and \newpage • Quotations • Bold \textbf{……………} or \bf • Italics \emph{…………} or \textit{………} or \it • Underline \underline{…………} or \ul • Including Multiple Files • \input{filename.tex}

  15. Format • Sections • \section{…} = 1. Latex is Great • \subsection{…} = 1.1 Why Latex is Great • \subsubsection{…} = 1.1.1 Reason One • \appendix - changes numbering scheme • \chapter{…} - To be used with book and report document classes • Titles, Authors and others • \title{…} \author{…} • \footnote{…}

  16. Format Contd. • \maketitle - Display Title and Author • \tableofcontents - generates TOC • \listoftables - generates LOT • \listoffigures - generates LOF • Labels • \label{marker} - Marker in document. • \pageref{marker} - Displays page no. of marker. • \ref{marker} - Displays section location of marker. • Itemize • Use either enumerate, itemize or description. • Alignment center, flushleft, flushright

  17. Font size \tiny\scriptsize \footnotesize \small \normalsize \large \Large \LARGE\huge \Huge

  18. Example

  19. Tabular • Columns • \begin{tabular}{|…|…|} • \end{tabular} • Rows • & - Split text into columns • \\ - End a row • \hline - Draw line under row • Table editors or converter from Excel to LaTeX

  20. Images • Use epsfig package • \usepackage{epsfig} • Reference to pictures in text, pictures saved in folder • Other file formats are also possible • Pdf or png preference • MS PowerPoint, save as GIF and convert to EPS or Use some code to create a PDF image automatically \ifpdf \usepackage{graphicx} \usepackage{epstopdf} \usepackage{epsfig} \DeclareGraphicsRule{.eps}{pdf}{.pdf}{`epstopdf #1} \pdfcompresslevel=9 \else \usepackage{graphicx} \usepackage{epsfig} \fi

  21. Floating Objects • Floating objects can stop splitting of tables and images over pages. • \begin{figure}[options] • \end{figure} • \begin{table}[options] • \end{table} • They will now appear in the • List of Figures (LOF) and • List of Tables (LOT). Options (recommendations) h = place table here t = place at top of page b = place at bottom of page p = special page only for tables and figures ! = without taking into account other rules

  22. Example of table \begin{table}[!htp] \begin{center} \label{testtable} \begin{tabular} {l | r | c} \hline Date & Price & Size \\ \hline Yesterday & 5 & big \\ \hline Today & 3 & small \\ \hline \multicolumn{3}{c}{\today} \\ \end{tabular} \caption{Short table} \end{center} \end{table}

  23. Mathematics • Inline math text: • \( … \), $ … $ or \begin{math} … \end{math} • Equations or formulas: • \begin{displaymath} … \end{displaymath} • \begin{equation} … \end{equation} • \begin{eqnarray}...\end{eqnarray} • Normal text in between math • \textrm{…}

  24. Mathematics examples

  25. Mathematics examples $ y=\frac{a^3+2c_{x}}{1+\sqrt{b_{x}}} $ \begin{equation} Q = \sum_{i=1}^{j}\int_{\mu}^{\infty}f(x_{j})dx \end{equation} \begin{displaymath} x^2 \geq 0 \qquad \textrm{for all }x \in \mathbb{R} \end{displaymath}

  26. Chemistry • \usepackage[version=3]{mhchem} • Inline chemistry • \ce{…} • Numbered chemistry reaction • \reaction + extra definition in preamble (see manual) • Numbering will be different than math equations • $\frac{1}{2}\mathrm{H}_2\mathrm{O}$ or \ce{1/2H2O}

  27. Chemistry examples \ce{CO2 + C <=> 2CO} \ce{X=Y#Z} $K = \frac{[\ce{Hg^2+}][\ce{Hg}]}{[\ce{Hg2^2+}]}$

  28. Bibliography by hand \begin{thebibliography}{} \bibitem{Maex}Maex, Edel: Mindfulness: \textit{In de maalstroom van je leven} (2006), Lannoo \end{thebibliography}

  29. Bibliography using Bibtex • Bibliography information is stored in a *.bib file, in Bibtex format. • Windows: JabRef • MacOSx : BIBdesk • Set referencing style • \bibliographystyle{style} – default plain (thesis: apacite) • Create reference section by • \bibliography{bibfile with no extension}

  30. JabRef

  31. Creating Latex Files Your Latex File Your Bibtex File (a text file) Latex compile x3 Bibtex compile x2 Latex compile x3 Device independent output .dvi dvips compile x1 Your Postscript File

  32. Conclusions • Latex is optimal for master and PhD thesis • Mathematical formulae are easy. • Use bibtex search engines • Only concentrate onto content

  33. Where to get everything • MiKTeX distribution: http://www.miktex.org/ • GhostScript & GhostView & epstool for dealing with images: http://www.cs.wisc.edu/~ghost/ [Install GPL Ghostscript, GSView & epstool] • JabRef: http://jabref.sourceforge.net/ • LaTeX editor: http://www.texniccenter.org/ Nice extra: • GIMP (free Photoshop-like thing, especially useful to convert images): http://gimp-win.sourceforge.net/ • Latable - Table editor: http://ctan.org/tex-archive/help/Catalogue/entries/latable.html

  34. Define the output profile in Texniccenter

  35. Define the output profile in Texniccenter

More Related