2

I have the following example. I use \lstinline{} command to provide code within latex text. However the font size seems to be small. Please if you know how to to trigger this please let me know.

enter image description here

SETUP:

\documentclass[bsc]{bangorcsthesis}
\title{title}
\author{name name}
\date{\today}
\degreeScheme{BSc}
\supervisor{Prof. prof prof}

\bibliographySetup[compressed]
\addbibresource{references.bib}

\usepackage{soul}
\newcommand{\lk}[1]{\textcolor{red}{#1}}
\newcommand{\mk}[1]{\textcolor{green}{#1}}
\newcommand{\question}[1]{\textcolor{blue}{#1}}


\usepackage{float}
\usepackage{listings}
\usepackage{color}
\definecolor{lightgray}{rgb}{.9,.9,.9}
\definecolor{darkgray}{rgb}{.4,.4,.4}
\definecolor{purple}{rgb}{0.65, 0.12, 0.82}

\lstdefinelanguage{JavaScript}{
  keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break},
  keywordstyle=\color{blue}\bfseries,
  ndkeywords={class, export, boolean, throw, implements, import, this, image, createCapture},
  ndkeywordstyle=\color{darkgray}\bfseries,
  identifierstyle=\color{black},
  sensitive=false,
  comment=[l]{//},
  morecomment=[s]{/*}{*/},
  commentstyle=\color{purple}\ttfamily,
  stringstyle=\color{red}\ttfamily,
  morestring=[b]',
  morestring=[b]"
}

\lstset{
   language=JavaScript,
   backgroundcolor=\color{lightgray},
   extendedchars=true,
   basicstyle=\footnotesize\ttfamily,
   showstringspaces=false,
   showspaces=false,
   numbers=left,
   numberstyle=\footnotesize,
   numbersep=9pt,
   tabsize=2,
   breaklines=true,
   showtabs=false,
   captionpos=b
}
\renewcommand\lstlistingname{Code Snippet}

\begin{document}
    ...
    The layout is displayed as soon as the page loads on the user's screen. There are three main parts of the web-page's content. The first one is the original video feed (left canvas) which would be loaded frame by frame according to \lstinline{function draw()} of Processing5 library. The second part (middle of the figure) is where all the events are represented by image buttons and would be executed when mouse event listeners are called for each button individually. The third and final part, is where the 3-Dimensional environment is set (right canvas), using all the necessary WebGL libraries and self-invoking functions are called, such as \lstinline{function animate()} \& \lstinline{function render()}.
    ...
\end{document}
  • 3
    Change basicstyle=\footnotesize\ttfamily, to a font size of your choice. For more information on the basicstyle option see page 30 of the listings manual. – leandriis Apr 21 '19 at 15:34
  • I will delete this later. Ive seen that example it was difficult to understand @CarLaTeX. – Loizos Vasileiou Apr 21 '19 at 15:50
  • 3
    @LoizosVasileiou Don't worry, it's normal to close a question as a duplicate. Do not hesitate to ask other questions if you don't understand what you find on the site. – CarLaTeX Apr 21 '19 at 15:54

0 Answers0