Skip to content

Commit

Permalink
Replace PDF manual with html asciidoc one
Browse files Browse the repository at this point in the history
As a checked in manual, the html version should be much more git-friendly
than a binary PDF file.

Also fix a sail documentation bug with empty filenames
  • Loading branch information
Alasdair committed Dec 5, 2023
1 parent 3c0faed commit 9d3493a
Show file tree
Hide file tree
Showing 8 changed files with 6,060 additions and 5 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ clean:

asciidoc:
$(MAKE) -C doc/asciidoc
cp doc/asciidoc/manual.html manual.html

docker:
docker build --tag sail:0.1 .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ descriptions of the current state.
This repository contains the implementation of Sail, together with
some Sail specifications and related tools.

* A manual, [manual.pdf](manual.pdf) with source (in [doc/](doc/))
* A manual, [manual.html](manual.html) with source (in [doc/](doc/))

* The Sail source code (in [src/](src/))

Expand Down
7 changes: 6 additions & 1 deletion doc/asciidoc/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
SAIL_LOGO_PATH ?= etc/logo/sail_logo_square.png

SAIL_PLUGIN ?= asciidoctor-sail

SAIL_DOCS = sail_doc/riscv_duopod.json
Expand Down Expand Up @@ -64,7 +66,10 @@ parser.txt: ../../src/lib/parser.mly parser.sed
manual.pdf: *.adoc $(SAIL_DOCS) $(INCS) $(TIKZ_FIGURES) parser.txt
asciidoctor-pdf manual.adoc -r $(SAIL_PLUGIN) -r asciidoctor-bibtex

manual.html: *.adoc $(SAIL_DOCS) $(INCS) $(TIKZ_FIGURES) parser.txt manual.css sail_logo_square.png
docinfo.html: docinfo.template
sed 's/SAIL_LOGO_PATH/$(shell echo $(SAIL_LOGO_PATH) | sed 's/\//\\\//g')/' $< > $@

manual.html: *.adoc $(SAIL_DOCS) $(INCS) $(TIKZ_FIGURES) parser.txt manual.css docinfo.html
asciidoctor manual.adoc -r $(SAIL_PLUGIN) -r asciidoctor-bibtex

.PHONY: clean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<script>
document.addEventListener("DOMContentLoaded", () => {
var image = document.createElement('img')
image.setAttribute('src', 'sail_logo_square.png')
image.setAttribute('src', 'SAIL_LOGO_PATH')
image.setAttribute('alt', 'Sail Logo')
image.classList.add('logo')
var toc = document.querySelector('#toc')
Expand Down
2 changes: 1 addition & 1 deletion doc/asciidoc/language.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ assert(x @ y == 0xFFFF_0000);
----

For historical reasons the `bit` type is not equal to `bits(1)`, and
while this does simplify na&iuml;vely mapping the bits type into a (very
while this does simplify naively mapping the bits type into a (very
inefficient!) representation like `bit list` in Isabelle or OCaml, it
might be something we reconsider in the future.

Expand Down
Loading

0 comments on commit 9d3493a

Please sign in to comment.