summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--install.conf.yaml1
-rw-r--r--latex/header.sty34
-rw-r--r--latex/section.sty50
-rw-r--r--latex/title.sty29
4 files changed, 114 insertions, 0 deletions
diff --git a/install.conf.yaml b/install.conf.yaml
index 85e607b..889dc3d 100644
--- a/install.conf.yaml
+++ b/install.conf.yaml
@@ -25,6 +25,7 @@
~/.p10k.zsh:
~/.gitconfig:
~/.ssh/config: ssh/config
+ ~/texmf/tex/latex/local: latex
~/.gnupg/:
glob: true
path: gnupg/*.conf
diff --git a/latex/header.sty b/latex/header.sty
new file mode 100644
index 0000000..4607356
--- /dev/null
+++ b/latex/header.sty
@@ -0,0 +1,34 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{header}[2021/09/29 Header style]
+
+% ┌───────────────────────────────────┐
+% │ Title: Subtitle │ ──┬─ [Header]
+% │ Author │ ──┘
+% │ Title │ ──┬─ Title
+% │ Subtitle │ ──┘
+% │ │
+% │ A Section │ ──┬─ Sections
+% │ ... │ │
+% │ 1.1 A Subsection │ ──┤
+% │ ... │ │
+% │ Another Section │ ──┤
+% │ ... │ │
+% │ 2.1 A Subsection │ ──┤
+% │ ... │ │
+% │ 2.2 Another Subsection │ ──┘
+% │ ... │
+% │ │
+% │ │
+% └───────────────────────────────────┘
+
+\pagestyle{myheadings}
+
+\newsavebox{\headingbox}
+\sbox{\headingbox}{%
+ \begin{minipage}[b]{0.5\textwidth}
+ \begin{flushright}
+ \@title: \@subtitle \\
+ \@author \\
+ \end{flushright}
+ \end{minipage}}
+\markright{\hfill\usebox{\headingbox}}
diff --git a/latex/section.sty b/latex/section.sty
new file mode 100644
index 0000000..1b9e2ae
--- /dev/null
+++ b/latex/section.sty
@@ -0,0 +1,50 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{section}[2021/09/29 Section style]
+
+% ┌───────────────────────────────────┐
+% │ Title: Subtitle │ ──┬─ Header
+% │ Author │ ──┘
+% │ Title │ ──┬─ Title
+% │ Subtitle │ ──┘
+% │ │
+% │ A Section │ ──┬─ [Sections]
+% │ ... │ │
+% │ 1.1 A Subsection │ ──┤
+% │ ... │ │
+% │ Another Section │ ──┤
+% │ ... │ │
+% │ 2.1 A Subsection │ ──┤
+% │ ... │ │
+% │ 2.2 Another Subsection │ ──┘
+% │ ... │
+% │ │
+% │ │
+% └───────────────────────────────────┘
+
+\RequirePackage{indentfirst}
+% \RequirePackage{titlesec}
+% \titlespacing*{\section}{0pt}{1.1\baselineskip}{\baselineskip}
+
+% Paragraph spacing
+\setlength{\parskip}{1em}
+
+\RedeclareSectionCommand[
+ afterindent=false,
+ beforeskip=.5\baselineskip,
+ afterskip=.5\baselineskip
+]{section}
+
+% Section style - Hides main section numbers
+
+% First section
+% 1.1 First subsection
+% Another section
+% 2.2 Another subsection
+% \renewcommand{\thesection}{}
+% \renewcommand{\thesubsection}{\arabic{section}.\arabic{subsection}}
+% \makeatletter
+% \def\@seccntformat#1{\csname #1ignore\expandafter\endcsname\csname the#1\endcsname\quad}
+% \let\sectionignore\@gobbletwo
+% \let\latex@numberline\numberline
+% \def\numberline#1{\if\relax#1\relax\else\latex@numberline{#1}\fi}
+% \makeatother
diff --git a/latex/title.sty b/latex/title.sty
new file mode 100644
index 0000000..b6b54a3
--- /dev/null
+++ b/latex/title.sty
@@ -0,0 +1,29 @@
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{title}[2021/09/29 Title style]
+
+% ┌───────────────────────────────────┐
+% │ Title: Subtitle │ ──┬─ Header
+% │ Author │ ──┘
+% │ Title │ ──┬─ [Title]
+% │ Subtitle │ ──┘
+% │ │
+% │ A Section │ ──┬─ Sections
+% │ ... │ │
+% │ 1.1 A Subsection │ ──┤
+% │ ... │ │
+% │ Another Section │ ──┤
+% │ ... │ │
+% │ 2.1 A Subsection │ ──┤
+% │ ... │ │
+% │ 2.2 Another Subsection │ ──┘
+% │ ... │
+% │ │
+% │ │
+% └───────────────────────────────────┘
+
+\renewcommand{\maketitle}{
+ \begin{flushleft}
+ {\Huge \bfseries \sffamily \@title }\\[2ex]
+ {\Large \sffamily \@subtitle }\\[4ex]
+ \end{flushleft}
+}