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
  • Merge requests
  • !1455

Fix TeX.Environment() to use the correct end environment.

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Davide P. Cervone requested to merge github/fork/dpvc/environment-fix into develop May 03, 2016
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

There is no issue number for this. It turned up when I was checking another bug, but was unrelated to it. You are supposed to be able to use

MathJax.InputJax.TeX.Environment(name,prefix,suffix,n,default)

(after loading the TeX newcommand extension) in order to define a new command, where prefix is the TeX code to insert at the beginning of the environment, suffix is the TeX to insert at the end, n is the number of arguments required for the environment, and default is the default for the argument. The n and default are not required.

This works as advertised, except for one thing: if the prefix includes a \begin{...} and the suffix includes an \end{...}, MathJax issues an error about the nesting being wrong. With this fix, the begin and end work properly. E.g.,

MathJax.InputJax.TeX.Environment("nested","\\begin{matrix}","\\end{matrix}");

would cause \begin{nested} a& b \end{nested} to produce the message '\begin{matrix} ended by \end{nested}` without the patch. With the patch, you should get a matrix as expected.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/dpvc/environment-fix