Colorize strings in code examples.

This commit is contained in:
Máté Cserép 2019-06-08 07:58:35 +02:00
parent 90cbec0b1e
commit d8acbb79cf

View File

@ -181,6 +181,7 @@
% Színek % Színek
\definecolor{codebackg}{rgb}{0.95,0.95,0.95} \definecolor{codebackg}{rgb}{0.95,0.95,0.95}
\definecolor{codecomment}{rgb}{0,0.6,0} \definecolor{codecomment}{rgb}{0,0.6,0}
\definecolor{codestring}{rgb}{0.58,0,0.82}
\colorlet{todobackg}{orange!10} \colorlet{todobackg}{orange!10}
% ------------------------------ % ------------------------------
@ -284,6 +285,7 @@
backgroundcolor=\color{codebackg}, backgroundcolor=\color{codebackg},
keywordstyle=\color{blue}, keywordstyle=\color{blue},
commentstyle=\color{codecomment}, commentstyle=\color{codecomment},
stringstyle=\color{codestring},
stepnumber=1, stepnumber=1,
firstnumber=1, firstnumber=1,
numbersep=5pt, numbersep=5pt,
@ -295,8 +297,7 @@
breakatwhitespace=false, breakatwhitespace=false,
float, float,
frame=linesc, frame=linesc,
captionpos=b, captionpos=b
morekeywords={var}
} }
% Algoritmus kommentek jobb szélre igazítása % Algoritmus kommentek jobb szélre igazítása
\renewcommand{\algorithmiccomment}[1]{\hfill {\it #1}} \renewcommand{\algorithmiccomment}[1]{\hfill {\it #1}}