-
Notifications
You must be signed in to change notification settings - Fork 388
Multiline \boxed{} used in math mode breaks highlighting #4331
Copy link
Copy link
Closed
Description
Environment
- TeXstudio: 4.9.2
- Qt: 6.10.2
- OS: macOS 15.7.3
- TeX distribution: BasicTeX 2025 (irrelevant)
Expected behavior
Multiline \boxed{} used in math mode doesn't break highlighting.
Actual behavior
It breaks highlighting for some closing delimiters.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
% ok
\[
\boxed{}
\]
% "\]" raises "Unrecognized command"
\[
\boxed{
}
\]
\end{document}
\documentclass{article}
\usepackage{amsmath}
\begin{document}
% ok
$
\boxed{}
$
% "\end{document}" raises "closing environment which has not been opened"
$
\boxed{
}
$
\end{document}
More info
\boxed from amsmath package has cwl entry
\boxed{formula}
Other commands having formula arguments share the same issue, for example the \ch from chemformula package. So this is caused by handling of cwl command arguments named formula or ending with %formula.
Reactions are currently unavailable