-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path04-git.html
520 lines (470 loc) · 23.4 KB
/
04-git.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
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Introduction to Bioinformatics</title>
<meta name="description" content="Introduction to Bioinformatics">
<!-- Disabled for now - embeds HTML in author string -->
<!-- <meta name="author" content="Lesson 4 - Version control with <code>git</code>" /> -->
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="reveal.js/css/reveal.css">
<link rel="stylesheet" href="src/theme/csmall.css" id="theme">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="reveal.js/lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write( '<link rel="stylesheet" href="reveal.js/css/print/' +
( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) +
'.css" type="text/css" media="print">' );
</script>
<!--[if lt IE 9]>
<script src="reveal.js/lib/js/html5shiv.js"></script>
<![endif]-->
<!-- Note escaped dollars -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>Introduction to Bioinformatics</h1>
<h3>Lesson 4 - Version control with <code>git</code></h3>
<p>
<h4></h4>
</p>
</section>
<!--Things for next time:-->
<!--* maybe deete prior class merges to keep histry the same-->
<!--* need to cover git pull-->
<section id="git-for-version-control" class="level1">
<h1>Git for Version control!</h1>
<p><em>In which with our fleets of flying, speaking beasts we gain mastery over time</em></p>
</section>
<section id="everyone-have-a-github-account" class="level1">
<h1>Everyone have a GitHub account?</h1>
<p>If not please go to <a href="https://github.com">github.com</a> and sign up while we get started (it’s free).</p>
</section>
<section id="the-basic-idea" class="level1">
<h1>The basic idea</h1>
<p>Like Back to the Future for data/code (on steroids, sans DeLorean):</p>
<ul>
<li>Save current state, with a helpful message</li>
<li>Go back to an old state to try a different strategy, saving steps along the way</li>
<li>Take two alternate histories and merge results</li>
</ul>
</section>
<section id="in-computational-biology" class="level1">
<h1>In computational biology</h1>
<p>Analogy from the book:</p>
<blockquote>
<p>Imagine you keep a lab notebook in pencil, and each time you run a PCR you erase your past specifics and jot down the newest ones…</p>
</blockquote>
<p>This is functionally equivalent to not versioning your code…</p>
</section>
<section id="some-perspective-on-this-class" class="level1">
<h1>Some perspective on this class</h1>
<p>There are four or five commands you should know and start using <em>now</em>. The goal for the rest of the class is to generally understand what is possible should you need it.</p>
<p>So relax and enjoy the ride.</p>
</section>
<section id="git" class="level1">
<h1>Git</h1>
<p>We’ll be using <code>git</code> to version our project from here on out.</p>
<p>There are other version control systems out there (<code>svn</code>, <code>mercurial</code>, etc.), but <code>git</code> is currently by far the most popular in bioinformatics, and it’s lovely!</p>
</section>
<section id="customizing-git" class="level1">
<h1>Customizing git</h1>
<pre><code>git config --global user.name "<your-real-name>"
git config --global user.email "<your-email-address>"
# Some nice color modes for git output
git config --global color.ui true</code></pre>
<p>(Note: You can see all of your current settings with <code>cat ~/.gitconfig</code>)</p>
</section>
<section id="initializing-git" class="level1">
<h1>Initializing git</h1>
<p>Before you can use git on a project, you have to <em>initialize</em> a git <em>repository</em>.</p>
<pre><code># Get to project dir
cd ~/bioinfclass
git status
# Initialize
git init
git status</code></pre>
</section>
<section id="commits" class="level1">
<h1>Commits</h1>
<p><em>Commits</em> are the basis for most of git. They are our waypoints as we travel through time.</p>
<p>Initializing a project only sets things up; we still have to make our first commit (save state).</p>
</section>
<section id="making-our-first-commit" class="level1">
<h1>Making our first commit</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># Tell git what files to track (staging)</span>
<span class="fu">git</span> add *
<span class="co"># Make initial commit</span>
<span class="fu">git</span> commit -m <span class="st">"Initial commit"</span></code></pre></div>
<p>We now have a saved state on which to build without fear of “messing things up”.</p>
</section>
<section id="lets-make-some-edits-and-commit-them" class="level1">
<h1>Let’s make some edits, and commit them</h1>
<p>Write some things in <code>README.md</code>:</p>
<div class="sourceCode"><pre class="sourceCode markdown"><code class="sourceCode markdown"><span class="fu"># Bioinfclass Notes</span>
Where you type out notes and stuff...
<span class="fu">## Jun 24, 2015</span>
Learned how to use git!
It was pretty fun.</code></pre></div>
<p>Note: This is formatted in <a href="http://assemble.io/docs/Cheatsheet-Markdown.html">Markdown</a>.</p>
</section>
<section id="first-seeing-whats-changed" class="level1">
<h1>First, seeing what’s changed</h1>
<pre><code># Check the status of the repo
git status
# Seeing specific changes
git diff</code></pre>
<p>Git diff uses + and - (and optionally, colors) to show what’s changed.</p>
</section>
<section id="committing-our-changes" class="level1">
<h1>Committing our changes</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># Stage the changed file</span>
<span class="fu">git</span> add README.md
<span class="co"># Commit staged changes, with commit message</span>
<span class="fu">git</span> commit -m <span class="st">"Add notes to README"</span>
<span class="co"># Checking our status</span>
<span class="fu">git</span> status
<span class="fu">git</span> log</code></pre></div>
</section>
<section id="thats-it-for-the-basics" class="level1">
<h1>That’s it for the basics!</h1>
<p>Start using this immediately, and learn the rest as needed.</p>
<p>The remainder of this class is a survey of the more advanced features of git. Most is generally useful, but a lot is most valuable for collaboration. As such, it’s more important at this point to know <em>what’s</em> possible than remember <em>how</em> to do it all.</p>
</section>
<section id="github" class="level1">
<h1>GitHub!</h1>
<p>The <em>de facto</em> home of open source on the internet.</p>
<p>Visit <a href="https://github.com">github.com</a> and log in.</p>
</section>
<section id="forking" class="level1">
<h1>Forking</h1>
<section id="a-way-of-copying-a-project-over-to-your-account" class="level2">
<h2>A way of copying a project over to your account</h2>
<ul>
<li>Go to <a href="https://github.com/fredhutchio/bioinfclass-sample-project" class="uri">https://github.com/fredhutchio/bioinfclass-sample-project</a></li>
<li>Click on the button that says “Fork” and select your account</li>
</ul>
<p>You are now on your “fork” or copy of the project</p>
</section>
</section>
<section id="cloning-a-repository" class="level1">
<h1>Cloning a repository</h1>
<section id="this-is-how-we-get-a-remote-repository-from-github-checked-out-on-our-computers" class="level2">
<h2>This is how we get a remote repository from GitHub checked out on our computers</h2>
<p>Copy the “HTTPS” clone url of the project on GitHub, then</p>
<pre><code># Go home, and rename the directory we've been working on
cd ~
mv bioinfclass old_bioinfclass
# Make the checkout
git clone <paste-your-https-url> bioinfclass
# Enter the directory we created, and see what's there
cd bioinfclass
tree
git status</code></pre>
</section>
</section>
<section id="looking-at-history" class="level1">
<h1>Looking at history</h1>
<pre><code># See the list of commits
git log</code></pre>
<p>Wow! Such commit history…</p>
</section>
<section id="a-slightly-better-way" class="level1">
<h1>A slightly better way…</h1>
<pre><code># Add an alias to a prettier log command
git config --global alias.glog "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit --all"
# Try it out!
git glog
git glog -n 5</code></pre>
</section>
<section id="breaing-this-down" class="level1">
<h1>Breaing this down</h1>
<p>Notice the history branching, the <em>sha hashes</em> (<code>a4b8893</code>, etc), commit messages, author, and human friendly time string.</p>
<pre><code>* 4467411 - (HEAD -> master, origin/master, origin/HEAD) Finishe
...
* a4b8893 - Added previous tree and alignment analysis to build.
* 2683a24 - Added csvhead script (9 months ago)<Christopher Smal
* 9596b65 - Added csvless script (9 months ago)<Christopher Smal
| * 5553b9e - (origin/other-idea) Ran results of sequences by lo
| * de48429 - Looking at sequences by location (9 months ago)<Ch
|/
* 3b0fac2 - Rewrote build.sh with env variables (9 months ago)<C
* 2c17799 - Added other metadata counting steps (9 months ago)<C
* d07378b - Computing number of sequences per species in build.s</code></pre>
</section>
<section id="branches" class="level1">
<h1>Branches</h1>
<p>Branches give us a way of referrin to alternate histories.</p>
<ul>
<li><code>master</code> is generally the “main” or “production” branch</li>
<li>other branches can let us keep work out of <code>master</code> until it’s ready (see <code>other-idea</code> branch)</li>
</ul>
</section>
<section id="grab-a-remote-branch" class="level1">
<h1>Grab a remote branch</h1>
<p>When we clone, we only pull down the <code>master</code> branch, but we can still see remote branches like <code>origin/other-idea</code>.</p>
<p>To check out one of these branches, we can do</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> checkout other-idea
<span class="fu">git</span> glog</code></pre></div>
<p>Note that we now see</p>
<pre><code>| * 5553b9e - (HEAD -> other-idea, origin/other-idea) Ran results of sequences by location (1 year, 4 months ago)<Christopher T Small></code></pre>
</section>
<section id="creating-a-new-branch" class="level1">
<h1>Creating a new branch</h1>
<p>You can do this any time you work on something you’re not sure you want to keep, or that follows a separate track of development.</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> checkout -b my-new-branch</code></pre></div>
<p>This will create a new branch from whatever commit you currently have checked out (<code>HEAD</code>).</p>
<p>We’ll look at how you can reconcile (merge) histories a little later.</p>
</section>
<section id="getting-back-to-the-master-branch" class="level1">
<h1>Getting back to the master branch</h1>
<p>Make sure to do this before continuing…</p>
<pre><code>git checkout master
git glog</code></pre>
</section>
<section id="tracing-history" class="level1">
<h1>Tracing history</h1>
<p>We can see the diffs for each commit with <code>git show</code>:</p>
<pre><code>git show 1aa457d
git show f566a9
git show cac1218
# Skipping a couple..
git show d07378b</code></pre>
</section>
<section id="doing-more-with-diff" class="level1">
<h1>Doing more with <code>diff</code></h1>
<p>We can also compare specific commits with <code>git diff</code>.</p>
<pre><code>git diff 1aa457d d07378b</code></pre>
</section>
<section id="git-show-or-diff-select-files" class="level1">
<h1><code>git show</code> or <code>diff</code> select files</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># Very long...</span>
<span class="fu">git</span> show 2c17799
<span class="co"># If we really just care about build.sh changes...</span>
<span class="fu">git</span> show 2c17799 build.sh
<span class="co"># Or with diff</span>
<span class="fu">git</span> diff 1aa457d d07378b build.sh</code></pre></div>
<p>This is pretty valuable as your project gets big and lots of things change.</p>
</section>
<section id="pushing-the-data-back-up" class="level1">
<h1>Pushing the data back up</h1>
<p>So far, we’ve forked a repository and cloned that fork locally.</p>
<p>Let’s complete the circle by making some changes and pushing them back up to the main repository.</p>
</section>
<section id="first-some-changes" class="level1">
<h1>First, some changes</h1>
<p>In README.md, add:</p>
<pre><code>## June 24, 3:30PM
Ran the location trees.
Interesting data.
Thinking about some other studies now.</code></pre>
</section>
<section id="adding-a-new-commit-as-before" class="level1">
<h1>Adding a new commit, as before</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> add README.md
<span class="fu">git</span> commit -m <span class="st">"Add location analyses notes"</span></code></pre></div>
</section>
<section id="pushing-changes-to-our-github-fork" class="level1">
<h1>Pushing changes to our GitHub fork</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="co"># Pushing changes on branch `master` to remote `origin`</span>
<span class="fu">git</span> push origin master
<span class="co"># Can also do `git push`, which pushes current branch to origin</span>
<span class="co"># When prompted enter your GH username and password</span></code></pre></div>
<p>Pull up github, reload and see the new commit there.</p>
</section>
<section id="sharing-your-changes-with-a-pull-request" class="level1">
<h1>Sharing your changes with a “pull request”</h1>
<p><em>Pull requests</em> are a way of <em>suggesting</em> changes to other people’s repositories.</p>
<p>Like “forking”, it’s a GitHub specific thing.</p>
<ul>
<li>Click on the “New pull request” button just above the list of files on your fork’s page</li>
<li>Note “base” and “head” forks: base is where the changes will go, head is where they’re from
<ul>
<li>(Sometimes you might change the branches; not today though)</li>
</ul></li>
<li>Click “Create pull request”</li>
</ul>
</section>
<section id="if-you-get-a-pull-request-you-can-merge-it" class="level1">
<h1>If you get a pull request, you can merge it</h1>
<p>This will show up on the repository page.</p>
<p>Some pull requests can be merged automatically, others need to be done from the command line.</p>
</section>
<section id="weve-now-seen-changes-make-the-whole-circuit" class="level1">
<h1>We’ve now seen changes make the whole circuit!</h1>
<p>Some things to keep in mind</p>
<ul>
<li>Changes move neither up nor down without being requested</li>
<li>You can’t change a repository you haven’t been given access/permissions to</li>
<li>Fork / Clone / Edit / Push / Pull Request</li>
</ul>
</section>
<section id="how-to-go-back-in-time" class="level1">
<h1>How to go “back in time”</h1>
<p>Pick a commit to check out, like <code>b445eea</code></p>
<ul>
<li>Type <code>git checkout -b backintime b445eea</code>: creates a new “branch” named <code>backintime</code> based on the desired commit</li>
<li>Reload the script file</li>
</ul>
</section>
<section id="make-some-edits" class="level1">
<h1>Make some edits</h1>
<p>Instead of worrying about making trees for each location, let’s just directly count the number of sequence names per location to make sure they match up.</p>
<pre><code> # ...
# Directly count number of sequences
loc_spec_count="$loc_outdir/seqcount"
wc -l $loc_sequences > $loc_spec_count
done
# Combine sequence counts by location
loc_spec_counts="$outdir/location_specimen_counts.txt"
find $outdir -name seqcount | xargs cat > $loc_spec_counts</code></pre>
</section>
<section id="now-commit-and-look-at-our-tree" class="level1">
<h1>Now commit and look at our tree</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> add build.sh
<span class="fu">git</span> commit -m <span class="st">"Add direct sequence per location count"</span>
<span class="co"># Now look at our history; we've branched!</span>
<span class="fu">git</span> glog</code></pre></div>
</section>
<section id="merging-back-into-master" class="level1">
<h1>Merging back into master</h1>
<p>Say we want to keep these changes and merge them into the most up to date code.</p>
<p>We have to do a <em>merge</em>.</p>
</section>
<section id="git-merge" class="level1">
<h1>Git merge</h1>
<pre><code># Switch to branch into which you want to merge changes (aka the HEAD branch).
git checkout master
# Next merge backintime into master
git merge backintime</code></pre>
</section>
<section id="clean-merges-and-conflicting-merges" class="level1">
<h1>Clean merges and conflicting merges</h1>
<p>If all of your changes are in different parts of the code that any changes on the other branch since the histories split, you’re done! The branches can be automatically merged, and there will be peace in the kingdom.</p>
<p>In our case however, the changes overlap (try running <code>git status</code>). This means we need to resolve the conflicts.</p>
</section>
<section id="exercise" class="level1">
<h1>Exercise</h1>
<p><code>vim build.sh</code> file and go down to the bottom where we made our changes.</p>
<ul>
<li>Changes to the branch you merge <em>to</em> are placed between <code><<<<<<<<< HEAD</code> and <code>========</code></li>
<li>Changes to the branch you merge <em>from</em> are placed betwee <code>========</code> and <code>>>>>>>>>></code>.</li>
</ul>
<p>In our case, we want to keep both changes, so simply delete the demarkation lines, then save, exit and then</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> add build.sh
<span class="fu">git</span> commit -m <span class="st">"Resolve build conflicts"</span></code></pre></div>
</section>
<section id="some-guidelines-for-using-git" class="level1">
<h1>Some guidelines for using Git</h1>
<ul>
<li>Commit often</li>
<li>Try to make commits “atomic” (commit unrelated code/data changes separately)</li>
<li>Make messages short but good
<ul>
<li>Think of it as a mini command for the state of your repo; what will happen to your repo if you apply the commit</li>
</ul></li>
</ul>
</section>
<section id="challenges-for-bigger-data" class="level1">
<h1>Challenges for bigger data</h1>
<p>Having biggish data that updates frequently can slow git down quite a bit.</p>
<p>One solution is to track the output data (and maybe even input data) in separate repositories, which you “ignore” from the main repository. This has a few problems too though:</p>
<ul>
<li>It’s more work keeping multiple repositories up to date</li>
<li>It’s more work matching the code / data versions when split across repositories</li>
</ul>
<p>GitHub is <a href="https://github.com/blog/1986-announcing-git-large-file-storage-lfs">solving this for large files</a>, but the problem remains for <em>lots</em> of smaller files…</p>
</section>
<section id="dont-freak-out" class="level1">
<h1>Don’t freak out!</h1>
<p>Git can be intimidating…</p>
<p><a href="figures/git-expert.gif" target="_blank"><img src="figures/git-expert.gif" height="400"></a></p>
<p><em>When the office git expert has to come fix everything</em></p>
</section>
<section id="but-90-of-the-time-youll-be-using" class="level1">
<h1>But 90% of the time, you’ll be using</h1>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="fu">git</span> init
<span class="fu">git</span> add ...
<span class="fu">git</span> commit -m <span class="st">"..."</span>
<span class="fu">git</span> status
<span class="fu">git</span> log # (or git glog, as you wish)
<span class="fu">git</span> diff</code></pre></div>
<p>Learn those, start using them, and Google the rest as you need it.</p>
</section>
<section id="exercises" class="level1">
<h1>Exercises</h1>
<ul>
<li>Create a new branch and add something to it, then merge back in to master</li>
<li>Create a new repository and push it to your account on GitHub</li>
<li>Create two clones of a repository, make conflicting changes in them, and then push them both up to master (hint: you’ll have to do a merge on one of the machines)</li>
</ul>
</section>
<section id="reading" class="level1">
<h1>Reading</h1>
<p>For this class:</p>
<ul>
<li>Chapter 5</li>
</ul>
<p>For next class (if you want to jump ahead):</p>
<ul>
<li>Start the Codecademy <a href="http://www.codecademy.com/tracks/python">Python course</a></li>
</ul>
</section>
<section id="resources" class="level1">
<h1>Resources</h1>
<ul>
<li><a href="http://www.git-tower.com/blog/git-cheat-sheet/">Git Cheat sheet</a></li>
<li>Tutorial: <a href="https://try.github.io/" class="uri">https://try.github.io/</a></li>
<li>Codeschool <a href="https://www.codeschool.com/courses/try-git">try-git tutorial</a></li>
<li>Quick guide for <a href="https://help.github.com/articles/basic-writing-and-formatting-syntax/">GitHub flavored Markdown</a></li>
<li>Git humor: <a href="http://wheningit.tumblr.com/">When in git</a></li>
<li>PLoS Comp Bio: <a href="http://journals.plos.org/ploscompbiol/article?id=10.1371/journal.pcbi.1004668">Intro to Git and GitHub for Biologists</a></li>
</ul>
<p><a href="http://fredhutchio.github.io/intro-bioinformatics/">Back to homepage</a></p>
</section>
</div>
<script src="reveal.js/lib/js/head.min.js"></script>
<script src="reveal.js/js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: false,
slideNumber: true,
rollingLinks: false,
// available themes are in /css/theme
theme: Reveal.getQueryHash().theme || 'csmall',
// default/cube/page/concave/zoom/linear/fade/none
transition: Reveal.getQueryHash().transition || 'fade',
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal.js/plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'reveal.js/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'MathJax/MathJax.js?config=TeX-AMS-MML_HTMLorMML'}
// { src: 'reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'reveal.js/plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
Reveal.addEventListener( 'slidechanged', function( event ) {
MathJax.Hub.Rerender();
} );
</script>
</body>
</html>