\colorbox does not work inside of \gdef #2562
Answered
by
edemaine
rudolf-adamkovic
asked this question in
Q&A
-
I am struggling to define a
All three macros (KaTeX in iA Writer) render as follows: <img width="443" alt="Screen Shot 2020-10-03 at 00 23 35" src="https://user-images.githubusercontent.com/1158274/94974366-afad8e00-050e-11eb-971b-08be5206e536.png”> Am I doing something wrong? Is this supposed to work? |
Beta Was this translation helpful? Give feedback.
Answered by
edemaine
Oct 3, 2020
Replies: 1 comment 1 reply
-
In TeX, a literal \gdef{\highlight}#1{\colorbox{##FFE270}{#1}}
\highlight{Hi.} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
kevinbarabash
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In TeX, a literal
#
inside a macro needs to be escaped as##
. Try this: