Update komageneral styles
This commit is contained in:
parent
e712a1fa3a
commit
78a10d0e70
2 changed files with 78 additions and 21 deletions
|
@ -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)
|
||||
|
||||
|
|
|
@ -1,24 +1,63 @@
|
|||
\ProvidesPackage{komageneral}
|
||||
% Font settings
|
||||
|
||||
% Base packages
|
||||
\usepackage{fontspec}
|
||||
\usepackage{geometry}
|
||||
\usepackage{scrlayer-scrpage}
|
||||
\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 Condensed}[BoldFont={Noto Sans Mono Condensed Bold},Scale=0.8]
|
||||
\setmonofont{Noto Sans Mono}[BoldFont={Noto Sans Mono 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}
|
||||
|
||||
% 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}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue