Skip to content

Commit

Permalink
Merge pull request #728 from MetaCoq/coqdocjs
Browse files Browse the repository at this point in the history
Use coqdocjs
  • Loading branch information
mattam82 authored Jul 4, 2022
2 parents 084e938 + d8315bb commit 5f3f703
Show file tree
Hide file tree
Showing 7 changed files with 541 additions and 17 deletions.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ uninstall: all
$(MAKE) -C translations uninstall

html: all
"coqdoc" --multi-index -toc -utf8 -interpolate -l -html \
"coqdoc" --multi-index -toc -utf8 -html \
--with-header ./html/resources/header.html --with-footer ./html/resources/footer.html \
-R template-coq/theories MetaCoq.Template \
-R pcuic/theories MetaCoq.PCUIC \
-R safechecker/theories MetaCoq.SafeChecker \
Expand Down
72 changes: 72 additions & 0 deletions html/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
var coqdocjs = coqdocjs || {};

coqdocjs.repl = {
"fun": "λ",
"forall": "∀",
"exists": "∃",
"~": "¬",
"/\\": "∧",
"\\/": "∨",
"->": "→",
"<-": "←",
"<->": "↔",
"=>": "⇒",
"<>": "≠",
"<=": "≤",
">=": "≥",
"el": "∈",
"nel": "∉",
"<<=": "⊆",
"<<": "⊂",
"|-": "⊢",
"++": "⧺",
"===": "≡",
"=/=": "≢",
"=~=": "≅",
"==>": "⟹",
"lhd": "⊲",
"rhd": "⊳",
"nat": "ℕ",
"alpha": "α",
"beta": "β",
"gamma": "γ",
"delta": "δ",
"epsilon": "ε",
"eta": "η",
"iota": "ι",
"kappa": "κ",
"lambda": "λ",
"mu": "μ",
"nu": "ν",
"lia": "ω",
"phi": "ϕ",
"pi": "π",
"psi": "ψ",
"rho": "ρ",
"sigma": "σ",
"tau": "τ",
"theta": "θ",
"xi": "ξ",
"zeta": "ζ",
"Delta": "Δ",
"Gamma": "Γ",
"Pi": "Π",
"Sigma": "Σ",
"Lia": "Ω",
"Xi": "Ξ"
};

coqdocjs.subscr = {
"0" : "₀",
"1" : "₁",
"2" : "₂",
"3" : "₃",
"4" : "₄",
"5" : "₅",
"6" : "₆",
"7" : "₇",
"8" : "₈",
"9" : "₉",
};

coqdocjs.replInText = ["==>","<=>", "=>", "->", "<-", ":="];
40 changes: 24 additions & 16 deletions html/coqdoc.css
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
body { padding: 0px 0px;
margin: 0px 0px;
margin: 0px 0px;
background-color: white }

#page { display: block;
padding-top: 0px;
margin: 0px 20% 0% 20%;
padding-bottom: 0px; }
padding: 0px;
margin: 0px;
padding-bottom: 10px; }

#header { display: block;
position: relative;
padding: 0;
margin: 10px 0px 0px 0px;
position: relative;
padding: 0;
margin: 0;
vertical-align: middle;
border-bottom-style: solid;
border-width: thin }
Expand Down Expand Up @@ -83,43 +83,48 @@ h4.section {
font-family: sans-serif;
font-size: 100%;
line-height: 125%;
max-width: 50em;
max-width: 40em;
color: black;
padding: 10px;
background-color: #90bdff }

.inlinecode {
display: inline;
/* font-size: 125%; */
/* color: #666666; */
color: #666666;
font-family: monospace }

.doc .inlinecode {
display: inline;
font-size: 120%;
/* color: rgb(30%,30%,70%); */
color: rgb(30%,30%,70%);
font-family: monospace }

.doc .inlinecode .id {
color: rgb(30%,30%,70%);
}

.inlinecodenm {
display: inline;
/* color: #444444; */
color: #444444;
}

.doc .code {
display: inline;
/* font-size: 120%; */
/* color: rgb(30%,30%,70%); */
font-size: 120%;
color: rgb(30%,30%,70%);
font-family: monospace }

.comment {
display: inline;
font-family: monospace;
/* color: rgb(50%,50%,80%); */
color: rgb(50%,50%,80%);
}

.code {
display: block;
padding-left: 15px;
/* padding-left: 15px; */
font-size: 110%;
font-family: monospace;
}

Expand Down Expand Up @@ -225,6 +230,10 @@ tr.infrulemiddle hr {
color: rgb(40%,0%,40%);
}

.id[title="binder"] {
color: rgb(40%,0%,40%);
}

.id[type="definition"] {
color: rgb(0%,40%,0%);
}
Expand Down Expand Up @@ -323,7 +332,6 @@ ul.doclist {
margin-bottom: 0em;
}


.code :target {
border: 2px solid #D4D4D4;
background-color: #e5eecc;
Expand Down
Loading

0 comments on commit 5f3f703

Please sign in to comment.