aos linux tutorial
play

AOS Linux Tutorial Revision Control and L A T EX Michael Havas - PowerPoint PPT Presentation

AOS Linux Tutorial Revision Control and L A T EX Michael Havas Dept. of Atmospheric and Oceanic Sciences McGill University October 12, 2010 Outline 1 Revision Control Subversion Git 2 L A T EX Introduction Beauty Tools Structure


  1. AOS Linux Tutorial Revision Control and L A T EX Michael Havas Dept. of Atmospheric and Oceanic Sciences McGill University October 12, 2010

  2. Outline 1 Revision Control Subversion Git 2 L A T EX Introduction Beauty Tools Structure Building Typesetting Text Useful Packages BibTeX 3 Next Time

  3. Revision Control Time machine for your documents. Collaboration. Integrates with Text Editors and IDEs.

  4. Revision Control Systems Types Central Subversion. CVS. Distributed Git. Mercurial. Darcs. Bazaar.

  5. Revision Control Systems Types Central Subversion. CVS. Distributed Git. Mercurial. Darcs. Bazaar.

  6. Revision Control Systems Pros and Cons of Central RCS Pros of central revisions control systems Centralized. Robust. Secure. Many tools. Cons of central revisions control systems Centralized. Rigid. Slow. Online.

  7. Revision Control Systems Pros and Cons of Central RCS Pros of central revisions control systems Centralized. Robust. Secure. Many tools. Cons of central revisions control systems Centralized. Rigid. Slow. Online.

  8. Revision Control Systems Subversion Workflow if Project is not checked out then Checkout project. end if Update project while Not tired do Do logical unit of work. Add any additional files to the repository. Checkin project with good log message. end while

  9. Revision Control Systems Subversion Creating and importing an existing project $ svnadmin create /aos/home/user/repos/svn $ svn import /path/to/project \ file:///~/repos/svn/project/trunk \ -m "Initial Import" Checking out a project $ cd /aos/home/user/project/src $ svn checkout file:///~/repos/svn/project/trunk Updating a checked out project $ svn update

  10. Revision Control Systems Subversion Adding Files and Directories $ svn add . Committing Changes $ svn commit -m "Log Message" Seeing Changes $ svn diff Viewing History $ svn log

  11. Revision Control Systems Git Benefits Decentralized. Quick. Branching is a primary activity. Working directory is the repository. Offline. Drawbacks Decentralized. Complicated (at first). Lack of integration.

  12. Revision Control Systems Git Benefits Decentralized. Quick. Branching is a primary activity. Working directory is the repository. Offline. Drawbacks Decentralized. Complicated (at first). Lack of integration.

  13. Revision Control Systems Git Initializing git $ cd /path/to/project $ git init $ git add $ git commit -a -m "Initial Commit." Adding files and Commiting $ git add . $ git commit -m "A useful message." Cloning a Repository $ git clone http://server/repository

  14. Revision Control Systems A Good Commit Message A Quote Always write a comment when committing something to the repository. Your comment should be brief and to the point, describing what was changed and possibly why. If you made several changes, write one line or sentence about each part. If you find yourself writing a very long list of changes, consider splitting your commit into smaller parts, as described earlier. Prefixing your comments with identifiers like Fix or Add is a good way of indicating what type of change you did. It also makes it easier to filter the content later, either visually, by a human reader, or automatically, by a program. http://blog.looplabel.net/2008/07/28/ best-practices-for-version-control/

  15. Outline 1 Revision Control Subversion Git 2 L A T EX Introduction Beauty Tools Structure Building Typesetting Text Useful Packages BibTeX 3 Next Time

  16. L A T EX Introduction What is L A T EX A document preparation system. Produces high-quality typesetting Often used for technical or scientific documents. What L A T EX is not A word processor. WYSIWYG

  17. L A T EX Introduction What is L A T EX A document preparation system. Produces high-quality typesetting Often used for technical or scientific documents. What L A T EX is not A word processor. WYSIWYG

  18. L A T EX Introduction Features for: Typesetting journal articles, technical reports, books and slide presentations. Control over large documents containing sections, cross-references, tables and figures. Typesetting complex mathematical formulas. Automatic generation of bibliographies and indexes. Multi-lingual typesetting. Inclusion of artwork. Custom fonts.

  19. L A T EX Introduction Advantages Over WYSIWYG Editors Beauty. Portability. Lightness. Security. Freedom. Focus on content and not layout.

  20. L A T EX Introduction History Based on Donald Knuth’s T EX typesetting language. First developed in 1985 by Leslie Lamport. Annoyances Pronounced Lah-tech or Lay-tech to rhyme with “blech” or “Brecht”. Written L A T EX.

  21. L A T EX Beauty Figure: Kerning in Word Kerning. Figure: Kerning in L A T EX

  22. L A T EX Beauty Figure: Small caps in Word Kerning. Figure: Small caps in L A T EX Real Small Caps.

  23. L A T EX Beauty Figure: Ligatures in Word Kerning. Real Small Caps. Figure: Ligatures in L A T EX Ligatures.

  24. L A T EX Beauty Kerning. Real Small Caps. Ligatures. Line breaks, justification and hyphenation. Figure: Hyphenation in L A T EX

  25. L A T EX Beauty Kerning. Real Small Caps. Ligatures. Line breaks, justification and hyphenation. Figure: Hyphenation in L A T EX For more info: http://nitens.org/taraborelli/latex

  26. L A T EX Tools Windows MiKTeX http://miktex.org/ TeXnicCenter http://www.texniccenter.org/ OS X MacTex http://www.tug.org/mactex/ Linux TeXLive http://www.tug.org/texlive/ Install via package manager.

  27. L A T EX Tools Editors Kile http://kile.sourceforge.net TeXMaker http://www.xm1math.net/texmaker/ Gedit-LaTeX http://live.gnome.org/Gedit/LaTeXPlugin Gummi http://code.google.com/p/gummi/ Vim http://www.vim.org Vim-latex vim-latex.sourceforge.net Emacs http://www.gnu.org/software/emacs/ Auctex http: //www.gnu.org/software/auctex/ LyX http://www.lyx.org/

  28. L A T EX Document Structure A first example % % Sample Document . A Sample Title % % ’%’ i s a comment Michael Havas October 12, 2010 % % The preamble Contents \ documentclass { a r t i c l e } 1 A sample Section 1 \ usepackage { f u l l p a g e } 1 A sample Section This is some text. \ author { Michael Havas } \ t i t l e { A Sample T i t l e } % % The body \ begin { document } \ m a k e t i t l e \ t a b l e o f c o n t e n t s \ s e c t i o n { A sample Section } This i s some t e x t . \ end { document } sample01.tex

  29. L A T EX Building Building a L A T EX document to pdf Code your document. bibtex document.bib while not complete do pdflatex document.tex if error then code some more end if end while Tips Some editors help you with this tremendously.

  30. L A T EX Typesetting Text Font types \ emph { word } Emphasis (normally italics) \ textsc { word } Small caps . \ textsl { word } Slanted . \ texttt { word } Typewritter font (fixed-width). \ textbf { word } Bold . \ underline { word } Underline. \ textit { word } Italics .

  31. L A T EX Typesetting Text Whitespace, Line-breaks, paragraph-breaks, page-breaks White space Does not count. Paragraph-breaks \\ Page-breaks \ newpage

  32. L A T EX Typesetting Text Enumerate \begin{enumerate} \item Apples. \item Oranges. \end{enumerate} itemize \begin{itemize} \item Apples. \item Oranges. \end{itemize} description \begin{description} \item[Apples] Yummy!. \item[Oranges] Nabbad. \end{description}

  33. L A T EX Typesetting Text Tables and the tabular environment \begin{tabular}{|r|l|} 7C0 hexadecimal \hline 7C0 & hexadecimal \\ 3700 octal 3700 & octal \\ 11111000000 binary 11111000000 & binary \\ 1984 decimal \hline \hline 1984 & decimal \\ \hline \end{tabular}

  34. L A T EX Typesetting Text Inline Math Inline math may be types by putting them between \ ( . . . \ ) characters. Used to be $ characters but that’s old-school Math Environments There exists some math environments useful for typesetting math. The most useful are in the amsmath package. align Ex: \begin{align*} a^2 +b^2 &= c^2 \\ 2a^2 + 2b^2 &= 2c^2 \end{align*}

  35. L A T EX Typesetting Text Symbols \ alpha \ beta \ gamma \ delta α β γ δ = \ equiv \ cup \ rightarrow = ≡ ∪ → \ geq \ frac { a }{ b } aˆb \ sum { a } ˆb � b a a b ≥ a b

  36. L A T EX Typesetting Text Sectioning \ section { name } \ subsection { name } \ subsubsection { name } Figures \begin{figure}[htpb] \label{labelID} \includegraphics[scale=0.5]{img/picture.jpg} \caption{A picture} \end{figure}

  37. L A T EX Typesetting Text Labels and References Labels can exist anywhere in your document. \label{labelID} References refer to labels for cross-referencing within a document. According to me in section \ref{labelID}, I am so awesome.

  38. L A T EX Useful Packages Useful Packages Listings Amsmath hshyperref Beamer Modernvc Algorithmic

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend