Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch \newcatcodetable before loading minim-alloc #154

Merged
merged 1 commit into from
Nov 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions optex/pkg/minim.opm
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@
tex.setcount("global", "e@alloc@luafunction@count", \csstring\#function_table)
}

\_doc
Both \LaTeX/ and the minim inspired catcode table allocators initialize the
catcode tables with `\initcatcodetable` (i.e. ini\TeX/ catcodes). \OpTeX/
merely allocates the registers. \LuaTeX/ doesn't allow to activate
unitialized catcode table, therefore activation with either
`\initcatcodetable` or `\savecatcodetable` is necessary before use. To
ensure compatibility with foreign macros, we also issue `\initcatcodetable`
on allocation in the public version of `\newcatcodetable`.
\_cod

\_def\newcatcodetable#1{\_newcatcodetable#1\_initcatcodetable#1}

\_doc
We also get PDF resources out of the way now. Minim is ready to use \OpTeX's
PDF resource management, but also has compatibility layer for PGF, which is
Expand All @@ -106,18 +118,6 @@

\input minim-alloc

\_doc
Both \LaTeX/ and the minim inspired catcode table allocators initialize the
catcode tables with `\initcatcodetable` (i.e. ini\TeX/ catcodes). \OpTeX/
merely allocates the registers. \LuaTeX/ doesn't allow to activate
unitialized catcode table, therefore activation with either
`\initcatcodetable` or `\savecatcodetable` is necessary before use. To
ensure compatibility with foreign macros, we also issue `\initcatcodetable`
on allocation in the public version of `\newcatcodetable`.
\_cod

\_def\newcatcodetable#1{\_newcatcodetable#1\_initcatcodetable#1}

\_doc
By now, the Knuthian allocators are dealt with. \eTeX/ global and local
allocators are undefined, but the global ones are expected in minim's Lua
Expand Down