latex: update document and presentation snippet

This commit is contained in:
Marco Thomas
2023-02-27 23:01:59 +01:00
parent a9e4bb337e
commit a824086cdb
2 changed files with 73 additions and 94 deletions

View File

@@ -1,46 +1,50 @@
{
"notes": {
"prefix": "notes",
"prefix": "document",
"body": [
"%%% compile with `latexmk -xelatex -shell-escape DOC.tex`",
"% compile with `latexmk -xelatex -shell-escape main.tex`",
"% if glossaries are used, run `makeglossaries`",
"",
"%",
"%%% general article setup",
"%",
"\\documentclass{article}[a4paper]",
"",
"%%% general includes",
"%",
"%%% includes + their setup",
"%",
"% use a4 paper",
"\\usepackage{a4wide}",
"% math typesetting",
"\\usepackage{mathtools}",
"\\usepackage{amsthm}",
"\\usepackage{amssymb}",
"\\usepackage{amsmath}",
"\\usepackage{amsfonts}",
"% correct hyphons",
"\\usepackage{hyphenat}",
"% draw things and color correctly",
"\\usepackage{tikz}",
"\\usepackage{graphicx}",
"\\usepackage{xcolor}",
"\\usepackage{color}",
"",
"%%% used to \\import{PATH}{FILE}",
"% import other files",
"\\usepackage{import}",
"",
"%%% DEUTSCH!",
"% german names",
"\\usepackage[ngerman]{babel}",
"",
"%%% lorem ipsum text",
"% lorem impsum",
"\\usepackage{blindtext}",
"",
"%%% figures in text flow",
"% figures in text flow",
"\\usepackage{wrapfig}",
"",
"%%% links in toc etc",
"% everything related to links",
"\\usepackage{hyperref}",
"",
"%%% source code",
"% listings",
"\\usepackage{listings}",
"\\usepackage{minted}",
"\\usepackage{fontspec}",
"\\setmonofont[Scale=0.85]{SFMono Nerd Font}",
"\\usepackage{xcolor}",
"\\usepackage{color}",
"\\definecolor{bg}{rgb}{0.95, 0.95, 1.0}",
"",
"%%% define own enumeration styles",
"% enumerations",
"% use custom labels with `\\begin{enumerate}[label=$\\bullet$]`",
"% \\arabic*) or \\roman*) also work",
"\\usepackage{enumerate}",
@@ -50,43 +54,25 @@
"\\setlist[enumerate, 1]{label=$\\bullet$}",
"\\setlist[enumerate, 2]{label=$\\bullet$}",
"\\setlist[enumerate, 3]{label=$\\bullet$}",
"",
"%%% cleaner newline indentation",
"% newline indentation at beginning",
"\\usepackage[parfill]{parskip}",
"",
"%%% break page on new section",
"% break page on new section",
"\\usepackage{titlesec}",
"\\newcommand{\\sectionbreak}{\\clearpage}",
"",
"%%% remove page numbers (fancyhdr provides its own)",
"\\usepackage{nopageno}",
"",
"%%% fancy headers and footers",
"% headers and footers",
"\\usepackage{fancyhdr}",
"\\pagestyle{headings}",
"",
"%%% theorem-style environments",
"\\usepackage{proof}",
"\\theoremstyle{definition}",
"\\newtheorem{definition}{Definition}[section]",
"\\newtheorem{example}{Beispiel}[section]",
"\\newtheorem{algo}{Algorithmus}[section]",
"\\newtheorem{theorem}{Satz}[section]",
"\\newtheorem*{remark}{Bemerkung}",
"",
"%%% glossary, use with \\gls{}",
"% make sure to run `makeglossaries FILE` to generate the glossary entries",
"\\usepackage{nopageno}",
"% glossary",
"\\usepackage[toc]{glossaries}",
"",
"%%% bibtex - cite with \\autocite{}, will show in footnote",
"% quotes",
"\\usepackage{csquotes}",
"\\usepackage[style=verbose-trad2]{biblatex}",
"% bibtex",
"\\usepackage{biblatex}",
"",
"%%% set monospace font and decrease size, to match 80c in minted",
"\\usepackage{fontspec}",
"\\setmonofont[Scale=0.85]{SFMono Nerd Font}",
"",
"%%% set titlepage",
"%",
"%%% document",
"%",
"\\title{ \\\\\\[0.2em] \\large }",
"\\author{Marco Thomas}",
"\\date{\\today}",
@@ -96,26 +82,22 @@
"",
"\\begin{document}",
"",
"% use with \\gls{nvim}, new entry with snippet nge",
"% \\import{.}{glossary.tex}",
"",
"% create title page with toc",
"\\maketitle",
"\\newpage",
"\\tableofcontents",
"\\newpage",
"",
"% glossary, use with \\gls{TERM}; make sure to run `makeglossaries`",
"\\printglossaries",
"",
"% begin here; don't forget to relaunch nvim",
"% and create a .latexmkrc :>",
"% 1. Close NVim",
"% 2. `touch .latexmkrc`",
"\\section{}",
"",
"% bibliography, cite with \\autocite{}",
"\\printbibliography[heading=bibintoc,title={Quellenverzeichnis}]",
"% \\listofigures",
"% \\listotables",
"% \\printglossaries",
"% \\printbibliography[heading=bibintoc,title={Quellenverzeichnis}]",
"",
"% optional appendix",
"% \\appendix",
"% \\section{optional appendix}",
"",
@@ -126,17 +108,15 @@
"presentation": {
"prefix": "presentation",
"body": [
"%%% compile with `latexmk -xelatex -interaction=nonstop -synctex=1 -shell-escape DOC.tex",
"% compile with `latexmk -xelatex -interaction=nonstop -synctex=1 -shell-escape main.tex",
"",
"%%% general beamer setup",
"\\documentclass[presentation, smaller, aspectratio=169]{beamer}",
"\\usetheme{Singapore}",
"\\usecolortheme{rose}",
"",
"% \\definecolor{accent}{rgb}{0.98047, 0.33203, 0.33203}",
"% \\setbeamercolor{structure}{fg=accent}",
"",
"%%% page numbers in the bottom right",
"% page numbers in the bottom right",
"\\addtobeamertemplate{navigation symbols}{}{%",
" \\usebeamerfont{footline}%",
" \\usebeamercolor[fg]{footline}%",
@@ -144,7 +124,7 @@
" \\raisebox{2pt}[0pt][0pt]{\\insertframenumber/\\inserttotalframenumber}",
"}",
"",
"%%% Show section title",
"% Show section title",
"\\AtBeginSection[] {",
" \\begin{frame}",
" \\vfill",
@@ -156,25 +136,28 @@
" \\end{frame}",
"}",
"",
"%%% DEUTSCH!",
"%",
"%%% include + their setup",
"%",
"% german names",
"\\usepackage[ngerman]{babel}",
"",
"%%% general includes",
"% math type setting",
"\\usepackage{mathtools}",
"\\usepackage{amsthm}",
"\\usepackage{amssymb}",
"\\usepackage{amsmath}",
"% correct hyphenation",
"\\usepackage{hyphenat}",
"% draw things and color correctly",
"\\usepackage{tikz}",
"\\usepackage{graphicx}",
"\\usepackage{color}",
"\\usepackage{proof}",
"",
"%%% source code",
"% listings",
"\\usepackage{listings}",
"\\usepackage{minted}",
"",
"%%% define own enumeration styles",
"\\usepackage{fontspec}",
"\\setmonofont[Scale=0.85]{SFMono Nerd Font}",
"% enumerations",
"% use custom labels with `\\begin{enumerate}[label=$\\bullet$]`",
"% \\arabic*) or \\roman*) also work",
"\\usepackage{enumerate}",
@@ -185,11 +168,9 @@
"\\setlist[enumerate, 2]{label=$\\bullet$}",
"\\setlist[enumerate, 3]{label=$\\bullet$}",
"",
"%%% set monospace font and decrease size, to match 80c in minted",
"\\usepackage{fontspec}",
"\\setmonofont[Scale=0.85]{SFMono Nerd Font}",
"",
"%%% set metadata",
"%",
"%%% document",
"%",
"\\title{}",
"\\subtitle{}",
"%\\institute{}",
@@ -211,10 +192,10 @@
"\\end{frame}",
"\\newpage",
"",
"% begin here; don't forget to relaunch nvim",
"% and create a .latexmkrc :>",
"% 1. Close nvim",
"% 2. `touch .latexmkrc`",
"\\section{}",
"\\begin{frame}",
"\\begin{frame}[fragile]{}",
"\\end{frame}",
"",
"\\end{document}"
@@ -224,9 +205,6 @@
"letter": {
"prefix": "letter",
"body": [
"%%% compile with TODO",
"",
"%%% general letter setup",
"\\documentclass[",
" fontsize=12pt,",
" parskip=full,",
@@ -238,12 +216,12 @@
" version=last",
"]{scrlttr2}",
"",
"%%% DEUTSCH!",
"\\usepackage[ngerman]{babel}",
"",
"%%% general includes",
"%",
"%%% includes + their setup",
"%",
"\\usepackage{pdfpages}",
"\\usepackage[hidelinks]{hyperref}",
"\\usepackage[ngerman]{babel}",
"",
"\\begin{document}",
"",
@@ -265,7 +243,8 @@
"",
"\\opening{Sehr geehrter}",
"",
"% type here; don't forget to relaunch nvim :>",
"% 1. Close nvim",
"% 2. `touch .latexmkrc`",
"",
"\\closing{mit freundlichen Grüßen}",
"",