From 42a979a40e89ebdde6d3142fa809b47650bbf77e Mon Sep 17 00:00:00 2001 From: Edson Brandi Date: Wed, 22 Apr 2026 21:48:00 +0000 Subject: [PATCH] Update the files needed to generate the .pdf and .epub --- scripts/BUILD-README.md | 32 ++++++++++++++++---------------- scripts/build-book.sh | 8 ++++---- scripts/metadata.yaml | 4 ++-- scripts/title.md | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/scripts/BUILD-README.md b/scripts/BUILD-README.md index 1d0560b..b2f3236 100644 --- a/scripts/BUILD-README.md +++ b/scripts/BUILD-README.md @@ -56,10 +56,10 @@ sudo apt install -y software-properties-common apt-transport-https ca-certificat ```bash # Download the latest pandoc version for Ubuntu 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 -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 sudo apt --fix-broken install -y @@ -68,7 +68,7 @@ sudo apt --fix-broken install -y pandoc --version # 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) @@ -210,17 +210,17 @@ mkdir -p ~/.local/share/pandoc/templates # Navigate to the templates directory cd ~/.local/share/pandoc/templates -# Download the latest Eisvogel template (version 3.2.0) -wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.2.0/Eisvogel-3.2.0.tar.gz +# Download the latest Eisvogel template (version 3.4.0) +wget https://github.com/Wandmalfarbe/pandoc-latex-template/releases/download/v3.4.0/Eisvogel-3.4.0.tar.gz # 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 -cp Eisvogel-3.2.0/eisvogel.latex ./ +cp Eisvogel-3.4.0/eisvogel.latex ./ # 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 ls -la eisvogel.latex @@ -595,14 +595,14 @@ ls -la eisvogel.latex cp eisvogel.latex eisvogel.latex.backup # 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 -tar -xzf Eisvogel-3.2.0.tar.gz -cp Eisvogel-3.2.0/eisvogel.latex ./ +tar -xzf Eisvogel-3.4.0.tar.gz +cp Eisvogel-3.4.0/eisvogel.latex ./ # 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 cd ~/your-project-directory @@ -704,7 +704,7 @@ pandoc $(find content/ -name "*.md" | sort) \ --to=html5 \ --standalone \ --embed-resources \ - --highlight-style=tango \ + --syntax-highlighting=tango \ --toc \ --toc-depth=2 \ --number-sections \ @@ -713,7 +713,7 @@ pandoc $(find content/ -name "*.md" | sort) \ --metadata date="DRAFT Version 1.0 - August, 30th 2025" \ -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 @@ -742,7 +742,7 @@ If you encounter issues: 1. Check the troubleshooting section above 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. @@ -820,4 +820,4 @@ This section documents known problems and limitations that exist in the current - Contribute improvements to the build system - Share workarounds and best practices -**Note**: These limitations are documented to set realistic expectations and help users work around known problems. The build system is functional for most use cases, but awareness of these limitations helps in planning and content preparation. \ No newline at end of file +**Note**: These limitations are documented to set realistic expectations and help users work around known problems. The build system is functional for most use cases, but awareness of these limitations helps in planning and content preparation. diff --git a/scripts/build-book.sh b/scripts/build-book.sh index 6216208..888f07f 100755 --- a/scripts/build-book.sh +++ b/scripts/build-book.sh @@ -55,7 +55,7 @@ cd "$ROOT_DIR" # Book information BOOK_TITLE="FreeBSD Device Drivers" BOOK_AUTHOR="Edson Brandi" -BOOK_DATE="DRAFT Version 1.2 - November 1, 2025" +BOOK_DATE="Version 2.0 - April, 22th 2026" # File paths TITLE_FILE="$SCRIPT_DIR/title.md" @@ -312,7 +312,7 @@ build_pdf() { --variable code-block-font-size=\\footnotesize \ --variable float-placement-figure="H" \ --variable figure-placement="H" \ - --highlight-style=tango \ + --syntax-highlighting=tango \ --variable linestretch=1.15 \ --variable geometry:"inner=2cm,outer=2cm,top=2.5cm,bottom=2.5cm" \ -o "$OUTPUT_DIR/freebsd-device-drivers.pdf" 2>&1 @@ -364,7 +364,7 @@ build_epub() { --toc \ --toc-depth=2 \ --number-sections \ - --highlight-style=tango \ + --syntax-highlighting=tango \ --epub-chapter-level=1 \ --verbose \ -o "$OUTPUT_DIR/freebsd-device-drivers.epub" 2>&1 @@ -423,7 +423,7 @@ build_html() { --to=html5 \ --standalone \ --embed-resources \ - --highlight-style=tango \ + --syntax-highlighting=tango \ --toc \ --toc-depth=2 \ --number-sections \ diff --git a/scripts/metadata.yaml b/scripts/metadata.yaml index 5651174..e34eb67 100644 --- a/scripts/metadata.yaml +++ b/scripts/metadata.yaml @@ -15,8 +15,8 @@ # Core document metadata that appears in the title page and document properties #title: "FreeBSD Device Drivers" subtitle: "From First Steps to Kernel Mastery" -#author: "Edson Brandi" -#date: "DRAFT Version 1.0 - August, 30th 2025" +author: "Edson Brandi" +date: "Version 2.0 - April, 22th 2026" # ============================================================================= # DOCUMENT CLASSIFICATION AND METADATA diff --git a/scripts/title.md b/scripts/title.md index 2d4bb6f..1b55af2 100644 --- a/scripts/title.md +++ b/scripts/title.md @@ -2,6 +2,6 @@ title: "FreeBSD Device Drivers" subtitle: "From First Steps to Kernel Mastery" author: "Edson Brandi" -date: "DRAFT Version 1.0 - August, 30th 2025" +date: "Version 2.0 - April, 22th 2026" --- \newpage