emacs.d/texmf/tex/latex/mycustomstyles/komageneral.sty

116 lines
3.1 KiB
Text
Raw Normal View History

\ProvidesPackage{komageneral}
2024-09-30 13:47:09 +02:00
% Base packages
\usepackage{fontspec}
\usepackage{geometry}
\usepackage{scrlayer-scrpage}
2024-09-30 13:47:09 +02:00
\usepackage{titlesec}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{fancyhdr}
2024-10-28 16:49:56 +01:00
\usepackage[expansion,protrusion=true]{microtype}
2024-09-30 13:47:09 +02:00
\usepackage{biblatex}
2024-10-28 16:49:56 +01:00
\usepackage{float}
\usepackage{xcolor}
\usepackage{listings}
\usepackage{longtable}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage[normalem]{ulem}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{capt-of}
\usepackage{hyperref}
\usepackage{booktabs}
\usepackage{polyglossia}
\usepackage{grffile}
\usepackage{unicode-math}
\usepackage[Export]{adjustbox}
2024-09-30 13:47:09 +02:00
\usepackage{graphicx} % Added for including images
2024-10-28 16:49:56 +01:00
% \addbibresource{yourbibliography.bib}
2024-10-31 19:34:37 +01:00
\documentclass[a4paper,10pt,captions=tableheading,twoside=false]{scrartcl}
2024-10-29 16:56:35 +01:00
\setdefaultlanguage{english}
\setotherlanguages{german}
2024-10-28 16:49:56 +01:00
\adjustboxset{max size={\textwidth}{0.6\textheight}}
\KOMAoptions{toc=flat,toc=listof}
2024-09-30 13:47:09 +02:00
% Font settings
\defaultfontfeatures{Ligatures=TeX, RawFeature={+zero, +liga}}
\setmainfont{Noto Serif Regular}[BoldFont={Noto Serif Bold}, ItalicFont={Noto Serif Italic}]
\setsansfont{Noto Sans Regular}[BoldFont={Noto Sans Bold}, ItalicFont={Noto Sans Italic}]
\setmonofont{Noto Sans Mono}[BoldFont={Noto Sans Mono Bold}, Scale=0.8]
2024-10-28 16:49:56 +01:00
\linespread{1.25}
2024-09-30 13:47:09 +02:00
% Geometry settings
2024-10-28 16:49:56 +01:00
\geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm}
2024-09-30 13:47:09 +02:00
% Header and footer settings with fancyhdr
\pagestyle{fancy}
\fancyhf{}
\fancyhead[L]{\nouppercase{\leftmark}}
\fancyhead[R]{\thepage}
% Section formatting with titlesec
\titleformat{\section}{\Large\bfseries\sffamily}{\thesection}{1em}{}
\titleformat{\subsection}{\large\bfseries\sffamily}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\normalsize\bfseries\sffamily}{\thesubsubsection}{1em}{}
% List formatting with enumitem
\setlist[itemize]{noitemsep, topsep=0pt}
\setlist[enumerate]{noitemsep, topsep=0pt}
% Caption settings
\captionsetup{font=small, labelfont=bf}
% Custom quote environment
\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\itshape}
% Custom formatting commands
\newcommand{\important}[1]{\textbf{#1}}
\newcommand{\code}[1]{\texttt{#1}}
% Title page settings
2024-10-28 16:49:56 +01:00
\newcommand{\TitlePage}[3]{ % #1 - Logo file, #2 - Company name
2024-09-30 13:47:09 +02:00
\begin{titlepage}
\centering
\vspace*{1cm}
\includegraphics[width=0.3\textwidth]{#1}\par\vspace{1cm}
2024-10-28 16:49:56 +01:00
{\Huge #2\par}
2024-09-30 13:47:09 +02:00
\vspace{2cm}
2024-10-28 16:49:56 +01:00
{\Large #3\par}
2024-09-30 13:47:09 +02:00
\vfill
{\large \today\par}
\end{titlepage}
}
2024-10-28 16:49:56 +01:00
% List items
\setlist[itemize]{wide=0pt, leftmargin=*, nosep}
\setlist[itemize,2]{label=\textbullet}
\setlist[itemize,3]{label=$\circ$}
% Global listing settings
\lstset{
basicstyle={\ttfamily\color[rgb]{0.30, 0.34, 0.42}},
showstringspaces=false,
keywordstyle={\color[rgb]{0.23, 0.26, 0.32}\textbf},
commentstyle={\color[rgb]{0.26, 0.30, 0.37}},
stringstyle={\color[rgb]{0.18, 0.20, 0.25}},
frame=single,
numbers=left,
numbersep=5pt,
numberstyle={\ttfamily\color[rgb]{0.30, 0.34, 0.42}},
keepspaces=true,
showspaces=false,
showstringspaces=false,
showtabs=false,
breaklines=true,
breakatwhitespace=false,
tabsize=2,
columns=fullflexible
}