Update komageneral style file

This commit is contained in:
Marcus Kammer 2024-12-22 20:46:45 +01:00
parent 1768ffa802
commit bb6a591d17
Signed by: marcuskammer
GPG key ID: C374817BE285268F
2 changed files with 52 additions and 29 deletions

View file

@ -6,18 +6,18 @@
(setq TeX-command-extra-options (setq TeX-command-extra-options
"-shell-escape") "-shell-escape")
(TeX-add-to-alist 'LaTeX-provided-package-options (TeX-add-to-alist 'LaTeX-provided-package-options
'(("fontspec" "") ("geometry" "") ("scrlayer-scrpage" "") ("enumitem" "") ("caption" "") ("microtype" "expansion" "protrusion=true") ("polyglossia" "") ("biblatex" "") ("float" "") ("xcolor" "") ("listings" "") ("booktabs" "") ("grffile" "") ("unicode-math" "") ("adjustbox" "Export") ("etoolbox" ""))) '(("fontspec" "") ("geometry" "") ("scrlayer-scrpage" "") ("enumitem" "") ("caption" "") ("microtype" "expansion" "protrusion=true") ("polyglossia" "") ("biblatex" "") ("float" "") ("xcolor" "") ("listings" "") ("booktabs" "") ("grffile" "") ("unicode-math" "") ("adjustbox" "Export") ("graphicx" "") ("etoolbox" "") ("longtable" "") ("wrapfig" "") ("rotating" "") ("ulem" "normalem") ("amsmath" "") ("amssymb" "") ("capt-of" "") ("hyperref" "")))
(add-to-list 'LaTeX-verbatim-environments-local "lstlisting") (add-to-list 'LaTeX-verbatim-environments-local "lstlisting")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "href") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "href")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "url") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "path") (add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperbaseurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "nolinkurl")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "lstinline")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "url")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "path")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "url")
(TeX-run-style-hooks (TeX-run-style-hooks
"fontspec" "fontspec"
"geometry" "geometry"
@ -34,7 +34,16 @@
"grffile" "grffile"
"unicode-math" "unicode-math"
"adjustbox" "adjustbox"
"etoolbox") "graphicx"
"etoolbox"
"longtable"
"wrapfig"
"rotating"
"ulem"
"amsmath"
"amssymb"
"capt-of"
"hyperref")
(TeX-add-symbols (TeX-add-symbols
'("TitlePage" 3) '("TitlePage" 3)
'("code" 1) '("code" 1)

View file

@ -3,7 +3,7 @@
% Base packages % Base packages
\usepackage{fontspec} \usepackage{fontspec}
\usepackage{geometry} \usepackage{geometry}
\usepackage{scrlayer-scrpage} % Already included, will be used instead of fancyhdr \usepackage{scrlayer-scrpage} % Part of KOMA-Script bundle
\usepackage{enumitem} \usepackage{enumitem}
\usepackage{caption} \usepackage{caption}
\usepackage[expansion,protrusion=true]{microtype} \usepackage[expansion,protrusion=true]{microtype}
@ -16,15 +16,16 @@
\usepackage{grffile} \usepackage{grffile}
\usepackage{unicode-math} \usepackage{unicode-math}
\usepackage[Export]{adjustbox} \usepackage[Export]{adjustbox}
% \usepackage{longtable} \usepackage{graphicx} % Needed for title page
% \usepackage{wrapfig} \usepackage{etoolbox} % For custom quote environment
% \usepackage{rotating} \usepackage{longtable}
% \usepackage[normalem]{ulem} \usepackage{wrapfig}
% \usepackage{amsmath} \usepackage{rotating}
% \usepackage{amssymb} \usepackage[normalem]{ulem}
% \usepackage{capt-of} \usepackage{amsmath}
% \usepackage{hyperref} \usepackage{amssymb}
% \usepackage{graphicx} \usepackage{capt-of}
\usepackage{hyperref}
\setdefaultlanguage{english} \setdefaultlanguage{english}
\setotherlanguages{german} \setotherlanguages{german}
@ -35,22 +36,36 @@
% Font settings % Font settings
\defaultfontfeatures{Ligatures=TeX, RawFeature={+zero, +liga}} \defaultfontfeatures{Ligatures=TeX, RawFeature={+zero, +liga}}
\setmainfont{Noto Serif Regular}[BoldFont={Noto Serif Bold}, ItalicFont={Noto Serif Italic}] \setmainfont{Noto Serif Regular}[
\setsansfont{Noto Sans Regular}[BoldFont={Noto Sans Bold}, ItalicFont={Noto Sans Italic}] BoldFont={Noto Serif Bold},
\setmonofont{Noto Sans Mono}[BoldFont={Noto Sans Mono Bold}, Scale=0.8] 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
]
\linespread{1.1} \linespread{1.1}
% Geometry settings % Geometry settings
\geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm} \geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm}
% Header and footer settings with scrlayer-scrpage instead of fancyhdr % Header and footer settings with scrlayer-scrpage
\pagestyle{scrheadings} \pagestyle{scrheadings}
\clearpairofpagestyles \clearpairofpagestyles
\cfoot{\pagemark} \automark[section]{section} % Automatically mark sections
\ihead{\@title} % Section title
\ohead{\pagemark}
\setkomafont{pageheadfoot}{\normalfont} \setkomafont{pageheadfoot}{\normalfont}
\setkomafont{pagehead}{\normalfont} \setkomafont{pagehead}{\normalfont}
% Section formatting with KOMA-Script features instead of titlesec % Add lines under the header and above the footer
\setheadsepline{0.2pt} % Thickness of the header line
% Section formatting with KOMA-Script features
\setkomafont{section}{\Large\bfseries\sffamily} \setkomafont{section}{\Large\bfseries\sffamily}
\setkomafont{subsection}{\large\bfseries\sffamily} \setkomafont{subsection}{\large\bfseries\sffamily}
\setkomafont{subsubsection}{\normalsize\bfseries\sffamily} \setkomafont{subsubsection}{\normalsize\bfseries\sffamily}
@ -73,7 +88,6 @@
\captionsetup{font=small, labelfont=bf} \captionsetup{font=small, labelfont=bf}
% Custom quote environment % Custom quote environment
\usepackage{etoolbox}
\AtBeginEnvironment{quote}{\itshape} \AtBeginEnvironment{quote}{\itshape}
% Custom formatting commands % Custom formatting commands
@ -81,7 +95,7 @@
\newcommand{\code}[1]{\texttt{#1}} \newcommand{\code}[1]{\texttt{#1}}
% Title page settings % Title page settings
\newcommand{\TitlePage}[3]{ % #1 - Logo file, #2 - Company name \newcommand{\TitlePage}[3]{ % #1 - Logo file, #2 - Company name, #3 - Title
\begin{titlepage} \begin{titlepage}
\centering \centering
\vspace*{1cm} \vspace*{1cm}
@ -117,5 +131,5 @@
belowskip=1em belowskip=1em
} }
% set description items to italic % Set description items to italic
\setlist[description]{font=\normalfont\itshape} \setlist[description]{font=\normalfont\itshape}