mathjax / mathjax/MathJax

Allow "markers" that simply retain their position

Open
#1,687 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Request
Dominant language
JavaScript
Stars
10.9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

I would like to specify a certain position in my LaTeX source and see where that position ends up in the generated math. (I'm trying to display a cursor within the math output). At the moment, I cannot see a way to achieve this.

This use case could be made possible by changing both the input and output jaxes to allow for "marker" symbols that do not affect processing, except that they retain their position through all processing stages.

I tried using arbitrary characters for this (and finding them later in the generated HTML), but they do affect processing. For example, when I use the marker |, the output of f|_1 is spaced differently from that of f_1 (even after subsequently removing the |).

The proposed change would allow measuring the proportions of generated math, which would enable applications adding custom annotations, cursors, tooltips etc. to it.

Contributor guide

Open the contributing guide

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.

Research direction

The issue names no files, tests, or entry points; begin by tracing how MathJax converts LaTeX input into generated math output. Define how marker symbols retain their positions without affecting processing, including the input and output jaxes. Done means positions can be measured for cursors, annotations, tooltips, or similar overlays without changing math layout.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, latex
Domain
frontend, web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.