87 lines
2.3 KiB
TeX
87 lines
2.3 KiB
TeX
\ProvidesPackage{myformat}[2026/07/28 SrcBook styled]
|
|
% This file change the behaviour of some commands such as:
|
|
% \underline -> \uline
|
|
%
|
|
%
|
|
\RequirePackage{fontspec}
|
|
\RequirePackage[svgnames, dvipsnames, table]{xcolor}
|
|
\RequirePackage{fontawesome5}
|
|
|
|
\KOMAoptions{
|
|
paper=a4,
|
|
fontsize=12pt,
|
|
chapterprefix=true,
|
|
twoside=semi,
|
|
DIV=classic,
|
|
parskip=half
|
|
}
|
|
|
|
% JP Font
|
|
% \RequirePackage{xeCJK}
|
|
% \setCJKmainfont{HaranoAji_GothicMedium.otf}[Path=./fonts/]
|
|
|
|
% other package
|
|
\RequirePackage{lmodern}
|
|
\RequirePackage{microtype}
|
|
\RequirePackage{tcolorbox}
|
|
\RequirePackage{graphics}
|
|
\RequirePackage{booktabs}
|
|
\RequirePackage[normalem]{ulem}
|
|
\renewcommand{\underline}[1]{\uline{#1}}
|
|
|
|
\RequirePackage{tabularx}
|
|
\tcbuselibrary{skins,breakable}
|
|
|
|
|
|
\sffamily
|
|
\linespread{1.25}
|
|
\setfootnoterule{0.8\textwidth}
|
|
|
|
\RequirePackage{scrlayer-scrpage}
|
|
\pagestyle{scrheadings}
|
|
\automark[section]{chapter}
|
|
\ofoot*{}
|
|
\cfoot*{\pagemark}
|
|
|
|
\RequirePackage{imakeidx}
|
|
\begin{filecontents}[overwrite]{myindexstyle.ist}
|
|
headings_flag 1
|
|
heading_prefix
|
|
"\\bigskip\\par\\penalty-50\\textbf{"
|
|
heading_suffix
|
|
"}\\\\[\\medskipamount]"
|
|
symhead_positive "Symbols"
|
|
symhead_negative "symbols"
|
|
numhead_positive "Numbers"
|
|
numhead_negative "numbers"
|
|
delim_0 ",\~"
|
|
\end{filecontents}
|
|
\makeindex[intoc, options=-s myindexstyle]
|
|
|
|
|
|
\usepackage{hyperref}
|
|
\hypersetup{
|
|
colorlinks,
|
|
linkcolor = black,
|
|
urlcolor = blue!70!Red,
|
|
citecolor = blue!70!Red,
|
|
pdfauthor = Domipoke,
|
|
pdftitle = LearnLATEX
|
|
}
|
|
|
|
\RequirePackage[open,openlevel=1,atend,numbered]{bookmark}
|
|
\RequirePackage{pdfpages}
|
|
% Chapter Heading (and related)
|
|
\renewcommand*{\chaptermarkformat}{\chapapp~\thechapter~--~}
|
|
\addtokomafont{chapterprefix}{\itshape\color{white}}
|
|
\renewcommand*{\chapterformat}{\raggedleft\colorbox{RoyalBlue}{\parbox[b][2.8em]{2.8em}{\vfill\centering{\large\chapapp}\\[-0.4em]\thechapter\vfill}}}
|
|
\renewcommand*{\chapterheadstartvskip}{\addvspace{2em}}
|
|
\RequirePackage{pgfornament}
|
|
\renewcommand*{\chapterheadendvskip}{\pgfornament[width=\textwidth]{88}\par}
|
|
% Section Heading
|
|
\renewcommand*{\sectionformat}{\colorbox{black}{\textcolor{white}{\thesection\autodot}}\enskip}
|
|
\renewcommand*{\sectionlinesformat}[4]{\makebox[0pt][l]{\rule[-\fboxsep-\fboxrule]{\textwidth}{\fboxrule}}#3\parbox[b]{0.85\textwidth}{\linespread{1}\selectfont#4}}
|
|
|
|
\RequirePackage{minted}
|
|
\setmonofont{JetBrains Mono}
|
|
\usemintedstyle{monokai} |