I am trying to get the argument of \EscVerb to become highlighted as the argument of \verb. I added a custom cwl file with the following command


But this only causes the following text to become highlighted as code, not the argument itself

enter image description here

How to obtain proper highlighting by providing suitable cwl command?




\EscVerb{\\mathcal} fgfdgfdgfd


  • I've posted a discussion under texstudio's repo: github.com/texstudio-org/texstudio/discussions/1951. Commented Nov 20, 2021 at 4:48
  • @muzimuzhiZ. The highlighting for \verb argument is also done using a cwl file I believe, which means it is the documentation of TeXstudio needs improvement Commented Nov 20, 2021 at 8:56
  • \verb|<code>| and \EscVerb{<code>} are different syntaxes, hence perhaps the handling of verbatimSymbol is hardcoded to only support being delimited by two identical chars. Commented Nov 20, 2021 at 10:18


You must log in to answer this question.

Browse other questions tagged .