Hello everyone,
I am currently working on my bachelors thesis. I programmed a little app for my professor and i want to include some of my code in my thesis in order to explain certain functions and how i solved problems that came up.
It is pretty easy to include code in LaTex. For that i use the listings-package and include my files like so:
\lstinputlisting[language={[Visual]Basic}]{code.b4a}
As you can see, Visual basic is as close as it gets to the b4a programming language.
Using the colors package you can create your own colors and try to get close to the look of the b4a ide but there is a problem:
\lstset{ %
basicstyle=\footnotesize,
backgroundcolor=\color{white},
numberstyle=\color{B4Apurple2},
commentstyle=\color{B4Agreen},
keywordstyle=\color{B4Ablue},
stringstyle=\color{B4Ared},
identifierstyle=\color{B4Apurple},
captionpos=b,
frame=single,
label=Skript23,
breaklines=true,
}
this is how the code is formatted and there are simply not enough differentiations that i could use all the colors that b4a uses. Does anyone of you have a better idea? Would it make sense to take screenshots of the code in order to keep the same layout and format? I appreciate your help.
Oddjob
PS: This is how it looks like. Its close, but not perfect.
I am currently working on my bachelors thesis. I programmed a little app for my professor and i want to include some of my code in my thesis in order to explain certain functions and how i solved problems that came up.
It is pretty easy to include code in LaTex. For that i use the listings-package and include my files like so:
\lstinputlisting[language={[Visual]Basic}]{code.b4a}
As you can see, Visual basic is as close as it gets to the b4a programming language.
Using the colors package you can create your own colors and try to get close to the look of the b4a ide but there is a problem:
\lstset{ %
basicstyle=\footnotesize,
backgroundcolor=\color{white},
numberstyle=\color{B4Apurple2},
commentstyle=\color{B4Agreen},
keywordstyle=\color{B4Ablue},
stringstyle=\color{B4Ared},
identifierstyle=\color{B4Apurple},
captionpos=b,
frame=single,
label=Skript23,
breaklines=true,
}
this is how the code is formatted and there are simply not enough differentiations that i could use all the colors that b4a uses. Does anyone of you have a better idea? Would it make sense to take screenshots of the code in order to keep the same layout and format? I appreciate your help.
Oddjob
PS: This is how it looks like. Its close, but not perfect.