Skip to content

Changes compare - Base#3

Draft
trngngntn wants to merge 1660 commits into
base/ver-2023-ec1bab38374a6c2958781aedb7a117fc644c6321from
master
Draft

Changes compare - Base#3
trngngntn wants to merge 1660 commits into
base/ver-2023-ec1bab38374a6c2958781aedb7a117fc644c6321from
master

Conversation

@trngngntn
Copy link
Copy Markdown

No description provided.

drlippman and others added 30 commits January 13, 2026 12:20
new version adds curlys around 1, resulting in space after 1
to address double-italicizing in Safari with TEX-I and font-style:italic
not putting space between 3 and 5
…ements

this prevents MJ's default click-to-explore feature, but preserves keyboard based explorer
should be treated as a string category, not like an
outcome to be looked up
anhbui5302 and others added 30 commits March 24, 2026 15:56
- -<= → \preceq (precedes or equal to ≼)
- >-= → \succeq (succeeds or equal to ≽)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l to

- mlt → ≪ (much less than)
- mgt → ≫ (much greater than)
- -<= → \preceq (precedes or equal to)
- >-= → \succeq (succeeds or equal to)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The \[...\] display math delimiter now wraps the fully converted TeX
expression in applyLatexConversion instead of being applied per-token
inside AMTparseSexpr. Also removes the unused isAnswerMode flag on AMtoTeX.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…2TeX

- Add Xi and Psi (capital) symbol mappings (previously rendered as literal text)
- Add epsilon as alias for epsi → \epsilon (matches PROD Python behavior)
- Add |== and |= → \models mappings for logical turnstile symbol
- Fix norm rewriteleftright to use \lVert/\rVert for proper double bars

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Loose == 0 comparisons silently coerce non-numeric strings to 0 in PHP 7,
causing symbolic matrix entries (e.g. 'a', 'a+b') to be treated as zero.
Replace with === 0 / !== 0 and add is_numeric() guards where needed.

Affected: matrixformat, matrixsystemdisp, matrixreduce, arrayIsZeroVector

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When `text` was followed by a non-bracket character (e.g. `textP(...)`),
substr($str, 1, -1) extracted nearly the entire remaining string instead
of the intended single character, causing duplicated content in the output.

Fix: when $i==0 (no bracket follows), consume just the single next char
as the text argument, producing \text{P} and leaving the rest unparsed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…oken merging (e.g. \partialu → \partial{}u)
…vice verification

- Add _make_link_nonce($href) helper in stats.php: signs the full href with
  HMAC-SHA256 over timestamp+href, returns a data-nonce attribute string
- Update csvdownloadlink to build $href first, then sign it via _make_link_nonce
- Accept nonce_secret from POST body in problems.php and expose via $GLOBALS
  so the nonce is tied to the secret supplied by the calling Python service

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… for showplot:fn mode

- assessment/macros/graph.php: add _mergeplots_extract_json_str() helper and rewrite
  mergeplots() else-branch to JSON-merge functions arrays when both plots are new-format
  showplot_with_functions embeds, preventing 2^N embed tag duplication (41MB response)
- problems.php: add injectFunctionListAttributes() that post-processes drawPicture embeds
  to add a function_list attribute (curve/text/dot entries) consumable by the Python
  backend's replace_graph_function_lists() for LLM-readable <GraphData> context;
  applied to question, solution, and answers when showplot=fn

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ersions

preg_replace with .*? and /s flag was hitting PCRE backtrack limit on
large answer boxes (e.g. matching questions with 1MB of HTML), silently
returning null and wiping the answer box content. Replaced with str_replace
which has no size limitations and is more efficient.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Map `lt`, `<`, `gt`, `>` to proper LaTeX relation commands \lt and \gt
instead of bare < and > characters.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s-function-list

fix: fix mergeplots exponential embed growth and inject function_list…
Apply the same _make_link_nonce() signing pattern used in csvdownloadlink
to CalcPlot3Dlink so external links carry a verifiable HMAC nonce attribute.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ility

The function was in stats.php (loaded only via loadlibrary("stats")),
making it unavailable to plot3d.php when stats isn't loaded. Moving it
to macros/html.php ensures it's always available since macros.php is
loaded on every question evaluation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…embed output

Add buildGraphSettingsJson() that parses showplot args into structured JSON
(view window, axes, grid, canvas config, and typed function definitions),
then inject base64-encoded function data as plot-func attribute on the embed tag.
plot-data (config portion) is computed but reserved for future use.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants