How can i handle this problem ?
Code: Select all
\begin{lstlisting}
fejl <- rnorm(antal_obs_total,0,1) + B %*% beta_endo
\end{lstlisting}
Code: Select all
\documentclass[12pt,a4paper,oneside]{report}
\usepackage[top=2.0cm,left=1.5 cm,right=3.5 cm,bottom=2.0cm,headheight=11.0 pt]{geometry} %Sætter lille top, bund og venstreside. Samt større højreside(så læser kan indsætte noter i margin)
\usepackage[ansinew]{inputenc}
\usepackage{graphicx}
\usepackage{amssymb,amsmath}
\usepackage[compact]{titlesec} %Bruges til at fjerne white space omkring overskrifter(chapters/sections etc.)
\usepackage{tabularx}
\usepackage{multicol}
\usepackage{amsmath, amsthm, amssymb} %Stor matematik pakke
\usepackage{ulem} %lettere adgang til over og underline
\usepackage{listings,relsize} %Gør kode pænere
\usepackage{textcomp} %gør at man kan skrive nye symboler, bla. '
\usepackage{wrapfig} %Gør at figure kan wrappes
\usepackage{color} %Gør at tekst osv. kan farves
\usepackage[bf]{caption} %gGør navnet på captions(fx. "Figur 5.1"') til fed skrift
\usepackage{enumerate} %Gør at man kan sætte tal/bogstaver som indeks på lister
\usepackage[nottoc,numbib]{tocbibind} %Sørger for at bibliografien er med i table of kontents
%\usepackage{pslatex} %Sætter skrift typen til Times new roman (langt grimmere end standard LaTex skrift)
%\usepackage{harvard} %Tillader at citer som \citeasnoun hvilket af nogen af foretrukket over \cite
\usepackage{natbib}
\usepackage[all]{xy} %Kan bruges til at tegne figurer såsom flowcharts
\usepackage{verbatim}
\setcounter{tocdepth}{1} %Dybde af indholdsfortegnelsen: 1: Chapters, 2: sections, 3: subsections osv.
%\input{diverse.settings.tex} %Nogle forskellige settings og genvejs kommandier
%Listings indstillinger defineres
\lstset{ %
language=R, % choose the language of the code
basicstyle=\footnotesize, % the size of the fonts that are used for the code
numbers=left, % where to put the line-numbers
numberstyle=\footnotesize, % the size of the fonts that are used for the line-numbers
stepnumber=1, % the step between two line-numbers. If it's 1 each line
% will be numbered
numbersep=5pt, % how far the line-numbers are from the code
backgroundcolor=\color{white}, % choose the background color. You must add \usepackage{color}
showspaces=false, % show spaces adding particular underscores
showstringspaces=false, % underline spaces within strings
showtabs=false, % show tabs within strings adding particular underscores
frame=single, % adds a frame around the code
tabsize=2, % sets default tabsize to 2 spaces
captionpos=b, % sets the caption-position to bottom
breaklines=true, % sets automatic line breaking
breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace
title=\lstname, % show the filename of files included with \lstinputlisting;
% also try caption instead of title
escapeinside={\%*}{*)}, % if you want to add a comment within your code
morekeywords={*,...} % if you want to add more keywords to the set
}
\begin{document}
\begin{lstlisting}
fejl <- rnorm(antal_obs_total,0,1) + B %*% beta_endo
\end{lstlisting}
\end{document}