Skip to content
Snippets Groups Projects

LaTeX Preamble

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Felix Drees

    LaTeX Preamble for Math, Physics, Computer Science

    Edited
    preamble.tex 3.12 KiB
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %
    %   based on Artikel-Vorlage (komplex)
    %   https://stuga.math.uni-bremen.de/wiki/LaTeX:_Vorlagen
    %
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    
    \usepackage[ngerman]{babel}
    \usepackage{amsmath,amssymb,amsthm,amsfonts,amsbsy,latexsym}
    \usepackage[utf8]{inputenc}
    \usepackage[T1]{fontenc}
    \usepackage{enumerate,url}
    \usepackage{graphicx}
    \usepackage{tikz}
    \usepackage{bibgerm}
    \usepackage[german=guillemets]{csquotes}
    \usepackage{makecell}
    \usepackage{subcaption}
    \usepackage{eurosym}
    \usepackage{lipsum}
    
    \usepackage{selinput}
    \SelectInputMappings{
      adieresis={ä},
      germandbls={ß},
      Euro={},
    }
    
    %%% MATH %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \newcommand{\fline}{\bigskip\noindent}
    \newcommand{\field}[1]{\mathbb{#1}}
    \newcommand{\N}{\field{N}}
    \newcommand{\Z}{\field{Z}}
    \newcommand{\Q}{\field{Q}}
    \newcommand{\R}{\field{R}}
    \newcommand{\C}{\field{C}}
    \newcommand{\K}{\field{K}}
    \newcommand{\B}{\field{B}}
    
    \newtheorem*{fakt}{Fakt}
    \newtheorem{fazit}{Fazit}
    \newtheorem{satz}{Satz}
    \newtheorem{theo}{Theorem}
    \newtheorem{lemma}[satz]{Lemma}
    \newtheorem{chara}{Charakterisierung}
    
    \theoremstyle{definition}
    \newtheorem{defi}{Definition}
    \newtheorem{termi}{Terminologie}
    
    \theoremstyle{remark}
    \newtheorem*{beh}{Behauptung}
    \newtheorem{rem}{Bemerkung}
    \newtheorem*{folg}{Folgerung}
    \newtheorem{korr}{Korollar}
    \newtheorem*{bsp}{Beispiel}
    \newtheorem*{bspe}{Beispiele}
    \newtheorem{aufg}{\textbf{Aufgabenstellung}}
    
    \newcommand{\induction}[1]{\textbf{Beweis} (durch vollständige Induktion nach $#1$): }
    \newcommand{\proofcon}{\textbf{Beweis} (durch Kontraposition):}
    \newcommand{\proofind}{\textbf{Beweis} (indirekt): }
    \newcommand{\indb}[2]{Induktionsbeginn ($#1 = #2$): }
    \newcommand{\indv}{Induktionsvoraussetzung ($\star$): }
    \newcommand{\inds}[1]{Induktionsschritt ($#1\rightsquigarrow #1 +1$): }
    
    \newcommand{\expo}[1]{\exp\left\{{#1}\right\}}
    \newcommand{\series}[1]{\sum_{#1}^{\infty}}
    \newcommand{\stetig}[2]{\mathscr{C}(#1,#2)}
    \newcommand{\topologie}{\mathfrak{T}}
    
    %%% PHYSICS %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage{units}
    
    %%% COMPUTER SCIENCE %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \usepackage{listings}
    \usepackage{dirtree}
    
    \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=\tiny\color{codegray},
        stringstyle=\color{codepurple},
        basicstyle=\ttfamily\footnotesize,
        breakatwhitespace=false,         
        breaklines=true,                 
        captionpos=b,                    
        keepspaces=true,                 
        numbers=left,                    
        numbersep=5pt,                  
        showspaces=false,                
        showstringspaces=false,
        showtabs=false,                  
        tabsize=2
    }
    
    % \lstset{style=mystyle}
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment