Last active
April 25, 2020 13:34
-
-
Save eddieantonio/ce41bdd47aaff7292e17e181ec4d3f66 to your computer and use it in GitHub Desktop.
Simple JavaScript definition for LaTeX's Listings package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\NeedsTeXFormat{LaTeX2e} | |
\ProvidesPackage{javascript}[2017/04/13] | |
% Defines a Listings definition for JavaScript (ECMAscript 2016). | |
\RequirePackage{listings} | |
\lstdefinelanguage{JavaScript}{% | |
keywords={const, let, typeof, instanceof, new, true, false, catch, function, return, null, undefined, catch, switch, var, if, in, while, for, do, else, case, break}, | |
keywordstyle=\bfseries, | |
ndkeywords={class, export, throw, import, this}, | |
ndkeywordstyle=\bfseries, | |
sensitive=false, | |
comment=[l]{//}, | |
morecomment=[s]{/*}{*/}, | |
commentstyle=\ttfamily, | |
stringstyle=\color{blue}\ttfamily, | |
morestring=[b]', | |
morestring=[b]`, | |
morestring=[b]" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment