Monaco EditorでLaTeXをハイライトする機会がありましたので、備忘録です。
Ace Editorを対象にした以下の記事の続編です。
参考になりましたら幸いです。
画面例#

デモサイト#
https://nakamura196.github.io/ace_latex/monaco/
リポジトリ#
https://github.com/nakamura196/ace_latex/
ソースコード#
カスタム言語の設定方法については、以下のページが参考になりました。
https://microsoft.github.io/monaco-editor/playground.html?source=v0.40.0#example-extending-language-services-custom-languages
また、rulesの作成については、ChatGPTの利用が便利でした。
他の方の参考になりましたら幸いです。