Advertisement
Guest User

Untitled

a guest
Mar 30th, 2017
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.46 KB | None | 0 0
  1. \documentclass[10pt,a4paper]{article}
  2. \usepackage[utf8]{inputenc}
  3. \usepackage{amsmath}
  4. \usepackage{amsfonts}
  5. \usepackage{amssymb}
  6. \usepackage{listings}
  7. \usepackage{color}
  8. \title{My title}
  9. \author{Ruben Horn}
  10. \date{\today}
  11.  
  12. \definecolor{mygreen}{rgb}{0,0.6,0}
  13. \definecolor{mygray}{rgb}{0.5,0.5,0.5}
  14. \definecolor{mymauve}{rgb}{0.58,0,0.82}
  15.  
  16. \lstset{ %
  17. backgroundcolor=\color{white}, % choose the background color
  18. basicstyle=\footnotesize, % size of fonts used for the code
  19. breaklines=true, % automatic line breaking only at whitespace
  20. captionpos=b, % sets the caption-position to bottom
  21. commentstyle=\color{mygreen}, % comment style
  22. escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
  23. keywordstyle=\color{blue}, % keyword style
  24. stringstyle=\color{mymauve}, % string literal style
  25. }
  26.  
  27. \begin{document}
  28. \maketitle
  29. \tableofcontents
  30. \newpage
  31. \section{My section}
  32. \subsection{My subsection}
  33. Hello $\frac{1}{0}=\infty $ Document. $\int_0^\infty \! f(x)\, \mathrm{d}x$
  34. \subsection{Code:}
  35. \begin{lstlisting}[language=java]
  36. public class MyClass{
  37. public static void main(String[] args){
  38. System.out.println("Hello, Document!");
  39. }
  40. }
  41. \end{lstlisting}
  42. \subsection{Some more Code:}
  43. \begin{lstlisting}[language=python]
  44. def _init_():
  45. print("Hello, Snake!");
  46. \end{lstlisting}
  47. \subsection{...and finally some text:}
  48. Some text
  49. \begin{quote}
  50. ...to be, or [Tobi]? - Some British writer
  51. \end{quote}
  52. more text
  53. \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement