[PR #1550] [CLOSED] fix(book): give AlexNet figure full float placement options for PDF #8258

Closed
opened 2026-04-27 17:36:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/harvard-edge/cs249r_book/pull/1550
Author: @profvjreddi
Created: 4/26/2026
Status: Closed

Base: devHead: fix/issue-1423-alexnet-pdf


📝 Commits (1)

  • 8b10583 fix(book): give AlexNet figure full float placement options for PDF

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 book/quarto/contents/vol1/introduction/introduction.qmd (+1 -1)

📄 Description

Closes #1423.

Summary

Reporter (#1423) observed the AlexNet architecture figure (@fig-alexnet, page 8 / Bitter Lesson section) renders cropped in the Vol1 PDF — only the bottom edge of the figure appears at the top of the page, with the rest cut off. Issue persists across PDF readers, so it is a real LaTeX placement issue.

Root cause

The TikZ figure is wide (~26.7 cm clip box) and ~7.45 cm tall. With fig-pos="htb", LaTeX is restricted to here/top/bottom of the current page. When preceding text exhausts those positions, the figure gets pushed but has no acceptable landing slot, producing the truncated render.

Fix

Change fig-pos="htb"fig-pos="!htbp":

  • p — float to own page (figures-only page) where the figure has the full text-block height to render.
  • ! — override strict placement parameters (totalnumber, topfraction) so the figure can land wherever it physically fits.

Other figures in the book that use the same pattern have not reported this issue, so the targeted change is appropriate without a global sweep.

Test plan

  • Render Vol1 PDF after merge, navigate to Bitter Lesson section, confirm AlexNet figure renders fully (either at original location or floated to its own page).
  • If still cropped: follow-up fix is to add out-width="100%" to the div, or apply scale=0.85 at the \begin{tikzpicture} level.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/harvard-edge/cs249r_book/pull/1550 **Author:** [@profvjreddi](https://github.com/profvjreddi) **Created:** 4/26/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/issue-1423-alexnet-pdf` --- ### 📝 Commits (1) - [`8b10583`](https://github.com/harvard-edge/cs249r_book/commit/8b10583098c7e15757a0f01d1f28e0ad0bcc143d) fix(book): give AlexNet figure full float placement options for PDF ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `book/quarto/contents/vol1/introduction/introduction.qmd` (+1 -1) </details> ### 📄 Description Closes #1423. ## Summary Reporter (#1423) observed the AlexNet architecture figure (@fig-alexnet, page 8 / Bitter Lesson section) renders cropped in the Vol1 PDF — only the bottom edge of the figure appears at the top of the page, with the rest cut off. Issue persists across PDF readers, so it is a real LaTeX placement issue. ## Root cause The TikZ figure is wide (~26.7 cm clip box) and ~7.45 cm tall. With `fig-pos="htb"`, LaTeX is restricted to here/top/bottom of the *current* page. When preceding text exhausts those positions, the figure gets pushed but has no acceptable landing slot, producing the truncated render. ## Fix Change `fig-pos="htb"` → `fig-pos="!htbp"`: - **`p`** — float to own page (figures-only page) where the figure has the full text-block height to render. - **`!`** — override strict placement parameters (totalnumber, topfraction) so the figure can land wherever it physically fits. Other figures in the book that use the same pattern have not reported this issue, so the targeted change is appropriate without a global sweep. ## Test plan - [ ] Render Vol1 PDF after merge, navigate to Bitter Lesson section, confirm AlexNet figure renders fully (either at original location or floated to its own page). - [ ] If still cropped: follow-up fix is to add `out-width="100%"` to the div, or apply `scale=0.85` at the `\begin{tikzpicture}` level. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-27 17:36:58 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/cs249r_book#8258