Skip to content

Commit 9b5f662

Browse files
authored
Revising specs in preparation for FPWD. (#626)
Adding single page bikeshed wrapper build of core spec. Adding katex conversion. Adding front matter. Switching to more current version of bikeshed.
1 parent 17c445d commit 9b5f662

23 files changed

Lines changed: 1106 additions & 25 deletions

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "document/core/util/katex"]
2+
path = document/core/util/katex
3+
url = https://github.com/Khan/KaTeX.git

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
language: c++
2+
language: python
3+
python:
4+
- "2.7"
25

36
sudo: on
47

58
install:
69
- ./interpreter/meta/travis/install-ocaml.sh
710
- sudo pip install sphinx
811
- sudo apt-get install texlive-full
12+
- git clone https://github.com/tabatkins/bikeshed.git
13+
- pip install --editable $PWD/bikeshed
14+
- bikeshed update
915

1016
script:
1117
- ./interpreter/meta/travis/build-test.sh

document/core/Makefile

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ usage:
2626
@echo "Please use \`make <target>' where <target> is one of"
2727
@echo " html to make standalone HTML files"
2828
@echo " pdf to make standalone PDF file"
29-
@echo " all to make both"
29+
@echo " bikeshed to make a bikeshed wrapped single large HTML file"
30+
@echo " all to make all 3"
3031
@echo " publish to make all and push to gh-pages"
3132
@echo " help to see more options"
3233

@@ -35,7 +36,8 @@ help:
3536
@echo "Usage: \`make <target>' where <target> is one of"
3637
@echo " html to make standalone HTML files"
3738
@echo " pdf to make standalone PDF file"
38-
@echo " all to make both"
39+
@echo " bikeshed to make a bikeshed wrapped single large HTML file"
40+
@echo " all to make all 3"
3941
@echo " publish to make all and push to gh-pages"
4042
@echo " dirhtml to make HTML files named index.html in directories"
4143
@echo " singlehtml to make a single large HTML file"
@@ -72,12 +74,12 @@ publish:
7274
(cd ..; make publish-core)
7375

7476
.PHONY: all
75-
all: pdf html
77+
all: pdf html bikeshed
7678

7779
.PHONY: pdf
7880
pdf: latexpdf
79-
mkdir -p $(BUILDDIR)/html/$(DOWNLOADDIR)
80-
ln -f $(BUILDDIR)/latex/$(NAME).pdf $(BUILDDIR)/html/$(DOWNLOADDIR)/$(NAME).pdf
81+
mkdir -p $(BUILDDIR)/html/multipage/$(DOWNLOADDIR)
82+
ln -f $(BUILDDIR)/latex/$(NAME).pdf $(BUILDDIR)/html/multipage/$(DOWNLOADDIR)/$(NAME).pdf
8183

8284

8385
.PHONY: clean
@@ -87,15 +89,15 @@ clean:
8789

8890
.PHONY: html
8991
html:
90-
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
91-
for file in `ls $(BUILDDIR)/html/*.html`; \
92+
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html/multipage
93+
for file in `ls $(BUILDDIR)/html/multipage/*.html`; \
9294
do \
9395
sed s:BASEDIR:.:g <$$file >$$file.out; \
9496
mv -f $$file.out $$file; \
9597
sed s~$(OLDMATHJAX)~$(NEWMATHJAX)~g <$$file >$$file.out; \
9698
mv -f $$file.out $$file; \
9799
done
98-
for file in `ls $(BUILDDIR)/html/*/*.html`; \
100+
for file in `ls $(BUILDDIR)/html/multipage/*/*.html`; \
99101
do \
100102
sed s:BASEDIR:..:g <$$file >$$file.out; \
101103
sed 's; <body; <script type="text/javascript">MathJax.Hub.Config({TeX: {MAXBUFFER: 30*1024}})</script><body;' \
@@ -105,7 +107,7 @@ html:
105107
mv -f $$file.out $$file; \
106108
done
107109
@echo
108-
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html."
110+
@echo "Build finished. The HTML pages are in `pwd`/$(BUILDDIR)/html/multipage."
109111

110112
.PHONY: dirhtml
111113
dirhtml:
@@ -119,6 +121,23 @@ singlehtml:
119121
@echo
120122
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
121123

124+
.PHONY: bikeshed
125+
bikeshed:
126+
$(SPHINXBUILD) -b singlehtml -c util/bikeshed \
127+
$(ALLSPHINXOPTS) $(BUILDDIR)/bikeshed_singlehtml
128+
mkdir -p $(BUILDDIR)/bikeshed_mathjax/
129+
cp index.bs $(BUILDDIR)/bikeshed_mathjax/
130+
bikeshed spec index.bs $(BUILDDIR)/bikeshed_mathjax/index.html
131+
mkdir -p $(BUILDDIR)/html/bikeshed/
132+
python util/mathjax2katex.py $(BUILDDIR)/bikeshed_mathjax/index.html \
133+
>$(BUILDDIR)/html/bikeshed/index.html
134+
mkdir -p $(BUILDDIR)/html/bikeshed/katex/dist/
135+
cp -r util/katex/dist/* $(BUILDDIR)/html/bikeshed/katex/dist/
136+
patch -p0 $(BUILDDIR)/html/bikeshed/katex/dist/katex.css \
137+
< util/katex_fix.patch
138+
@echo
139+
@echo "Build finished. The HTML page is in $(BUILDDIR)/html/bikeshed."
140+
122141
.PHONY: pickle
123142
pickle:
124143
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle

document/core/copyright.include

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © [YEAR] <a href="http://www.w3.org/"><abbr title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a href="http://www.csail.mit.edu/"><abbr title="Massachusetts Institute of Technology">MIT</abbr></a>, <a href="http://www.ercim.eu/"><abbr title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>, <a href="http://www.keio.ac.jp/">Keio</a>, <a href="http://ev.buaa.edu.cn/">Beihang</a>). W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>, <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a> and <a href="http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document">permissive document license</a> rules apply.

document/core/footer.include

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
</main>
2+
<h2 id="conformance" class="no-ref no-num">
3+
Conformance</h2>
4+
5+
<h3 id="document-conventions">
6+
Document conventions</h3>
7+
8+
<p>Conformance requirements are expressed with a combination of
9+
descriptive assertions and RFC 2119 terminology. The key words “MUST”,
10+
“MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
11+
“RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
12+
document are to be interpreted as described in RFC 2119.
13+
However, for readability, these words do not appear in all uppercase
14+
letters in this specification.
15+
16+
<p>All of the text of this specification is normative except sections
17+
explicitly marked as non-normative, examples, and notes. [[!RFC2119]]
18+
19+
<p>Examples in this specification are introduced with the words “for example”
20+
or are set apart from the normative text with <code>class="example"</code>,
21+
like this:
22+
23+
<div class="example">
24+
<p>This is an example of an informative example.
25+
</div>
26+
27+
<p>Informative notes begin with the word “Note” and are set apart from the
28+
normative text with <code>class="note"</code>, like this:
29+
30+
<p class="note">Note, this is an informative note.
31+
32+
</body>
33+
<script src="https://www.w3.org/scripts/TR/2016/fixup.js"></script>
34+
</html>

document/core/header.include

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5+
<title>[TITLE]</title>
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<meta name="w3c-status" content="[STATUS]">
8+
<meta name="abstract" content="[ABSTRACTATTR]">
9+
<link href="../default.css" rel=stylesheet type="text/css">
10+
<link href="[W3C-STYLESHEET-URL]" rel=stylesheet type="text/css">
11+
</head>
12+
<body class="h-entry">
13+
<div class="head">
14+
<p data-fill-with="logo"></p>
15+
<h1 id="title" class="p-name no-ref">[TITLE]</h1>
16+
<h2 id="subtitle" class="no-num no-toc no-ref">[LONGSTATUS],
17+
<time class="dt-updated" datetime="[ISODATE]">[DATE]</time></h2>
18+
<div data-fill-with="spec-metadata"></div>
19+
<div data-fill-with="warning"></div>
20+
<p class='copyright' data-fill-with='copyright'></p>
21+
<hr title="Separator for header">
22+
</div>
23+
24+
<div class="p-summary" data-fill-with="abstract"></div>
25+
26+
<h2 class='no-num no-toc no-ref' id='status'>Status of this document</h2>
27+
<div data-fill-with="status"></div>
28+
<div data-fill-with="at-risk"></div>
29+
30+
<nav data-fill-with="table-of-contents" id="toc"></nav>
31+
<main>

document/core/index.bs

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<pre class='metadata'>
2+
Title: WebAssembly Core Specification
3+
Shortname: wasm-core
4+
Group: WebAssembly Working Group
5+
Status: w3c/FPWD
6+
Level: 1
7+
TR: https://www.w3.org/TR/2018/WD-wasm-core-1/
8+
ED: https://webassembly.github.io/spec/core/
9+
Editor: Andreas Rossberg (Dfinity Stiftung)
10+
Repository: WebAssembly/spec
11+
Markup Shorthands: css no, markdown yes, algorithm no
12+
Abstract: This document describes version 1.0 of the core WebAssembly standard, a safe, portable, low-level code format designed for efficient execution and compact representation. To be used in coordination with the <a href="https://www.w3.org/TR/2018/WD-wasm-js-api-1/">WebAssembly JavaScript Interface</a> and the <a href="https://www.w3.org/TR/2018/WD-wasm-web-api-1/">WebAssembly Web API</a>.
13+
</pre>
14+
15+
<pre class='biblio'>
16+
{
17+
"WEBASSEMBLY": {
18+
"href": "https://webassembly.github.io/spec/",
19+
"title": "WebAssembly Specification",
20+
"publisher": "W3C WebAssembly Community Group",
21+
"status": "Draft"
22+
}
23+
}
24+
</pre>
25+
26+
<div boilerplate='status'>
27+
<p>
28+
This section describes the status of this document at the time of
29+
its publication. Other documents may supersede this document. A list of
30+
current W3C publications and the latest revision of this technical report
31+
can be found in the <a href="https://www.w3.org/TR/">W3C technical reports
32+
index at https://www.w3.org/TR/</a>.
33+
</p>
34+
35+
<p>This document is a <b>First Public Working Draft</b>.</p>
36+
<p>
37+
Publication as a First Public Working Draft does not imply endorsement
38+
by the W3C Membership. This is a draft document and may be updated,
39+
replaced or obsoleted by other documents at any time. It is inappropriate
40+
to cite this document as other than work in progress.
41+
</p>
42+
<p>
43+
<a href="https://github.com/WebAssembly/spec/issues">GitHub Issues</a>
44+
are preferred for discussion of this specification.
45+
All issues and comments are
46+
<a href="https://github.com/WebAssembly/spec/issues?utf8=%E2%9C%93&q=is%3Aissue++">archived</a>.
47+
</p>
48+
<p>This document was produced by the <a href="https://www.w3.org/wasm/">WebAssembly Working Group</a>.</p>
49+
<p>This document was produced by a group operating under the
50+
<a href="https://www.w3.org/Consortium/Patent-Policy/">W3C Patent Policy</a>.
51+
W3C maintains a <a href="https://www.w3.org/2004/01/pp-impl/101196/status" rel="disclosure">public list of any patent disclosures</a> made in
52+
connection with the deliverables of the group; that page also includes
53+
instructions for disclosing a patent. An individual who has actual
54+
knowledge of a patent which the individual believes contains
55+
<a href="https://www.w3.org/Consortium/Patent-Policy/#def-essential">Essential Claim(s)</a> must disclose the information in accordance with <a href="https://www.w3.org/Consortium/Patent-Policy/#sec-Disclosure">section
56+
6 of the W3C Patent Policy</a>.
57+
</p>
58+
<p>This document is governed by the <a href="https://www.w3.org/2018/Process-20180201/" id="w3c_process_revision">1 February 2018 W3C Process Document</a>. </p>
59+
<p></p>
60+
61+
</div>
62+
63+
<pre class=include>
64+
path: _build/bikeshed_singlehtml/index.html
65+
</pre>

0 commit comments

Comments
 (0)