summaryrefslogtreecommitdiff
path: root/_extensions/js/stylish-issue/_extension.yaml
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2024-12-10 22:56:06 +0100
committerJonas Smedegaard <dr@jones.dk>2024-12-10 22:56:06 +0100
commitce388772af251bdc4cc7b2f41c89b548bc8d85cc (patch)
tree54820a028e06bafc2de5c92c09dfeb9b1d32c3b1 /_extensions/js/stylish-issue/_extension.yaml
parent62f1f73bbb14e58d94a373a0e7b75cae1d835309 (diff)
generalize pdf layout as format extension js/stylish-issue
Diffstat (limited to '_extensions/js/stylish-issue/_extension.yaml')
-rw-r--r--_extensions/js/stylish-issue/_extension.yaml70
1 files changed, 70 insertions, 0 deletions
diff --git a/_extensions/js/stylish-issue/_extension.yaml b/_extensions/js/stylish-issue/_extension.yaml
new file mode 100644
index 0000000..4b02876
--- /dev/null
+++ b/_extensions/js/stylish-issue/_extension.yaml
@@ -0,0 +1,70 @@
+name: Stylish-issue
+author: Jonas Smedegaard
+version: 0.0.1
+contributes:
+ formats:
+ pdf:
+# links-as-notes: true
+ colorlinks: false
+ pdf-engine: lualatex
+ documentclass: scrartcl
+ csquotes: true
+ papersize: a4
+# extract-media: img
+
+ template-partials:
+ - before-title.tex
+
+ include-in-header:
+# support multiple tagged columns (class option twocolumn is not tagged)
+ - text: |
+ \usepackage[a4paper, margin=0.5in, bottom=1in]{geometry} % Set all margins to zero
+ \usepackage{multicol}
+ \setlength{\columnsep}{20pt} % Adjust space between columns
+ \setlength{\columnwidth}{0.45\textwidth} % Set column width (optional)
+# avoid widow headline or definition description
+ - text: |
+ \usepackage{needspace}
+ \let\oldsection\section
+ \renewcommand{\section}[1]{%
+ \needspace{6\baselineskip}
+ \oldsection{#1}%
+ }
+ \let\olddesc\description
+ \renewcommand{\description}[1][]{%
+ \olddesc[#1]%
+ \needspace{2\baselineskip}
+ }
+# avoid widow or orphan lines
+ - text: |
+ \usepackage[defaultlines=3,all]{nowidow}
+# reduce vertical space after headlines
+ - text: |
+ \RedeclareSectionCommands[
+ runin=false,
+ beforeskip=.5\baselineskip,
+ afterskip=-1ex]{section,subsection}
+# add newline between definition list description and items
+ - text: |
+ \usepackage{enumitem}
+ \setlist[description]{style=nextline}
+# set page footer to danish page count "side X af Y"
+ - text: |
+ \usepackage{lastpage}
+ \usepackage{scrlayer-scrpage}
+ \cfoot{side \thepage\ af \pageref{LastPage}}
+# suppress figure label
+ - text: |
+ \usepackage[labelformat=empty]{caption}
+
+ include-before-body:
+ - text: |
+# enable multiple tagged columns
+ - text: |
+ \begin{multicols}{2}
+ \raggedcolumns
+
+ include-after-body:
+# conclude multiple tagged columns
+ - text: |
+ \end{multicols}