From 11c94692a0e4936667ed1a646b3d7bcdb26ebdee Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <andreas.mueller@ost.ch>
Date: Sat, 26 Feb 2022 09:14:14 +0100
Subject: add page numbering program

---
 vorlesungsnotizen/bin/numbered.tex | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 vorlesungsnotizen/bin/numbered.tex

(limited to 'vorlesungsnotizen/bin/numbered.tex')

diff --git a/vorlesungsnotizen/bin/numbered.tex b/vorlesungsnotizen/bin/numbered.tex
new file mode 100644
index 0000000..bba61b6
--- /dev/null
+++ b/vorlesungsnotizen/bin/numbered.tex
@@ -0,0 +1,33 @@
+%
+% numbered.tex
+%
+% (c) 2022 Prof Dr Andreas Müller, OST Ostschweizer Fachhochschule
+%
+\documentclass[8pt,a4paper]{article}
+\usepackage[final]{pdfpages}
+\usepackage{geometry}
+\usepackage{times}
+\geometry{papersize={210mm,297mm},total={180mm,260mm},top=21mm}
+\usepackage{fancyhdr}
+
+%\topmargin 20pt
+%\oddsidemargin 20pt
+
+% from the TeXBook, page 308, exercise 7.7
+\def\ifundefined#1{\expandafter\ifx\csname#1\endcsname\relax}
+
+\pagestyle{fancy}
+\ifundefined{sectionnumber}
+\cfoot{\sffamily\Large\thepage}
+\else
+\cfoot{\sffamily\Large \sectionnumber{} -- \thepage}
+\fi
+\renewcommand {\headrulewidth}{0pt}
+
+\begin{document}
+\includepdfset{pagecommand=\thispagestyle{empty}}
+\includepdf[fitpaper=true,scale=0.95,pages={1}]{unnumbered.pdf}
+\setcounter{page}{1}
+\includepdfset{pagecommand=\thispagestyle{fancy}}
+\includepdf[fitpaper=true,scale=0.94,pages=2-]{unnumbered.pdf}
+\end{document}
-- 
cgit v1.2.1

