From 293f65a459747cd7ee61d845a0122806f2a61397 Mon Sep 17 00:00:00 2001 From: Kevin Broch Date: Thu, 25 Apr 2024 15:29:38 -0700 Subject: [PATCH] Add lists of lists (figures, tables, listings) relates to #43 Signed-off-by: Kevin Broch --- Makefile | 8 +++++++- src/chapter2.adoc | 1 + src/intro.adoc | 28 ++++++++++++++++++++++++++++ src/spec-sample.adoc | 12 ++++++++++++ 4 files changed, 48 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c09d1b5..d64c9f4 100644 --- a/Makefile +++ b/Makefile @@ -18,9 +18,10 @@ DOCS := \ DATE ?= $(shell date +%Y-%m-%d) VERSION ?= v0.0.0 REVMARK ?= Draft +DOCKER_IMG := riscvintl/riscv-docs-base-container-image:latest ifneq ($(SKIP_DOCKER),true) DOCKER_CMD := docker run --rm -v ${PWD}:/build -w /build \ - riscvintl/riscv-docs-base-container-image:latest \ + ${DOCKER_IMG} \ /bin/sh -c DOCKER_QUOTE := " endif @@ -47,6 +48,7 @@ OPTIONS := --trace \ --failure-level=ERROR REQUIRES := --require=asciidoctor-bibtex \ --require=asciidoctor-diagram \ + --require=asciidoctor-lists \ --require=asciidoctor-mathematical .PHONY: all build clean build-container build-no-container build-docs @@ -83,6 +85,10 @@ build-no-container: $(MAKE) SKIP_DOCKER=true build-docs @echo "Build completed successfully." +# Update docker image to latest +docker-pull-latest: + docker pull ${DOCKER_IMG} + clean: @echo "Cleaning up generated files..." rm -rf $(BUILD_DIR) diff --git a/src/chapter2.adoc b/src/chapter2.adoc index 8c11820..856334b 100644 --- a/src/chapter2.adoc +++ b/src/chapter2.adoc @@ -28,6 +28,7 @@ Seriously, multiple. === An example table +.Nonsensical table [cols="^1,^1,^1,^1,^3,^3",stripes=even,options="header"] |=== 4+|Letters _and_ bits {set:cellbgcolor:green} 2+|A much longer area diff --git a/src/intro.adoc b/src/intro.adoc index 0d62327..9b6292b 100644 --- a/src/intro.adoc +++ b/src/intro.adoc @@ -3,6 +3,21 @@ Lorem ipsum indexterm:[Lorem ipsum] dolor sit amet, consectetur adipiscing elit, sed do *eiusmod tempor* incididunt ut labore et dolore magna aliqua. Felis imperdiet proin fermentum leo vel orci porta. Volutpat lacus laoreet non curabitur indexterm:[curabitur] gravida indexterm:[gravida]. Posuere urna nec tincidunt praesent semper feugiat nibh. Elit ``ullamcorper`` dignissim cras tincidunt lobortis. Malesuada fames ac turpis egestas integer eget. Tristique sollicitudin nibh sit amet commodo. Sed felis eget velit aliquet. Sit amet aliquam id diam maecenas ultricies mi. Consectetur purus ut faucibus pulvinar. Lectus urna duis convallis convallis tellus id. Fermentum iaculis eu non diam. Feugiat in fermentum posuere urna nec tincidunt praesent semper feugiat. Urna nec tincidunt praesent semper feugiat nibh. +.Nonsensical code +[source, python] +---- +def banana_apple(): + x = "banana" + y = "apple" + for i in range(len(x)): + print(x[i], y[i]) + z = x + y + return z + +result = banana_apple() +print("Result:", result) +---- + Commodo viverra maecenas accumsan lacus. Vulputate odio ut enim blandit indexterm:[blandit] volutpat maecenas volutpat blandit. Urna porttitor rhoncus dolor purus non. Tellus mauris a diam maecenas sed. Vitae auctor eu augue ut lectus. Ridiculus mus mauris vitae ultricies leo integer. Consequat semper viverra nam *libero* justo laoreet sit amet. Pellentesque pulvinar pellentesque habitant morbi tristique senectus et netus et. Ac placerat vestibulum lectus mauris ``ultrices`` eros in cursus turpis. Accumsan in nisl nisi scelerisque eu ultrices vitae. Cras ornare arcu dui vivamus. Vitae congue mauris rhoncus aenean. Consequat mauris nunc congue nisi vitae suscipit tellus. Tempus egestas sed sed risus pretium quam vulputate dignissim. Quis varius quam quisque id diam vel. Mattis nunc sed blandit libero volutpat sed cras ornare arcu. Amet mauris commodo quis imperdiet massa tincidunt nunc. [NOTE] @@ -13,3 +28,16 @@ The name RISC-V indexterm:[RISC-V] was chosen to represent the fifth major RISC === Sub Section of Introduction Pellentesque habitant morbi *tristique* senectus et netus et. Aliquam purus sit amet luctus. Odio eu ``feugiat`` pretium nibh ipsum consequat nisl vel. Euismod lacinia at quis risus sed vulputate odio ut. Eu sem integer vitae justo eget. Cursus euismod quis viverra nibh. Tempus egestas sed sed risus. Quis imperdiet massa tincidunt nunc pulvinar. Id venenatis a condimentum vitae sapien pellentesque habitant. + +.Nonsensical wavedrom signals +[wavedrom, svg] +.... +{ + "signal": [ + { "name": "Clock", "wave": "P.......P" }, + { "name": "Data", "wave": "x.x..xx.x" }, + { "name": "Control", "wave": "0.1.01..0" }, + { "name": "Error", "wave": "zZzZzZzZz" } + ] +} +.... diff --git a/src/spec-sample.adoc b/src/spec-sample.adoc index d802da6..a624b9b 100644 --- a/src/spec-sample.adoc +++ b/src/spec-sample.adoc @@ -40,6 +40,18 @@ endif::[] :footnote: :xrefstyle: short +[preface] +== List of figures +list-of::image[hide_empty_section=true, enhanced_rendering=true] + +[preface] +== List of tables +list-of::table[hide_empty_section=true, enhanced_rendering=true] + +[preface] +== List of listings +list-of::listing[hide_empty_section=true, enhanced_rendering=true] + [WARNING] .This document is in the link:http://riscv.org/spec-state[Development state] ====