Presentation is loading. Please wait.

Presentation is loading. Please wait.

TeX, LaTeX, BibTeX and the Graduate Student Scott Weaver Pace University April 12, 2008.

Similar presentations


Presentation on theme: "TeX, LaTeX, BibTeX and the Graduate Student Scott Weaver Pace University April 12, 2008."— 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/tex- archive/info/lshort/english/lshort.pdf http://www.ctan.org/tex- archive/info/lshort/english/lshort.pdf http://www.ctan.org/tex- archive/info/lshort/english/lshort.pdf http://www.ctan.org http://www.ctan.org http://www.ctan.org http://www.andy-roberts.net/misc/latex/ http://www.andy-roberts.net/misc/latex/ http://www.andy-roberts.net/misc/latex/ http://dataninja.wordpress.com/2006/01/01/int roduction-to-bibtex/ http://dataninja.wordpress.com/2006/01/01/int roduction-to-bibtex/ http://dataninja.wordpress.com/2006/01/01/int roduction-to-bibtex/ http://dataninja.wordpress.com/2006/01/01/int roduction-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 Scientific and mathematical documents Simple letters Simple letters Complete books 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 Documents generated aesthetically pleasing with very little or inconsistent structure LaTeX forces the author to declare the logical structure of the document 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: Word Example: Hit 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 two more times to get two more lines of vertical space. Tex Example 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 keeping the vertical space between sections uniform is error-prone making sure that all of the bibliographic entries follow the required format making sure that all of the bibliographic entries follow the required format correct equations lay out 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 Note \ is not escaped using \\ since “\\” is used for line breaking

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

11 LaTeX Command Example

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

13 Comment Examples

14 Input File Structure \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

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

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 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 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 bibliographical information (author name, journal title, date, etc) stored in the file incorporates BibTeX file (.bib) into LaTeX documents incorporates BibTeX file (.bib) into LaTeX documents

22 Sample Bibliographic Entry @article{ Hemmendinger07, author = {David Hemmendinger}, author = {David Hemmendinger}, title = {The ACM and IEEE-CS guidelines for undergraduate CS education}, title = {The ACM and IEEE-CS guidelines for undergraduate CS education}, journal = {Commun. ACM}, journal = {Commun. ACM}, volume = {50}, volume = {50}, number = {5}, number = {5}, year = {2007}, year = {2007}, issn = {0001-0782}, issn = {0001-0782}, pages = {46--53}, pages = {46--53}, doi = {http://doi.acm.org/10.1145/ 1230819.1230838}, doi = {http://doi.acm.org/10.1145/ 1230819.1230838}, publisher = {ACM}, publisher = {ACM}, address = {New York, NY, USA}, 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.

23 Using BibTeX in a LaTeX Doc 1.Set the bibliography style. The standard is plain: \bibliographystyle{plain} The standard is plain: \bibliographystyle{plain} Location: after \begin{document} Location: after \begin{document} Other Styles: 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. 2.Make citations. To cite, insert \cite{ident} ident is the identifier (i.e. Hemmendinger07). ident is the identifier (i.e. Hemmendinger07). 3.Tell LaTeX to make the bibilography near the end of the document. \bibliography{bibfile} bibfile is your bibliography file bibfile.bib (without the.bib) bibfile is your bibliography file bibfile.bib (without the.bib)

24 Producing a Document with BibTeX latex document bibtex 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.

25 Basic Processing Architecture

26 Other Useful Software WinEdtJabRef

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. Advanced BibTeX editor: Detailed editing of BibTeX entries. Search functions: Search a pattern in the whole bibliography. Search functions: Search a pattern in the whole bibliography. Classification of entries - You can group entries explicitly, by keywords or any other fields. Classification of entries - You can group entries explicitly, by keywords or any other fields. Import of various formats Import of various formats Built-in and custom export formats (i.e. HTML, Docbook, BibTeXML, etc) Built-in and custom export formats (i.e. HTML, Docbook, BibTeXML, etc) Customization of BibTeX fields Customization of BibTeX fields Customizable Interface Customizable Interface Integrates to your environment – Launch PDF/PS viewers, web browser, etc. Integrates to your environment – Launch PDF/PS viewers, web browser, etc. Automatic Key generation Automatic Key generation Search Medline, Citeseer, IEEEXplore and arXiv Search Medline, Citeseer, IEEEXplore and arXiv http://jabref.sourceforge.net/

30 JabRef Screen


Download ppt "TeX, LaTeX, BibTeX and the Graduate Student Scott Weaver Pace University April 12, 2008."

Similar presentations


Ads by Google