1 / 30

TeX, LaTeX, BibTeX and the Graduate Student

TeX, LaTeX, BibTeX and the Graduate Student. Scott Weaver Pace University April 12, 2008. References. All the following slides are based on the following: http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf http://www.ctan.org http://www.andy-roberts.net/misc/latex/

Download Presentation

TeX, LaTeX, BibTeX and the Graduate Student

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. TeX, LaTeX, BibTeX and the Graduate Student Scott Weaver Pace University April 12, 2008

  2. References • All the following slides are based on the following: • http://www.ctan.org/tex-archive/info/lshort/english/lshort.pdf • http://www.ctan.org • http://www.andy-roberts.net/misc/latex/ • http://dataninja.wordpress.com/2006/01/01/introduction-to-bibtex/

  3. TeX • Created by Donald E. Knuth • Purpose: Typeset text and mathematical formulae • High typographical quality • First released in 1982 • TeX is the first syllable in the Greek word texnologia (technology) • Pronounced “Tech” as in Technology

  4. LaTeX • Written by Leslie Lamport • Interact at a Higher level Plain TeX • Uses TeX as its typeset engine • What can it produce? • Scientific and mathematical documents • Simple letters • Complete books • Pronounced “Lay-Tech” or “Lah-Tech”

  5. LaTex vs. WYSIWYG • Not a WYSIWYG program like MS-Word or Corel WordPerfect. • To preview the document, it must be processed with LaTeX • Problems with WYSIWYG • Documents generated aesthetically pleasing with very little or inconsistent structure • LaTeX forces the author to declare the logical structure of the document

  6. LaTeX Compared With WYSIWYG • WYSIWYG = “What You See Is What You Get” • WYSIWYG text is placed while it is typed • TeX, a formatter, separates entering text and placing it on the page • Examples Entering a New Section • Word Example: • Hit <Enter> twice to get two lines of vertical space • Type "Section 1.2: New results“ • highlight the text, clicking to select a larger type size, clicking to select a new type style • Hit <Enter> two more times to get two more lines of vertical space. • Tex Example • Type "\section{New results}“ • Format it later when it is “compiled” • Word processing a twenty page technical article is hard • keeping the vertical space between sections uniform is error-prone • making sure that all of the bibliographic entries follow the required format • correct equations lay out

  7. Advantages of LaTeX over WYSIWYG Word Processors • Best output • Fast • Stable - Documents that run today will still run in ten years, or fifty. How is *.doc vs. *.docx? • Flexible • Input: plain text • Output: anything – PS, PDF, HTML, or whatever will appear in the future • Highly portable and FREE • The scientific standard • Professionally crafted layouts available • Typesetting mathematical formulae convenient • complex structures Generated easily ( i.e. footnotes, references, table of contents, bibliographies) See Examples: http://www.tug.org/texshowcase/

  8. Disadvantages of LaTeX over WYSIWYG Word Processors • Does not work well for people who have sold their souls to … • Although some parameters can be adjusted within a predefined document layout, the design of a whole new layout is difficult and takes a lot of time. • Very hard to write unstructured and disorganized documents. • Your hamster might, despite some encouraging first steps, never be able to fully grasp the concept of Logical Markup.

  9. LaTeX Input Files • Plain ASCII Text created with any text editor (WinEdt suggested later) • Contains the text and LaTeX layout commands • Whitespace treated as HTML treats whitespace • Special Characters need “Escaped” • # $ % ^ & _ { } ~ \ • \# \$ \% \^{} \& \_ \{ \} \~{} • Note \ is not escaped using \\ since “\\” is used for line breaking

  10. LaTeX Commands • \commandName[options]{arguments} • Case Sensitive • options : optional • arguments : manditory • Example: \includegraphics[width=2.5cm]{chick.eps}

  11. LaTeX Command Example

  12. Comments • Comment • Single Line Comment • Character: “%” • Ignores the rest of the line (and all whitespace at the beginning of the next line) • Multi-line Comment • \begin{comment} … \end{comment} • Must include \usepackage{verbatim} in the preamble of your document

  13. Comment Examples

  14. \documentclass[options]{class} … \usepackage[options]{package} … \begin{document} … \end{document} Specifies the type of document you intend to write Include commands to influence the style of the whole document Load external packages Start the body of your document End the document – anything that follows is ignored Input File Structure

  15. \documentclass{article} \usepackage{babel} \begin{document} \title{An Example} \maketitle … contents … \begin{bibliography} … \end{bibliography} \end{document} Preamble Front Matter Body Back Matter Input File Structure

  16. Basic Processing Example • Create the file (small.tex) \documentclass{article} \begin{document} Small is beautiful. \end{document} • Run LaTeX on the file creating a dvi latex small.tex • View dvi using yap • simply double-click on the dvi file • Ghostscript to change to a ps file dvips -Pcmz small.dvi -o small.ps • Or Use WinEdt…more on that later

  17. Basic Processing Architecture

  18. Another Example \documentclass[a4paper,11pt]{article} % define the title \author{H.~Partl} \title{Minimalism} \begin{document} % generates the title \maketitle % insert the table of contents \tableofcontents \section{Some Interesting Words} Well, and here begins my lovely article. \section{Good Bye World} \ldots{} and here it ends. \end{document}

  19. Other Possibilities • Making Tables • Adding Images • Adding Captions • Labels and Cross-References

  20. BibTeX

  21. Introduction • BibTeX is… • A plain-text file format and a program designed to work with LaTeX • bibliographical information (author name, journal title, date, etc) stored in the file • incorporates BibTeX file (.bib) into LaTeX documents

  22. @article{ Hemmendinger07, author = {David Hemmendinger}, title = {The ACM and IEEE-CS guidelines for undergraduate CS education}, journal = {Commun. ACM}, volume = {50}, number = {5}, year = {2007}, issn = {0001-0782}, pages = {46--53}, doi = {http://doi.acm.org/10.1145/1230819.1230838}, publisher = {ACM}, address = {New York, NY, USA}, } @article lets BibTeX know that the bibliographical entry is an article. Other Types: book phdthesis unpublished misc and others Hemmendinger07 identifies the entry – used when citing it in a LaTeX document. Sample Bibliographic Entry

  23. Using BibTeX in a LaTeX Doc • Set the bibliography style. • The standard is plain: \bibliographystyle{plain} • Location: after \begin{document} • Other Styles: • unsrt –same as plain except entries are numbered based on when they are cited, not alphabetically by author. • alpha – Similar to plain except instead of having numerical identifiers (e.g. [1]), labels are created based on the year of publication and the name of the author(s). • abbrv – Names and journal titles are abbreviated. • Make citations. • To cite, insert \cite{ident} • ident is the identifier (i.e. Hemmendinger07). • Tell LaTeX to make the bibilography near the end of the document. • \bibliography{bibfile} • bibfile is your bibliography file bibfile.bib (without the .bib)

  24. latex document bibtex document latex document latex document Produces an .aux file that lists all citations made within the document Looks up .aux file for citations, and generates a .bbl according to style Allows latex to look up the .bbl file. Final run needed to resolve forward references. Producing a Document with BibTeX

  25. Basic Processing Architecture

  26. Other Useful Software WinEdt JabRef

  27. WinEdt • “A powerful and versatile ASCII editor and shell for MS Windows with a strong predisposition towards the creation of [La]TeX documents.” • Eclipse is to Java as WinEdt is to LaTeX http://www.winedt.com/

  28. WinEdt Screen

  29. JabRef • JabRef is an open source bibliography reference manager (FREE). • The native file format: BibTeX • Runs on the Java VM (version 1.5 or newer) • Features • Advanced BibTeX editor: Detailed editing of BibTeX entries. • Search functions: Search a pattern in the whole bibliography. • Classification of entries - You can group entries explicitly, by keywords or any other fields. • Import of various formats • Built-in and custom export formats (i.e. HTML, Docbook, BibTeXML, etc) • Customization of BibTeX fields • Customizable Interface • Integrates to your environment – Launch PDF/PS viewers, web browser, etc. • Automatic Key generation • Search Medline, Citeseer, IEEEXplore and arXiv http://jabref.sourceforge.net/

  30. JabRef Screen

More Related