Answers for "latex insert code"

1

writing code in latex

begin{lstlisting}
Put your code here.
end{lstlisting}
Posted by: Guest on March-28-2021
0

insert table latex

begin{center}
begin{tabular}{ |c|c|c| } 
 hline
 cell1 & cell2 & cell3 \ 
 cell4 & cell5 & cell6 \ 
 cell7 & cell8 & cell9 \ 
 hline
end{tabular}
end{center}
Posted by: Guest on November-21-2020
1

latex code

documentclass{article}
usepackage[utf8]{inputenc}

usepackage{listings}
usepackage{xcolor}

definecolor{codegreen}{rgb}{0,0.6,0}
definecolor{codegray}{rgb}{0.5,0.5,0.5}
definecolor{codepurple}{rgb}{0.58,0,0.82}
definecolor{backcolour}{rgb}{0.95,0.95,0.92}

lstdefinestyle{mystyle}{
    backgroundcolor=color{backcolour},   
    commentstyle=color{codegreen},
    keywordstyle=color{magenta},
    numberstyle=tinycolor{codegray},
    stringstyle=color{codepurple},
    basicstyle=ttfamilyfootnotesize,
    breakatwhitespace=false,         
    breaklines=true,                 
    captionpos=b,                    
    keepspaces=true,                 
    numbers=left,                    
    numbersep=5pt,                  
    showspaces=false,                
    showstringspaces=false,
    showtabs=false,                  
    tabsize=2
}

lstset{style=mystyle}

begin{document}
The next code will be directly imported from a file

lstinputlisting[language=Octave]{BitXorMatrix.m}
end{document}
Posted by: Guest on November-16-2020
0

insert table latex

%...

begin{sidewaystable}[h!] % <--
  begin{center}
  caption{Landscape table.}
  label{tab:table1}
  begin{tabular}{l|S|r}
  	toprule
  	textbf{Value 1} & textbf{Value 2} & textbf{Value 3}\
  	$alpha$ & $beta$ & $gamma$ \
    midrule
    1 & 1110.1 & a\
    2 & 10.1 & b\
    3 & 23.113231 & c\
    bottomrule
  end{tabular}
  end{center}
end{sidewaystable}

%...
Posted by: Guest on November-21-2020
0

include code in latex

usepackage{listings}
usepackage{color}

definecolor{dkgreen}{rgb}{0,0.6,0}
definecolor{gray}{rgb}{0.5,0.5,0.5}
definecolor{mauve}{rgb}{0.58,0,0.82}

lstset{frame=tb,
  language=Java,
  aboveskip=3mm,
  belowskip=3mm,
  showstringspaces=false,
  columns=flexible,
  basicstyle={smallttfamily},
  numbers=none,
  numberstyle=tinycolor{gray},
  keywordstyle=color{blue},
  commentstyle=color{dkgreen},
  stringstyle=color{mauve},
  breaklines=true,
  breakatwhitespace=true,
  tabsize=3
}
Posted by: Guest on October-18-2020

Code answers related to "Assembly"

Browse Popular Code Answers by Language