答案1
如果你知道要突出显示哪些单词或句子,则可以使用命令的emph
and 。这是手动完成的,并不是真正的技巧,但它应该有效。emphstyle
lstset
\usepackage{listings}
\lstset{
language=bash,% or another depending of your input
emph={[1] word with style 1},
emphstyle=[1]\color{teal},
emph={[2] word with style 2},
emphstyle=[2]\color{violet}\bfseries\slshape,
}