LaTeXNotesForProfessionals.pdf

(1386 KB) Pobierz
Notes for Professionals
LaTeX
LaTeX
Notes for Professionals
of professional hints and tricks
50+ pages
GoalKicker.com
Free Programming Books
Disclaimer
This is an unocial free book created for educational purposes and is
not aliated with ocial LaTeX group(s) or company(s).
All trademarks and registered trademarks are
the property of their respective owners
Contents
About
................................................................................................................................................................................... 1
Chapter 1: Getting started with LaTeX
.............................................................................................................. 2
Section 1.1: LaTeX Editors
.............................................................................................................................................. 2
Section 1.2: Installation and Setup
............................................................................................................................... 2
Chapter 2: Title Pages
................................................................................................................................................ 7
Section 2.1: Standard report titlepage
......................................................................................................................... 7
Chapter 3: Header and Footer
............................................................................................................................... 8
Section 3.1: Using fancyhdr and titleps packages
...................................................................................................... 8
Section 3.2: Page number as CurrPage/TotalPages in footer
................................................................................. 9
Chapter 4: Text Formatting
.................................................................................................................................. 11
Section 4.1: Bold text
................................................................................................................................................... 11
Section 4.2: Emphazise Text
....................................................................................................................................... 11
Section 4.3: Strike through text
.................................................................................................................................. 11
Chapter 5: Tables
....................................................................................................................................................... 12
Section 5.1: The tabular environment
........................................................................................................................ 12
Section 5.2: Coloring Table
......................................................................................................................................... 13
Chapter 6: Typesetting Mathematics
............................................................................................................... 16
Section 6.1: Basic Equations
....................................................................................................................................... 16
Section 6.2: Finding Symbols
..................................................................................................................................... 17
Section 6.3: Packages available for use
................................................................................................................... 17
Section 6.4: Good Commands to Know
.................................................................................................................... 18
Section 6.5: Creating New Symbols
........................................................................................................................... 19
Section 6.6: Matrices
................................................................................................................................................... 19
Chapter 7: Creating a Bibliography
.................................................................................................................. 21
Section 7.1: Basic bibliography with biber
................................................................................................................. 21
Section 7.2: Basic bibliography without packages (manual formatting)
.............................................................. 22
Chapter 8: Add Citation
........................................................................................................................................... 23
Section 8.1: Add citation to already existing LaTeX document
.............................................................................. 23
Chapter 9: Counters, if statements and loops with LaTeX
................................................................... 24
Section 9.1: Operations with counters
....................................................................................................................... 24
Section 9.2: Counter declaration, initialization and printing to pdf
........................................................................ 25
Section 9.3: If statements
........................................................................................................................................... 25
Section 9.4: Loops - repeating things
........................................................................................................................ 26
Section 9.5: Using loops in Tikz
.................................................................................................................................. 28
Chapter 10: Document Classes
............................................................................................................................ 30
Section 10.1: Article
...................................................................................................................................................... 30
Section 10.2: Beamer
................................................................................................................................................... 30
Section 10.3: Defining the document class
................................................................................................................ 31
Chapter 11: Drawing Graphs
.................................................................................................................................. 32
Section 11.1: TikZ -- Graph specifications
................................................................................................................... 32
Section 11.2: TikZ -- Algorithmic graph drawing
....................................................................................................... 33
Section 11.3: State Transition Diagram of a Markov Chain
..................................................................................... 34
Section 11.4: TikZ -- Manual layout
............................................................................................................................ 35
Chapter 12: Presentation with beamer package
........................................................................................ 37
Section 12.1: Simple one author title slide
.................................................................................................................. 37
Section 12.2: Multiple author and aliation title slide
.............................................................................................. 38
Chapter 13: Defining macros
................................................................................................................................. 40
Section 13.1: Basic definition of macros
..................................................................................................................... 40
Chapter 14: Build Tools
............................................................................................................................................ 41
Section 14.1: Arara
........................................................................................................................................................ 41
Chapter 15: Accessing documentation of LaTeX packages
.................................................................. 42
Section 15.1: CTAN
........................................................................................................................................................ 42
Section 15.2: TeX Live -- texdoc
................................................................................................................................. 44
Chapter 16: Creating posters using beamer
................................................................................................. 45
Section 16.1: Orientation and size
............................................................................................................................... 45
Section 16.2: Basic outline of a beamer poster
........................................................................................................ 45
Section 16.3: Full example of beamer poster
............................................................................................................ 49
Chapter 17: Engraving Sheet Music
................................................................................................................... 54
Section 17.1: LilyPond
................................................................................................................................................... 54
Credits
.............................................................................................................................................................................. 56
You may also like
........................................................................................................................................................ 57
About
Please feel free to share this PDF with anyone for free,
latest version of this book can be downloaded from:
https://goalkicker.com/LaTeXBook
This
LaTeX Notes for Professionals
book is compiled from Stack Overflow
Documentation, the content is written by the beautiful people at Stack Overflow.
Text content is released under Creative Commons BY-SA, see credits at the end
of this book whom contributed to the various chapters. Images may be copyright
of their respective owners unless otherwise specified
This is an unofficial free book created for educational purposes and is not
affiliated with official LaTeX group(s) or company(s) nor Stack Overflow. All
trademarks and registered trademarks are the property of their respective
company owners
The information presented in this book is not guaranteed to be correct nor
accurate, use at your own risk
Please send feedback and corrections to web@petercv.com
GoalKicker.com – LaTeX Notes for Professionals
1
Chapter 1: Getting started with LaTeX
Version Release Date
LaTeX 2.09 1985-09-01
LaTeX 2e
1994-06-01
Section 1.1: LaTeX Editors
While you can create LaTeX documents using any editor and compiling using the console, there exist several plugins
for widely used editors to simplify creating LaTeX documents, and there are specialized LaTeX editors. An
exhaustive list of LaTeX editors is available on TeX.SE (the StackExchange site, dedicated to TeX, LaTeX & Friends).
The most widely used editors, according to this list, are:
The Emacs editor with the AUCTeX extension.
The Vim editor with the LaTeX-suite plugin.
Texmaker
a specialized LaTeX IDE.
TeXstudio
another LaTeX IDE.
TeXworks
one more LaTeX IDE.
While experienced users of Emacs or Vim may want to stick to their editor (whose plugins provide a host of
functionality unavailable elsewhere), a specialized IDE might be easier to install/use for beginners. The last three on
the list have a preview function where one can see the results of the compilation of the document.
Additionally, there are online LaTeX tools that can be of use to beginners or people that must collaborate, e.g.
ShareLaTeX and Overleaf.
Section 1.2: Installation and Setup
You can choose between major distributions of LaTeX:
TeX Live (Windows, Linux, and OS X), the standard, cross-platform distribution.
MacTeX (Mac) A packaged version of TeX Live made for OS X with some Mac-specific tools
MiKTeX (Windows) A separate distribution entirely that
All distributions are more or less equivalent in an ideal world. TeX Live has the advantage of being available on all
platforms and thus has much better community support. MiKTeX can take advantage of Windows-specific features.
For licensing reasons, MiKTeX will also distribute a few packages that TeX Live will not.
In all cases, the full install is recommended. Specifically, using MiKTeX's download-on-command feature will
hang/crash many editors.
Installation
Windows (TeXLive)
1. Download the most recent TeXLive
install-tl-windows.exe
from their website.
2. Run
install-tl-windows.exe
and follow the instructions.
Windows (MiKTeX)
1. Download the most recent MiKTeX installer from their website.
2. Run the installer and follow the instructions.
Mac OS X (TeXLive)
GoalKicker.com – LaTeX Notes for Professionals
2
Zgłoś jeśli naruszono regulamin