STACK static representations contain markup that is not valid PreTeXt

Open
#3,038 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
html, xml
Domain
compilers

Research direction

The payload does not name the generator file, so locate the STACK static-representation code first. Generate the stack-integration sample or one of the sample-article STACK problems and inspect the statement output for a p nested in a p, an image inside a p, and div wrappers such as div class="stack_plot". Done means the output has no nested p, the images sit where the schema allows, the div wrappers are gone, and the output validates against the PreTeXt schema.

Written by the indexing model from the issue text.

Description

The static representations produced for STACK problems contain three constructions the PreTeXt schema forbids: a p element nested inside a p (e.g. <statement><p><p>...</p><p>...</p></p></statement> in stack-integration, and all five sample-article STACK problems), an image inside a p, and HTML div elements surviving as wrappers (<div class="stack_plot">, <p class="HELM_exercise"> attributes similarly suggest direct HTML carryover). The braille conversion (as of PreTeXtBook/pretext#3037) now reports these as errors and emits [INVALID SOURCE] placeholders, so STACK problems degrade visibly there; other conversions cope silently but the markup is invalid everywhere. The generator should unwrap the outer p (emitting the paragraph sequence directly), place images per the schema, and drop the div wrappers. Validating generated representations against the schema would catch this class at generation time.

Claude Fable 5, acting as a coding assistant for Rob Beezer

Dominant language
XSLT
Stars
466
Forks
251
Avg merge
4m
Merged PRs (30d)
13

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PreTeXtBook/pretext

All issues in PreTeXtBook/pretext

Similar issues

More Compilers issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.