Tag Info

New answers tagged

2

You can realise that with pink N (?=\d+)(pt|mm|cm|in|ex|em) (?=\d+) checks if there is at least one (+) occurrence of a digit (\d). If there is, the listed character-combinations will be printed in pink. It's important to group them in braces, otherwise the (?= )-check would only affect the first character-combination; the others would be printed ...


1

This works for me: \documentclass{article} \usepackage{listings} \usepackage{xcolor} \begin{document} \lstdefinelanguage{JavaScript}{ keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break}, keywordstyle=\color{blue}\bfseries, ndkeywords={class, export, boolean, throw, implements, ...



Top 50 recent answers are included