Update komageneral

This commit is contained in:
Marcus Kammer 2024-12-23 11:46:10 +01:00
parent 95c59971c8
commit b37fee69eb
Signed by: marcuskammer
GPG key ID: C374817BE285268F
2 changed files with 74 additions and 42 deletions

View file

@ -6,18 +6,17 @@
(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") ("graphicx" "") ("etoolbox" "") ("longtable" "") ("wrapfig" "") ("rotating" "") ("ulem" "normalem") ("amsmath" "") ("amssymb" "") ("capt-of" "") ("hyperref" ""))) '(("fontspec" "") ("geometry" "") ("scrlayer-scrpage" "") ("enumitem" "") ("caption" "") ("microtype" "protrusion=true" "expansion=true" "final" "tracking=true" "kerning=true") ("polyglossia" "") ("biblatex" "") ("float" "") ("xcolor" "table") ("listings" "") ("booktabs" "") ("grffile" "") ("unicode-math" "") ("adjustbox" "Export") ("graphicx" "") ("etoolbox" "") ("longtable" "") ("wrapfig" "") ("rotating" "") ("ulem" "normalem") ("amsmath" "") ("amssymb" "") ("capt-of" "") ("hyperref" "pdfusetitle") ("array" "") ("pdfx" "a-1b")))
(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 "href")
(add-to-list 'LaTeX-verbatim-macros-with-braces-local "hyperimage")
(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-braces-local "path")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline") (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-delims-local "path") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "path")
(add-to-list 'LaTeX-verbatim-macros-with-delims-local "url") (add-to-list 'LaTeX-verbatim-macros-with-delims-local "lstinline")
(TeX-run-style-hooks (TeX-run-style-hooks
"fontspec" "fontspec"
"geometry" "geometry"
@ -43,13 +42,20 @@
"amsmath" "amsmath"
"amssymb" "amssymb"
"capt-of" "capt-of"
"hyperref") "hyperref"
"array"
"pdfx")
(TeX-add-symbols (TeX-add-symbols
'("TitlePage" 3) '("TitlePage" 3)
'("code" 1) '("code" 1)
'("important" 1)) '("important" 1))
(LaTeX-add-environments
"oldtabular")
(LaTeX-add-polyglossia-langs (LaTeX-add-polyglossia-langs
'("english" "defaultlanguage" "") '("english" "defaultlanguage" "")
'("german" "otherlanguages" ""))) '("german" "otherlanguages" ""))
(LaTeX-add-xcolor-definecolors
"darkgray"
"lightgray"))
:latex) :latex)

View file

@ -6,11 +6,11 @@
\usepackage{scrlayer-scrpage} % Part of KOMA-Script bundle \usepackage{scrlayer-scrpage} % Part of KOMA-Script bundle
\usepackage{enumitem} \usepackage{enumitem}
\usepackage{caption} \usepackage{caption}
\usepackage[expansion,protrusion=true]{microtype} \usepackage[protrusion=true,expansion=true,final,tracking=true,kerning=true]{microtype}
\usepackage{polyglossia} \usepackage{polyglossia}
\usepackage{biblatex} \usepackage{biblatex}
\usepackage{float} \usepackage{float}
\usepackage{xcolor} \usepackage[table]{xcolor}
\usepackage{listings} \usepackage{listings}
\usepackage{booktabs} \usepackage{booktabs}
\usepackage{grffile} \usepackage{grffile}
@ -25,7 +25,12 @@
\usepackage{amsmath} \usepackage{amsmath}
\usepackage{amssymb} \usepackage{amssymb}
\usepackage{capt-of} \usepackage{capt-of}
\usepackage{hyperref} \usepackage[pdfusetitle]{hyperref}
\usepackage{array}
\usepackage[a-1b]{pdfx}
\definecolor{darkgray}{RGB}{64,64,64}
\definecolor{lightgray}{RGB}{200,200,200}
\setdefaultlanguage{english} \setdefaultlanguage{english}
\setotherlanguages{german} \setotherlanguages{german}
@ -35,30 +40,23 @@
\KOMAoptions{toc=flat,toc=listof} \KOMAoptions{toc=flat,toc=listof}
% Font settings % Font settings
\defaultfontfeatures{Ligatures=TeX, RawFeature={+zero, +liga}} \defaultfontfeatures{RawFeature={+zero, +liga}}
\setmainfont{Noto Serif Regular}[ \setmainfont{Noto Serif}[BoldFont={Noto Serif Bold},ItalicFont={Noto Serif Italic}]
BoldFont={Noto Serif Bold}, \setsansfont{Noto Sans}[BoldFont={Noto Sans Bold},ItalicFont={Noto Sans Italic}]
ItalicFont={Noto Serif Italic} \setmonofont{MonoLisa}[BoldFont={MonoLisa Bold},ItalicFont={MonoLisa Italic}Scale=0.8]
]
\setsansfont{Noto Sans Regular}[ \linespread{1.15}
BoldFont={Noto Sans Bold},
ItalicFont={Noto Sans Italic}
]
\setmonofont{Noto Sans Mono}[
BoldFont={Noto Sans Mono Bold},
Scale=0.8
]
\linespread{1.1}
% Geometry settings % Geometry settings
\geometry{a4paper, left=2cm, right=2cm, top=2cm, bottom=2cm} \geometry{a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm, marginparwidth=1.5cm}
% Header and footer settings with scrlayer-scrpage % Header and footer settings with scrlayer-scrpage
\pagestyle{scrheadings} \pagestyle{scrheadings}
\clearpairofpagestyles \clearpairofpagestyles
\automark[section]{section} % Automatically mark sections \automark[section]{section} % Automatically mark sections
\ihead{\@title} % Section title \ihead{\@title} % Section title
\ohead{\pagemark} % \ohead{\pagemark}
\cfoot{\thepage}
\setkomafont{pageheadfoot}{\normalfont} \setkomafont{pageheadfoot}{\normalfont}
\setkomafont{pagehead}{\normalfont} \setkomafont{pagehead}{\normalfont}
@ -66,9 +64,9 @@
\setheadsepline{0.2pt} % Thickness of the header line \setheadsepline{0.2pt} % Thickness of the header line
% Section formatting with KOMA-Script features % Section formatting with KOMA-Script features
\setkomafont{section}{\Large\bfseries\sffamily} \setkomafont{section}{\LARGE\bfseries\sffamily\color{darkgray}}
\setkomafont{subsection}{\large\bfseries\sffamily} \setkomafont{subsection}{\large\bfseries\sffamily\color{darkgray}}
\setkomafont{subsubsection}{\normalsize\bfseries\sffamily} \setkomafont{subsubsection}{\normalsize\bfseries\sffamily\color{darkgray}}
% Define the spacing between title and content % Define the spacing between title and content
\RedeclareSectionCommand[beforeskip=\baselineskip, afterskip=0.5\baselineskip]{section} \RedeclareSectionCommand[beforeskip=\baselineskip, afterskip=0.5\baselineskip]{section}
@ -83,6 +81,7 @@
% Set global table font to Noto Sans Condensed Light % Set global table font to Noto Sans Condensed Light
\AtBeginEnvironment{tabular}{\fontspec{Noto Sans Condensed}} \AtBeginEnvironment{tabular}{\fontspec{Noto Sans Condensed}}
\AtBeginEnvironment{longtable}{\fontspec{Noto Sans Condensed}} \AtBeginEnvironment{longtable}{\fontspec{Noto Sans Condensed}}
\newcolumntype{P}[1]{>{\centering\arraybackslash}p{#1}}
% Caption settings % Caption settings
\captionsetup{font=small, labelfont=bf} \captionsetup{font=small, labelfont=bf}
@ -110,26 +109,53 @@
% Global listing settings % Global listing settings
\lstset{ \lstset{
basicstyle={\ttfamily\color[rgb]{0.30, 0.34, 0.42}}, basicstyle=\small\ttfamily,
breaklines=true,
backgroundcolor=\color{lightgray!30},
frame=single,
rulecolor=\color{lightgray},
numbers=left,
numberstyle=\tiny\color{gray},
numbersep=5pt,
showstringspaces=false, showstringspaces=false,
keywordstyle={\color[rgb]{0.23, 0.26, 0.32}\textbf}, keywordstyle={\color[rgb]{0.23, 0.26, 0.32}\bfseries},
commentstyle={\color[rgb]{0.26, 0.30, 0.37}}, commentstyle={\color[rgb]{0.26, 0.30, 0.37}},
stringstyle={\color[rgb]{0.18, 0.20, 0.25}}, 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, keepspaces=true,
showspaces=false, showspaces=false,
showstringspaces=false,
showtabs=false, showtabs=false,
breaklines=true,
breakatwhitespace=false, breakatwhitespace=false,
tabsize=2, tabsize=2,
columns=fullflexible, columns=fullflexible,
aboveskip=1em, aboveskip=1em,
belowskip=1em belowskip=1em,
morecomment=[l]{\#},
morecomment=[s]{"}{"},
moredelim=[is][\color[rgb]{0.26, 0.30, 0.37}]{"}{"},
literate={"}{"}2 {"}{"}2
} }
% Set description items to italic % Set description items to italic
\setlist[description]{font=\normalfont\itshape} \setlist[description]{font=\normalfont\itshape}
% Enhance your hyperref setup
\hypersetup{
colorlinks=true,
linkcolor=darkgray,
filecolor=darkgray,
urlcolor=darkgray,
citecolor=darkgray,
% pdftitle={Your Document Title},
% pdfauthor={Your Name},
% pdfsubject={Document Subject},
% pdfkeywords={keyword1, keyword2},
pdfstartview={FitV},
pdfview={FitV},
pdfpagemode={UseOutlines},
bookmarksopen=true,
bookmarksnumbered=true
}
\let\oldtabular\tabular
\let\endoldtabular\endtabular
\renewenvironment{tabular}{\rowcolors{2}{white}{lightgray}\oldtabular}{\endoldtabular}