diff --git a/Makefile b/Makefile index a57223d..9b00a98 100644 --- a/Makefile +++ b/Makefile @@ -1,25 +1,30 @@ # This file is under the public domain. sec = coope.tex \ + coope.bib \ sec/class-like.tex \ sec/encap-hacks.tex \ sec/hacking-proto.tex \ sec/licenses.tex -.PHONY: default pdf dvi +src = coope.tex +aux = coope.aux + +.PHONY: default pdf dvi clean default: pdf dvi -pdf: coope.pdf -dvi: coope.dvi -# intentionally two-pass -%.pdf: $(sec) - pdflatex $< $@ - pdflatex $< $@ +pdf: $(sec) + pdflatex $(src) + bibtex $(aux) + pdflatex $(src) + pdflatex $(src) -%.dvi: $(sec) - latex $< $@ - latex $< $@ +dvi: $(sec) + latex $(src) + bibtex $(aux) + latex $(src) + latex $(src) clean: rm -f coope.{pdf,dvi} diff --git a/coope.bib b/coope.bib new file mode 100644 index 0000000..e907e38 --- /dev/null +++ b/coope.bib @@ -0,0 +1,8 @@ +@manual{es5-call, + organization = "ECMA International", + title = "ECMA-262", + edition = "5.1", + year = "2011", + month = "Jun", + note = "Section 10.4.3" +} diff --git a/coope.sty b/coope.sty index 0d9cbd2..5ba1eab 100644 --- a/coope.sty +++ b/coope.sty @@ -6,6 +6,7 @@ \usepackage{listings} \usepackage{color} \usepackage{hyperref} +\usepackage{cite} \hypersetup{colorlinks, citecolor=black, diff --git a/coope.tex b/coope.tex index 7642bff..96c78d4 100644 --- a/coope.tex +++ b/coope.tex @@ -41,4 +41,7 @@ \input{sec/encap-hacks} \input{sec/licenses} +\bibliographystyle{plain} +\bibliography{coope} + \end{document} diff --git a/sec/encap-hacks.tex b/sec/encap-hacks.tex index a443c63..9a2134f 100644 --- a/sec/encap-hacks.tex +++ b/sec/encap-hacks.tex @@ -254,8 +254,7 @@ from within the constructor, is bound to the new instance when invoked with the properties of \keyword{this} from within the constructor without any problems. What, then, happens if the constructor is invoked \emph{without} the keyword? \keyword{this} would instead be bound (according to the ECMAScript -standard\footnote{See ECMAScript Language Specification, ECMA-262 5.1 Edition, -Section 1.4.3 on pg 58.}) to ``the global object'',\footnote{In most browser +standard\cite{es5-call}) to ``the global object'',\footnote{In most browser environments, the global object is \var{window}.} unless in strict mode. This is dangerous: