diff --git a/texmf/tex/latex/mycustomstyles/auto/komageneral.el b/texmf/tex/latex/mycustomstyles/auto/komageneral.el index 6a1d0aa9..5e4f7a1f 100644 --- a/texmf/tex/latex/mycustomstyles/auto/komageneral.el +++ b/texmf/tex/latex/mycustomstyles/auto/komageneral.el @@ -1,11 +1,29 @@ +;; -*- lexical-binding: t; -*- + (TeX-add-style-hook "komageneral" (lambda () (setq TeX-command-extra-options "-shell-escape") + (TeX-add-to-alist 'LaTeX-provided-package-options + '(("fontspec" "") ("geometry" "") ("scrlayer-scrpage" "") ("titlesec" "") ("enumitem" "") ("caption" "") ("fancyhdr" "") ("microtype" "") ("biblatex" "") ("graphicx" "") ("etoolbox" ""))) (TeX-run-style-hooks "fontspec" "geometry" - "scrlayer-scrpage")) + "scrlayer-scrpage" + "titlesec" + "enumitem" + "caption" + "fancyhdr" + "microtype" + "biblatex" + "graphicx" + "etoolbox") + (TeX-add-symbols + '("TitlePage" 2) + '("code" 1) + '("important" 1)) + (LaTeX-add-bibliographies + "yourbibliography")) :latex) diff --git a/texmf/tex/latex/mycustomstyles/komageneral.sty b/texmf/tex/latex/mycustomstyles/komageneral.sty index dbd95fb5..613e3c65 100644 --- a/texmf/tex/latex/mycustomstyles/komageneral.sty +++ b/texmf/tex/latex/mycustomstyles/komageneral.sty @@ -1,24 +1,63 @@ \ProvidesPackage{komageneral} -% Font settings + +% Base packages \usepackage{fontspec} -\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 Condensed}[BoldFont={Noto Sans Mono Condensed Bold},Scale=0.8] -% Geometry settings \usepackage{geometry} -\geometry{a4paper,left=2cm,right=2cm,top=1.6cm,bottom=1.6cm} -% Header and section settings \usepackage{scrlayer-scrpage} -\pagestyle{scrheadings} -\clearpairofpagestyles -\automark{section} -\ihead{\headmark} -\ohead{\thepage} -% Section command redeclarations -\setkomafont{section}{\Large\bfseries\sffamily} -\setkomafont{subsection}{\large\bfseries\sffamily} -\setkomafont{subsubsection}{\normalsize\bfseries\sffamily} -\RedeclareSectionCommand[beforeskip=-2\baselineskip,afterskip=0.5\baselineskip]{section} -\RedeclareSectionCommand[beforeskip=-1.5\baselineskip,afterskip=0.25\baselineskip]{subsection} -\RedeclareSectionCommand[beforeskip=-1\baselineskip,afterskip=0.1\baselineskip]{subsubsection} +\usepackage{titlesec} +\usepackage{enumitem} +\usepackage{caption} +\usepackage{fancyhdr} +\usepackage{microtype} +\usepackage{biblatex} +\usepackage{graphicx} % Added for including images +\addbibresource{yourbibliography.bib} + +% 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] + +% Geometry settings +\geometry{a4paper, left=2cm, right=2cm, top=1.6cm, bottom=1.6cm} + +% 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 +\newcommand{\TitlePage}[2]{ % #1 - Logo file, #2 - Company name + \begin{titlepage} + \centering + \vspace*{1cm} + \includegraphics[width=0.3\textwidth]{#1}\par\vspace{1cm} + {\Huge\bfseries\sffamily #2\par} + \vspace{2cm} + {\Large\itshape An Elegant and Professional Document\par} + \vfill + {\large \today\par} + \end{titlepage} +}