1
0
mirror of https://gitlab.com/tiggr/patchwork.git synced 2024-12-26 06:11:02 +01:00
patchwork/styles.tex

449 lines
11 KiB
TeX
Raw Permalink Normal View History

2019-09-01 20:25:05 +02:00
% !TeX root = main.tex
% !TeX program = LuaLaTeX
% !TeX encoding = UTF-8
\usepackage{tabularx}
\usepackage[table]{xcolor}
\usepackage[left=15mm, right=25mm, top=2.7cm, bottom=2.5cm]{geometry}
\usepackage{babel}
\usepackage{fontspec}
\usepackage{scrlayer}
\usepackage{parskip}
\usepackage{graphicx}
\usepackage{color}
\usepackage{wrapfig}
\usepackage[tight]{units}
\usepackage{amsmath}
\usepackage{emptypage}
\usepackage[colorlinks=true,linkcolor=black,citecolor=black,urlcolor=black,bookmarks=true,unicode]{hyperref}
2019-10-16 23:19:22 +02:00
\usepackage[figurewithin=none]{caption}
2019-09-01 20:25:05 +02:00
\usepackage{subcaption}
\usepackage[activate=true,tracking=true]{microtype}
\usepackage[titles]{tocloft}
\usepackage{fixme}
\usepackage{hologo}
\usepackage{varioref}
2019-10-29 20:54:30 +01:00
\usepackage{nameref}
2019-09-01 20:25:05 +02:00
\usepackage{csvsimple}
\usepackage{tcolorbox}
\usepackage{qrcode}
2019-10-16 21:32:56 +02:00
\usepackage[safe]{tipa}
\usepackage{csquotes}
\usepackage{tikz}
\usetikzlibrary{calc}
2019-09-01 20:25:05 +02:00
\usepackage{pdfpages}
\usepackage{blindtext}
\usepackage{balance}
\usepackage{comment}
2020-01-26 16:53:33 +01:00
\usepackage[backend=biber,citestyle=numeric-comp]{biblatex}
2019-09-01 20:25:05 +02:00
2019-11-16 16:25:51 +01:00
\newcolumntype{L}[1]{>{\raggedright\arraybackslash}p{#1}} % linksbündig mit Breitenangabe
\newcolumntype{C}[1]{>{\centering\arraybackslash}p{#1}} % zentriert mit Breitenangabe
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{#1}} % rechtsbündig mit Breitenangabe
2019-09-01 20:25:05 +02:00
% cleardoublepage neu definieren, da es durch "balance" verändert wurde
\makeatletter
2020-01-27 20:19:35 +01:00
\renewcommand{\@BAcleardblpage}{\clearpage\if@twoside \ifodd\c@page\else
\hbox{}\thispagestyle{empty}\newpage\fi\fi}
2019-09-01 20:25:05 +02:00
\makeatother
2019-10-29 20:54:30 +01:00
% Verweise auf Name statt auf Nummer
\newcommand{\xref}[1]{\glqq{}\nameref{#1}\grqq{} \vpageref[\unskip]{#1}}
2019-09-01 20:25:05 +02:00
% immer durch 4 teilbare Seitenzahl
\usepackage{refcount,lastpage}
\makeatletter
\newcommand{\checkmultipleoffour}{%
2020-01-27 20:19:35 +01:00
\count@=\getpagerefnumber{LastPage}%
\count@=\the\numexpr\count@\relax
\@tempcnta=\count@
\divide\@tempcnta by 4
\multiply\@tempcnta by 4
\count@=\numexpr\count@-\@tempcnta\relax
\ifnum\count@>0
\loop\ifnum\count@<3
\hbox{}\thispagestyle{empty}\newpage
\advance\count@\@ne
\repeat
\fi
\input{backside.tex}
2019-09-01 20:25:05 +02:00
}
2019-10-29 20:54:30 +01:00
\@ifclassloaded{scrbook}{%
2020-01-27 20:19:35 +01:00
\AtEndDocument{\checkmultipleoffour}}
2019-10-29 20:54:30 +01:00
{}
2019-09-01 20:25:05 +02:00
\makeatother
% font settings
\directlua{
2020-01-27 20:19:35 +01:00
fonts.handlers.otf.addfeature{
name = "liga",
type = "ligature",
data = {
['fi'] = { "f", "i" },
['fl'] = { "f", "l" },
},
}
2019-09-01 20:25:05 +02:00
}
\setmainfont{Delicious}
% Captions
\captionsetup[figure]{justification=centerlast,font={normalsize,it}}
\captionsetup[table]{justification=centerlast,font={normalsize,it}}
\captionsetup[subfigure]{labelformat=empty,labelsep=colon,justification=centerlast,font={normalsize,it}}
% varioref
\labelformat{figure}{Abbildung~#1}
\labelformat{section}{Abschnitt~#1}
\labelformat{table}{Tabelle~#1}
2019-09-01 20:25:05 +02:00
% footnote: some more room between text and footnote
\addtolength{\skip\footins}{2pc plus 5pt}
% Farben
\definecolor{tableRow1}{RGB}{77, 156, 164}
\definecolor{tableRowHead}{RGB}{255, 126, 119}
\definecolor{primary}{RGB}{1, 74, 81}
\definecolor{secondary}{RGB}{46, 134, 142}
\definecolor{okcolor}{RGB}{140,202,27}
2019-09-01 20:25:05 +02:00
2019-10-16 21:32:56 +02:00
%https://tex.stackexchange.com/questions/75667/change-colour-on-chapter-section-headings-lyx
\setkomafont{disposition}{\color{primary}\bfseries}
2019-09-01 20:25:05 +02:00
% for wrapfigure
\setlength{\columnsep}{2\columnsep}%
% Boxen
% \newtcolorbox{hint}{%
% colback=tableRow1!50,%
% colframe=tableRow1,%
% sharp corners,%
% boxrule=0.2mm,%
% }
2019-09-01 20:25:05 +02:00
\newtcolorbox{vcard}[1]{%
2020-01-27 20:19:35 +01:00
colback=tableRow1!50,%
colframe=tableRow1,%
sharp corners,%
title=#1,%
height=5cm,%
left=1mm,%
bottom=1mm,%
fonttitle=\bfseries,%
boxrule=0.2mm%
2019-09-01 20:25:05 +02:00
}
\newsavebox\MBox
\newenvironment{Wikipedia}[1]
2020-01-27 20:19:35 +01:00
{\par\smallskip\begin{lrbox}{\MBox}\begin{minipage}[t]{#1}}
{\end{minipage}\end{lrbox}%
\makebox(0,0){\put(0,0){%
\includegraphics[trim=0 20 0 -20,width=0.3\columnwidth,height=0.27\columnwidth]{Bilder/wikipedia-light.pdf}}}%
\usebox\MBox\par%
}
\tcbuselibrary{skins,breakable}
\newtcolorbox{Hint}{%
2020-01-27 20:19:35 +01:00
enhanced,breakable,%
toggle left and right,%
sharp corners,%
boxrule=1pt,top=1.2mm,bottom=1.2mm,left=1.2mm,right=1.2mm,%
rightrule=1.2cm,%
before skip=12pt plus 2pt,after skip=12pt plus 2pt,%
colback=okcolor!20,%
colframe=okcolor!80,%
overlay={%
\begin{tcbclipframe}
\tcbifoddpage{\coordinate (X) at ([shift={(-6mm,-8mm)}]frame.north east);}
{\coordinate (X) at ([shift={(6mm,-8mm)}]frame.north west);}
\node[inner sep=0pt] (russell) at (X) {\includegraphics[width=10mm,height=10mm]{bulb.pdf}};
\end{tcbclipframe}%
},%
}
2019-09-01 20:25:05 +02:00
% sections ohne Nummer!
% Besser als \section*, da so die section ins toc kommt!
\setcounter{secnumdepth}{0}
% tocloft - Inhaltsverzeichnis formatieren
\renewcommand{\cftsecfont}{}
\renewcommand{\cftsecpagefont}{}
\pagenumbering{arabic}
% Standardseiten
\DeclareNewLayer[oddpage,
2020-01-27 20:19:35 +01:00
align=tr,
hoffset=\dimexpr\paperwidth-20mm\relax,
voffset=6.3mm,
width=16.3mm,
height=20mm,
contents={%
\includegraphics[height=20mm]{Bilder/logo.pdf}
}]{RWLogo}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[oddpage,
2020-01-27 20:19:35 +01:00
align=tr,
hoffset=\dimexpr\paperwidth-32mm\relax,
voffset=10mm,
width=40mm,
height=20mm,
contents={%
\fontspec{Delicious-Roman}[] Rodgauer Workshop
}]{RWText}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=15mm,
voffset=\dimexpr\paperheight-16.5mm\relax,
width=12mm,
height=12mm,
contents={%
\includegraphics[width=7mm,angle=12]{Bilder/logo3.pdf}
}]{RWFootLogo}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=25mm, % 15mm without Logo
voffset=\dimexpr\paperheight-17mm\relax,
width=70mm,
height=10mm,
contents={%
{\fontspec{Delicious-Roman}[]
\scriptsize http://www.stieg-op.com/\\[-4pt] https://www.rodgauer-workshop.de}
}]{RWurl}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[evenpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=8mm,
voffset=7mm,
width=16mm,
height=14mm,
contents={%
\includegraphics[height=18mm]{Bilder/bedsheetlogo.pdf}
}]{RWkite}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[evenpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=25mm,
voffset=10mm,
width=40mm,
height=15mm,
contents={%
\fontspec{Delicious-Roman}[] Patchwork
}]{RWname}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[evenpage,
2020-01-27 20:19:35 +01:00
align=tr,
hoffset=\dimexpr\paperwidth-15mm\relax,
voffset=\dimexpr\paperheight-17mm\relax,
width=70mm,
height=10mm,
contents={%
{\fontspec{Delicious-Roman}[] \scriptsize\hfill Patchwork-Workshop, 7. und 14. März 2019}
}]{RWdate}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[evenpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=25mm,
voffset=\dimexpr\paperheight-17mm\relax,
width=20mm,
height=10mm,
contents={%
{\fontspec{Delicious-Roman}[]\thepage{}}
}]{RWPagenumberEven}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[oddpage,
2020-01-27 20:19:35 +01:00
align=tr,
hoffset=\dimexpr\paperwidth-25mm\relax,
voffset=\dimexpr\paperheight-17mm\relax,
width=20mm,
height=10mm,
contents={%
{\hfill\fontspec{Delicious-Roman}[]\thepage{}}
}]{RWPagenumberOdd}
2019-09-01 20:25:05 +02:00
% Titelseite
\DeclareNewLayer[background,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=19mm,
voffset=0mm,
width=56mm,
height=304mm,
contents={%
\includegraphics[width=56mm,height=297mm]{Bilder/vertical_big.jpg}
}]{RWtitleBar}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[background,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=81mm,
voffset=261mm,
width=14mm,
height=18mm,
contents={%
\includegraphics[width=14mm]{Bilder/logo_bw.pdf}
}]{RWtitleLogo}
2019-09-01 20:25:05 +02:00
% Logo des Drachenentwicklers
\DeclareNewLayer[background,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=81.5mm,
voffset=241mm,
width=11mm,
height=16mm,
contents={%
%\includegraphics[width=14mm]{Bilder/dummy.pdf}
}]{RWguestLogo}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[foreground,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=97.3mm,
voffset=245.5mm,
width=100mm,
height=30mm,
contents={
%{\fontspec{MadameFlacon}[]\Large Beau Du Ciel}
}]{RWguest}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[foreground,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=5mm,
voffset=23mm,
width=16mm,
height=14mm,
contents={%
\includegraphics[width=84mm]{Bilder/bedsheetlogo.pdf}
}]{RWkiteLogo}
2019-09-01 20:25:05 +02:00
\makeatletter
\DeclareNewLayer[foreground,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=81mm,
voffset=44mm,
width=115mm,
height=60mm,
contents={%
{\huge\@title\\}
{\large\@date}
}]{RWtitle}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[foreground,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=81mm,
voffset=212mm,
width=100mm,
height=15mm,
contents={%
{\huge Materialsammlung}
}]{RWsammlung}
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[foreground,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=97.3mm,
voffset=262.5mm,
width=100mm,
height=30mm,
contents={%
{\@author}
}]{RWauthor}
2019-09-01 20:25:05 +02:00
\makeatother
2019-10-16 21:32:56 +02:00
% part pager
2019-09-01 20:25:05 +02:00
\DeclareNewLayer[background,oddpage,
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=0mm,
voffset=55mm,
width=170mm,
height=30mm,
contents={%
\includegraphics[width=\layerwidth,height=\layerheight]{Bilder/horizontal_big.jpg}
}]{RWpartBar}
2019-10-16 21:32:56 +02:00
% \DeclareNewLayer[foreground,oddpage,
% clone=RWpartBar,
% addhoffset=15mm,
% addwidth=-25mm,
% contents={%
% \vfill
% \begin{flushright}
% {\Large\partname\hskip 0.82em \thepart}\\[10pt]
% {\huge ...}
% \end{flushright}
% \vfill
% }]{RWpartTitle}
2019-09-01 20:25:05 +02:00
% Backside
\DeclareNewLayer[%
2020-01-27 20:19:35 +01:00
align=tl,
hoffset=15mm,
voffset=21.5cm,
width=35mm,
height=60mm,
contents={%
\includegraphics[width=35mm]{opensource.pdf}
}]{OSILogo}
2019-09-01 20:25:05 +02:00
\DeclareNewPageStyleByLayers{RodgauerWorkshop}{RWLogo,RWText,RWurl,RWkite,RWname,RWdate,RWFootLogo,RWPagenumberEven,RWPagenumberOdd}
\DeclareNewPageStyleByLayers{RodgauerWorkshopNN}{RWLogo,RWText,RWurl,RWkite,RWname,RWdate,RWFootLogo}
\DeclareNewPageStyleByLayers{RWTitlePage}{RWtitleBar,RWtitle,RWauthor,RWsammlung,RWtitleLogo,RWkiteLogo,RWguestLogo,RWguest}
2019-10-16 21:32:56 +02:00
\DeclareNewPageStyleByLayers{RWPartPage}{RWpartBar}
2019-09-01 20:25:05 +02:00
\DeclareNewPageStyleByLayers{RWBackside}{OSILogo}
2019-10-29 20:54:30 +01:00
\makeatletter
\@ifclassloaded{scrbook}{%
2020-01-27 20:19:35 +01:00
\renewcommand*{\partpagestyle}{RWPartPage}
\renewcommand*{\chapterpagestyle}{RodgauerWorkshop}}
2019-10-29 20:54:30 +01:00
{}
\makeatother
2019-10-16 21:32:56 +02:00
2019-09-01 20:25:05 +02:00
% for todonotes
\setlength{\marginparwidth}{2cm}
% bibliography
\setlength{\bibitemsep}{1em}
\renewcommand*{\newunitpunct}{\addcomma\space}
% \subsubsection ohne Leerraum nach Überschrift
\RedeclareSectionCommand[%
2020-01-27 20:19:35 +01:00
beforeskip=-3.25ex plus -1ex minus -.2ex,%
afterskip=1sp%
2019-09-01 20:25:05 +02:00
]{subsubsection}
2019-10-16 21:32:56 +02:00
% Parts-Seiten gestalten
% https://tex.stackexchange.com/questions/370478/part-page-formatting-in-scrlayer-scrpage
\makeatletter
% numbered part in the table of contents
\newcommand{\@mypartnumtocformat}[2]{%
2020-01-27 20:19:35 +01:00
\setlength\fboxsep{0pt}%
{\noindent\centering#1}\hskip 0.5em{\centering#2}}%
2019-10-16 21:32:56 +02:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% unnumbered part in the table of contents
\newcommand{\@myparttocformat}[1]{%
2020-01-27 20:19:35 +01:00
\setlength\fboxsep{0pt}%
{\centering#1}}%
2019-10-16 21:32:56 +02:00
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\def\@part[#1]#2{%
2020-01-27 20:19:35 +01:00
\ifnum \c@secnumdepth >-2\relax%
\refstepcounter{part}%
\addcontentsline{toc}{part}{\texorpdfstring{\protect\@mypartnumtocformat{\thepart}{#1}}{\partname~\thepart\ ---\ #1}}
\else%
% \addcontentsline{toc}{part}{\texorpdfstring{\protect\@myparttocformat{#1}}{#1}}%
\fi%
%\startcontents%
\markboth{}{}%
{\thispagestyle{\partpagestyle}%
\begin{tikzpicture}[remember picture,overlay]
\node[align=right, text width=12cm] at ($(current page.south west) + (10.2cm,22.6cm)$) {{\LARGE\bfseries\raggedright\partname{ }\@Roman\c@part}\\[12pt] {\strut\raggedright\Huge\bfseries#2}};
\end{tikzpicture}%
}
\@endpart}
2019-10-16 21:32:56 +02:00
\def\@spart#1{%
2020-01-27 20:19:35 +01:00
\startcontents%
\phantomsection
{\thispagestyle{\partpagestyle}%
{\fontsize{30}{30}\sffamily\bfseries#1}};
% \addcontentsline{toc}{part}{\texorpdfstring{%
% \setlength\fboxsep{0pt}%
% \noindent\protect\colorbox{mybluei!40}{\strut\protect\parbox[c][.7cm]{\linewidth}{\Large\sffamily\protect\centering #1\quad\mbox{}}}}{#1}}%
\@endpart}
2019-10-16 21:32:56 +02:00
\def\@endpart{\vfil\newpage
2020-01-27 20:19:35 +01:00
\if@twoside
\if@openright
\null
\thispagestyle{empty}%
\newpage
\fi
\fi
\if@tempswa
\twocolumn
\fi}
2019-10-16 21:32:56 +02:00
\makeatother