-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathslides.tex
229 lines (204 loc) · 7.08 KB
/
slides.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
%% -*- latex -*-
\newtoks\nicsroot\directlua{ tex.settoks("nicsroot", os.getenv("NICS_ROOT") or error("NICS_ROOT environment variable has to be set, use the Makefile")) }
\input{\the\nicsroot /src/nics-cached.tex}
\endofdump
\input{\the\nicsroot /src/nics-noncached.tex}
\hypersetup{
pdfauthor={your name or email},
pdftitle={your presentation title},
}
\nicsgrid=0
\begin{document}
\section{Hello world}
\nicstitleslide{images/welcome}{nics cheetsheat}{Look at the PDF and look at the code}
\begin{slide}{Hello world}{This is our first slide}
\begin{nicscolumn}
\nicsheader{Welcome everyone}
\nicspar{We can have some paragraphs without bullet points}
\nicsitem{Or with bullet points}
\begin{nicsindent}
\nicsitem{\just
We can also have indentation for less important stuff inside another item.
Also note that this paragraph is justified and has the same length in each line.
This is pretty nice for long paragraphs, we have the same in books.
}
\nicsitem{\nicsleadword{Lead word} is something that changes the indentation for the rest of the item or paragraph.
Here the ``Lead word'' at the beginning is defined as lead word.
}
\end{nicsindent}
\end{nicscolumn}
\begin{nicscolumn*}{5cm}{0cm}{5cm}
\nicsitem{Absolute positioning is easy with nics}
\nicsitem{\nicslonghbox{You are bound only by your imagination and the papersize of course}}
\nicsmath
\nicsitem{$ e^{i\pi} = -1 $ ... WOW!}
\end{nicscolumn*}
\end{slide}
\begin{slide}{Slide with title, but without sub title}{}
\begin{nicscolumn}
\nicsitem{\mono{Typewriters were awesome, but loud!}}
\nicsitem{\serif{Serif fonts are good for books, maybe not for presentations}}
\nicsitem{\sans{You can be \slant{explicit}, but sans serif fonts are the \bold{default}}}
\nicshrule
\nicspar{\centering centering is easy}
\nicspar{\centering\nicsincludepic[width=3cm]{images/tux}}
\end{nicscolumn}
\end{slide}
\begin{slide}{Skips between paragraphs/items}{}
\begin{nicscolumn}
\nicsitem{Here will be a small skip}
\nicssmallskip
\nicsitem{And then after this a medium skip}
\nicsmedskip
\nicsitem{And finally a big skip}
\nicsbigskip
\nicsitem{Should we also have huge skips? Maybe!}
\end{nicscolumn}
\end{slide}
\begin{slide}{Skips can be automated}{So you don't have to repeat them between every item}
\begin{nicscolumn*}{1cm}{2cm}{2cm}
\nicsheader{\tiny\mono{\bs nicsnoskips}}
\nicsnoskips
\nicsitem{point 1}
\nicsitem{point 2}
\nicsitem{point 3}
\nicsitem{point 4}
\end{nicscolumn*}
\begin{nicscolumn*}{4cm}{2cm}{2cm}
\nicsheader{\tiny\mono{\bs nicssmallskips}}
\nicssmallskips
\nicsitem{point 1}
\nicsitem{point 2}
\nicsitem{point 3}
\nicsitem{point 4}
\end{nicscolumn*}
\begin{nicscolumn*}{7cm}{2cm}{2cm}
\nicsheader{\tiny\mono{\bs nicsmedskips}}
\nicsmedskips
\nicsitem{point 1}
\nicsitem{point 2}
\nicsitem{point 3}
\nicsitem{point 4}
\end{nicscolumn*}
\begin{nicscolumn*}{10cm}{2cm}{2cm}
\nicsheader{\tiny\mono{\bs nicsbigskips}}
\nicsbigskips
\nicsitem{point 1}
\nicsitem{point 2}
\nicsitem{point 3}
\nicsitem{point 4}
\end{nicscolumn*}
\end{slide}
\begin{slide}{Colors}{}
\begin{nicscolumn}
\nicsitem{\textcolor{FireBrick}{hello colors}}
\nicsitem{\textcolor{Coral}{you are all beautiful}}
\nicsitem{\textcolor{ForestGreen}{yes, all of you}}
\nicsitem{\SMALL\url{https://developer.mozilla.org/en-US/docs/Web/CSS/color_value\#Color_keywords}}
\nicsitem{\href{http://www.yellowbearjourneys.com/color_themes/color_closest.html}{\Small \bold{www.yellowbearjourneys.com/color_themes/color_closest.html}}}
\definecolor{customgreen}{HTML}{00D200}
\nicsitem{\textcolor{customgreen}{It's ok to use custom colornames}}
\nicsitem{We have a special style for cmdline: \nicscmdline{$ ls -l}}
\end{nicscolumn}
\end{slide}
\nicsgrid=1
\begin{slide}{Font sizes}{}
\begin{nicscolumn*}{5cm}{0cm}{10cm}
\def\example#1{#1\nicsitem{\string#1}}
\example{\TINY}
\example{\Tiny}
\example{\tiny}
\example{\SMALL}
\example{\Small}
\example{\small}
\example{\normalsize}
\example{\large}
\example{\Large}
\example{\LARGE}
\example{\huge}
\example{\Huge}
\example{\HUGE}
\end{nicscolumn*}
\end{slide}
\nicsgrid=0
\begin{slide}{Terminals}{We have an escape character to \LaTeX, so you can do fancy stuff}
\begin{nicscolumn}
\nicsmath
\begin{nicsterm}
59676@15:09 errge@brooks:~/work/nics-hello/demo $ §\nicstermcmd{ls -l}
total 988
§\textcolor{red}{d}§rwxr-xr-x 1 errge errge 138 Jun 13 15:09 build
drwxr-xr-x 1 errge errge 36 Jun 13 14:59 images
-rw-r--r-- 1 errge errge 63 Jun 13 13:47 Makefile
-rw-r--r-- 1 errge errge 1001300 Jun 13 15:09 slides.pdf
-rw-r--r-- 1 errge errge 3880 Jun 13 15:09 slides.tex
59677@15:09 errge@brooks:~/work/nics-hello/demo $ §\nicstermcursor\ $e^{i\pi}$
\end{nicsterm}
\end{nicscolumn}
\end{slide}
\begin{slide}{Code}{Without syntax highlighting}
\begin{nicscolumn}
\nicsitem{It's the same as terminals, but with light color scheme}
\nicsitem{Terminals and codes (and other parts too) can also be zoomed}
\nicszoom[4cm]{
\begin{nicscode}
int main() {
return 0;
}
\end{nicscode}
}
\nicszoomnoautocenter1
\nicszoom[3cm]{
\begin{nicscode}
int main() {
return 0;
}
\end{nicscode}
}
\end{nicscolumn}
\begin{nicscolumn*}{7cm}{5.5cm}{2cm}
\nicszoom{\nicsmultiline{zooming \\ defaults \\ to \\ horizontal \\ size}}
\end{nicscolumn*}
\end{slide}
\begin{slide}{Externalization}{For TikZ}
\begin{nicscolumn}
\nicsexterntemplate{tikz}
\begin{nicsextern}{nics-is-awesome}
\begin{tikzpicture}
\node (left) [ circle, draw = black, minimum width = 4cm, label=left:{\nicsmultiline{has \\ source \\ code}} ] {};
\node (right) [ circle, draw = black, minimum width = 4cm, label=right:{\nicsmultiline{looks \\ nice}}, right=-1.5cm of left ] {};
\node at ([xshift=-5mm] left.center) { RST/MD };
\node at ([xshift=7mm] right.center) { PowerPoint };
\node at ($ (left)!0.5!(right) $) [text = Tomato ] { nics };
\end{tikzpicture}
\end{nicsextern}
\end{nicscolumn}
\end{slide}
\section{Externalization}
\begin{slide}{Externalization}{For slow to import images}
\begin{nicscolumn}[3cm]
\begin{nicsextern}{}
\nicsincludepic{images/tux}
\end{nicsextern}
\end{nicscolumn}
\end{slide}
\begin{slide}{Externalization}{For source code highglighting}
\begin{nicscolumn}
\nicsitem{This is our killer-app compared to Google Slides/Powerpoint}
\nicsexterncode{go}
\begin{nicsextern}[height=5.5cm]{}
package main
func main() {
b := string(96) §\sans{\bold{hello}, we escaped}
print(p, b, p, b)
}
const p = `package main
func main() {
b := string(96)
print(p, b, p, b)
}
const p = `
\end{nicsextern}
\end{nicscolumn}
\end{slide}
\end{document}