question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

globalGroup adversely affects \color and tall right delimiters

See original GitHub issue

PR #2091 has an unintended consequence. When the rendering option globalGroup is set to true, then \color escapes its group and affects tall right delimiters.

The KaTeX function\color works by creating a macro \current@color and assigning a color to it. When globalGroup is true, then this macro escapes its group. Tall right delimiters are then given that color in line https://github.com/KaTeX/KaTeX/blob/21c4bc355c04cfa13bb79dd9dd06627f5b04f54d/src/functions/delimsizing.js#L155. I don’t know why tall right delimiters get that treatment, but there it is.

The stated reason for PR #2091 was to give global scope to \newcommand. But its effect is more sweeping than that. I think that @edemaine’s comment was correct. We need some mechanism that gives global scope to \newcommand, not to all macros.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ronkokcommented, Nov 15, 2020

Note that this will only be an issue for \color at the top level.

It will actually be an issue for any top level \def, not just color. You probably already realize that, but I want it clearly stated.

Please cast an eye over PR #2640. It’s intent is to restore local scope to any \def, regardless of KaTeX settings. \newcommand can still persist between calls to KaTeX, which accomplishes the original goal for globalScope.

1reaction
ronkokcommented, Nov 15, 2020

I’ll mention one other thing. I think it is valuable to maintain a distinction between \def and \gdef regardless of what happens to right delimiters. \def should not be global.

Read more comments on GitHub >

github_iconTop Results From Across the Web

xDO - River Thames Conditions
Flag color of india, Creative suite 4, Tissot rkq-bc, Arsonal vs hitman holla lyrics, ... Maksutov teleskop spektiv test, Pt optimo global group....
Read more >
OSHA Technical Manual (OTM) - Section III: Chapter 5
Ototoxic agents (ototoxins) have adverse effects on organs or nerves involved in hearing or balance and may be physical (e.g., noise), biological, ...
Read more >
COD Technical Reference - FSA Partner Connect
Resubmit the batch with a new Batch Number in the Grant Batch Header and Trailer and also correct or include the Reporting Campus...
Read more >
System
Color Scheme . ... Defines organizations, groups, departments and staff ... (page 2) for a summary of functions affecting user logons.
Read more >
PROGRESS BASIC QUERY COURSE - Maine.gov
Only one record is allowed to have a particular primary key, thus preventing duplicate records in the table. A foreign key is a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found