I am trying to customize cwl
file to provide verbatim highlighting. I am trying to get assistance from TeXstudio : User manual, and my cwl
file contains the following
\basoom{verbatimSymbol}
This is what I get
TeXstudio thus, does not actually highlight the argument itself as verbatim, but rather highlights the input after the closing bracket. It is possible to solve this by using |
for brackets, but arguments defined using LaTeX only appear in curly brackets. Thus, the possible solutions are
- Modify the
cwl
to highlight only the argument between curly brackets as verbatim - Define the command itself as to accept
|
for brackets for its argument
This is my MWE
\documentclass[aspectratio=169, xcolor={x11names}, t, handout]{beamer}
\usetheme{Dresden}
\usefonttheme{professionalfonts}
\renewcommand{\sfdefault}{ppl}
\usepackage[T1]{fontenc}
\renewcommand{\encodingdefault}{T1}
\usepackage{listings}
\lstdefinestyle{LaTeX}{
% style
language={[LaTeX]TeX},
basicstyle=\linespread{0.8}\ttfamily\color{DodgerBlue3},
}
\lstset{style=LaTeX}
\newcommand{\basoom}[1]{\lstinline|#1|} % for testing
\begin{document}
\basoom{BasmahWantsMeHappy}BasmahWantsMeHappy
\basoom|BasmahWantsMeHappy|
\end{document}
\basoom{arg%definition}
then follow the steps here to define custom highlighting for the arg. Replace\footnote
with\basoom
in that example