-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIntroduction_to_LaTeX.tex
999 lines (847 loc) · 31.3 KB
/
Introduction_to_LaTeX.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
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
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
\documentclass{beamer}
\usetheme{Dresden}
\usefonttheme[onlymath]{serif}
\input{examplepages.tex}
\usepackage{graphicx}
\usepackage{xcolor}
\usepackage{adjustbox}
\usepackage{fontawesome}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usepackage{hologo}
\usepackage{showexpl}
\usepackage{hyperref}
\usepackage{calc}
\usepackage{fp}
\title{An Introduction to \LaTeX}
\subtitle{Make Documents Like A PROgrammer}
%\thanks{\href{https://github.com/BlueNalgene/Introduction_to_LaTeX}{https://github.com/BlueNalgene/Introduction\_to\_LaTeX}}
\author{Wesley T. Honeycutt}
\institute{University of Oklahoma}
\date{\today}
\definecolor{OUCrimson}{RGB}{132 22 23} % UBC Blue (primary)
\definecolor{OUCream}{RGB}{253 249 216} % UBC Grey (secondary)
\setbeamercolor{palette primary}{bg=OUCrimson,fg=white}
\setbeamercolor{palette secondary}{bg=OUCrimson,fg=white}
\setbeamercolor{palette tertiary}{bg=OUCrimson,fg=white}
\setbeamercolor{palette quaternary}{bg=OUCrimson,fg=white}
\setbeamercolor{structure}{fg=OUCrimson} % itemize, enumerate, etc
\setbeamercolor{section in toc}{fg=OUCrimson} % TOC sections
% Override palette coloring with secondary
\setbeamercolor{subsection in head/foot}{bg=OUCream,fg=white}
\makeatletter
\Hy@AtBeginDocument{%
\def\@pdfborder{0 0 1}% Overrides border definition set with colorlinks=true
\def\@pdfborderstyle{0 0 0}% Overrides border style set with colorlinks=true
% Hyperlink border style will be underline of width 1pt
}
\makeatother
\hypersetup{%
colorlinks=true,% hyperlinks will have color
linkcolor=blue,
urlcolor=blue,
linkbordercolor=blue,% hyperlink borders will be red
pdfborderstyle={/S/U/W 0}% border style will be underline of width 1pt
}
\lstloadlanguages{[LaTeX]Tex}
\lstset{%
tabsize=2, % Our tabs will be displayed with 2 spaces each
gobble=6, % We gobble the first x characters (removes excess tabs)
basicstyle=\ttfamily\scriptsize,
commentstyle=\itshape\ttfamily\scriptsize,
showspaces=false,
showstringspaces=false,
breaklines=true,
breakautoindent=true,
captionpos=t
}
\newcommand{\metalone}{[pattern= horizontal lines, pattern color=blue]}
\newcommand{\metaltwo}{[pattern= vertical lines, pattern color=purple]}
\newcommand{\poly}{[pattern= grid, pattern color=red]}
\newcommand{\pdiff}{[pattern= north east lines, pattern color=orange]}
\newcommand{\ndiff}{[pattern= north west lines, pattern color=green]}
\newcommand{\pwell}{[pattern= crosshatch dots, pattern color=orange]}
\newcommand{\nwell}{[pattern= crosshatch dots, pattern color=green]}
\newcommand{\oxide}{[pattern = bricks, pattern color = olive]}
\newcommand{\silicon}{[fill = white]}
\newcommand{\metalthree}{[fill = teal]}
\graphicspath{ {images/} } %this removes clutter from the root folder
\begin{document}
\frame{\titlepage
\footnotetext{\href{https://github.com/BlueNalgene/Introduction_to_LaTeX}{https://github.com/BlueNalgene/Introduction\_to\_LaTeX}}
}
\frame{\tableofcontents}
\section{What is \LaTeX{}?}
\frame{\frametitle{History}
\begin{itemize}
\item<1-> In 1978, Donald Knuth created the \TeX\ programming language in a fit of frustration with how ugly photoprinting looked.
\item<2-> In 1983, Leslie Lamport released \LaTeX\ (Layman's \TeX), a set of macros which made \TeX\ usable by mortals.
\item<3-> There are many other variants such as :
\begin{center}
\hologo{BibTeX}\ \hologo{ConTeXt}\ \hologo{LuaTeX}\ \hologo{LyX}\ \hologo{pdfLaTeX}\ \hologo{XeLaTeX}
\end{center}
\end{itemize}
}
\frame{\frametitle{\LaTeX~is\ldots}
\ldots a sophisticated document preparation sytem.
\\~\\
\begin{block}{\LaTeX~has\ldots}
\begin{itemize}
\item Stylistic uniformity
\item Bibliography support
\item Sophisticated structuring abilities
\item Reference tracking
\item Highly extendible capabilities
\end{itemize}
\end{block}
}
\frame{\frametitle{\LaTeX~is not\ldots}
\ldots a word processor.
\\~\\
\begin{block}{\LaTeX~does not\ldots}
\begin{itemize}
\item Spell-check your documents
\item Give you complete control over formatting
\item Provide a graphical interface for editing
\end{itemize}
\end{block}
``You take care of writing, and we'll take care of presentation."
}
\frame{\frametitle{You might be used to WYSIWYG}
\begin{center}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{cl}
\textbf{W}&hat \\
\textbf{Y}&ou \\
\textbf{S}&ee \\
\textbf{I}&s \\
\textbf{W}&hat \\
\textbf{Y}&ou \\
\textbf{G}&et
\end{tabular}
\end{center}
}
\frame{\frametitle{\LaTeX is WYSIWYM}
\begin{center}
\setlength{\tabcolsep}{0pt}
\begin{tabular}{cl}
\textbf{W}&hat \\
\textbf{Y}&ou \\
\textbf{S}&ee \\
\textbf{I}&s \\
\textbf{W}&hat \\
\textbf{Y}&ou \\
\textbf{M}&ean
\end{tabular}
\end{center}
}
\frame[containsverbatim]{\frametitle{Presentation matching what you wrote, not how it was written}
\begin{LTXexample}
This text is
spaced specially.
\end{LTXexample}
\begin{LTXexample}<2>
Paragraphs are easy.
Use double line breaks.
\end{LTXexample}
\begin{LTXexample}
Never break the unbreakable unless you want to.
You~can~force~connections~of~words~in~a~line~or\ force\ spaces and\\linebreaks.
\end{LTXexample}
}
\section{IDE's}
\frame[containsverbatim]{\frametitle{If you like to suffer}
\LaTeX{}is coded as plaintext. If you really want to, you can do everything in a Notepad-like text editor.
\\~\\
The code is processed via command line:
\begin{lstlisting}
pdflatex thefile.tex
\end{lstlisting}
}
\frame{\frametitle{There are add-ons for popular text editors}
\begin{itemize}
\item<1-> \textit{vim}: \href{http://vim-latex.sourceforge.net}{\LaTeX{}suite for vim}
\item<2-> \textit{emacs}: \href{http://personal.psu.edu/jcc8//software/latexmk-jcc/}{Latexmk}
\item<3-> \textit{Notepad++}: \href{http://johnbruer.com/2013/05/21/latex-editing-using-notepad/}{Requires multiple tweaks}
\item<4-> \textit{Sublime Text}: \href{https://latextools.readthedocs.io/en/latest/}{\LaTeX{}Tools}
\item<5-> \textit{Atom}: \href{https://atom.io/packages/latex}{\LaTeX{}apm}
\end{itemize}
}
\frame{\frametitle{Lots of \LaTeX{} IDE's}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-\linewidth/20}
\begin{itemize}
\item<1-> \faWindows{} \faApple{} \faLinux{} TeXstudio
\item<2-> \faWindows{} \faApple{} \faLinux{} Texmaker
\item<3-> \faWindows{} \faApple{} \faLinux{} LyX
\item<4-> \faApple{} MacTeX
\item<5-> \faWindows{} MiKTeX
\item<6-> \faLinux{} TeX Live
\end{itemize}
\column{\linewidth/2-\linewidth/20}
\includegraphics[width=\linewidth]{texstudio.png}<1>
\includegraphics[width=\linewidth]{texmaker.png}<2>
\includegraphics[width=\linewidth]{lyx.png}<3>
\includegraphics[width=\linewidth]{mactex.png}<4>
\includegraphics[width=\linewidth]{miktex.png}<5>
\end{columns}
}
\frame{\frametitle{Online collaborative options}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-\linewidth/20}
\begin{itemize}
\item<1-> Overleaf/ShareLaTeX
\item<2-> Authorea
\item<3-> There are others which I have no experience with.
\end{itemize}
\column{\linewidth/2-\linewidth/20}
\includegraphics[width=\linewidth]{overleaf.png}<1>
\includegraphics[width=\linewidth]{authorea.jpg}<2>
\end{columns}
}
\section{Basics and Principles}
\frame{\frametitle{Learn to love braces}
\includegraphics[width=\textwidth-5pt]{xkcd.png}
\footnotetext{With apologies to Randall Munroe}
}
\frame[containsverbatim]{\frametitle{Commands and Environments}
\begin{LTXexample}
Uncentered
\end{LTXexample}
\begin{LTXexample}
\begin{center}
Centered Environment
\end{center}
\end{LTXexample}
\begin{LTXexample}
\centering
Command Centered
\end{LTXexample}
}
\frame{\frametitle{The Logical Structure of a \LaTeX\ Document}
\begin{block}{Preamble}
\begin{itemize}
\item<1-> Declare the document type you will be making: \\
\textbackslash{}documentclass[options]\{class\}
\item<2-> Declare what packages you will need: \\
\textbackslash{}usepackage[options]\{package\}
\item<3-> Define any custom functions or environments
\item<4-> Declare important variables
\end{itemize}
\end{block}
}
\begin{frame}{The Logical Structure of a \LaTeX\ Document cont'd}
\begin{block}{Body}
\begin{itemize}
\item<1-> Initialize the document in an environment\\
\textbackslash{}begin\{document\}\\
\qquad\ldots\\
\textbackslash{}end\{document\}
\item<2-> Within this environment you will:
\begin{itemize}
\item<3-> Create the title page or section:\\
\textbackslash{}maketitle
\item<4-> Write your document
\end{itemize}
\end{itemize}
\end{block}
\end{frame}
\frame[containsverbatim]{\frametitle{The simplest document}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-5mm}
{%
\setlength{\fboxsep}{0pt}%
\setlength{\fboxrule}{1pt}%
\fbox{\includegraphics[width=\linewidth]{hiddensimplestdoc}}
}\\
\column{\linewidth/2-5mm}
\begin{lstlisting}
\documentclass{article}
\usepackage{lipsum}
\title{The simplest}
\author{Wes Honeycutt}
\begin{document}
\maketitle
\lipsum[1]
\end{document}
\end{lstlisting}
\end{columns}
}
\frame{\frametitle{Making the \textbackslash{}maketitle}
The title can include several elements, which are declared by the user.
\begin{itemize}
\item<2-> \textbackslash{}title\{The Title\}
\item<3-> \textbackslash{}author\{The Author's Name\}
\begin{itemize}
\item<4-> This can include \textbackslash{}thanks\{Some Institution\}
\end{itemize}
\item<5-> \textbackslash{}subtitle\{A Clever Subtitle\}
\item<6-> \textbackslash{}subject\{A Subject Heading\}
\end{itemize}
}
\frame[containsverbatim]{\frametitle{Our Sample Title Page}
\begin{lstlisting}
\title{The Pitfalls of LaTeX}
\author{
Wesley T. Honeycutt
\thanks{University of Oklahoma Department of Biology}
\and Leon the Cat}
\subtitle{Stackexchange was down and other horror stories}
\subject{A Joke Paper}
\end{lstlisting}
}
\frame{\frametitle{\textbackslash{}documentclass\{article\}}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=1]{hiddentitlearticle}
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=2]{hiddentitlearticle}
\end{columns}
}
\frame{\frametitle{\textbackslash{}documentclass\{scrbook\}}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=1]{hiddentitlescrbook}
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=2]{hiddentitlescrbook}
\end{columns}
}
\frame{\frametitle{\textbackslash{}documentclass\{report\}}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=1]{hiddentitlereport}
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=2]{hiddentitlereport}
\end{columns}
}
\frame{\frametitle{\textbackslash{}documentclass\{elsarticle\}}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=1]{hiddentitleelsarticle}
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=2]{hiddentitleelsarticle}
\end{columns}
}
\frame{\frametitle{Publisher Distributed Classes}
\only<1->{The previous example shows how different classes rearrange the same elements.}
\begin{block}<2->{Academic Publishers}
\begin{center}
Elsevier - \lstinline{elsarticle}\\
Springer - \lstinline{llncs}\\
IEEE - \lstinline{IEEEtran}\\
AMS - \lstinline{amscls}\\
ACS - \lstinline{achemso}
\end{center}
\end{block}
}
\frame{\frametitle{Some More Academic Publishers With Classes}
\begin{itemize}
\item aaai www.aaai.org
\item AAAS/science www.sciencemag.org
\item American Chemical Society Publications
\item Addison-Wesley
\item algebra universalis
\item American Institute of Physics www.aip.org
\item American Meteorological Society www.ametsoc.org
\item American Physical Society authors.aps.org
\item Beech Stave Press
\item Birkhäuser
\item Cambridge University Press
\item CRC
\item Documenta Mathematica www.math.uiuc.edu
\item Docscape
\item Engine House Books
\end{itemize}
}
\frame{\frametitle{Some More Academic Publishers With Classes}
\begin{itemize}
\item Fondo de Cultura Económica
\item Informs joc.pubs.informs.org
\item Institut Mittag-Leffler (Royal Swedish Academy of Sciences)
\item www.arkivformatematik.org
\item IOP (institute of physics) authors.iop.org
\item John Benjamins Publishing Company
\item London Mathematical Society books www.lms.ac.uk
\item Louisiana State University Press
\item Mathematical Association of America www.maa.org
\item National Research Council of Canada
\item Oxford University Press www.oup.co.uk
\item Princeton University Press press.princeton.edu
\item Publications de l'Institut Mathématique (Beograd) www.emis.de
\end{itemize}
}
\frame{\frametitle{Some More Academic Publishers With Classes}
\begin{itemize}
\item SAS Institute
\item SIAM books www.siam.org
\item Springer math www.springer.com
\item Springer physics www.springer.com
\item Thomson Delmar Learning
\item UIT Cambridge
\item Unipress (Institute of High Pressure Physics, Polish Academy of Sciences)
\item www.unipress.waw.pl
\item University of California Press
\item Wiley www.wiley.com
\item William Andrew Publishing
\item World Scientific
\item WordTech
\end{itemize}
}
\section{Tools}
\frame[containsverbatim]{\frametitle{Text Formats}
\begin{LTXexample}
Be \textbf{Bold}!\\
\textit{Italicize}!\\
\underline{Underline} to accentuate!\\
Write with \emph{emphasis}!\\
\end{LTXexample}
}
\frame[containsverbatim]{\frametitle{Font Size}
\begin{LTXexample}
{\Huge I'm shrinking}\\
{\huge I'm shrinking}\\
{\LARGE I'm shrinking}\\
{\Large I'm shrinking}\\
{\large I'm shrinking}\\
{\normalsize I'm shrinking}\\
{\small I'm shrinking}\\
{\footnotesize I'm shrinking}\\
{\scriptsize I'm shrinking}\\
{\tiny I'm shrinking}\\
\end{LTXexample}
}
\frame{\frametitle{Section Hierarchy}
\textbackslash{}section\{The Topmost\}
\qquad\textbackslash{}subsection\{A Little Deeper\}
\qquad\qquad\textbackslash{}subsubsection\{Deeper Still\}
\qquad\qquad\qquad\qquad\qquad\qquad\qquad\qquad\ldots
}
\frame[containsverbatim]{\frametitle{Lists}
\begin{LTXexample}
\begin{itemize}
\item Boomer
\item Sooner
\item Oklahoma
\end{itemize}
\end{LTXexample}
\begin{LTXexample}
\begin{enumerate}
\item Boomer
\item Sooner
\item Oklahoma
\end{enumerate}
\end{LTXexample}
}
\frame[containsverbatim]{\frametitle{Nested Lists}
\begin{LTXexample}
\begin{itemize}
\item Boomer
\begin{itemize}
\item Sooner
\end{itemize}
\item Oklahoma
\end{itemize}
\end{LTXexample}
\begin{LTXexample}
\begin{enumerate}
\item Boomer
\begin{enumerate}
\item Sooner
\end{enumerate}
\item Oklahoma
\end{enumerate}
\end{LTXexample}
}
\frame[containsverbatim]{\frametitle{Exotic Page Sizes}
You can alter the \textbackslash{}geometry of a page.
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-\linewidth/20}
\includegraphics[width=0.9\linewidth]{hiddengeometry}
\column{\linewidth/3*2-\linewidth/20}
\begin{lstlisting}
\documentclass{article}
\usepackage{lipsum}
\usepackage[paperheight=5in,
paperwidth=4in,
margin=0.5in,
heightrounded,
showframe]{geometry}
\begin{document}
\lipsum[1]
\end{document}
\end{lstlisting}
\end{columns}
}
\frame[containsverbatim]{\frametitle{Graphics}
Graphics are included with size information, but not location.
\\
\begin{LTXexample}
\includegraphics[width=0.75\linewidth]{leonbike.png}
\end{LTXexample}
They still need somewhere to go!
}
\frame[containsverbatim]{\frametitle{Graphics Locations}
You can put graphics within containers.\\
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-\linewidth/20}
~\\~\\~\\~\\~\\
\includegraphics[width=\columnwidth]{hiddenleonitemize}
\column{\linewidth/2-\linewidth/20}
\begin{lstlisting}
\documentclass{article}
\usepackage[paperheight=2in,paperwidth=2in,margin=0in]{geometry}
\usepackage{graphicx}
\newcommand*{\meow}{\includegraphics[width=1em]{leon.png}}
\begin{document}
\begin{itemize}
\item[\meow] My cat's name is Leon
\item[\meow] He is a handsome little man
\item[\meow] Also a jerk
\end{itemize}
\end{document}
\end{lstlisting}
\end{columns}
}
\frame{\frametitle{Floats}
Floats hold things for you.
\begin{itemize}
\item<1-> $h$ - Put it about \emph{here}
\item<2-> $t$ - Put it on the \emph{top} of a page
\item<3-> $b$ - Put it on the \emph{bottom} of a page
\item<4-> $p$ - Put it on a dedicated \emph{page}
\item<5-> $!$ - Listen to me you little\ldots
\end{itemize}
\only<6->{Feel free to mix and match.}
\begin{itemize}
\item<7-> $tb$ - Put it on the top or bottom of the page, whatever works
\item<8-> $htbp$ - I don't care where you put it
\item<9-> $h!$ - If you don't put it here I swear to Papa Knuth I will \lstinline{apt remove} you
\end{itemize}
}
\frame[containsverbatim]{\frametitle{Tables}
Tables are made within the \lstinline{tabular} float environment.
\begin{LTXexample}
\begin{tabular}[htbp]{l|c|c|c}
~ & col1 & col2 & col3\\
\hline
row1 & a & b & c \\
row2 & aa & bb & cc \\
row3 & aaa & bbb & ccc \\
\end{tabular}
\end{LTXexample}
}
\frame{\frametitle{These can be as complicated as you want to make them.}
\includegraphics[width=\linewidth]{hiddentable}
}
\frame[containsverbatim]{\frametitle{Math}
\begin{LTXexample}
\begin{equation}
x^2 + y^2 = z^2
\end{equation}
\end{LTXexample}
\begin{LTXexample}
\begin{equation}
\frac{\hbar^2}{2m}\nabla^2\Psi + V(\mathbf{r})\Psi = -i\hbar \frac{\partial\Psi}{\partial t}
\end{equation}
\end{LTXexample}
\begin{LTXexample}
Inline $y = m*x+b$ equations.
\end{LTXexample}
}
\frame[containsverbatim]{\frametitle{Aligned math}
% \begin{LTXexample}
\begin{align*}
0 &= ax^2+bx+c\\
0 &= x^2+\frac{b}{a}x+\frac{c}{a}\\
0 &= x^2+\frac{b}{a}x+\frac{b^2}{4a^2}+\frac{c}{a}-\frac{b^2}{4a^2}\\
\frac{b^2}{4a^2}-\frac{c}{a} &= \left(x+\frac{b}{2a}\right)^2\\
\frac{b^2-4ac}{4a^2} &= \left(x+\frac{b}{2a}\right)^2\\
\frac{\pm \sqrt{b^2-4ac}}{2a} &= x+\frac{b}{2a}\\
\frac{-b\pm \sqrt{b^2-4ac}}{2a} &= x
\end{align*}
% \end{LTXexample}
}
\frame{\frametitle{Citing and Referencing}
\begin{itemize}
\item<1->\LaTeX{}can create perfect bibliographies with \hologo{BibTeX}
\item<2->\hologo{BibTeX} files are sets of information which contain everything relevant to citing a source
\item<3->Most citation managers can export \hologo{BibTeX} files
\end{itemize}
\only
}
\frame[containsverbatim]{\frametitle{A \hologo{BibTeX} Entry}
\begin{lstlisting}
@inproceedings{jacob2016,
series = {20},
title = {Monitoring of {{Carbon Dioxide}} and {{Methane Plumes}} from {{Combined Ground}}-{{Airborne Sensors}}},
volume = {61},
booktitle = {Convection and {{Boyancy Driven Flows}}: {{Environmental}}},
publisher = {{APS}},
author = {Jacob, Jamey and Mitchell, Taylor and Honeycutt, Wesley T. and Materer, Nicholas F. and Clark, Peter},
month = nov,
year = {2016}
}
@phdthesis{dissertation,
address = {Stillwater, Oklahoma},
type = {Dissertation},
title = {Development and {{Applications}} of {{Chemical Sensors}} for the {{Detection}} of {{Atmospheric Carbon Dioxide}} and {{Methane}}},
school = {Oklahoma State University},
author = {Honeycutt, Wesley T.},
month = may,
year = {2017}
}
\end{lstlisting}
}
\frame{\frametitle{I like using Zotero}
\includegraphics[width=\linewidth]{zotero}
}
\frame[containsverbatim]{\frametitle{Now I can easily cite a source.}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=1]{../hiddencitations.pdf}
\column{\linewidth/2}
\begin{lstlisting}
Not only does the illustrious Dr. Honeycutt have a PhD in chemistry~\cite{dissertation}, but he likes to give technical talks~\cite{talk2014, talk2015}. Other people even like giving presentations on his work~\cite{jacob2016}!
\end{lstlisting}
\end{columns}
}
\frame[containsverbatim]{\frametitle{Then we create our bibliography}
\begin{lstlisting}
\bibliographystyle{natbib}
\bibliography{bib}
\end{lstlisting}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=2]{../hiddencitations.pdf}
\column{\linewidth/2}
\includegraphics[width=\linewidth, page=3]{../hiddencitations.pdf}
\end{columns}
}
\section{Advanced Features}
\frame{\frametitle{Super Powerful for Theses}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-\linewidth/20}
Pop a chapter out, boom\ldots{}you got a paper.\\~\\
My last school didn't have a template. So I had to make one myself.\\~\\
But you are lucky! \href{http://www.math.ou.edu/~mgsa/latex.html}{The OU math department has one.}
\column{\linewidth/2-\linewidth/20}
\includegraphics[width=\linewidth]{mathtemplate}
\end{columns}
}
\frame[containsverbatim]{\frametitle{Graphics Generation with TikZ}
High quality vector images can be produced from within LaTeX using a package called TikZ.
Additionally, Inkscape can export TikZ directly.
}
\frame[containsverbatim]{
% This slide breaks indentation convention to fit more on slide.
\begin{lstlisting}[basicstyle=\tiny\tt,]
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25) node [midway,above] {p doped Si};
\draw \metalthree (0,0) rectangle (11,.25) node [midway, color=white]
{Si Substrate};
\draw \oxide (4,3) rectangle (7,4) node [pos=.5,font=\bf\Large] {oxide};
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) node at (2.625,2.5) [align=center] {n-type};
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) node at (8.375,2.5) [align=center] {n-type};
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\draw [->] (1,5) node [above] {Source} -- (2.125,3.5);
\draw [->] (10,5) node [above] {Drain} -- (8.975,3.5);
\draw [->] (5.5,5) node [above] {Gate} -- (5.5,4.5);
\node at (5.5,-.5) [align=center] {$V_{GS} < V_{threshold}$};
\end{tikzpicture}
\end{lstlisting}
}
\frame{\frametitle{MOSFET}
% General n-type mosfet
\begin{adjustbox}{max width=\linewidth}
\begin{tikzpicture}
\draw \pdiff (0,.25) -- (0,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) -- (11,3) -- (11,.25) -- (0,.25) node [midway,above] {p doped Si};
\draw \metalthree (0,0) rectangle (11,.25) node [midway, color=white]
{Si Substrate};
\draw \oxide (4,3) rectangle (7,4) node [pos=.5,font=\bf\Large] {oxide};
\draw \metalone (4,4) rectangle (7,4.5);
\draw \ndiff (4.25,3) -- (1,3) -- (1,2.5) to [out=270,in=180] (1.5,2) -- (3.75,2) to [out=0,in=270] (4.25,2.5) -- (4.25,3) node at (2.625,2.5) [align=center] {n-type};
\draw \ndiff (10,3) -- (6.75,3) -- (6.75,2.5) to [out=270,in=180] (7.25,2) -- (9.5,2) to [out=0,in=270] (10,2.5) -- (10,3) node at (8.375,2.5) [align=center] {n-type};
\draw \metalone (1.25,3) rectangle (3,3.5);
\draw \metalone (8,3) rectangle (9.75,3.5);
\draw [->] (1,5) node [above] {Source} -- (2.125,3.5);
\draw [->] (10,5) node [above] {Drain} -- (8.975,3.5);
\draw [->] (5.5,5) node [above] {Gate} -- (5.5,4.5);
\only<1> {\node at (5.5,-.5) [align=center] {$V_{GS} < V_{threshold}$};}
\only<2-3> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} < V_{GS} - V_{threshold}$};
}
\only<3> {\draw [fill=white] (4.25,3) rectangle (6.75,2.5);
\draw \ndiff (4.25,3) rectangle (6.75,2.5);
}
\only<4-5> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} = V_{GS} - V_{threshold}$};
}
\only<5> {\draw [fill=orange,orange] (4.25,3) rectangle (6.75,2.5);
\draw [fill=white] (4.25,3) -- (4.25,2.65) -- (6.75,3) -- (4.75,3);
\draw \ndiff (4.25,3) -- (4.25,2.65) -- (6.75,3) -- (4.75,3);
}
\only<6-7> {\node at (5.5,-.5) [align=center] {$V_{GS} \geq V_{threshold}$};
\node at (5.5,-1) [align=center] {$V_{DS} > V_{GS} - V_{threshold}$};
}
\only<7> {\draw [fill=orange,orange] (4.25,3) rectangle (6.75,2.5);
\draw [fill=white] (4.25,3) -- (4.25,2.85) -- (6.75,3) -- (4.75,3);
\draw \ndiff (4.25,3) -- (4.25,2.85) -- (6.75,3) -- (4.75,3);
}
\end{tikzpicture}
\end{adjustbox}
}
\frame{\frametitle{Make a Custom Class}
% Show off my fancy executive summary.
\centering
\includegraphics[height=0.9\textheight]{redcedar.pdf}
}
\frame{\frametitle{Make a Custom Class}
\centering
\includegraphics[width=0.9\linewidth]{nipajin.png}\\
\href{https://github.com/ludus-leonis/nipajin}{https://github.com/ludus-leonis/nipajin}
}
\frame{\frametitle{Make a Custom Class}
\centering
\includegraphics[height=0.8\textheight]{liturghie.png}\\
\href{http://www.liturghie.net/}{http://www.liturghie.net/}
}
\frame{\frametitle{Make a Custom Class}
\centering
\includegraphics[height=0.75\textheight]{bible.png}\\
\href{https://github.com/raphink/geneve_1564}{https://github.com/raphink/geneve\_1564}
}
\frame{\frametitle{Make a Custom Class}
\centering
\includegraphics[width=0.9\linewidth]{textbook.jpg}\\
\href{https://github.com/alexisflesch/nexus}{https://github.com/alexisflesch/nexus}
}
\frame[containsverbatim]{\frametitle{Unique Words and Hypenation}
\LaTeX{} automatically hyphenates words in the dictionary. What if you have something that isn't common?
\\~\\
\begin{lstlisting}
\hyphenation{Red-ce-dar May-ap-ple Ok-la-ho-ma che-mo-ther-apy through}
\end{lstlisting}
}
\frame[containsverbatim]{\frametitle{Do calculations}
\LaTeX{}wasn't made for math, but you do have access to registers \ldots
\\~\\
\begin{block}{\textbackslash{}usepackage\{calc\}}
\begin{LTXexample}
\newlength{\mylength}
\setlength{\mylength}{\textwidth}%
\noindent\rule{\mylength}{20pt}
\bigskip
\setlength{\mylength}{\textwidth-1cm}%
\noindent\rule{\mylength}{20pt}
\bigskip
\setlength{\mylength}{\textwidth-80pt+5mm-1bp}%
\noindent\rule{\mylength}{20pt}
\end{LTXexample}
\end{block}
}
\frame[containsverbatim]{\frametitle{Do calculations}
\ldots and floating points.
\\~\\
\begin{block}{\textbackslash{}usepackage\{fp\}}
\begin{LTXexample}
The following arithmetic is easy:
\begin{itemize}
\item \FPeval{\result}{clip(5+6)}%
$5+6=\result$
\item \FPeval{\result}{round(2+3/5*pi,5)}%
$2+3/5\times\pi=\result$
\end{itemize}
\end{LTXexample}
\end{block}
}
\frame{\frametitle{I use math for my consulting invoices.}
\centering
\includegraphics[height=0.9\paperheight]{hiddeninvoice}
}
\frame{\frametitle{\textbackslash{}microtype aka Giving in to typesetting}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth]{hiddengeometry}
\column{\linewidth/2}
\includegraphics[width=\linewidth]{hiddenmicrotype}
\end{columns}
}
\frame{\frametitle{\textbackslash{}microtype aka Giving in to typesetting}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2}
\includegraphics[width=\linewidth]{wordvariant}
\column{\linewidth/2}
\includegraphics[width=\linewidth]{hiddenmicrotype}
\end{columns}
}
\section{Learning More}
\frame{\frametitle{RTFM}
\begin{columns}[onlytextwidth,T]
\column{\linewidth/2-5mm}
The Comprehensive \TeX\ Archive Network is a package repository
\\~\\
This also includes manuals and examples
\column{\linewidth/2-5mm}
\includegraphics[width=\linewidth]{ctan.png}
\end{columns}
}
\frame{\frametitle{When in doubt: Google}
\begin{center}
\only<1-3>{\TeX\ is older than the Happy Meal.\\}
~\\
\only<1>{~\\~\\}
\only<2-3>{Someone has likely experienced your pain.\\}
~\\
\only<2>{~\\}
\only<3>{\href{https://tex.stackexchange.com/}{https://tex.stackexchange.com/}}
\end{center}
}
\frame{\frametitle{At your local library}
\begin{block}{OU libraries has a \LaTeX\ expert:}
\begin{columns}[onlytextwidth,T]
\column{\linewidth-30mm-5mm}
~\\~\\
\textbf{Amanda Schilling}\\
\faChain: \href{https://libraries.ou.edu/departments/stem-services}{Stem Services}
\faPhone: (405) 325-6126
\faEnvelope: \href{mailto:[email protected]}{[email protected]}
~\\
\textbf{Office Hours:} W/Th 8-9am in DAVIS\\
\qquad\qquad M 6-8pm in the Learning Lab
\column{30mm}
\includegraphics[width=30mm]{amanda.jpg}
\end{columns}
\end{block}
}
\frame{\frametitle{At your local library}
\begin{block}{OU libraries has a \LaTeX\ expert:}
\begin{columns}[onlytextwidth,T]
\column{\linewidth-30mm-5mm}
~\\~\\
\textbf{Mark Laufersweiler}\\
\faChain: \href{https://libraries.ou.edu/users/mark-laufersweiler}{Research Data Specialist}
\faPhone: (405) 325-3710
\faEnvelope: \href{mailto:[email protected]}{[email protected]}
\column{30mm}
\includegraphics[width=30mm]{mark.jpg}
\end{columns}
\end{block}
}
\frame{\frametitle{Or contact me}
\begin{block}{I'm just a \LaTeX\ junkie:}
\begin{columns}[onlytextwidth,T]
\column{\linewidth-30mm-5mm}
~\\~\\
\textbf{Wesley T. Honeycutt}\\
\faChain: \href{wesleythoneycutt.com}{Personal Site}
\faPhone: \emph{I have an office phone?}
\faEnvelope: \href{mailto:[email protected]}{[email protected]}
\faGithub: \href{https://github.com/BlueNalgene}{https://github.com/BlueNalgene}
\column{30mm}
\includegraphics[width=30mm]{wes.png}
\end{columns}
\end{block}
}
\end{document}