←back to thread

Open-source Zig book

(www.zigbook.net)
692 points rudedogg | 1 comments | | HN request time: 0.226s | source
Show context
amitav1 ◴[] No.45948070[source]
It looks cool! No experience with Zig so can't comment on the accuracy, but I will take a look at it this week. Also a bit annoying that there is no PDF version that I could download as the website is pretty slow. After taking a look at the repository (https://github.com/zigbook/zigbook/tree/main), each page seems to be written in AsciiDoc, so I'll take a look about compiling a PDF version later today.
replies(1): >>45949754 #
hoshikihao ◴[] No.45949754[source]
If there is a PDF version, please remember to give me one. Thank you in advance.
replies(2): >>45951335 #>>45952010 #
1. forgotpwd16 ◴[] No.45952010[source]
zigbook.pdf => https://files.catbox.moe/gobtw7.pdf

HOWTO: The text can be found per-chapter in `./pages/{chapter}.adoc` but each chapter includes code snippets found in a respective `./chapters-data/code/{chapter}/` subdirectory. So, perhaps a hacky way to do it but quite lazy to fully figure asciidoctor flags, created using a script a combined book.adoc that includes all others with `include::{chapter}.adoc` directives, then run `asciidoctor-pdf -a sourcedir=../chapters-data/code -r asciidoctor-diagram -o book.pdf ./pages/book.adoc`.