Commit 0f1efe21 authored by Adam Chlipala's avatar Adam Chlipala

Pretty LaTeX generation

parent 12b4adcf
...@@ -6,3 +6,8 @@ syntax: glob ...@@ -6,3 +6,8 @@ syntax: glob
*.vo *.vo
*/Makefile.coq */Makefile.coq
*/.coq_globals */.coq_globals
*/coqdoc.sty
*/cpdt.*
*/*.log
MODULES := Tactics StackMachine MODULES_NODOC := Tactics
VS := $(MODULES:%=%.v) MODULES_DOC := StackMachine
GLOBALS := .coq_globals MODULES := $(MODULES_NODOC) $(MODULES_DOC)
VS := $(MODULES:%=src/%.v)
VS_DOC := $(MODULES_DOC:%=%.v)
GLOBALS := .coq_globals
.PHONY: coq clean .PHONY: coq clean doc
coq: Makefile.coq coq: Makefile.coq
make -f Makefile.coq make -f Makefile.coq
Makefile.coq: Makefile $(VS) Makefile.coq: Makefile $(VS)
coq_makefile $(VS) \ coq_makefile $(VS) \
COQC = "coqc -impredicative-set -dump-glob $(GLOBALS)" \ COQC = "coqc -I src -impredicative-set \
-dump-glob $(GLOBALS)" \
-o Makefile.coq -o Makefile.coq
clean:: Makefile.coq clean:: Makefile.coq
make -f Makefile.coq clean make -f Makefile.coq clean
rm -f Makefile.coq .depend rm -f Makefile.coq .depend $(GLOBALS) \
latex/*.sty latex/cpdt.*
doc: latex/cpdt.dvi
latex/cpdt.tex: $(VS)
cd src ; coqdoc --latex $(VS_DOC) \
-o ../latex/cpdt.tex
latex/cpdt.dvi: latex/cpdt.tex
cd latex ; latex cpdt
...@@ -7,14 +7,18 @@ ...@@ -7,14 +7,18 @@
* http://creativecommons.org/licenses/by-nc-nd/3.0/ * http://creativecommons.org/licenses/by-nc-nd/3.0/
*) *)
(* begin hide *)
Require Import List. Require Import List.
Require Import Tactics. Require Import Tactics.
(* end hide *)
(** * Arithmetic expressions over natural numbers *) (** * Arithmetic expressions over natural numbers *)
(* begin hide *)
Module Nat. Module Nat.
(* end hide *)
(** ** Source language *) (** ** Source language *)
Inductive binop : Set := Plus | Times. Inductive binop : Set := Plus | Times.
...@@ -112,4 +116,6 @@ Module Nat. ...@@ -112,4 +116,6 @@ Module Nat.
reflexivity. reflexivity.
Qed. Qed.
(* begin hide *)
End Nat. End Nat.
(* end hide *)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment