Skip to content

Add RequirePackage to the scanned macros for recursive LaTeX scanning - #4878

Merged
bdbaddog merged 4 commits into
SCons:masterfrom
kprussing:feature/latex-scanner-requirepackage
Jul 14, 2026
Merged

Add RequirePackage to the scanned macros for recursive LaTeX scanning#4878
bdbaddog merged 4 commits into
SCons:masterfrom
kprussing:feature/latex-scanner-requirepackage

Conversation

@kprussing

Copy link
Copy Markdown
Contributor

Custom LaTeX packages must use the \RequirePackage macro instead of \updatepackage used by document authors. If a user has a custom package or style, it needs to be scanned for additional dependencies that may be known by SCons. This adds \RequirePackage to the list of macros scanned to ensure proper tracking of dependencies.

Note: This also includes a minor fix in the LaTeXTests.py where a prior PR accidentally reused a class name disabling another test.

Contributor Checklist:

  • I have created a new test or updated the unit tests to cover the new/changed functionality.
  • I have updated CHANGES.txt and RELEASE.txt (and read the README.rst).
  • I have updated the appropriate documentation

A previous commit accidentally used a duplicate name for a test
disabling a prior test.
This test demonstrates the desired behavior of the LaTeXScanner parsing
a package for the RequirePackage macro and recognizing files known to
SCons and those that should be assumed system installed.
A custom LaTeX package must use the \RequirePackage macro instead of the
\usepackage macro used by document writers.  This adds the additional
macro to the scanning and properly handle potentially system installed
packages.
@bdbaddog
bdbaddog merged commit 19b2ef5 into SCons:master Jul 14, 2026
11 of 12 checks passed
@mwichmann mwichmann added the LaTex LaTex related issues. label Jul 14, 2026
@mwichmann mwichmann added this to 4.11 Jul 14, 2026
@github-project-automation github-project-automation Bot moved this to Done in 4.11 Jul 14, 2026
@mwichmann mwichmann added this to the 4.11.0 milestone Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

LaTex LaTex related issues.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants