Create a style file to shorten class definition
This commit is contained in:
parent
409a53ab68
commit
e4c857fb31
3 changed files with 36 additions and 20 deletions
|
@ -170,26 +170,7 @@
|
|||
'("koma-general"
|
||||
"\\documentclass[a4paper,10pt,captions=tableheading,twoside=false]{scrartcl}
|
||||
\\linespread{1.25}
|
||||
\\setkomafont{section}{\\Large\\bfseries\\sffamily}
|
||||
\\setkomafont{subsection}{\\large\\bfseries\\sffamily}
|
||||
\\setkomafont{subsubsection}{\\normalsize\\bfseries\\sffamily}
|
||||
\\RedeclareSectionCommand[beforeskip=-1sp,afterskip=0.5\\baselineskip]{section}
|
||||
\\RedeclareSectionCommand[beforeskip=-1sp,afterskip=0.25\\baselineskip]{subsection}
|
||||
\\RedeclareSectionCommand[beforeskip=-1sp,afterskip=0.1\\baselineskip]{subsubsection}
|
||||
\\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}[BoldFont={Noto Sans Mono Bold},Scale=0.8]
|
||||
\\usepackage{geometry}
|
||||
\\geometry{a4paper,left=2cm,right=2cm,top=1.6cm,bottom=1.6cm}
|
||||
\\usepackage{scrlayer-scrpage}
|
||||
\\pagestyle{scrheadings}
|
||||
\\clearpairofpagestyles
|
||||
\\automark{section}
|
||||
\\ihead{\\headmark} % Inner header
|
||||
\\ohead{\\thepage} % Outer header
|
||||
"
|
||||
\\usepackage{komageneral}"
|
||||
("\\section{%s}" . "\\section*{%s}")
|
||||
("\\subsection{%s}" . "\\subsection*{%s}")
|
||||
("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|
||||
|
|
11
texmf/tex/latex/mycustomstyles/auto/komageneral.el
Normal file
11
texmf/tex/latex/mycustomstyles/auto/komageneral.el
Normal file
|
@ -0,0 +1,11 @@
|
|||
(TeX-add-style-hook
|
||||
"komageneral"
|
||||
(lambda ()
|
||||
(setq TeX-command-extra-options
|
||||
"-shell-escape")
|
||||
(TeX-run-style-hooks
|
||||
"fontspec"
|
||||
"geometry"
|
||||
"scrlayer-scrpage"))
|
||||
:latex)
|
||||
|
24
texmf/tex/latex/mycustomstyles/komageneral.sty
Normal file
24
texmf/tex/latex/mycustomstyles/komageneral.sty
Normal file
|
@ -0,0 +1,24 @@
|
|||
\ProvidesPackage{komageneral}
|
||||
% Font settings
|
||||
\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}[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=-1sp,afterskip=0.5\baselineskip]{section}
|
||||
\RedeclareSectionCommand[beforeskip=-1sp,afterskip=0.25\baselineskip]{subsection}
|
||||
\RedeclareSectionCommand[beforeskip=-1sp,afterskip=0.1\baselineskip]{subsubsection}
|
Loading…
Add table
Reference in a new issue