-
Notifications
You must be signed in to change notification settings - Fork 0
/
module4.html
350 lines (330 loc) · 18.9 KB
/
module4.html
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
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
<!doctype html>
<!--
This single-page template is used for each learning module.
-->
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="LaTeX101 landing page">
<title>LaTeX101 Learning Module</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<!-- Additional scripts required for collapse, etc. -->
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
.dm-code {
background:azure;
}
</style>
<script type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-MML-AM_CHTML">
console.log("downloading mathjax")
</script>
</head>
<body>
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<a class="navbar-brand" href="..">dmackinnon1.github.io</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarsExampleDefault">
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a class="nav-link" href="./">Home <span class="sr-only">(current)</span></a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown01" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Modules</a>
<div class="dropdown-menu" aria-labelledby="dropdown01">
<a class="dropdown-item" href="./module0.html">0: What is LaTeX?</a>
<a class="dropdown-item" href="./module1.html">1: Getting Started</a>
<a class="dropdown-item" href="./module2.html">2: Essential LaTeX Commands</a>
<a class="dropdown-item" href="./module3.html">3: LaTeX on Various Platforms</a>
<a class="dropdown-item" href="./module4.html">4: Cloud-based LaTeX Environments</a>
<a class="dropdown-item" href="./module5.html">5: LaTeX as a Digital Literacy</a>
</div>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="dropdown02" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Utilities</a>
<div class="dropdown-menu" aria-labelledby="dropdown02">
<a class="dropdown-item" href="./quiz.html">Command Quiz</a>
<a class="dropdown-item" href="./simpleLaTeX.html">LaTeX Tester</a>
</div>
</li>
</ul>
</div>
</nav>
<main role="main">
<div id='top_padding'>
<br/><br/><br/>
</div>
<div class="container">
<!-- Row 1 introduction -->
<h1> Module 4: Cloud-based LaTeX Environments </h1>
<div class="row" id="contents">
<div class="col-md-8">
<h2>Contents</h2>
<ul>
<li><a href="#goals">Learning Goals</a></li>
<li><a href="#before">Before You Start</a></li>
<li><a href="#main">Cloud-based LaTeX Environments</a></li>
<li><a href="#more">Learn More</a></li>
<li><a href="#check">Checklist</a></li>
<li><a href="#references">References</a></li>
</ul>
</div>
</div>
<hr>
<div class="row" id="goals">
<div class="col-md-8">
<h2>Learning Goals</h2>
<p> The learning goals for this module include:
<ul>
<li>Understand the benefits of using cloud-based LaTeX environments.</li>
<li>Setup an account on Overleaf and create a LaTeX document.</li>
<li>Learn where to obtain templates and packages designed for teachers.</li>
</ul>
</p>
</div>
</div>
<hr>
<div class="row" id="before">
<div class="col-md-8">
<h2>Before You Start</h2>
<ol>
<li> Recall that LaTeX can be used not just to insert math equations, but to format entire documents. LaTeX is used for
scientific reports, books, resumes, slideshows, and really any other type of document.
Check out the <a href="https://www.overleaf.com/gallery/tagged/cv" target="_blank">Overleaf LaTeX CV Gallery</a> for examples
of how LaTeX can be used to create resumes.</li>
<li> Scan, but do not read all of, the <a href="https://en.wikibooks.org/w/index.php?title=LaTeX/Installation" target="_blank">
LaTeX Wikibooks entry on installing LaTeX</a>. The steps on this page, and other configuration
required to run LaTeX on your local machine, is exactly what we are avoiding by looking to cloud-based LaTeX systems.
</li>
<li> Set up a free account on <a href="https://www.overleaf.com" target="_blank">Overleaf</a>.</li>
</ol>
</div>
</div>
<hr>
<div class="row" id="main">
<div class="col-md-8">
<h2>Cloud-based LaTeX Environments</h2>
<p>
To create full LaTeX documents, one option is to install the LaTeX processor on your local
machine, write your documents using a text editor, and compile them to generate
pdf or other document formats. An alternative is to use one of
several online LaTeX systems. <strong>Overleaf</strong> and <strong>CoCalc</strong>, for example, offer free accounts that allow
you to create and edit LaTeX documents, providing editors that show both the LaTeX code and
the rendered document side by side.
</p>
<h3>Basic Document Layout</h3>
<p> At its simplest, a LaTeX document is very simple, as shown below. </p>
<div class="dm-code">
<pre>
\documentclass{article}
\usepackage[utf8]{inputenc}
\begin{document}
\noindent
Euler's formula shows the surprising relationship between
the exponential function and the sine and cosine functions.
\[
e^{i\theta} = \cos(\theta) + i\sin(\theta)
\]
When \(\theta = \pi \), Euler's formula provides
the identity \(e^{i\pi}=-1\).
\end{document}
</pre>
</div>
<p> The example above shows many of the elements of a typical LaTeX document:
<ul>
<li>Preliminary commands to identify the document as a LaTeX document and identify its document class.</li>
<li>Package imports that instruct LaTeX what groups of commands will be used (the ones shown are minimal).</li>
<li>Some formatting commands, like the <strong>\noindent</strong> shown.</li>
<li>Plain text that will be rendered as typed.</li>
<li>Inline mathematics, placed inside the backslash-round-bracket pattern shown.</li>
<li>Display equations, placed inside the backslash-square-bracket pattern shown.</li>
</ul>
</p>
<div style="padding:10px;border:thin solid black;">
<p><strong>Exercise 2:</strong> Create a "blank" document project within Overleaf.
Remove all text in the document and replace it with the example above. Recompile and note
the difference between the inline math and displayed equation. </p>
</div>
<br>
<div style="padding:10px;border:thin solid black;">
<p><strong>Exercise 3:</strong> Create a "blank" document project within Overleaf.
Somewhere between
the <strong> \begin{document} </strong> and <strong>\end{document}</strong>, insert
a LaTeX command that you have learned, in between the backslash-square bracket pattern as
shown above. </p>
</div>
<br>
<h3>Advanced Options</h3>
<p>
Some notation and formatting requires you to provide extra instructions to LaTeX.
As the formatting gets more complex, the LaTeX file will start to look more like
a computer program than a document. If you end up using LaTeX as a complete formatting system,
you will need to learn more about using packages, defining macros, and other advanced features.</p>
<p> For example, the <strong>\cfrac</strong> command and the <strong>align</strong> environments
shown in module 2 require the <strong>amsmath</strong> package.
<div class="dm-code">
<pre>
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\begin{document}
\noindent
\[
\cfrac{1}{1+\cfrac{1}{1+x}}
\]
\end{document}
</pre>
</div>
<br>
<p> Additional packages are included via the <strong>\usepackage</strong> commands, which
must be added prior to the the <strong>\begin{document}</strong> directive.
<div style="padding:4px;border:thin solid black;">
<p><strong>Exercise 4:</strong> In one of your documents, include a use of
the <strong>\cfrac</strong> command. Note the error that occurs when you
compile this. Add the <strong>\usepackage{amsmath}</strong> command in the
right part of your document, and see that it resolves the error.
</div>
<br>
<h3>How Will I Use This?</h3>
<p> Depending on your level of interest, you can use environments like Overleaf in various
ways:
<ul>
<li> Use the environment like
one of the LaTeX equation editors we saw previously - allowing you to create more involved
math snippets that can be captured and imported as images into other documents.</li>
<li> Produce simple handouts that do not require extensive formatting, downloaded and distributed
as pdf files </li>
<li> Create complete well-formatted notes, quizzes, tests, and slideshows using special packages
and custom formatting. </li>
</ul>
<h3>Useful Packages and Templates</h3>
<p>As a teacher, you may be tempted to use LaTeX to create assignments, tests, and other documents
that might require special formatting. There are several LaTeX classes and templates that have been
created to help do this. A few places to look for these kinds of resources
include:
<ul>
<li>Samuel S. Watson's <a href="http://math.mit.edu/~sswatson/latexforteachers.html" target="_blank">page about LaTeX for teachers</a>.</li>
<li>The LaTeX Wikibook's <a href="https://en.wikibooks.org/wiki/LaTeX/Teacher%27s_Corner" target="_blank">Teacher's Corner</a>.</li>
<li> Overleaf's <a href="https://www.overleaf.com/latex/templates/tagged/homework" target="_blank">templates for homework assignments</a>.</li>
</ul>
</p>
</div>
</div>
<hr>
<div class="row" id="more">
<div class="col-md-8">
<h2>Learn More</h2>
<p>
Did we mention that LaTeX is an established technology? At this point, you're ready to take a
look at a LaTeX overview from (gasp!) 1995: David R. Wilkins's <a href="https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/GSWLaTeX.pdf" target="_blank">Getting Started with LaTeX</a> covers
many aspects of document setup and formatting not discussed in this workshop.
Another place to learn more is the <a href="https://www.overleaf.com/learn" target="_blank">Overleaf documentation centre</a>, which has helpful
information on LaTeX and the Overleaf platform. The
<a href="https://www.latex-project.org/help/documentation/amsldoc.pdf" target="_blank">full documentation for amsmath </a>
is
a great place to learn about the advanced formatting options available in that package.
</p>
</div>
</div>
<hr>
<div class="row" id="check">
<div class="col-md-8">
<h2>Learning Checklist</h2>
<p>
Before moving on to the next module, take a moment to review the learning checklist.
</p>
<p>
<div class="form-check">
<input class="form-check-input" type="checkbox" value="" id="defaultCheck1">
<label class="form-check-label" for="defaultCheck1">
I created a free account in Overleaf.
</label><br>
<input class="form-check-input" type="checkbox" value="" id="defaultCheck2">
<label class="form-check-label" for="defaultCheck2">
I created and modified simple LaTeX documents.
</label><br>
<input class="form-check-input" type="checkbox" value="" id="defaultCheck3">
<label class="form-check-label" for="defaultCheck3">
I explored some of the available templates for LaTeX documents.
</label><br>
<input class="form-check-input" type="checkbox" value="" id="defaultCheck4">
<label class="form-check-label" for="defaultCheck4">
I looked at some LaTeX resources available for teachers.
</label><br>
</div>
</p>
<p> If there were any items in the checklist that you did not complete,
consider reviewing this page again before moving on.
</p>
</div>
</div>
<hr>
<div class="row" id="references">
<div class="col-md-8">
<h2>References</h2>
<p>
LaTeX/Installation. (2019, February 15). Wikibooks, The Free Textbook Project. Retrieved 02:23, March 20, 2019 from
<a href="https://en.wikibooks.org/w/index.php?title=LaTeX/Installation&oldid=3516765" target="_blank">
https://en.wikibooks.org/w/index.php?title=LaTeX/Installation&oldid=3516765</a>
</p>
<p>
Lees-Miller, J (2017). An Interactive Introduction to LaTeX. Slides. Retrieved on March 21 from:
<a href="https://learn.sharelatex.com/learn/Free_online_introduction_to_LaTeX_(part_1)" target="_blank">
https://learn.sharelatex.com/learn/Free_online_introduction_to_LaTeX_(part_1)</a>
</p>
<p>
Overleaf Inc. (2019). Overleaf Cloud-based LaTeX Document Preparation Software. Retrieved on March 18, 2019 from
<a href="https://www.overleaf.com/about" target="_blank">
https://www.overleaf.com/about</a>
</p>
<p>
SageMath, Inc. (2019). CoCalc Online LaTeX Editor Software. Retrieved on March 20 from
<a href="https://cocalc.com/doc/latex-editor.html" target="_blank">
https://cocalc.com/doc/latex-editor.html</a>
</p>
<p>
Watson, S.S. (2013). LaTeX Resources for Teachers, webpage. Retrieved March 7, 2019 from
<a href="http://math.mit.edu/~sswatson/latexforteachers.html" target="_blank">
http://math.mit.edu/~sswatson/latexforteachers.html</a>
</p>
<p>
Wilkins, D.R., (1995). Getting Started with LaTeX. Webpage. Retrieved February 26, 2019 from
<a href="https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/GSWLaTeX.pdf" target="_blank">
https://www.maths.tcd.ie/~dwilkins/LaTeXPrimer/GSWLaTeX.pdf</a>
<p>
</div>
</div>
<hr>
</div>
<!-- /container -->
</main>
<footer class="container">
<div class="btn-group" role="group" aria-label="nav-buttons">
<button type="button" class="btn btn-outline-secondary"><a href="./module3.html">Back</a></button>
<button type="button" class="btn btn-outline-secondary"><a href="./">Home</a></button>
<button type="button" class="btn btn-outline-secondary"><a href="./module5.html">Next</a></button>
</div>
</footer>
<script>
MathJax.Hub.Typeset();
</script>
</html>