Update the files needed to generate the .pdf and .epub

This commit is contained in:
Edson Brandi 2026-04-22 21:48:00 +00:00
parent f92af5b969
commit 42a979a40e
4 changed files with 23 additions and 23 deletions

View file

@ -56,10 +56,10 @@ sudo apt install -y software-properties-common apt-transport-https ca-certificat
```bash ```bash
# Download the latest pandoc version for Ubuntu # Download the latest pandoc version for Ubuntu
cd /tmp cd /tmp
wget https://github.com/jgm/pandoc/releases/latest/download/pandoc-3.1.11-1-amd64.deb wget https://github.com/jgm/pandoc/releases/download/3.9.0.2/pandoc-3.9.0.2-1-amd64.deb
# Install the downloaded package # Install the downloaded package
sudo dpkg -i pandoc-3.1.11-1-amd64.deb sudo dpkg -i pandoc-3.9.0.2-1-amd64.deb
# If you get dependency errors, fix them # If you get dependency errors, fix them
sudo apt --fix-broken install -y sudo apt --fix-broken install -y
@ -68,7 +68,7 @@ sudo apt --fix-broken install -y
pandoc --version pandoc --version
# Clean up # Clean up
rm -f pandoc-3.1.11-1-amd64.deb rm -f pandoc-3.9.0.2-1-amd64.deb
``` ```
#### 3. **LaTeX Distribution Installation** (with XeLaTeX support) #### 3. **LaTeX Distribution Installation** (with XeLaTeX support)
@ -210,17 +210,17 @@ mkdir -p ~/.local/share/pandoc/templates
# Navigate to the templates directory # Navigate to the templates directory
cd ~/.local/share/pandoc/templates cd ~/.local/share/pandoc/templates
# Download the latest Eisvogel template (version 3.2.0) # Download the latest Eisvogel template (version 3.4.0)
wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.2.0/Eisvogel-3.2.0.tar.gz wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.4.0/Eisvogel-3.4.0.tar.gz
# Extract the downloaded archive # Extract the downloaded archive
tar -xzf Eisvogel-3.2.0.tar.gz tar -xzf Eisvogel-3.4.0.tar.gz
# Copy the main template file to the templates directory # Copy the main template file to the templates directory
cp Eisvogel-3.2.0/eisvogel.latex ./ cp Eisvogel-3.4.0/eisvogel.latex ./
# Clean up temporary files # Clean up temporary files
rm -rf Eisvogel-3.2.0 Eisvogel-3.2.0.tar.gz rm -rf Eisvogel-3.4.0 Eisvogel-3.4.0.tar.gz
# Verify the template is properly installed # Verify the template is properly installed
ls -la eisvogel.latex ls -la eisvogel.latex
@ -595,14 +595,14 @@ ls -la eisvogel.latex
cp eisvogel.latex eisvogel.latex.backup cp eisvogel.latex eisvogel.latex.backup
# Download latest version # Download latest version
wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest/download/Eisvogel-3.2.0.tar.gz wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.4.0/Eisvogel-3.4.0.tar.gz
# Extract and install # Extract and install
tar -xzf Eisvogel-3.2.0.tar.gz tar -xzf Eisvogel-3.4.0.tar.gz
cp Eisvogel-3.2.0/eisvogel.latex ./ cp Eisvogel-3.4.0/eisvogel.latex ./
# Clean up # Clean up
rm -rf Eisvogel-3.2.0 Eisvogel-3.2.0.tar.gz rm -rf Eisvogel-3.4.0 Eisvogel-3.4.0.tar.gz
# Test the new template # Test the new template
cd ~/your-project-directory cd ~/your-project-directory
@ -704,7 +704,7 @@ pandoc $(find content/ -name "*.md" | sort) \
--to=html5 \ --to=html5 \
--standalone \ --standalone \
--embed-resources \ --embed-resources \
--highlight-style=tango \ --syntax-highlighting=tango \
--toc \ --toc \
--toc-depth=2 \ --toc-depth=2 \
--number-sections \ --number-sections \
@ -713,7 +713,7 @@ pandoc $(find content/ -name "*.md" | sort) \
--metadata date="DRAFT Version 1.0 - August, 30th 2025" \ --metadata date="DRAFT Version 1.0 - August, 30th 2025" \
-o public/downloads/freebsd-device-drivers.html -o public/downloads/freebsd-device-drivers.html
**Note**: The `--highlight-style=tango` option provides excellent C language syntax highlighting. Other available styles include: `pygments`, `kate`, `espresso`, `zenburn`, `monochrome`, `breezedark`, and `haddock`. You can list all available styles with `pandoc --list-highlight-styles`. **Note**: The `--syntax-highlighting=tango` option (new name for the deprecated `--highlight-style` flag in recent Pandoc releases) provides excellent C language syntax highlighting. Other available styles include: `pygments`, `kate`, `espresso`, `zenburn`, `monochrome`, `breezedark`, and `haddock`. You can list all available styles with `pandoc --list-highlight-styles`.
``` ```
### HTML5 vs PDF Comparison ### HTML5 vs PDF Comparison
@ -742,7 +742,7 @@ If you encounter issues:
1. Check the troubleshooting section above 1. Check the troubleshooting section above
2. Verify all prerequisites are installed 2. Verify all prerequisites are installed
3. Check the Eisvogel documentation in `Eisvogel-3.2.0/README.md` 3. Check the Eisvogel documentation in `Eisvogel-3.4.0/README.md`
The build system is designed to be robust and provide clear error messages to help resolve any issues quickly. The build system is designed to be robust and provide clear error messages to help resolve any issues quickly.

View file

@ -55,7 +55,7 @@ cd "$ROOT_DIR"
# Book information # Book information
BOOK_TITLE="FreeBSD Device Drivers" BOOK_TITLE="FreeBSD Device Drivers"
BOOK_AUTHOR="Edson Brandi" BOOK_AUTHOR="Edson Brandi"
BOOK_DATE="DRAFT Version 1.2 - November 1, 2025" BOOK_DATE="Version 2.0 - April, 22th 2026"
# File paths # File paths
TITLE_FILE="$SCRIPT_DIR/title.md" TITLE_FILE="$SCRIPT_DIR/title.md"
@ -312,7 +312,7 @@ build_pdf() {
--variable code-block-font-size=\\footnotesize \ --variable code-block-font-size=\\footnotesize \
--variable float-placement-figure="H" \ --variable float-placement-figure="H" \
--variable figure-placement="H" \ --variable figure-placement="H" \
--highlight-style=tango \ --syntax-highlighting=tango \
--variable linestretch=1.15 \ --variable linestretch=1.15 \
--variable geometry:"inner=2cm,outer=2cm,top=2.5cm,bottom=2.5cm" \ --variable geometry:"inner=2cm,outer=2cm,top=2.5cm,bottom=2.5cm" \
-o "$OUTPUT_DIR/freebsd-device-drivers.pdf" 2>&1 -o "$OUTPUT_DIR/freebsd-device-drivers.pdf" 2>&1
@ -364,7 +364,7 @@ build_epub() {
--toc \ --toc \
--toc-depth=2 \ --toc-depth=2 \
--number-sections \ --number-sections \
--highlight-style=tango \ --syntax-highlighting=tango \
--epub-chapter-level=1 \ --epub-chapter-level=1 \
--verbose \ --verbose \
-o "$OUTPUT_DIR/freebsd-device-drivers.epub" 2>&1 -o "$OUTPUT_DIR/freebsd-device-drivers.epub" 2>&1
@ -423,7 +423,7 @@ build_html() {
--to=html5 \ --to=html5 \
--standalone \ --standalone \
--embed-resources \ --embed-resources \
--highlight-style=tango \ --syntax-highlighting=tango \
--toc \ --toc \
--toc-depth=2 \ --toc-depth=2 \
--number-sections \ --number-sections \

View file

@ -15,8 +15,8 @@
# Core document metadata that appears in the title page and document properties # Core document metadata that appears in the title page and document properties
#title: "FreeBSD Device Drivers" #title: "FreeBSD Device Drivers"
subtitle: "From First Steps to Kernel Mastery" subtitle: "From First Steps to Kernel Mastery"
#author: "Edson Brandi" author: "Edson Brandi"
#date: "DRAFT Version 1.0 - August, 30th 2025" date: "Version 2.0 - April, 22th 2026"
# ============================================================================= # =============================================================================
# DOCUMENT CLASSIFICATION AND METADATA # DOCUMENT CLASSIFICATION AND METADATA

View file

@ -2,6 +2,6 @@
title: "FreeBSD Device Drivers" title: "FreeBSD Device Drivers"
subtitle: "From First Steps to Kernel Mastery" subtitle: "From First Steps to Kernel Mastery"
author: "Edson Brandi" author: "Edson Brandi"
date: "DRAFT Version 1.0 - August, 30th 2025" date: "Version 2.0 - April, 22th 2026"
--- ---
\newpage \newpage