From cd805e9b0b43fb51231d9992fbb29e1230a9ed0e Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Mon, 30 Dec 2024 09:50:39 +0100 Subject: [PATCH] Update komageneral style file --- .../latex/mycustomstyles/auto/komageneral.el | 12 ++-- .../tex/latex/mycustomstyles/komageneral.sty | 70 ++++++++++++++----- 2 files changed, 61 insertions(+), 21 deletions(-) diff --git a/texmf/tex/latex/mycustomstyles/auto/komageneral.el b/texmf/tex/latex/mycustomstyles/auto/komageneral.el index 47681513..86e5195a 100644 --- a/texmf/tex/latex/mycustomstyles/auto/komageneral.el +++ b/texmf/tex/latex/mycustomstyles/auto/komageneral.el @@ -6,7 +6,7 @@ (setq TeX-command-extra-options "-shell-escape") (TeX-add-to-alist 'LaTeX-provided-package-options - '(("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"))) + '(("fontspec" "") ("geometry" "") ("scrlayer-scrpage" "") ("enumitem" "") ("caption" "") ("microtype" "protrusion=true" "expansion=true" "final" "tracking=true" "kerning=true") ("polyglossia" "") ("biblatex" "") ("float" "") ("xcolor" "table") ("booktabs" "") ("grffile" "") ("unicode-math" "") ("adjustbox" "Export") ("graphicx" "") ("etoolbox" "") ("longtable" "") ("wrapfig" "") ("rotating" "") ("ulem" "normalem") ("amsmath" "") ("amssymb" "") ("capt-of" "") ("hyperref" "pdfusetitle") ("array" "") ("pdfx" "a-1a") ("listings" ""))) (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") @@ -28,7 +28,6 @@ "biblatex" "float" "xcolor" - "listings" "booktabs" "grffile" "unicode-math" @@ -44,7 +43,8 @@ "capt-of" "hyperref" "array" - "pdfx") + "pdfx" + "listings") (TeX-add-symbols '("TitlePage" 3) '("code" 1) @@ -56,6 +56,10 @@ '("german" "otherlanguages" "")) (LaTeX-add-xcolor-definecolors "darkgray" - "lightgray")) + "lightgray") + (LaTeX-add-array-newcolumntypes + "P") + (LaTeX-add-listings-lstdefinestyles + "numbers")) :latex) diff --git a/texmf/tex/latex/mycustomstyles/komageneral.sty b/texmf/tex/latex/mycustomstyles/komageneral.sty index db0f66e4..f0bf07d5 100644 --- a/texmf/tex/latex/mycustomstyles/komageneral.sty +++ b/texmf/tex/latex/mycustomstyles/komageneral.sty @@ -11,7 +11,6 @@ \usepackage{biblatex} \usepackage{float} \usepackage[table]{xcolor} -\usepackage{listings} \usepackage{booktabs} \usepackage{grffile} \usepackage{unicode-math} @@ -27,7 +26,8 @@ \usepackage{capt-of} \usepackage[pdfusetitle]{hyperref} \usepackage{array} -\usepackage[a-1b]{pdfx} +\usepackage[a-1a]{pdfx} +\usepackage{listings} \definecolor{darkgray}{RGB}{64,64,64} \definecolor{lightgray}{RGB}{200,200,200} @@ -41,14 +41,45 @@ % Font settings \defaultfontfeatures{RawFeature={+zero, +liga}} -\setmainfont{Noto Serif}[BoldFont={Noto Serif Bold},ItalicFont={Noto Serif Italic}] -\setsansfont{Noto Sans}[BoldFont={Noto Sans Bold},ItalicFont={Noto Sans Italic}] -\setmonofont{MonoLisa}[BoldFont={MonoLisa Bold},ItalicFont={MonoLisa Italic}Scale=0.8] +\setmainfont{Noto Serif}[ + UprightFont = Noto Serif Regular, + BoldFont = Noto Serif Bold, + ItalicFont = Noto Serif Italic, + BoldItalicFont = Noto Serif Bold Italic, + Scale = 1.0, + Ligatures = {Common, TeX}, + Numbers = {Lowercase, Proportional}, + SmallCapsFeatures = {Letters = SmallCaps}, + WordSpace = 1.1, + PunctuationSpace = 2 +] +\setsansfont{Noto Sans}[ + UprightFont = Noto Sans Regular, + BoldFont = Noto Sans Bold, + ItalicFont = Noto Sans Italic, + BoldItalicFont = Noto Sans Bold Italic, + Scale = 1.0, + Ligatures = {Common, TeX}, + Numbers = {Lowercase, Proportional}, + SmallCapsFeatures = {Letters = SmallCaps}, + WordSpace = 1.1, + PunctuationSpace = 2 +] +\setmonofont{Noto Sans Mono Condensed Light}[ + Scale = 0.8 +] \linespread{1.15} % Geometry settings -\geometry{a4paper, left=2.5cm, right=2.5cm, top=2.5cm, bottom=2.5cm, marginparwidth=1.5cm} +\geometry{ + a4paper, + left=2.5cm, + right=2.5cm, + top=2.5cm, + bottom=2.5cm, + marginparwidth=1.5cm +} % Header and footer settings with scrlayer-scrpage \pagestyle{scrheadings} @@ -111,16 +142,10 @@ \lstset{ basicstyle=\small\ttfamily, breaklines=true, - backgroundcolor=\color{lightgray!30}, + backgroundcolor=\color{lightgray!10}, frame=single, rulecolor=\color{lightgray}, - numbers=left, - numberstyle=\tiny\color{gray}, - numbersep=5pt, showstringspaces=false, - keywordstyle={\color[rgb]{0.23, 0.26, 0.32}\bfseries}, - commentstyle={\color[rgb]{0.26, 0.30, 0.37}}, - stringstyle={\color[rgb]{0.18, 0.20, 0.25}}, keepspaces=true, showspaces=false, showtabs=false, @@ -129,10 +154,21 @@ columns=fullflexible, aboveskip=1em, belowskip=1em, - morecomment=[l]{\#}, - morecomment=[s]{"}{"}, - moredelim=[is][\color[rgb]{0.26, 0.30, 0.37}]{"}{"}, - literate={"}{"}2 {"}{"}2 + morecomment=[l]{;}, + morestring=[b]", + literate={-}{{-}}1 {'}{{'}}{1}, + keywordstyle=\color{blue}\bfseries, + commentstyle=\color{green!60!black}\itshape, + stringstyle=\color{red!80!black}, + emphstyle=\color{purple}\bfseries, + emph={defun, setq, let, if, cond, loop, car, cdr, cons} +} + +\lstdefinestyle{numbers}{ + numbers=left, + stepnumber=1, + numberstyle=\tiny, + numbersep=3pt } % Set description items to italic