hi cgnieder and thanks for the welcome
This is perfect, and just what I was looking for!:)
Just one question, if I want to make two kinds of keywords, I write:
Code: Select all
...
\lstdefinelanguage{VHDL}{
morekeywords=[a]{
library,use,all,entity,is,port,in,out,end,architecture,of,
begin,and
},
morekeywords=[b]{
STD_LOGIC_VECTOR,STD_LOGIC
},
morecomment=[l]--
}
\usepackage{xcolor}
\colorlet{keyword1}{blue!100!black!80}
\colorlet{keyword2}{blue!50!black!80}
\colorlet{comment}{green!90!black!90}
\lstdefinestyle{vhdl}{
language = VHDL,
basicstyle = \ttfamily,
keywordstyle[a] = \color{keyword1}\bfseries,
keywordstyle[b] = \color{keyword2}\bfseries,
commentstyle = \color{comment}
}
right? (dunno if the color code I used is real, but...
EDIT: after a little work around it worked:)
Code: Select all
\lstdefinelanguage{VHDL}{
morekeywords=[1]{
library,use,all,entity,is,port,in,out,end,architecture,of,
begin,and,or,Not,downto,ALL
},
morekeywords=[2]{
STD_LOGIC_VECTOR,STD_LOGIC,IEEE,STD_LOGIC_1164,
NUMERIC_STD,STD_LOGIC_ARITH,STD_LOGIC_UNSIGNED,std_logic_vector,
std_logic
},
morecomment=[l]--
}
\usepackage[usenames,dvipsnames]{xcolor}
\colorlet{keyword}{blue!100!black!80}
\colorlet{STD}{Lavender}
\colorlet{comment}{green!80!black!90}
\lstdefinestyle{vhdl}{
language = VHDL,
basicstyle = \footnotesize \ttfamily,
keywordstyle = [1]\color{keyword}\bfseries,
keywordstyle = [2]\color{STD}\bfseries,
commentstyle = \color{comment}
breaklines=true, % sets automatic line breaking
tabsize=3 % sets default tabsize to 2 spaces
}