Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- \documentclass[10pt,a4paper]{article}
- \usepackage[utf8]{inputenc}
- \usepackage{amsmath}
- \usepackage{amsfonts}
- \usepackage{amssymb}
- \usepackage{listings}
- \usepackage{color}
- \title{My title}
- \author{Ruben Horn}
- \date{\today}
- \definecolor{mygreen}{rgb}{0,0.6,0}
- \definecolor{mygray}{rgb}{0.5,0.5,0.5}
- \definecolor{mymauve}{rgb}{0.58,0,0.82}
- \lstset{ %
- backgroundcolor=\color{white}, % choose the background color
- basicstyle=\footnotesize, % size of fonts used for the code
- breaklines=true, % automatic line breaking only at whitespace
- captionpos=b, % sets the caption-position to bottom
- commentstyle=\color{mygreen}, % comment style
- escapeinside={\%*}{*)}, % if you want to add LaTeX within your code
- keywordstyle=\color{blue}, % keyword style
- stringstyle=\color{mymauve}, % string literal style
- }
- \begin{document}
- \maketitle
- \tableofcontents
- \newpage
- \section{My section}
- \subsection{My subsection}
- Hello $\frac{1}{0}=\infty $ Document. $\int_0^\infty \! f(x)\, \mathrm{d}x$
- \subsection{Code:}
- \begin{lstlisting}[language=java]
- public class MyClass{
- public static void main(String[] args){
- System.out.println("Hello, Document!");
- }
- }
- \end{lstlisting}
- \subsection{Some more Code:}
- \begin{lstlisting}[language=python]
- def _init_():
- print("Hello, Snake!");
- \end{lstlisting}
- \subsection{...and finally some text:}
- Some text
- \begin{quote}
- ...to be, or [Tobi]? - Some British writer
- \end{quote}
- more text
- \end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement