Permalink
Browse files

very rough web page

  • Loading branch information...
0 parents commit da1e976cd050c6ef8bd2017e655d66670c747860 David Mazieres committed Sep 11, 2011
Showing with 1,488 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +166 −0 handouts/Exam.mk
  3. +2 −0 handouts/q1/GNUmakefile
  4. +57 −0 handouts/q1/q1.ltx
  5. +333 −0 handouts/quiz.cls
  6. +60 −0 handouts/template.ltx
  7. +7 −0 labs/.gitignore
  8. +109 −0 www/index.html
  9. +152 −0 www/notes/index.html
  10. +206 −0 www/sched/gensched
  11. +218 −0 www/sched/index.html
  12. +88 −0 www/sched/sched.html
  13. BIN www/staff.png
  14. +89 −0 www/style.css
@@ -0,0 +1 @@
+*~
@@ -0,0 +1,166 @@
+#
+# Must define MAIN in file that includes this (e.g., MAIN = q1.ltx)
+# Can define GENFIGS to any extra figures that need to be generated
+# and GENFIGSRC to any source
+# Set PDF=pdf to use pdflatex
+
+ifeq ($(PDF),pdf)
+FIGEXT = pdf
+OUTEXT = pdf
+else
+FIGEXT = eps
+OUTEXT = dvi
+endif
+
+BASE := $(basename $(MAIN))
+SRCEXT := $(patsubst $(BASE).%,%,$(MAIN))
+XFIGS := $(wildcard *.fig)
+DIAFIGS := $(wildcard *.dia)
+TEXFIGS := $(XFIGS:.fig=.tex) # $(DIAFIGS:.dia=.tex)
+BINFIGS := $(XFIGS:.fig=.$(FIGEXT)) $(DIAFIGS:.dia=.$(FIGEXT)) $(GENFIGS)
+TEXFILES := $(sort $(MAIN) $(wildcard *.tex) $(TEXFIGS))
+STYFILES := quiz.cls
+
+JGRAPHS := $(wildcard *.j)
+GGRAPHS := $(wildcard *.gnuplot)
+GRAPHS := $(JGRAPHS.j=.$(FIGEXT)) $(GGRAPHS:.gnuplot=.$(FIGEXT))
+
+ifeq ($(PDF),pdf)
+IMAGESRC := $(wildcard figs/*.gif) $(wildcard figs/*.eps)
+else
+IMAGESRC := $(wildcard figs/*.gif)
+endif
+IMAGEGEN := $(addsuffix .$(FIGEXT), $(basename $(IMAGESRC)))
+IMAGES := $(sort $(IMAGEGEN) $(wildcard figs/*.$(FIGEXT)))
+IMAGEDIST := $(filter-out $(IMAGEGEN), $(IMAGES)) \
+ $(wildcard figs/*.odp) $(wildcard figs/*.ppt)
+
+ifeq ($(PDF),pdf)
+LATEX = pdflatex \\nonstopmode\\input
+else
+LATEX = latex \\nonstopmode\\input
+DVIPS = dvips -j0 -G0 -t letter
+#PS2PDF = GS_OPTIONS=-sPAPERSIZE=letter ps2pdf -sPAPERSIZE=letter
+PS2PDF = ps2pdf
+endif
+
+all: $(BASE).pdf $(BASE)-ans.pdf
+
+ifeq ($(PDF),pdf)
+%.pdf %.tex: %.fig
+ fig2dev -L pdftex -p1 $< > $*.pdf
+ fig2dev -L pdftex_t -p $*.pdf $< > $*.tex
+
+%.pdf: %.eps
+ perl -ne 'exit 1 unless /\n/' $< \
+ || perl -p -i -e 's/\r/\n/g' $<
+ epstopdf --outfile=$@ $<
+
+figs/%.pdf: figs/%.gif
+ convert $< $@
+
+%.ps: %.pdf
+ pdftops $< $@
+
+else
+%.ps: %.dvi
+ $(DVIPS) $< -o $@
+
+%.eps %.tex: %.fig
+ fig2dev -L pstex -p1 $< > $*.eps
+ fig2dev -L pstex_t -p $*.eps $< > $*.tex
+endif
+
+%.eps: %.dia
+ unset DISPLAY; dia -n -e $@ $<
+%.tex: %.dia
+ unset DISPLAY; dia -n -e $@ $<
+%.eps: %.j
+ @rm -f $@~
+ jgraph $< > $@~
+ mv -f $@~ $@
+%.eps: %.gnuplot %.data
+ gnuplot $*.gnuplot
+
+$(STYFILES):
+ rm -f $@
+ ln -s ../$@ .
+
+RERUN = egrep -q '(^LaTeX Warning:|\(natbib\)).* Rerun' $(basename $@).log
+UNDEFINED = egrep -q '^(LaTeX|Package natbib) Warning:.* undefined' \
+ $(basename $@).log
+
+$(BASE).$(OUTEXT) $(BASE)-ans.$(OUTEXT): \
+%.$(OUTEXT): %.$(SRCEXT) $(TEXFILES) $(STYFILES) $(BINFIGS) $(GRAPHS) $(IMAGES)
+ $(LATEX) $< || ! rm -f $@
+ ! $(UNDEFINED) || $(LATEX) $< || ! rm -f $@
+ ! $(RERUN) || $(LATEX) $< || ! rm -f $@
+ ! $(RERUN) || $(LATEX) $< || ! rm -f $@
+ifeq ($(PDF),pdf)
+ touch $*.dvi
+ test ! -f .xpdf-running || xpdf -remote $(BASE)-server -reload
+else
+
+$(BASE).pdf $(BASE)-ans.pdf: %.pdf: %.ps
+ $(PS2PDF) $< $@
+ test ! -f .xpdf-running || xpdf -remote $(BASE)-server -reload
+endif
+
+$(BASE)-ans.$(SRCEXT): ../Exam.mk
+ @rm -f $@~
+ echo '\def\doanswers{root}' > $@~
+ echo '\input{$(MAIN)}' >> $@~
+ mv -f $@~ $@
+
+DIST = GNUmakefile $(MAIN) $(XFIGS) $(DIAFIGS) $(GENFIGSRC) \
+ $(JGRAPHS) $(GGRAPHS) $(GGRAPHS:.gnuplot=:.data) \
+ $(IMAGESRC) $(IMAGEDIST) $(STYFILES)
+dist: $(BASE).tar.gz
+$(BASE).tar.gz: $(DIST) ../Exam.mk
+ tar -chzf $@ -C .. Exam.mk \
+ $(patsubst %, $(notdir $(PWD))/%, $(DIST))
+
+# Create a file called .noans for make preview not to show answers
+PREVIEW := $(BASE)$(shell test -f .noans || echo -ans)
+preview: $(PREVIEW).pdf
+ if test -f .xpdf-running; then \
+ xpdf -remote $(BASE)-server -quit; \
+ sleep 1; \
+ fi
+ touch .xpdf-running
+ (xpdf -remote $(BASE)-server $(PREVIEW).pdf; rm -f .xpdf-running) &
+
+show: $(BASE).pdf
+ xpdf -fullscreen $(BASE).pdf
+
+osx: $(BASE).pdf
+ open $(BASE).pdf
+
+#EXTRAIGNORE = '*.aux' '*.bbl' '*.blg' '*.log' '*.dvi' '*.bak' '*.out'
+ignore:
+ rm -f .gitignore
+ (for file in $(EXTRAIGNORE) \
+ .xpdf-running \
+ $(BASE).tar.gz \
+ $(TEXFIGS) $(BINFIGS) $(GRAPHS) $(IMAGEGEN) \
+ $(BASE).ps $(BASE).pdf '$(BASE)-ans.*' .noans; do \
+ echo "/$$file"; \
+ done; \
+ for file in $(STYFILES); do \
+ test -r $$file -a ! -h $$file || echo /$$file; \
+ done) | sort -u > .gitignore
+ git add .gitignore
+
+clean:
+ rm -f $(BASE).ps $(BASE).pdf $(BASE).tar.gz $(BASE)-ans.*
+ rm -f $(TEXFIGS) $(BINFIGS) $(GRAPHS) $(IMAGEGEN)
+ for sty in $(STYFILES); do \
+ test ! -h $$sty -o ! -f ../$$sty || rm -f $$sty; \
+ done
+ rm -f *.dvi *.aux *.log *.bbl *.blg *.lof *.lot *.toc *.bak *.out
+ rm -f *~ *.core core
+
+always:
+ @:
+
+.PHONY: install clean all always ignore preview show osx dist
@@ -0,0 +1,2 @@
+MAIN = q1.ltx
+include ../Exam.mk
@@ -0,0 +1,57 @@
+% -*-latex-*-
+
+%\documentclass[scpd]{quiz}
+\documentclass{quiz}
+\usepackage{graphics}
+
+%\special{! statusdict /setduplexmode known { statusdict begin false
+%setduplexmode end } if}
+
+
+\title{CS240h \\
+Functional Systems in Haskell \\
+Midterm Exam -- ???, October ??, 2011 \\
+\bigskip
+OPEN BOOK, OPEN NOTES, CLOSED LAPTOP}
+
+\minutes{75}
+
+\advice{
+Some questions may be much harder than others.
+
+Keep your answers concise. We will deduct points for a correct answer
+that also includes incorrect or irrelevant information.
+}
+
+\begin{document}
+
+\section{Basics}
+
+\begin{prob}{10}
+This is a problem.
+\end{prob}
+
+\begin{answer}{2in}
+ This is an answer.
+\end{answer}
+
+\begin{prob}{10}
+What is this?
+\begin{mchoice*}
+ \citem This is a quiz.
+ \citem[\putmccnt{$\beta$}] This is a test. This is only a test. If this had been an
+ actual emergency you would also have heard an audible alarm and seen
+ lots of blinking lights.
+ \citem\relax [pay attention] This is an exam.
+ \item Microsoft is a non-profit organization funded primarily
+ through the generosity of Bill and Melinda Gates.
+\end{mchoice*}
+\end{prob}
+
+\end{document}
+
+% Local Variables:
+% tex-dvi-view-command: "gmake preview ; :"
+% tex-command: "gmake ; :"
+% End:
+
Oops, something went wrong.

0 comments on commit da1e976

Please sign in to comment.