-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpresentLaTeX.tex
326 lines (262 loc) · 15 KB
/
presentLaTeX.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
% !TEX TS-program = pdflatex
% !TEX encoding = UTF-8 Unicode
% This file is a template using the "beamer" package to create slides for a talk or presentation
% - Giving a talk on some subject.
% - The talk is between 15min and 45min long.
% - Style is ornate.
% MODIFIED by Jonathan Kew, 2008-07-06
% The header comments and encoding in this file were modified for inclusion with TeXworks.
% The content is otherwise unchanged from the original distributed with the beamer package.
\documentclass{beamer}
\usepackage{cleveref}
\usepackage{listings}
\usepackage{qrcode}
% Copyright 2004 by Till Tantau <tantau@users.sourceforge.net>.
%
% In principle, this file can be redistributed and/or modified under
% the terms of the GNU General Public License, version 2.
%
% However, this file is supposed to be a template to be modified
% for your own needs. For this reason, if you use this file as a
% template and not specifically distribute it as part of a another
% package/program, I grant the extra permission to freely copy and
% modify this file as you see fit and even to delete this copyright
% notice.
\usepackage[normalem]{ulem}
\useunder{\uline}{\ul}{}
\usepackage{xcolor}
%\definecolor{LCNgold}{RGB}{255, 215, 0}
\definecolor{LCNblue}{RGB}{0,33,71}
\usecolortheme[named=LCNblue]{structure}
\mode<presentation>
{
\usetheme{Luebeck}
% or ...
\setbeamercovered{transparent}
% or whatever (possibly just delete it)
}
\usepackage{hyperref}
%\usepackage[english]{babel}
% or whatever
\usepackage[utf8]{inputenc}
\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.
%\pagenumbering{arabic}
%\setbeamertemplate{footline}[frame number]
\title[] % (optional, use only with long paper titles)
{Welcome to \LaTeX.}
\subtitle
{The What, the Why, and the How of the Premier WYSIWYM Text Processor.} % (optional)
\author[] % (optional, use only with lots of authors)
{Sam~Orman-Chan~\&~Alex~Elwell}
% - Use the \inst{?} command only if the authors have different
% affiliation.
\institute[] % (optional, but mostly needed)
{%
University of Lincoln --- School of Computer Science}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.
\date[] % (optional)
{27\textsuperscript{th} February 2023 / Enhancement Week 2023}
\subject{LaTeX: The What? The Why? and The How?}
% This is only inserted into the PDF information catalog. Can be left
% out.
% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:
\pgfdeclareimage[height=1cm]{university-logo}{./uniLincs.jpg}
\logo{\pgfuseimage{university-logo}}
% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
\AtBeginSubsection[]
{
\begin{frame}<beamer>{Outline}
\tableofcontents[currentsection,currentsubsection]
\end{frame}
}
% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command:
%\beamerdefaultoverlayspecification{<+->}
\begin{document}
\begin{frame}
\titlepage
\end{frame}
% Since this a solution template for a generic talk, very little can
% be said about how it should be structured. However, the talk length
% of between 15min and 45min and the theme suggest that you stick to
% the following rules:
% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
% 15 and 30 frames, all told.
\section{What is \LaTeX.}
\subsection{What is \LaTeX}
\begin{frame}{What is LaTeX?}{Not the Fetish Society Sort.}
% - A title should summarize the slide in an understandable fashion
% for anyone how does not follow everything on the slide itself.
\emph{Pronounced as Lay-Teck}
\begin{itemize}
\item
\LaTeX~is a Typesetting System.
\begin{itemize}\item Meaning it is software used to define how a written document is laid out.
\item It is often used in academic writing, particularly in academic papers and reports.
\item \LaTeX~is also used to write Books, letters, CVs \& even Presentations (Including this One).
\end{itemize}
\end{itemize}
\end{frame}
\subsection{Why use \LaTeX}
\begin{frame}{Why?}{Why use \LaTeX?}
\begin{itemize}
\item \LaTeX~is a ``What You See is What You Mean'' Document Processing \& Typesetting System.
\item This is opposed to the Ubiquitous ``What You See is What You Get'' paradigm employed by tools like Microsoft Word or LibreOffice.
\item The Result of this Difference is with \LaTeX, you use special `escape sequences' and `commands' to describe your document layout whilst you write your document.
\item Allowing you to focus on your writing whilst the Compiler focuses on the Layout.
\end{itemize}
\end{frame}
\section{What you need to Begin.}
\subsection{First Steps}
\begin{frame}{Editors \& Compilers}
\LaTeX~is an Open Source Project with a variety of Distributions available for its usage. Examples Include:\\
\begin{itemize}
\item Overleaf --- An Online \LaTeX~Editor \& Compiler.
\item MikTeX --- A Native Instance for Windows, macOS \& Linux. (Sam's Personal Favourite for Windows)
\item MacTeX --- A Native Instance for Mac\footnote{MacTeX \& TeXLive have very Large Storage Footprints (4GB+) as they locally store and maintain entire copies of the CTAN locally.{\label{fn1}}}
\item TexLive --- A Native Cross-Platform Version for just about anything.\textsuperscript{1}
\item VerbTex --- An Android Instance.
\end{itemize}
\end{frame}
\begin{frame}{Overleaf}
For the Ease of Learning \& so you don't need to download any software, we will be using Overleaf, however the Syntax is the Same Across the different \LaTeX~Distributions.
\begin{enumerate}
\item Create an Account on Overleaf. You can use your University Email Here.
\item Next create a Project In Overleaf. This is a bit like a folder where you will store all files relating to the document. Here we will start with selecting ``Blank Project''.
\item Now you are Ready. Please shout if you have any issues.
\end{enumerate}
\end{frame}
\begin{frame}{Your First Document}
When You create your Blank Project you will be presented with a split screen of \LaTeX~Source Code \& the PDF Output.\par Overleaf helpfully provides a bit of code like this to get you started:\\
\lstinputlisting[language=TeX]{./example.tex}
\end{frame}
\begin{frame}{Edit the Code}
You may notice that editing the code does not result in the preview updating. This is as \LaTeX~is a compiled Language and as such, you will need to click Recompile in Overleaf before you can see your changes.\par
Begin by Typing on the line below ``\textbackslash begin\{document\}'' line. Try adding some newlines and some text.
\end{frame}
\subsection{Escape Sequences}
\begin{frame}{Escape Sequences}
You have probably noticed that no matter how many newlines you put in, the spacing on the output doesn't seem to change. This is as \LaTeX~treats newlines a bit differently to how Word does.\par
In fact there are a couple ways to add vertical space between lines. You can use a double backslash or a backslash `par', with the difference being that the latter also indents the next line to make paragraph demarcation a little more obvious.
\end{frame}
\begin{frame}{Accents}
You may also note that typing characters with accents results in errors. This is as to type an accented character, like \~o or \^h you must escape it. This is done by:
\begin{enumerate}
\item Typing \textbackslash~and the character that best matches the accent. Such as \^~ for a circumflex, a ``~for an umlaut or a `c' for cedilla.
\item Then, without a space between them, type the letter you want accenting.
\end{enumerate}\par
\emph{Note:} If you wish to type the \pounds~sign, you must type ``\textbackslash pounds''.\par
If you notice that spacing is weird between your escaped characters and your normal ones, swap the space immediately after the escape sequence with a tilde (\textasciitilde).\par
\end{frame}
\subsection{Structure}
\begin{frame}{Your Preamble}
When you use \LaTeX~you will notice that unlike a plain text or even a word doc, there are areas of the source file that are not output. The most important of these is the Preamble. \par
This part of your document works a bit like a configuration file, instructing the \LaTeX~compiler on things like page size, document class, packages in use etc.\par
%You can use your preamble to even add metadata to the pdf file output of your \LaTeX~source such as author name or keywords relating to your document. \par
However, if you use a template, you rarely need to touch the preamble unless you use a package.
\end{frame}
%\begin{frame}{The Preamble}
%In \LaTeX~Documents have a number of attributes, mostly declared in the Preamble, the area before the \textbackslash\{begin\{document\}\} line. In this area you declare any packages you are going to use, any parameters for the packages, general document parameters like paper size or document class. Document Class is arguably one of the most important preamble commands, as the class of the document determines which commands \& structures you may use as well as how the document will look overall. For instance, the Overleaf project you have made is an Article, whilst this Presentation is a Beamer Class document.
%\end{frame}
\begin{frame}{Document Classes}
In \LaTeX~the type of document you are writing is indicated with the Document Class. A Class determines the layout attributes of a document, such as whether it will include a postal address at the top or a page number at the bottom.\par
Types of Document Class Include:\\
\begin{itemize}
\item Article --- The default for most. If in doubt, use this one.
\item Letter --- Used for writing letters and other correspondence.
\item Beamer --- Used for creating presentations like this.
\item Book --- Used for creating books.
\item KOMA Letter --- A variant of the Letter Class with the KOMA Macros.
\item Memoir --- A variant of Book Class.
\end{itemize}
\end{frame}
\begin{frame}{Environments}%Bit Wordy.
In \LaTeX~concepts like slides, centre-aligned areas, figures, lists \& tables are created within and using `Environments'. Environments are created using the \textbackslash\{begin\{Environment Type\}\} \& \textbackslash\{end\} commands. With environments, you can use specialist commands and/or benefit from specialised formatting that is not available within the wider document environment.\par
An example of this is the `itemize' environment that lets you create a bulleted list, and adds the `\textbackslash item' command, which allows you to indicate that the piece of text is an item of the list.
\end{frame}
\begin{frame}{Referencing}
\LaTeX~has both inbuilt and external Referencing Tools that are highly customisable. You can use the inbuilt referencing tool by using the cite command (obviously escaped) or a BibTex/BibLaTeX file and the appropriate post-processor. Please see the Further Reading for information on Referencing though as it can become very, very in depth.
\begin{figure}[h]
\qrcode[hyperlink,height=2.5cm]{https://lncn.ac/w8j1d}\\
Further Reading on Referencing in \LaTeX.
\end{figure}
\end{frame}
\section{Further Readings \& Useful Commands.}
\begin{frame}{The Maths ``Environment''}
The Maths Environment is a special area of your document that you start and end with \$ signs. Between the \$ you can use \LaTeX~Maths Notation to write even very complex maths very easily. For instance, if I wanted to write ``12 plus 144 plus 20 plus 3 times the square root of 4, divided by 7, all added to 5 times 11 is equal to 9 squared plus 0'' I could write:\\ ``\$ \textbackslash frac\{12 + 144 + 20 + 3 \textbackslash sqrt \{4\}\}\{7\} + 9 \textbackslash times 11 = 9\^{}{2} \textbackslash + 0 \$''\\
Which would output:\begin{centering}\\$\frac{12+144+20+3\sqrt{4}}{7} + 9 \times 11 = 9^2 + 0$\end{centering}
\end{frame}
\begin{frame}{Images}
In \LaTeX~Images are supported using the `graphicx' package. To use this package:\\
\begin{enumerate}
\item Declare `graphicx' in the preamble with the `usepackage' command.
\item{Optional} Set the \textbackslash graphicspath to the directory where images/graphics are kept.
\item At the location you want the image to appear, type \textbackslash includegraphics[size either as a measurement of height and/or width, or scale]\{image path, either from the graphics path, the relative path to the \TeX~file or the absolute path from the drive root\}.
\item Compile and check it looks right.
\end{enumerate}
\end{frame}
\begin{frame}{Further Reading}
\begin{table}[]
\begin{tabular}{ll}
\url{https://en.wikibooks.org/wiki/LaTeX} & \qrcode[hyperlink,height=1cm]{https://en.wikibooks.org/wiki/LaTeX} \\\\
\url{https://www.overleaf.com/learn} & \qrcode[hyperlink,height=1cm]{https://www.overleaf.com/learn} \\\\
\url{https://lncn.ac/3p3t} & \qrcode[hyperlink,height=1cm]{https://lncn.ac/3p3t} \\\\
\url{https://lncn.ac/zk1qu} & \qrcode[hyperlink,height=1cm]{https://lncn.ac/zk1qu}
\end{tabular}
\label{tabFurtherRead}
\end{table}
\end{frame}
\begin{frame}{Accents Reference}
\tiny{
\begin{table}[]
\begin{tabular}{lll}
\multicolumn{1}{c}{\textbf{LaTeX command}} & \multicolumn{1}{c}{\textbf{Sample}} & \multicolumn{1}{c}{\textbf{Description}} \\
\textbackslash{}`\{o\} & \`{o} & grave accent \\
\textbackslash{}'\{o\} & \'{o} & acute accent \\
\textbackslash{}\textasciicircum{}\{o\} & \^{o} & circumflex \\
\textbackslash{}"\{o\} & \"{o} & umlaut, trema or dieresis \\
\textbackslash{}H\{o\} & \H{o} & long Hungarian umlaut (double acute) \\
\textbackslash{}$\sim$\{o\} & \~{o} & tilde \\
\textbackslash{}c\{c\} &\c{o} & cedilla \\
\textbackslash{}k\{a\} & \k{o} & ogonek \\
\textbackslash{}l\{\} & \l{l} & barred l (l with stroke) \\
\textbackslash{}=\{o\} & \={o} & macron accent (a bar over the letter) \\
\textbackslash{}.\{o\} & \.{o} & dot over the letter \\
\textbackslash{}d\{u\} & \d{o}& dot under the letter \\
\textbackslash{}r\{a\} & \r{a} & ring over the letter (for å there is also the special command \textbackslash{}aa) \\
\textbackslash{}u\{o\} & \u{o} & breve over the letter \\
\textbackslash{}v\{s\} & \v{s} & caron/háček ("v") over the letter \\
\textbackslash{}o\{\} & \o{} & slashed o (o with stroke) \\
\{\textbackslash{}i\} & \i{} & dotless i (i without tittle)
\end{tabular}
\caption{Table of Accent Escapes}
\label{tabAccentChars}
\end{table}}%End Tiny
\end{frame}
\section{The End.}
\begin{frame}{Thanks to:}
\begin{itemize}
\item Wikibooks Community for the Invaluable, Straightforward \& Comprehensive wiki-book on Learning \LaTeX
\item Overleaf for Useful, Well Organised \& Detailed Support Articles on the \LaTeX~Language.
\item \TeX~Stack Exchange for almost universally having answers to any questions that can arise from \LaTeX~Usage.
\end{itemize}
\end{frame}
\begin{frame}{Download this Presentation}
\begin{centering}
\begin{figure}[h]
\qrcode[hyperlink,height=5cm]{https://github.com/SJO-C/presentLatex/raw/main/presentLaTeX.pdf}\\~\\
\url{https://github.com/SJO-C/presentLatex/raw/main/presentLaTeX.pdf}
\label{qrandLinkforPresent}
\end{figure}
\end{centering}
\end{frame}
\end{document}