Only block fullpage/graphics in HTML, not PDF#270
Open
AbdelKharij wants to merge 2 commits into
Open
Conversation
Adds a \ximera@blockpkg helper in src/packages.dtx that pre-declares packages as already loaded (via \@namedef{ver@<pkg>.sty}), making \usepackage a silent no-op with a warning in the compile log. Blocked packages: - geometry, fullpage: conflict with Ximera's hardcoded page dimensions (\oddsidemargin, \textwidth, etc. set in src/pagesetup.dtx) - fancyhdr: conflicts with Ximera's titlesec-based \pagestyle{main} - authblk: conflicts with Ximera's custom \author handling in src/title.dtx - setspace, multicol, ragged2e: alter spacing/layout Ximera depends on Also overrides \pagenumbering to a no-op with a warning, since Ximera manages page numbering via its own pagestyle. The original \pagenumbering is preserved as \ximera@old@pagenumbering in case Ximera itself needs to call it internally in the future.
fullpage and graphics were unconditionally disabled by \ximera@blockpkg, but they only actually conflict with Ximera's own page layout and image handling in the HTML build (tex4ht's graphics.4ht clashes with Ximera's graphicspath/image environment from src/image.dtx). In a plain PDF build neither package causes problems, so \pdfOnly content relying on them was being silently dropped for no reason. Guard both with \ifdefined\HCode, the project's standard PDF/HTML detection (see src/only.dtx), so they load normally under pdflatex/lualatex and are only blocked for HTML. Blocking graphics in HTML on its own isn't enough, since Ximera's own \includegraphics machinery is loaded internally regardless of whether the user's package load was blocked. Added a cfgXimera section that suppresses tex4ht's raster <img>/dvisvgm output for it, so no stray image markup leaks into the HTML. Also adds lualatex.pdf/lualatex.handout.pdf targets to luaxake's xake config, needed so XM_COMPILE_SEQUENCE=lualatex.pdf (the new engine toggle in ximera-contribution-1) actually resolves to a build command instead of being a no-op. Verified against both output paths: compiling with lualatex directly loads fullpage/graphics with no warning, while compiling via make4ht (tex4ht) produces the "conflicts with Ximera" warning for both and the generated HTML has no leftover <img> tag for the test image. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Collaborator
|
Hi,
I think we just solve this issue with
\pdfOnly{\usepackage{fullpage}}
…On Thu, Jul 16, 2026, 3:57 PM AbdelKharij ***@***.***> wrote:
Summary
- fullpage/graphics are now only disabled by ***@***.*** in the
HTML build (guarded by \ifdefined\HCode), matching the project's
standard PDF/HTML detection convention (see src/only.dtx). They load
normally under plain pdflatex/lualatex, so \pdfOnly content depending
on them keeps working.
- Adds a cfgXimera section suppressing tex4ht's raster <img>/dvisvgm
output for Ximera's internally-loaded \includegraphics, since blocking
the package alone doesn't stop Ximera's own image machinery (see
src/image.dtx) from still emitting markup in HTML.
- Adds lualatex.pdf/lualatex.handout.pdf targets to luaxake's xake
config, needed so XM_COMPILE_SEQUENCE=lualatex.pdf (new engine toggle
in ximera-contribution-1) resolves to an actual build command instead
of a no-op.
Test plan
- Compiled a test doc with lualatex directly: fullpage/graphics load
with no "conflicts with Ximera" warning; other blocked packages (geometry,
authblk, setspace, fancyhdr, multicol, ragged2e) still warn as before.
- Compiled the same doc via make4ht: all seven packages, including
fullpage/graphics, now produce the block warning.
- Checked the generated HTML has no <img> tag or reference to the test
image.
------------------------------
You can view, comment on, or merge this pull request online at:
#270
Commit Summary
- 013c26f
<013c26f>
Block packages conflicting with Ximera's page layout
- 3a1a6b6
<3a1a6b6>
Only block fullpage/graphics in HTML, not PDF; add lualatex xake targets
File Changes
(5 files <https://github.com/XimeraProject/ximeraLatex/pull/270/files>)
- *M* luaxake/luaxake
<https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-5286290b67f3c7faaa544e0695d24c2e75934b9c014fc47d29a79b9093936ce8>
(20)
- *M* src/packages.dtx
<https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-9680b5c5e030237f2996bfe87068f614b8ed7189d7f5bd3f275fc3b0d33bc047>
(80)
- *M* ximera.cfg
<https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-4cd5c5ea1dcdd9fe5eb1aeae652c2f0c5994de9f19ff5eab619181cf237f08d4>
(26)
- *M* ximera.cls
<https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-1f67f7bb5ad249e3282ac36304f262150546c09d19522aeb26291f339e4a4647>
(27)
- *M* ximera.pdf
<https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-e2071b170d20c097e6cb541914204fbc96cfcbd54bc9de1e81ac65d6ba8cbdef>
(0)
Patch Links:
- https://github.com/XimeraProject/ximeraLatex/pull/270.patch
- https://github.com/XimeraProject/ximeraLatex/pull/270.diff
—
Reply to this email directly, view it on GitHub
<#270?email_source=notifications&email_token=AAKQDPZYIQQDG3TNU5DYXZL5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKQDP4RRSAMOGOW4HTYB735FEXUBAVCNFSNUABEKJSXA33TNF2G64TZHMYTMMBXHE3TKNR3JFZXG5LFHM2DSMBVGUZDCOJRGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AAKQDP2WJL7U6GTSROLFEKT5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
and Android
<https://github.com/notifications/mobile/android/AAKQDP7C4B5EPMPJTKAWJ3D5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
Download it today!
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Author
|
Hey Dr. Snapp! I was thinking that this approach would allow the user to
not worry about using certain packages. Using \pdfOnly moves responsibility
onto each course author to remember to wrap risky packages
in \pdfOnly{} themselves instead of automatically warning if someone
forgets and just writes \usepackage{fullpage} unguarded (it'll silently
break the HTML build with no "conflicts with Ximera" message). I'm okay
with leaving it to the user but Dr. Kuan asked me if there was a way to
automatically block certain formatting packages that could cause issues.
Let me know what you think!
Best,
Abdel Kharij
…On Thu, 16 Jul 2026 at 17:43, Bart Snapp ***@***.***> wrote:
*bartsnapp* left a comment (XimeraProject/ximeraLatex#270)
<#270 (comment)>
Hi,
I think we just solve this issue with
\pdfOnly{\usepackage{fullpage}}
On Thu, Jul 16, 2026, 3:57 PM AbdelKharij ***@***.***> wrote:
> Summary
>
> - fullpage/graphics are now only disabled by ***@***.*** in the
> HTML build (guarded by \ifdefined\HCode), matching the project's
> standard PDF/HTML detection convention (see src/only.dtx). They load
> normally under plain pdflatex/lualatex, so \pdfOnly content depending
> on them keeps working.
> - Adds a cfgXimera section suppressing tex4ht's raster <img>/dvisvgm
> output for Ximera's internally-loaded \includegraphics, since blocking
> the package alone doesn't stop Ximera's own image machinery (see
> src/image.dtx) from still emitting markup in HTML.
> - Adds lualatex.pdf/lualatex.handout.pdf targets to luaxake's xake
> config, needed so XM_COMPILE_SEQUENCE=lualatex.pdf (new engine toggle
> in ximera-contribution-1) resolves to an actual build command instead
> of a no-op.
>
> Test plan
>
> - Compiled a test doc with lualatex directly: fullpage/graphics load
> with no "conflicts with Ximera" warning; other blocked packages
(geometry,
> authblk, setspace, fancyhdr, multicol, ragged2e) still warn as before.
> - Compiled the same doc via make4ht: all seven packages, including
> fullpage/graphics, now produce the block warning.
> - Checked the generated HTML has no <img> tag or reference to the test
> image.
>
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> #270
> Commit Summary
>
> - 013c26f
> <
013c26f>
> Block packages conflicting with Ximera's page layout
> - 3a1a6b6
> <
3a1a6b6>
> Only block fullpage/graphics in HTML, not PDF; add lualatex xake targets
>
> File Changes
>
> (5 files <https://github.com/XimeraProject/ximeraLatex/pull/270/files>)
>
> - *M* luaxake/luaxake
> <
https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-5286290b67f3c7faaa544e0695d24c2e75934b9c014fc47d29a79b9093936ce8>
> (20)
> - *M* src/packages.dtx
> <
https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-9680b5c5e030237f2996bfe87068f614b8ed7189d7f5bd3f275fc3b0d33bc047>
> (80)
> - *M* ximera.cfg
> <
https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-4cd5c5ea1dcdd9fe5eb1aeae652c2f0c5994de9f19ff5eab619181cf237f08d4>
> (26)
> - *M* ximera.cls
> <
https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-1f67f7bb5ad249e3282ac36304f262150546c09d19522aeb26291f339e4a4647>
> (27)
> - *M* ximera.pdf
> <
https://github.com/XimeraProject/ximeraLatex/pull/270/files#diff-e2071b170d20c097e6cb541914204fbc96cfcbd54bc9de1e81ac65d6ba8cbdef>
> (0)
>
> Patch Links:
>
> - https://github.com/XimeraProject/ximeraLatex/pull/270.patch
> - https://github.com/XimeraProject/ximeraLatex/pull/270.diff
>
> —
> Reply to this email directly, view it on GitHub
> <
#270?email_source=notifications&email_token=AAKQDPZYIQQDG3TNU5DYXZL5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVRTG633UMVZF6Y3MNFRWW>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AAKQDP4RRSAMOGOW4HTYB735FEXUBAVCNFSNUABEKJSXA33TNF2G64TZHMYTMMBXHE3TKNR3JFZXG5LFHM2DSMBVGUZDCOJRGCQXMAQ>
> .
> Triage notifications, keep track of coding agent tasks and review pull
> requests on the go with GitHub Mobile for iOS
> <
https://github.com/notifications/mobile/ios/AAKQDP2WJL7U6GTSROLFEKT5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVJTG633UMVZF62LPOM>
> and Android
> <
https://github.com/notifications/mobile/android/AAKQDP7C4B5EPMPJTKAWJ3D5FEXUBA5CNFSNUABEM5UWIORPF5TWS5BNNB2WEL2QOVWGYUTFOF2WK43UF42DANZRGU3TSNZVGKTHEZLBONXW5KTTOVRHGY3SNFRGKZFFMV3GK3TUVZTG633UMVZF6YLOMRZG62LE>.
> Download it today!
> You are receiving this because you are subscribed to this thread.Message
> ID: ***@***.***>
>
—
Reply to this email directly, view it on GitHub
<#270?email_source=notifications&email_token=AZXGJNBOTD53YP4E5OE4MP35FFEBZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJZGY4DMOBXGQYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-4996868740>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AZXGJND6BKWRG6BDFEQ6ZKT5FFEBZAVCNFSNUABEKJSXA33TNF2G64TZHMYTMMBXHE3TKNR3JFZXG5LFHM2DSMBVGUZDCOJRGCQXMAQ>
.
Triage notifications, keep track of coding agent tasks and review pull
requests on the go with GitHub Mobile for iOS
<https://github.com/notifications/mobile/ios/AZXGJNBVSL6WXCCYBI4BFZL5FFEBZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJZGY4DMOBXGQYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2KUZTPN52GK4S7NFXXG>
and Android
<https://github.com/notifications/mobile/android/AZXGJNCBYOD4YUABITPWVVD5FFEBZA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIOJZGY4DMOBXGQYKM4TFMFZW63VGMF2XI2DPOKSWK5TFNZ2K4ZTPN52GK4S7MFXGI4TPNFSA>.
Download it today!
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
[image: The Ohio State University]
*Abdel Kharij*
Applied Mathematics
Student Researcher
*The Ohio State University*
Department of Mathematics
Nationwide Children's Hospital
9379636882 Mobile
***@***.***
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fullpage/graphicsare now only disabled by\ximera@blockpkgin the HTML build (guarded by\ifdefined\HCode), matching the project's standard PDF/HTML detection convention (seesrc/only.dtx). They load normally under plain pdflatex/lualatex, so\pdfOnlycontent depending on them keeps working.cfgXimerasection suppressing tex4ht's raster<img>/dvisvgm output for Ximera's internally-loaded\includegraphics, since blocking the package alone doesn't stop Ximera's own image machinery (seesrc/image.dtx) from still emitting markup in HTML.lualatex.pdf/lualatex.handout.pdftargets toluaxake's xake config, needed soXM_COMPILE_SEQUENCE=lualatex.pdf(new engine toggle inximera-contribution-1) resolves to an actual build command instead of a no-op.Test plan
lualatexdirectly:fullpage/graphicsload with no "conflicts with Ximera" warning; other blocked packages (geometry, authblk, setspace, fancyhdr, multicol, ragged2e) still warn as before.make4ht: all seven packages, includingfullpage/graphics, now produce the block warning.<img>tag or reference to the test image.