Created
March 1, 2018 22:57
-
-
Save vivngo/e37e1c7b79bf7e8b910c6566c59c46be to your computer and use it in GitHub Desktop.
SQL syntax highlighting in LaTeX
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
\usepackage{listings} | |
\usepackage{color} | |
\definecolor{dkgreen}{rgb}{0,0.6,0} | |
\definecolor{gray}{rgb}{0.5,0.5,0.5} | |
\definecolor{mauve}{rgb}{0.58,0,0.82} | |
\lstset{language=SQL, | |
basicstyle={\small\ttfamily}, | |
belowskip=3mm, | |
breakatwhitespace=true, | |
breaklines=true, | |
classoffset=0, | |
columns=flexible, | |
commentstyle=\color{dkgreen}, | |
framexleftmargin=0.25em, | |
frameshape={}{yy}{}{}, %To remove to vertical lines on left, set `frameshape={}{}{}{}` | |
keywordstyle=\color{blue}, | |
numbers=none, %If you want line numbers, set `numbers=left` | |
numberstyle=\tiny\color{gray}, | |
showstringspaces=false, | |
stringstyle=\color{mauve}, | |
tabsize=3, | |
xleftmargin =1em | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@egeorg02 You put your SQL Code in a block like this
\begin{lstlisting}
SQL-Code
\end{lstlisting}
(If you haven't found out yourself by now :D)
Many thanks to the author, worked perfectly well!