mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-12 22:48:41 +00:00
docs: Fix \bar documentation by avoiding global redefinition (#3804)
* `\bar` examples weren't rendering correctly because of `\gdef\bar` example when illustrating `\gdef` and `\xdef`. * Improve `\bar` name to `\sqr` when defining squaring (not necessary for fix, but improved naming). * Fix `\def` scoping test that originally seemed related. Fixes #3803
This commit is contained in:
@@ -332,7 +332,7 @@ Direct Input: $∀ ∴ ∁ ∵ ∃ ∣ ∈ ∉ ∋ ⊂ ⊃ ∧ ∨ ↦ → ←
|
||||
|||
|
||||
|:-------------------------------------|:------
|
||||
|$\def\foo{x^2} \foo + \foo$ | `\def\foo{x^2} \foo + \foo`
|
||||
|$\gdef\bar#1{#1^2} \bar{y} + \bar{y}$ | `\gdef\bar#1{#1^2} \bar{y} + \bar{y}`
|
||||
|$\gdef\foo#1{#1^2} \foo{y} + \foo{y}$ | `\gdef\foo#1{#1^2} \foo{y} + \foo{y}`
|
||||
| | `\edef\macroname#1#2…{definition to be expanded}`
|
||||
| | `\xdef\macroname#1#2…{definition to be expanded}`
|
||||
| | `\let\foo=\bar`
|
||||
|
Reference in New Issue
Block a user