[ASL Reference] fixed HTML (hevea-related) warnings#1900
Open
Roman-Manevich wants to merge 2 commits into
Open
[ASL Reference] fixed HTML (hevea-related) warnings#1900Roman-Manevich wants to merge 2 commits into
Roman-Manevich wants to merge 2 commits into
Conversation
hrutvik
reviewed
Jul 8, 2026
fcebab1 to
08c0af1
Compare
hrutvik
reviewed
Jul 8, 2026
08c0af1 to
9fde3f6
Compare
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.
This PR is AI-assisted.
ASL Reference HTML Warning Cleanup
First-pass undefined labels, citations, and fixpoint warnings.
Example warning:
./introduction.tex:140: Warning: Undefined label: 'chap:Specifications'.Cause: the first
hevea -fix0pass runs beforebibhvaand before HeVeAhas enough information to reach a cross-reference fixpoint. Undefined labels,
undefined citations, and rerun/fixpoint messages are therefore expected during
this bootstrap pass.
Fix: pass
-sto this first HeVeA invocation inasllib/doc/Makefile. Thissilences only the bootstrap pass; later unsilenced output is still used to
catch warnings that survive reference convergence.
Post-bibliography citation and fixpoint warnings.
Example warning:
./LexicalStructure.tex:436: Warning: Undefined citation: 'ASU86'.Cause:
bibhvamakes bibliography entries available after the first HeVeApass. The next HeVeA pass is therefore the first pass that can consume the
generated bibliography data, resolve citations, and update HeVeA's own
cross-reference state. If that pass is also the final unsilenced pass, HeVeA
reports transient undefined-citation and changed-label warnings even though a
subsequent pass would resolve them.
Fix: add one silent
hevea -fix0 -spass immediately afterbibhvainasllib/doc/Makefile. This lets HeVeA absorb the bibliography/citation statebefore the final unsilenced
hevea -fixpass, so the visible final passstarts from stable references.
Broken
CannotOverapproximateandCannotUnderapproximateanchors.Example warning:
ASL.html:27550: Warning, cannot find anchor: constant-CannotOverapproximate.Cause:
macros.hvalinked these HTML-only macro definitions toconstant-CannotOverapproximateandconstant-CannotUnderapproximate, butthe generated HTML anchors are
type-CannotOverapproximateandtype-CannotUnderapproximate.Fix: update the two
macros.hvalinks to use the generatedtype-*anchors.Unused
\commonprefixlineand\commonsuffixlineoverrides.Example warning:
./ASLmacros.tex:329: Warning: Ignoring (re-)definition of '\commonprefixline' by \newcommand.Cause: these macros were no longer used in the TeX sources, but definitions
remained in both
ASLmacros.texandmacros.hva. HeVeA still processed thoseunused definitions and reported redefinition warnings.
Fix: remove the unused definitions from both files.
Rule-list aux writes.
Example warning:
./TypeAttributes.tex:9: Warning: Command not found: \immediate.Cause:
ASLmacros.texrecords rule-list entries with\immediate\write\@auxout{...\unexpanded{...}}, which HeVeA does notsupport. In HTML builds this produced command warnings, leaked raw
\ASLRuleListEntry...text into generated pages, and left rule-list outlinessaying "Run LaTeX again".
Fix: override the HTML-only rule-recording macros in
macros.hvaso theywrite equivalent
\ASLRuleListEntrycommands through HeVeA's.hauxmechanism with
\@auxdowrite, instead of using TeX's aux stream. Alsooverride
\ASLRuleListEntryfor HTML to accumulate entries with HeVeA tokenregisters (
\newtokens/\addtokens) rather than LaTeX's unsupported\g@addto@macro; install that override before HeVeA reads.haux. Thegenerated outlines now contain linked rule entries, the "Run LaTeX again"
placeholders are gone, and the aux-write warnings are suppressed.
Parse-tree warning suppression.
Example warning:
./Syntax.tex:845: Warning: Command not found: \adjustbox.Cause:
Syntax.texusesadjustboxand qtree's\Tree, which HeVeA doesnot understand. Without HTML-specific handling, HeVeA reports unknown-command
warnings and emits visible raw text such as
max width=...alongside the rawqtree bracket syntax.
Fix: define a one-argument no-op
adjustboxenvironment inmacros.hvasothe width option is consumed instead of rendered as text, and define
\Treeas a no-op so HeVeA stops warning about it. This keeps the source TeX
unchanged and avoids special encodings for individual trees in
Syntax.tex.This PR intentionally only suppresses the HeVeA warnings; it does not attempt
to implement qtree rendering in HTML, so the generated HTML still shows the
raw qtree bracket syntax.
Unsupported math primitives.
Example warning:
./Semantics.tex:284: Warning: Command not found: \mathchoice.Cause: some ASL macros use TeX primitives that HeVeA does not support,
including
\mathchoice,\mathaccent, and\Big. The affected formsinclude
\parallelgraphsand\disjointunion.Fix: add HTML-only replacements in
macros.hvaafterASLmacros.texhasloaded.
\parallelgraphskeeps its hyperlink but renders the list paralleloperator as a larger ASCII
||, avoiding\mathchoiceand\Big;\disjointunionkeeps its hyperlink but renders as a larger Unicode multisetunion, avoiding
\mathaccent. Representative definition and rule-use siteswere visually inspected in the generated HTML, and the larger operator
rendering was accepted.
HTML macro override warnings.
Example warning:
./ASLmacros.tex:25: Warning: Ignoring (re-)definition of '\mathhypertarget' by \newcommand.Cause:
macros.hvaintentionally defines HTML-specific versions of macrosthat are also defined in
ASLmacros.tex, so HeVeA reports redefinitionwarnings when
ASLmacros.texlater defines the same names.Fix: for body-use overrides that can be changed entirely within
macros.hva,define private
\my@...implementations and install them with\AtBeginDocumentafterASLmacros.texhas loaded. This removes theredefinition warnings for
\reverseeqdef,\ordered,\orderedctrl,\ordereddata,\orderedpo,\Ignore,\Option,\derivesinline,\anycharacter,\CannotOverapproximate, and\CannotUnderapproximate.For early-load helpers that must exist while
ASLmacros.texis being read(
\mathhypertarget,\texthypertarget, and\lightyellow), change theshared TeX definitions to
\providecommand. The PDF build still definesthose helpers when no HTML override exists, while HeVeA keeps the definitions
from
macros.hvawithout reporting redefinition warnings.HeVeA
commentpackage status output.Example output:
Exclude comment 'comment'.Cause:
ASLmacros.texloaded the LaTeXcommentpackage, but the ASLdocument sources do not use
commentenvironments or anyincludecomment/excludecomment/specialcommentcommands. HeVeA'scomment.hvadefines the defaultcommentenvironment by calling\excludecomment, and that shim emits this status line once per HeVeAinvocation. This is not a
Warning:line, but it still added noise to thecaptured HTML build messages.
Fix: since the package was confirmed unused, remove
\usepackage{comment}fromASLmacros.tex. The HTML build no longer loadscomment.hva, so the status output disappears. The PDF build was rebuilt andspot-checked after the removal.
\implies\renewcommandwarning.Example warning:
./ASLmacros.tex:508: Warning: Defining '\implies' by \renewcommand.Cause:
ASLmacros.texredefined LaTeX's built-in\implieswith\renewcommandto add a hyperlink to the ASL implication definition. HeVeArenders the macro correctly but warns about this
\renewcommand.Fix: keep the same linked
\Rightarrowexpansion, but define it with\definstead of
\renewcommand. The generated HTML was checked at the implicationdefinition and a generated rule use to confirm the linked
⇒rendering isunchanged. The PDF rendering was also inspected and accepted.
Incomplete
enumitem.hvashim.Example warning:
./ASLmacros.tex:143: Warning: Command not found: \setlistdepth.Cause:
ASLmacros.texloadsenumitemto configure deeply nested inlineitemize lists. HeVeA finds the local
enumitem.hvapackage shim, whichalready ignores
\renewlistand\setlist, but the shim did not define\setlistdepth. HeVeA therefore treated\setlistdepth{20}as an unknowncommand and emitted a warning.
Fix: add a one-argument no-op definition to
enumitem.hva:\newcommand{\setlistdepth}[1]{}. This matches the existing shim strategy:keep the LaTeX list customization for PDF output, while letting HeVeA ignore
enumitem-specific list setup that it does not need to render the HTML.
\not\derives.Example warning:
./Syntax.tex:867: Warning: Cannot apply '\not' to '\derives'.Cause:
Syntax.texuses\not\derives, and HeVeA cannot apply\nottothe custom
\derivesmacro.Fix: define HeVeA's internal negated form of
\derivesinmacros.hva,rendering
\not\derivesas-/->. This suppresses the warning whileproducing a negated derivation arrow closer in width to the normal
\longrightarrow-based\derivesrendering.Negative
\vspace.Example warning:
./Syntax.tex:394: Warning: \vspace with arg '-\baselineskip'.Cause:
Syntax.texused\vspace*{-\baselineskip}, which HeVeA reports as aspacing warning.
Fix: remove the spacing command from
Syntax.tex; visual inspection showedno meaningful difference in the surrounding grammar display.
frontmatter/mainmatter macros.
warning: ./ASLReference.tex:30: Warning: Command not found: \frontmatter
./ASLReference.tex:33: Warning: Command not found: \mainmatter`
Fix: defined no-op shims