Skip to content

Fig. 5 with its links in the review PDF, from bbqs-standards as a submodule - #17

Open
yarikoptic-gitmate wants to merge 2 commits into
mainfrom
claude/exciting-mayer-c7xbc7
Open

yarikoptic-gitmate wants to merge 2 commits into
mainfrom
claude/exciting-mayer-c7xbc7

Conversation

@yarikoptic-gitmate

Copy link
Copy Markdown
Collaborator

Two commits, following #13 and #15:

1. Review PDF: Fig. 5 from its SVG, with the links of the figure

The draft embedded the PNG preview of Fig. 5, so the PDF had none of the 118 links of the SVG. Converting the SVG to PDF alone would not fix that: \includegraphics drops the links of an included PDF (XeLaTeX, pdfLaTeX, and LuaLaTeX alike).

  • make pdf renders each SVG figure of the draft to build/<path>.pdf with rsvg-convert, which keeps the SVG's links. tools/pdf/pdflinks.py (pypdf) then lists them in build/<path>.links.tex.
  • tools/pdf/figures.lua puts an SVG figure in as \linkedgraphics. That macro (tools/pdf/header.tex) draws the links again over the figure as invisible link annotations of explicit size. A \href around an empty box does not work: xdvipdfmx sizes a link by the glyphs inside it, so the link comes out empty. The macro works with XeTeX, pdfTeX, and LuaTeX, so paper.tex also works for a journal build.
  • Fig. 5 is now vector with selectable text, instead of a 300 dpi PNG.
  • CI also installs librsvg2-bin fonts-liberation python3-pypdf.

2. Fig. 5 now lives in bbqs-standards, included as a submodule

As agreed in #15, Fig. 5 moves to brain-bbqs/bbqs-standards, where it is Figure 2 of the guidelines (brain-bbqs/bbqs-standards#5). The paper includes that repository as the bbqs-standards/ submodule, which tracks main.

  • draft/12_figures_tables.md uses bbqs-standards/content/guidelines/figures/bbqs-standards-stack.svg.
  • The SVG was produced from the PowerPoint draft here (fig5_bbqs_stack_design.pptx, fig5_bbqs_stack.yaml, tools/pptx2svg.py). It will be refined as the SVG itself from now on, so those files and the PNG preview are removed rather than moved. figures/fig5_bbqs_stack/README.md points to the new home.
  • make fig5 only writes the svgtune walkthrough.
  • CI checks out submodules, and README says to clone with --recurse-submodules.

Merge brain-bbqs/bbqs-standards#5 first, then update the submodule here. The submodule currently points at 0e59722, the head of that PR, which is fetchable through refs/pull/5/head. If #5 is squash-merged, point it at the resulting commit on main: git submodule update --remote bbqs-standards.

Testing

  • Locally (Ubuntu 24.04, like CI), from clean: make pdf gives 30 pages, with all 118 links of Fig. 5 on page 22 (171 annotations in total, 53 before). The link rectangles were drawn over a render of the page and sit exactly on their boxes and words, including the per-word links inside a box.
  • make check passes.
  • github.com does not render images inside a submodule, so its view of draft/12_figures_tables.md shows no Fig. 5. The review PDF is not affected.

Generated by Claude Code

\includegraphics keeps the drawing of a PDF figure but drops its links, so:

- make pdf renders each SVG figure of the draft to build/<path>.pdf with
  rsvg-convert, which keeps the links of the SVG, and lists them with
  tools/pdf/pdflinks.py (pypdf) in build/<path>.links.tex
- tools/pdf/figures.lua puts an SVG figure in as \linkedgraphics, which
  (tools/pdf/header.tex) draws its links again over it, as invisible link
  annotations of explicit size (XeTeX, pdfTeX, and LuaTeX)
- Fig. 5 in the draft is now the SVG (vector, 118 links) instead of the
  PNG preview
- CI installs librsvg2-bin, fonts-liberation, python3-pypdf

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvaGRbLpDegB5uBvgecaiL
Fig. 5 is also Figure 2 of the BBQS standards guideline, so it moves to
brain-bbqs/bbqs-standards (content/guidelines/figures/bbqs-standards-stack.svg
and .svgtune), and the paper includes that repository as the bbqs-standards
submodule (issue #15):

- draft: Fig. 5 is bbqs-standards/content/guidelines/figures/
  bbqs-standards-stack.svg, which make pdf puts in with its links
- the SVG was produced from the PowerPoint draft here
  (fig5_bbqs_stack_design.pptx and fig5_bbqs_stack.yaml, by
  tools/pptx2svg.py), but is to be refined from now on as the SVG itself, so
  the .pptx, .yaml, PNG preview, and tools/pptx2svg.py are removed and not
  carried over; figures/fig5_bbqs_stack/README.md points to the new home
- make fig5 only writes the svgtune walkthrough (and is no longer part of
  make figures)
- CI checks out the submodule; README says to clone with
  --recurse-submodules

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PvaGRbLpDegB5uBvgecaiL
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown

Review PDF for e46d643: paper.pdf · paper.tex (sign in to GitHub to download). Updated on each push.

@yarikoptic

Copy link
Copy Markdown
Collaborator

woohoo -- PDF is clickable now within paper with urls:
image

it also removes the ppt to svg converter helper , I guess we could keep it for others but also it would be of a dead code I guess here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants