Skip to content

Pdflatex run appears stuck on large directory trees #40

@Abdelrhmansersawy

Description

@Abdelrhmansersawy

Description
When generating a notebook for a large source tree (e.g., 500+ pages, like CSES-solutions), the command seems to hang. After investigation, it was actually failing in pdflatex due to encoding issues and noisy link formatting, but the CLI gave little feedback and left an empty PDF.

Steps to Reproduce

  1. node ./bin/notebookgen /path/to/large/tree --output /tmp/notebook.pdf
  2. Wait for pdflatex to run (many files → long LaTeX run).
  3. Observe no progress info; output PDF may remain 0 bytes if pdflatex errors.

Expected Behavior

  • CLI surfaces pdflatex progress and errors.
  • Large trees complete without stalls; encoding issues don’t kill the build.
  • TOC/link formatting is clean by default.

Actual Behavior

  • With many files, pdflatex errors (invalid UTF-8, latin1) abort silently from the CLI perspective.
  • Generated PDF stays empty.
  • TOC shows LaTeX formatting of filenames and colored link borders by default.

Logs / Examples

  • Errors like Invalid UTF-8 byte sequence and inputencoding latin1 undefined chars.
  • Sections with underscores render as math in TOC; hyperref draws red boxes.

Environment

  • OS: Arch Linux
  • Node: (current project version)
  • pdflatex: TeX Live 2026/dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions