Repository navigation
LaTeX reader: \newenvironment and \renewenvironment - #10
Merged
Merged
Conversation
…does
\begin{name}{arguments}...\end{name} becomes the begin code with its #1...
(the first argument optional with a default), the body and the end code,
before the other passes; the definitions go to the macros, where later
conversions find them. ## in a macro body is # in math mode, which TeX
rejects: newcommand-escaped-hash is no LaTeX.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
simonebortolin
changed the base branch from
claude/latex-corpus-tests
to
main
November 8, 2026 14:20
The groups of NotInWordLaTeX taken from main, without the seven cases the reader now reads (\tt, \Bbb, \mathop, the arrows of mathtools), and \Box renamed once. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
simonebortolin
changed the base branch from
main
to
claude/latex-limits-dacdf3
November 9, 2026 18:45
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.
Based on main. It also carries b6eeafc (the LaTeX and amsmath of the latex2mathml cases, pushed to
claude/latex-corpus-testsafter #4 was merged), which main does not have yet. Merging main removed fromNotInWordLaTeXthe seven cases that the reader now reads (tt,blackboard-bold,mathop,issue-125-4-mathop,xLeftarrow-double,xleftrightarrow,xhookleftarrow), and dropped the duplicate\Boxentry ofRenamed.\newenvironment{name}[n][default]{begin}{end}and\renewenvironmentare expanded as TeX does, in a new pass (NewEnvironments) before the others:\begin{name}{arguments}…\end{name}becomes the begin code with its#1…(the first argument optional when it has a default,##→#), the body and the end code. Nested uses of the same environment and environments in the expansion are expanded too; a space is kept where a control word would otherwise run into the next letter (\alpha+x), and an environment that never stops expanding is rejected after 1000 expansions. The portedApplyMacromachinery is untouched.macrosdictionary under{name}(a key no control word can collide with), where later conversions find them as they find\newcommandmacros.newenvironment-multi-nodepasses and leavesNotReadYet;newenvironmentandnewenvironment-with-argspass and leaveNotExpanded.newcommand-escaped-hash(\newcommand{\foo}[1]{## #1} \foo{x}) moves toNotLaTeX:##in a macro body is#in its expansion, and a#in math mode is a TeX error.LaTeXReaderTests(ExpandsEnvironments,RejectsEnvironmentsThatExpandForever).No snapshot was changed.
VersionPrefixis untouched.dotnet test --solution SharpEquations.slnx: 5536/5536 on net10.0 and net481.🤖 Generated with Claude Code