Initial upload

This commit is contained in:
Ämin Baumeler 2023-10-30 21:45:37 +01:00
parent dc4d6dd2ba
commit 585a6ad9b7
7 changed files with 249 additions and 0 deletions

7
.gitignore vendored Normal file
View File

@ -0,0 +1,7 @@
*.aux
*.fdb_latexmk
*.fls
*.log
*.pdf
*.synctex.gz
*.toc

View File

@ -1,3 +1,4 @@
# Vorlage
LuaLaTeX Satzvorlage für Zündhölzliücher.
Die datei [example.tex](example.tex) beschreibt die Verwendung der Vorlage.

44
example.tex Normal file
View File

@ -0,0 +1,44 @@
%! TeX program = lualatex
\documentclass{zuendhoelzli}
\booktitle{Beispielbuch}
\author{Zünd Hölzli}
\authorbio{Z.~Hözli hat viele sachen geschrieben, und einiges erreicht, wie dies und das.}
\summary{Das ist eine Zusammenfassung, ein Prolog, oder ein Pretext.}
\edition{Erste Auflage}
\year{2023}
\isbn{978-6-54-321-012-3}
\booknr{31}
\licence{CC BY 4.0}
\extracopyrightinfo{Copyright 2023 Z.~Hözli}
\print{P.~Rint}
\coverauthor{D.~Esigner\\Gedruckt im Web}
\usepackage{lipsum}
\begin{document}
\frontmatter
\titlepage
\zuendhoelzlipage
\authorpage
\titleclean
\copyrightpage
\tableofcontents
\mainmatter
\chapter{Mehrsprachiges Kapitel}
\selectlanguage{german-ch}\chapterdedication{Dieses Kapitel ist dem Beispiel gewidmet.}
Das ist Schweizer Hochdeutsch, dass sich so schreibt.
\foreignlanguage{american}{We can write {\bf bold}, {\it italics}, but not {\bf\it bolditalics} yet.}
\chapter{Lorem}
\lipsum
% % Back Matter
% \backmatter % Switch to back matter
% Information in the appendix.
\end{document}

BIN
font/Urbanist-ExtraBold.ttf Normal file

Binary file not shown.

BIN
font/Urbanist-Italic.ttf Normal file

Binary file not shown.

BIN
font/Urbanist-Regular.ttf Normal file

Binary file not shown.

197
zuendhoelzli.cls Normal file
View File

@ -0,0 +1,197 @@
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{zuendhoelzli}[Zündhölzli Class]
\LoadClass[twoside, 8pt, openright]{extbook}
% Fonts
\RequirePackage{fontspec}
\usepackage{ebgaramond}
\newfontfamily{\urbanistfont}[
Path = ./font/,
Extension = .ttf,
UprightFont = *-Regular,
BoldFont = *-ExtraBold,
ItalicFont = *-Italic
]{Urbanist}
% Page layout
\RequirePackage[
paperheight=175mm,
paperwidth=110mm,
top=10mm,
bottom=17mm,
left=10mm,
right=10mm,
% showframe
]{geometry}
\RequirePackage{microtype}
% Color support
\RequirePackage{xcolor}
% Language support
\RequirePackage{babel}
\babelprovide[import]{german-ch}
\babelprovide[import]{french-ch}
\babelprovide[import]{swissgerman}
\babelprovide{american}
% Makros and variables
\newcommand{\zbooktitle}{\textcolor{red}{NO TITLE}}
\newcommand{\booktitle}[1]{\renewcommand{\zbooktitle}{#1}}
\newcommand{\zauthor}{\textcolor{red}{NO AUTHOR}}
\renewcommand{\author}[1]{\renewcommand{\zauthor}{#1}}
\newcommand{\zauthorbio}{\textcolor{red}{NO BIO}}
\newcommand{\authorbio}[1]{\renewcommand{\zauthorbio}{#1}}
\newcommand{\zsummary}{\textcolor{red}{NO SUMMARY}}
\newcommand{\summary}[1]{\renewcommand{\zsummary}{#1}}
\newcommand{\zedition}{\textcolor{red}{NO EDITION}}
\newcommand{\edition}[1]{\renewcommand{\zedition}{#1}}
\newcommand{\zyear}{\textcolor{red}{NO YEAR}}
\renewcommand{\year}[1]{\renewcommand{\zyear}{#1}}
\newcommand{\zisbn}{\textcolor{red}{NO ISBN}}
\newcommand{\isbn}[1]{\renewcommand{\zisbn}{#1}}
\newcommand{\zbooknr}{\textcolor{red}{NO BOOKNR}}
\newcommand{\booknr}[1]{\renewcommand{\zbooknr}{#1}}
\newcommand{\zlicence}{\textcolor{red}{NO licence}}
\newcommand{\licence}[1]{\renewcommand{\zlicence}{#1}}
\newcommand{\zextracopyrightinfo}{\textcolor{red}{NO extracopyrightinfo}}
\newcommand{\extracopyrightinfo}[1]{\renewcommand{\zextracopyrightinfo}{#1}}
\newcommand{\zprint}{\textcolor{red}{NO zprint}}
\newcommand{\print}[1]{\renewcommand{\zprint}{#1}}
\newcommand{\zcoverauthor}{\textcolor{red}{NO zcoverauthor}}
\newcommand{\coverauthor}[1]{\renewcommand{\zcoverauthor}{#1}}
\newcommand{\chapterdedication}[1]{\vspace{-1ex}\hfill{\em #1}\vspace{1ex}}
% Custom Table of Contents Formatting
\addtocontents{toc}{\protect\thispagestyle{empty}}
\RequirePackage{titletoc}
\titlecontents{chapter}[0em]
{\addvspace{5pt}\bfseries}
{\itshape}
{\itshape}
{\titlerule*[0.5pc]{.}\contentspage}
% Custom Chapter Style
\RequirePackage{titlesec}
\titleformat{\chapter}[display]
{\centering\normalfont\huge\bfseries}% format
{}% label
{0pt}% sep
{\Huge\vspace{-2em}}% before
[\vspace{-2em}]% after
% Headers and Footers
\RequirePackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyfoot[LE,RO]{\small\thepage}
\renewcommand{\headrulewidth}{0pt}
\renewcommand{\footrulewidth}{0pt}
% Styles
\renewcommand{\frontmatter}{%
\cleardoublepage
\pagestyle{empty}
\normalsize
\rmfamily
}
\renewcommand{\mainmatter}{%
\cleardoublepage
\pagestyle{fancy}
\pagenumbering{arabic}
\normalsize
\rmfamily
}
\renewcommand{\backmatter}{%
\cleardoublepage
\pagestyle{fancy}
\normalsize
\rmfamily
}
% Pages
\renewcommand{\titlepage}{%
{
\clearpage
\vspace*{\fill}
\begin{center}
% \Huge\bfseries
\Huge\bfseries
\urbanistfont
\zbooktitle
\end{center}
\hspace{3em}
\hfill
\Large
{\it \zauthor}
\vfill
\cleardoublepage
}
}
\newcommand{\zuendhoelzlipage}{%
{%}
\clearpage
\begin{center}%
Zündhölzli \zbooknr%
\end{center}%
\clearpage
}%
}%
\newcommand{\authorpage}{%
{%
\clearpage
\null\vfill
{\footnotesize\noindent\zsummary}
\vspace{3ex}
{\footnotesize\noindent\zauthorbio}
\clearpage
}%
}%
\newcommand{\titleclean}{%
{%
\clearpage
\begin{center}
{\large \zauthor}
\vspace{1ex}
{\Large \zbooktitle}
\vfill
Zündhölzli
\end{center}
\clearpage
}%
}%
\newcommand{\copyrightpage}{%
{%
\clearpage
\null\vfill
\begin{center}%
{%
\small
\zedition~\zyear
\vspace{1ex}
Zündhölzli~\zbooknr\\
\zlicence\\
Satz und Reproduktion, Zündhölzli Verlag, Zürich\\
in Lua\TeX{} mit {\urbanistfont Urbanist} und EBGaramond Font\\
Druk: \zprint\\
Umschlag: \zcoverauthor\\
ISBN~\zisbn
}%
\end{center}%
}%
}%
% Table of content Heading
\renewcommand{\contentsname}{}
% End of the Class File
\endinput