-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 049c1d7
Showing
11 changed files
with
4,092 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
build/ | ||
dev/ | ||
build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2019 Magnus Lie Hetland | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
LATEX=latexmk -norc -pdf -auxdir=build -outdir=build | ||
FIGS=build/hilitefig.pdf build/pausefig.pdf | ||
|
||
doc/pseudo.pdf: build/pseudo.pdf | ||
cp $< $@ | ||
|
||
build/pseudo.pdf: doc/pseudo.tex build/pseudo.bib $(FIGS) | ||
$(LATEX) $< | ||
|
||
build/pseudo.bib: doc/pseudo.bib | ||
cp $< $@ | ||
|
||
build/hilitefig.pdf: doc/fig/hilitefig.tex pseudo.sty | ||
$(LATEX) $< | ||
|
||
build/pausefig.pdf: doc/fig/pausefig.tex pseudo.sty | ||
$(LATEX) $< | ||
|
||
pseudo.sty: VERSION LICENSE doc/pseudo.tex | ||
cat LICENSE | sed -e "s/^/% /" | sed -e "s/^% \$$/%/" > pseudo.sty | ||
echo "%" >> pseudo.sty | ||
cat doc/pseudo.tex | sed -n \ | ||
-e "/\begin{source}/,/\end{source}/{" \ | ||
-e "/\\begin{source}/b" \ | ||
-e "/\\end{source}/b" \ | ||
-e "s/_@@/__pseudo/g" \ | ||
-e "s/@@/__pseudo/g" \ | ||
-e "s/VERSION/$$(cat VERSION)/g" \ | ||
-e "s/DATE/$$(date +"%Y-%m-%d")/g" \ | ||
-e "s/[ ]*%.*\$$//" \ | ||
-e "/^\$$/d" \ | ||
-e "p" \ | ||
-e "}" >> pseudo.sty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
The **pseudo** package permits writing pseudocode without much fuss and with | ||
quite a bit of configurability. Its main environment combines aspects of | ||
`enumeration`, `tabbing` and `tabular` for nonintrusive line numbering, | ||
indentation and highlighting, and there is functionality for typesetting | ||
common syntactic elements such as keywords, identifiers and comments. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
\documentclass[beamer,preview,multi]{standalone} | ||
% \documentclass{beamer} | ||
% \usepackage{mlh} | ||
\usepackage{pseudo} | ||
% \pseudoset{kw, hpad, kwfont=\bfseries} | ||
% \pseudoset{kw, hpad, kwfont=\bfseries} | ||
\pseudoset{hpad} | ||
|
||
\standaloneenv{myenv} | ||
|
||
% XXX My \== gets ruined by the standalone preview option for some reason. | ||
|
||
\begin{document} | ||
|
||
% \begin{standaloneframe} | ||
% \begin{myenv} | ||
% \begin{pseudo}[hpad] <1-3> | ||
% if $x < y$ \\+ <2> [bol=\onslide<2->] | ||
% $\id{foo} = 2$ \\- [hl<3>, bol=\onslide<3->] | ||
% howdy | ||
% \end{pseudo} | ||
% \end{myenv} | ||
% \end{standaloneframe} | ||
|
||
% \begin{standaloneframe} | ||
% \begin{myenv} | ||
% \begin{pseudo} <1,4> | ||
% while $a \neq b$ \\+ <2> | ||
% if $a > b$ \\+ | ||
% $a = a - b$ \\- <3> | ||
% else $b = b - a$ \\- <5> | ||
% return $a$ | ||
% \end{pseudo} | ||
% \end{myenv} | ||
% \end{standaloneframe} | ||
|
||
\begin{standaloneframe} | ||
\begin{myenv} | ||
\begin{pseudo} | ||
<1> Go to line 3 \\ | ||
<3> Go to line 4 \\ | ||
<2> Go to line 2 \\ | ||
<4> Go to line 1 \\ | ||
\end{pseudo} | ||
\end{myenv} | ||
\end{standaloneframe} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
\documentclass[beamer,preview,multi]{standalone} | ||
% \documentclass{beamer} | ||
|
||
% \usepackage[notmath]{sansmathfonts} | ||
% \usepackage{mlh} | ||
\usepackage{pseudo} | ||
% \pseudoset{kw, hpad, kwfont=\bfseries, prfont=\sffamily} | ||
|
||
% \usepackage{expl3,xparse} | ||
% | ||
% \makeatletter | ||
% \ExplSyntaxOn | ||
% | ||
% \int_new:N \g_@@_row_num_int | ||
% | ||
% \cs_new:Nn \@@_onslide: { | ||
% \int_gincr:N \g_@@_row_num_int | ||
% \onslide<\g_@@_row_num_int-> | ||
% } | ||
% | ||
% \NewDocumentCommand \pseudostartslide {} { | ||
% \int_zero:N \g_@@_row_num_int | ||
% } | ||
% | ||
% \cs_set_eq:NN \pseudoonslide \@@_onslide: | ||
% % \cs_set_eq:NN \oldctrcmd \__pseudo_old_counter_cmds: | ||
% | ||
% \ExplSyntaxOff | ||
% \makeatother | ||
|
||
\setbeamercovered{transparent} | ||
\standaloneenv{myenv} | ||
|
||
\begin{document} | ||
|
||
|
||
% \begin{frame} | ||
\begin{standaloneframe} | ||
\begin{myenv} | ||
% XXX Begins on line 2, as it hasn't been incremented yet. And several | ||
% solutions (like \onslide<+-> or \pause) just break down. | ||
% XXX Working on an "uncover" option. Should probably have a similar thing | ||
% that dims out the previous ones -- or maybe even a "dim" key... | ||
% | ||
% XXX Use the suffix package to get the starred versions | ||
\begin{pseudo}[pause] | ||
Eeny \\ | ||
Meeny \\ | ||
Miny \\ | ||
Moe \\ | ||
\end{pseudo} | ||
\end{myenv} | ||
\end{standaloneframe} | ||
% \end{frame} | ||
|
||
\end{document} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@book{Cormen:2009, | ||
author={Thomas H. Cormen and Charles E. Leiserson and Ronald L. Rivest and | ||
Clifford Stein}, | ||
title={Introduction to Algorithms}, | ||
year={2009}, | ||
publisher={MIT Press}, | ||
edition={third} | ||
} | ||
|
||
@book{Graham:1994, | ||
author={Ronald L. Graham and Donald E. Knuth and Oren Patashnik}, | ||
title={Concrete Mathematics}, | ||
subtitle={A Foundation for Computer Science}, | ||
year={1994}, | ||
publisher={Addison\kern.063em-\kern-.1emWesley Professional}, | ||
} | ||
|
||
@book{Williamson:2011, | ||
author={David P. Williamson and David B. Shmoys}, | ||
title={The Design of Approximation Algorithms}, | ||
year={2011}, | ||
publisher={Cambridge University Press}, | ||
url={http://www.designofapproxalgs.com} | ||
} | ||
|
||
@article{Knuth:1975, | ||
title={Random Matroids}, | ||
author={Knuth, Donald E.}, | ||
journal={Discrete Mathematics}, | ||
volume={12}, | ||
number={4}, | ||
pages={341--358}, | ||
year={1975}, | ||
publisher={Elsevier} | ||
} |
Binary file not shown.
Oops, something went wrong.