Skip to content

Commit

Permalink
Add titlepage
Browse files Browse the repository at this point in the history
Prepended a title page to each inlay. Used the title page to provide
contextual information.
  • Loading branch information
corvus-ch committed Jan 6, 2022
1 parent f309196 commit 85effb3
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 66 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,25 @@ jobs:
name:
- dotted
- gridded

steps:
- name: Set up Git repository
uses: actions/checkout@v2

- name: Compile LaTeX documents
- name: Compile inlay
uses: xu-cheng/latex-action@v2
with:
root_file: ${{ matrix.name }}.tex
root_file: ${{ matrix.name }}-inlay.tex
latexmk_use_xelatex: true
post_compile: pdfjam --vanilla --noautoscale true --angle 90 --nup 2x1 --suffix 'booklet' --booklet true ${{ matrix.name }}.pdf
- name: Append licence

- name: Compile main document
uses: xu-cheng/latex-action@v2
with:
root_file: license.tex
root_file: ${{ matrix.name }}.tex
latexmk_use_xelatex: true
post_compile: pdfjam --vanilla --noautoscale true --outfile ${{ matrix.name }}.pdf ${{ matrix.name }}-booklet.pdf license.pdf

- uses: actions/upload-artifact@v2
- name: Upload PDF
uses: actions/upload-artifact@v2
with:
path: ${{ matrix.name }}.pdf

Expand Down
16 changes: 6 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,19 @@ SHELL := bash
.SUFFIXES:

# Internal variables
build_cmd := latexmk -pdf -pdflatex="xelatex -interaction=nonstopmode" -use-make
build_cmd := latexmk -pdf -pdflatex="xelatex -shell-escape -interaction=nonstopmode" -use-make
clean_cmd := latexmk -c

# Rules and targets
.PHONY: all
all: dotted-template.pdf gridded-template.pdf
all: dotted.pdf gridded.pdf

.SUFFIXES: -template.pdf
%-template.pdf: %-2x1.pdf license.pdf
pdfjam --vanilla --noautoscale true --outfile $*-template.pdf $^

.SUFFIXES: -2x1.pdf
%-2x1.pdf: %.pdf
pdfjam --vanilla --noautoscale true --angle 90 --nup 2x1 --suffix '2x1' --booklet true $<
.SUFFIXES: -inlay.pdf
%-inlay.pdf: %-inlay.tex
$(build_cmd) $<

.SUFFIXES: .pdf
%.pdf: %.tex freitag-inlay.sty
%.pdf: %.tex %-inlay.pdf inlay.sty
$(build_cmd) $<

.PHONY: clean
Expand Down
23 changes: 23 additions & 0 deletions dotted-inlay.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
\documentclass[twoside]{scrartcl}

\usepackage{freitag}
\usepackage{tikz}
\usepackage{color}

\newcommand{\griddim}{5mm}

\newcommand{\dottedpage}{%
\begin{tikzpicture}[gray, ultra thin]
\draw [step=\griddim, line cap=round, dash pattern=on 0pt off \griddim, thin] (0,0) grid (\width-\margin-\margininner,\height-\margin-\margin);
\draw [dashed] (5mm,0) -- (5mm,\height-\margin-\margin);
\end{tikzpicture}
}

\begin{document}
\pagestyle{empty}
\enlargethispage{\margin}
\dottedpage
\dottedpage
\dottedpage
\dottedpage
\end{document}
22 changes: 3 additions & 19 deletions dotted.tex
Original file line number Diff line number Diff line change
@@ -1,23 +1,7 @@
\documentclass[9pt,twoside]{scrartcl}
\documentclass{scrartcl}

\usepackage{freitag-inlay}
\usepackage{tikz}
\usepackage{color}

\newcommand{\griddim}{5mm}

\newcommand{\dottedpage}{%
\begin{tikzpicture}[gray, ultra thin]
\draw [step=\griddim, line cap=round, dash pattern=on 0pt off \griddim, thin] (0,0) grid (\width-\margin-\margininner,\height-\margin-\margin);
\draw [dashed] (5mm,0) -- (5mm,\height-\margin-\margin);
\end{tikzpicture}
}
\usepackage{inlay}

\begin{document}
\pagestyle{empty}
\enlargethispage{\margin}
\dottedpage
\dottedpage
\dottedpage
\dottedpage
\inlay{Dotted}{dotted-inlay.pdf}
\end{document}
2 changes: 1 addition & 1 deletion freitag-inlay.sty → freitag.sty
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%!TEX encoding = UTF-8 Unicode
\ProvidesPackage{freitag-inlay}
\ProvidesPackage{freitag}

% ==========
% Dimensions
Expand Down
21 changes: 21 additions & 0 deletions gridded-inlay.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\documentclass[twoside]{scrartcl}

\usepackage{freitag}
\usepackage{tikz}
\usepackage{color}

\newcommand{\griddedpage}{%
\begin{tikzpicture}[gray, very thin]
\draw [xstep=10mm,ystep=4mm] (0,0) grid (\width-\margin-\margininner,\height-\margin-\margin);
\draw [dashed] (\margintext,0) -- (\margintext,\height-\margin-\margin);
\end{tikzpicture}
}

\begin{document}
\pagestyle{empty}
\enlargethispage{\margin}
\griddedpage
\griddedpage
\griddedpage
\griddedpage
\end{document}
20 changes: 3 additions & 17 deletions gridded.tex
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
\documentclass[9pt,twoside]{scrartcl}
\documentclass{scrartcl}

\usepackage{freitag-inlay}
\usepackage{tikz}
\usepackage{color}

\newcommand{\griddedpage}{%
\begin{tikzpicture}[gray, very thin]
\draw [xstep=10mm,ystep=4mm] (0,0) grid (\width-\margin-\margininner,\height-\margin-\margin);
\draw [dashed] (\margintext,0) -- (\margintext,\height-\margin-\margin);
\end{tikzpicture}
}
\usepackage{inlay}

\begin{document}
\pagestyle{empty}
\enlargethispage{\margin}
\griddedpage
\griddedpage
\griddedpage
\griddedpage
\inlay{Gridded}{gridded-inlay.pdf}
\end{document}
41 changes: 41 additions & 0 deletions inlay.sty
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
%!TEX encoding = UTF-8 Unicode
\ProvidesPackage{inlay}

% Fonts
% -----
\RequirePackage{ifxetex}

\ifxetex
\RequirePackage{fontspec}
\RequirePackage{xltxtra}
\RequirePackage{xunicode}
\else
\RequirePackage[utf8]{inputenc}
\RequirePackage[T1]{fontenc}
\fi

% Titlepage
% ---------
\RequirePackage{pdfpages}
\RequirePackage{gitinfo2}
\RequirePackage[
type={CC},
modifier={by-sa},
version={4.0},
]{doclicense}

\newcommand{\inlay}[2]{%
\begin{titlepage}
\subject{Freitag Agenda Inlay}
\title{#1}
\author{Christian Häusler}
\date{\gitDescribe~\gitAuthorIsoDate}
\publishers{https://github.com/corvus-ch/freitag-inlay}
\clearpage
\maketitle
\thispagestyle{empty}
\vfill
\doclicenseThis
\end{titlepage}
\includepdf[angle=90,nup=2x1,booklet=true,pages=-]{#2}
}
12 changes: 0 additions & 12 deletions license.tex

This file was deleted.

0 comments on commit 85effb3

Please sign in to comment.