Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M MathJax
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 304
    • Issues 304
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 15
    • Merge requests 15
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MathJax
  • MathJax
  • Issues
  • #1296
Closed
Open
Issue created Nov 04, 2015 by Administrator@rootContributor

AsciiMath - cannot add functions to symbols table

Created by: bhelzer

I used to be able to add functions to the input table by calling:

AM = MathJax.InputJax.AsciiMath.AM;
AM.symbols.push({
  func: true,
  input: 'asin',
  output: 'asin',
  tag: 'mi',
  tex: null,
  type: AM.TOKEN.UNARY
 })

It appears that the new library initializes AM.symbols to the symbol table, but then makes copies of it every time somebody modifies it. If I am the first user, I can make the changes I want, but I don't have any control over that. I could use the define method, but it doesn't allow we to set the tag, or func attributes, so the parsing is incorrect. Can we make one of to changes:

  1. (Preferred) Enhance define to allow we to set tag and func, maybe let me pass in the object I want to set. It would be easy enough to detect the difference between 2 strings or an object.
  2. Or, keep AM.symbols up to date so I can modify it.
Assignee
Assign to
Time tracking