Compare commits
10 Commits
ac7c9b9c01
...
3ddc2fa572
Author | SHA1 | Date |
---|---|---|
Peter H. Fröhlich | 3ddc2fa572 | |
Peter H. Fröhlich | 82aae9939e | |
Peter H. Fröhlich | 2610d3d878 | |
Peter H. Fröhlich | f9e9d09be1 | |
Peter H. Fröhlich | 37f0ec9b3d | |
Peter H. Fröhlich | 0c43ed3562 | |
Peter H. Fröhlich | 29fb8eeb07 | |
Peter H. Fröhlich | b984cf567e | |
Peter H. Fröhlich | 650c12470b | |
Peter H. Fröhlich | fcc762afb9 |
|
@ -25,15 +25,6 @@ paperheight=9in,
|
|||
\definecolor{darkred}{rgb}{0.5,0.0,0.0}
|
||||
\definecolor{lightgray}{gray}{0.75}
|
||||
|
||||
% we want some hypertext stuff please
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
urlcolor=darkblue,
|
||||
citecolor=darkred,
|
||||
linkcolor=darkgreen,
|
||||
}
|
||||
|
||||
% switch to a different font
|
||||
\usepackage{fouriernc}
|
||||
|
||||
|
@ -68,9 +59,22 @@ linkcolor=darkgreen,
|
|||
\usepackage{lipsum}
|
||||
\usepackage{blindtext}
|
||||
|
||||
% a silly abbreviated I needed to import something
|
||||
% smarter cross-references that include automatic page-references
|
||||
\usepackage{varioref}
|
||||
|
||||
% a silly abbreviation I needed to import an example
|
||||
\newcommand{\f}{\bfseries}
|
||||
|
||||
% we want some hypertext stuff please
|
||||
% IMPORTANT: !always load hyperref last!
|
||||
\usepackage{hyperref}
|
||||
\hypersetup{
|
||||
colorlinks=true,
|
||||
urlcolor=darkblue,
|
||||
citecolor=darkred,
|
||||
linkcolor=darkgreen,
|
||||
}
|
||||
|
||||
% alright, now we start the actual book :-)
|
||||
\title{\textbf{The Typography of History}\\
|
||||
Lecture Notes for AS.987.123}
|
||||
|
@ -83,8 +87,7 @@ phf@cs.jhu.edu}
|
|||
|
||||
\maketitle
|
||||
|
||||
\chapter*{Preface}
|
||||
\addcontentsline{toc}{chapter}{Preface}
|
||||
\chapter{Preface}
|
||||
|
||||
\lipsum[1]
|
||||
|
||||
|
@ -108,6 +111,7 @@ please \cite{Conway2000,Meyer2000,Huetal2000,LaTeXe,lshort,Gill}.
|
|||
On the other hand, we'd prefer to do some
|
||||
serious Algebraic Topology\index{Algebraic Topology}\index{Topology!Algebraic}
|
||||
instead of Category Theory\index{Category Theory} to figure this out.
|
||||
See Figure~\vref{plot}.
|
||||
|
||||
\section{A Journey of Doom}
|
||||
\lipsum[1-4]
|
||||
|
@ -175,8 +179,11 @@ Level &
|
|||
\centering
|
||||
\includegraphics[width=\textwidth]{plot}
|
||||
\caption{Something silly PyLab plotted for us}
|
||||
\label{plot}
|
||||
\end{figure}
|
||||
\lipsum[3-8]
|
||||
\lipsum[3]
|
||||
Also shown in Figure~\vref{plot} of course.
|
||||
\lipsum[4-8]
|
||||
|
||||
\chapter[Democracy of the Masters]{Democracy of the\\Masters}
|
||||
\lipsum[1-10]
|
||||
|
@ -194,21 +201,22 @@ Level &
|
|||
|
||||
\backmatter
|
||||
|
||||
\newpage
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{chapter}{Bibliography}
|
||||
\bibliography{04-lecture-notes}{}
|
||||
% plain is [2] and full author name, abbrv shortens author
|
||||
% alpha is [Kan02], common in CS books
|
||||
% apalike is [Brooks et al., 2010]
|
||||
\bibliographystyle{plain}
|
||||
%\bibliographystyle{abbrv}
|
||||
%\bibliographystyle{alpha}
|
||||
%\bibliographystyle{apalike}
|
||||
|
||||
\chapter*{Colophone}
|
||||
\addcontentsline{toc}{chapter}{Colophone}
|
||||
\lipsum[2]
|
||||
|
||||
\clearpage
|
||||
\cleardoublepage
|
||||
\phantomsection
|
||||
\addcontentsline{toc}{chapter}{Index}
|
||||
\printindex
|
||||
|
||||
\cleardoublepage
|
||||
\chapter{Colophone}
|
||||
\lipsum[2]
|
||||
|
||||
\end{document}
|
||||
|
|
|
@ -177,7 +177,7 @@ If there are epigrams, there must be meta-epigrams.
|
|||
\item Epigrams scorn detail and make a point: They are a superb high-level documentation.
|
||||
\item Epigrams are more like vitamins than protein.
|
||||
\item Epigrams have extremely low entropy.
|
||||
\item The last epigram? Neither eat nor drink them, snuff epigrams.
|
||||
\item The last epigram? Neither eat nor drink them, snuff epigrams.
|
||||
\end{enumerate}
|
||||
\end{multicols}
|
||||
|
||||
|
|
|
@ -0,0 +1,77 @@
|
|||
\RequirePackage[l2tabu,orthodox]{nag}
|
||||
\RequirePackage{fixltx2e}
|
||||
|
||||
\documentclass[a4paper,12pt]{article}
|
||||
|
||||
\usepackage{fourier}
|
||||
\usepackage{empheq}
|
||||
|
||||
\title{\textbf{Lambdas Everywhere}}
|
||||
\author{Peter H.\ Fr{\"o}hlich\\
|
||||
phf@acm.org}
|
||||
|
||||
\begin{document}
|
||||
|
||||
\maketitle
|
||||
|
||||
\begin{abstract}
|
||||
Tries to show how you can \(\lambda\) it up.
|
||||
Sorry, this is nowhere near complete,
|
||||
but I don't have time for more right now.
|
||||
\end{abstract}
|
||||
|
||||
\section*{Problem 1}
|
||||
|
||||
You can state short fragments like \(S \equiv \lambda nab.a(nab)\) in the text
|
||||
itself.
|
||||
Or you can typeset them more prominently as follows:
|
||||
\[
|
||||
S \equiv \lambda nab.a(nab)
|
||||
\]
|
||||
If need be, you can even number your equations:
|
||||
\begin{equation}
|
||||
S \equiv \lambda nab.a(nab)
|
||||
\label{Slambda}
|
||||
\end{equation}
|
||||
Then you can later refer to equation (\ref{Slambda}) and impress your friends
|
||||
with your \LaTeX{} power.
|
||||
Got a \emph{really} important result? Frame it!
|
||||
\begin{empheq}[box=\fbox]{equation}
|
||||
S \equiv \lambda nab.a(nab)
|
||||
\end{empheq}
|
||||
That's about it for just plain \(\lambda\) expressions.
|
||||
|
||||
\section*{Problem 2}
|
||||
|
||||
One of \emph{many} ways to typeset a derivation.
|
||||
Note the use of ``\(\equiv\)'' for steps that just rename things versus the use
|
||||
of ``\(\to\)'' for reductions.
|
||||
%
|
||||
\begin{align*}
|
||||
S3
|
||||
\equiv {} & (\lambda nab.a(nab)) 3 \\
|
||||
\equiv {} & (\lambda nab.a(nab)) (\lambda sz.s(s(s(z)))) \\
|
||||
\to {} & \lambda ab.a((\lambda sz.s(s(s(z))))ab) \\
|
||||
\to {} & \lambda ab.a((\lambda z.a(a(a(z))))b) \\
|
||||
\to {} & \lambda ab.a(a(a(a(b)))) \\
|
||||
\equiv {} & \lambda sz.s(s(s(s(z)))) \\
|
||||
\equiv {} & 4
|
||||
\end{align*}
|
||||
%
|
||||
If you want to be even clearer, underline the redexes for reductions and use a
|
||||
fancy font for abbreviations:
|
||||
%
|
||||
\begin{align*}
|
||||
\textsf{S3}
|
||||
\equiv {} & (\lambda nab.a(nab)) \textsf{3} \\
|
||||
\equiv {} & (\lambda \underline{n}ab.a(nab)) \underline{(\lambda sz.s(s(s(z))))} \\
|
||||
\to {} & \lambda ab.a((\lambda \underline{s}z.s(s(s(z))))\underline{a}b) \\
|
||||
\to {} & \lambda ab.a((\lambda \underline{z}.a(a(a(z))))\underline{b}) \\
|
||||
\to {} & \lambda ab.a(a(a(a(b)))) \\
|
||||
\equiv {} & \lambda sz.s(s(s(s(z)))) \\
|
||||
\equiv {} & \textsf{4}
|
||||
\end{align*}
|
||||
%
|
||||
And we're done for now.
|
||||
|
||||
\end{document}
|
|
@ -24,7 +24,7 @@
|
|||
% outputs
|
||||
\draw (nand1.output) -- ++(right:1) node [right] {\(Q\)};
|
||||
\draw (nand2.output) -- ++(right:1) node [right] {\(\overline{Q}\)};
|
||||
% input nubs for cross coupling
|
||||
% input nubs for cross coupling
|
||||
\draw (nand1.input 2) -- ++(left:0.5) -- ++(down:0.5) coordinate (x1);
|
||||
\draw (nand2.input 1) -- ++(left:0.5) -- ++(up:0.5) coordinate (x2);
|
||||
% output nubs for cross coupling
|
||||
|
|
24
Makefile
24
Makefile
|
@ -1,5 +1,23 @@
|
|||
all:
|
||||
echo "Not implemented. :-/"
|
||||
TEX=pdflatex
|
||||
BIBTEX=bibtex
|
||||
INDEX=makeindex
|
||||
|
||||
all: 04-lecture-notes.pdf
|
||||
|
||||
# This does a little more work than strictly necessary, but for regular-sized
|
||||
# documents you probably won't notice on today's machines...
|
||||
04-lecture-notes.pdf: 04-lecture-notes.tex 04-lecture-notes.bib plot.pdf
|
||||
$(TEX) $<
|
||||
while ($(BIBTEX) $(basename $<) ; \
|
||||
$(INDEX) $(basename $<) ; \
|
||||
$(TEX) $< ; \
|
||||
grep -q "Rerun to get cross-references" $(basename $<).log ) do true ; \
|
||||
done
|
||||
|
||||
plot.pdf: plot.py
|
||||
python $^
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
rm -rf *.aux *.log *.toc *.lof *.nav *.out *.snm *.lot *.pdf *.bbl *.blg *.dvi *.idx *.ilg *.ind
|
||||
rm -rf *.aux *.log *.toc *.lof *.nav *.out *.snm *.lot *.pdf *.bbl \
|
||||
*.blg *.dvi *.idx *.ilg *.ind
|
||||
|
|
44
README.md
44
README.md
|
@ -8,6 +8,50 @@ at times!
|
|||
Still, if you're willing to learn, you'll be rewarded
|
||||
with almost limitless typographic beauty.
|
||||
|
||||
## Contents
|
||||
|
||||
- **01-minimal-document.tex** is just about the
|
||||
shortest thing that will compile
|
||||
|
||||
- **02-basic-article.tex** shows something more
|
||||
complete; minimal knowledge for a rough term
|
||||
paper I would guess
|
||||
|
||||
- **03-fancier-article.tex** uses some packages
|
||||
to make things look nicer, shows off a basic
|
||||
bibliography; what you'd really want for a
|
||||
moderately decent term paper
|
||||
|
||||
- **04-lecture-notes.tex** and **04-lecture-notes.bib**
|
||||
shows off a more complex document (lecture notes for
|
||||
a fictitious course) and messes with lots of things
|
||||
including chapter headings; shows how an index and an
|
||||
external bibliography can be used; also shows off
|
||||
cross-references in the document
|
||||
|
||||
- **05-color-test.tex** and **jhcolors.sty**
|
||||
demonstrates how to hack a custom style file
|
||||
|
||||
- **26-epigrams.tex** is just another example
|
||||
for laying out a document, a famous one in
|
||||
this case
|
||||
|
||||
- **50-tikz-rs-latch.tex** has a *very* simple
|
||||
TikZ example for drawing a basic circuit
|
||||
|
||||
- **99-basic-presentation.tex** shows how to put
|
||||
together a simple presentation using beamer
|
||||
|
||||
## History
|
||||
|
||||
I wrote most of this stuff for a talk I gave to the
|
||||
Johns Hopkins ACM chapter on 2015/02/12.
|
||||
I didn't get through all the material, never touched
|
||||
writing your own .sty files for example.
|
||||
Let's see if I reprise the talk more frequently now,
|
||||
the last time I recall giving a similar talk was in
|
||||
2007 or so. Yikes!
|
||||
|
||||
## License
|
||||
|
||||
This work is licensed under a Creative Commons
|
||||
|
|
Loading…
Reference in New Issue