├── presentation.pdf ├── figures ├── sds_screenshot.png ├── Logo_SDS_colour_300dpi.png └── sds_formsheet_organization.png ├── sdsbrowser.sdsanalysis.caa2019.Rproj ├── .gitignore ├── metropolis_theme ├── beamercolorthemecustommetropolis-highcontrast.sty ├── beamerthemecustommetropolis.sty ├── pgfplotsthemetol.sty ├── beamercolorthemecustommetropolis.sty ├── beamerouterthemecustommetropolis.sty ├── beamerinnerthemecustommetropolis.sty └── beamerfontthemecustommetropolis.sty ├── preamble.tex ├── README.md └── presentation.Rmd /presentation.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/sdsbrowser.sdsanalysis.caa2019/master/presentation.pdf -------------------------------------------------------------------------------- /figures/sds_screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/sdsbrowser.sdsanalysis.caa2019/master/figures/sds_screenshot.png -------------------------------------------------------------------------------- /figures/Logo_SDS_colour_300dpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/sdsbrowser.sdsanalysis.caa2019/master/figures/Logo_SDS_colour_300dpi.png -------------------------------------------------------------------------------- /figures/sds_formsheet_organization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/sdsbrowser.sdsanalysis.caa2019/master/figures/sds_formsheet_organization.png -------------------------------------------------------------------------------- /sdsbrowser.sdsanalysis.caa2019.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: XeLaTeX 14 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | 5 | # Session Data files 6 | .RData 7 | 8 | # Example code in package build process 9 | *-Ex.R 10 | 11 | # Output files from R CMD build 12 | /*.tar.gz 13 | 14 | # Output files from R CMD check 15 | /*.Rcheck/ 16 | 17 | # RStudio files 18 | .Rproj.user/ 19 | 20 | # produced vignettes 21 | vignettes/*.html 22 | vignettes/*.pdf 23 | 24 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 25 | .httr-oauth 26 | 27 | # knitr and R markdown default cache directories 28 | /*_cache/ 29 | /cache/ 30 | 31 | # Temporary files created by R markdown 32 | *.utf8.md 33 | *.knit.md 34 | 35 | # Shiny token, see https://shiny.rstudio.com/articles/shinyapps.html 36 | rsconnect/ 37 | .Rproj.user 38 | 39 | # rendered results 40 | presentation.tex 41 | 42 | # logfiles 43 | *.log 44 | -------------------------------------------------------------------------------- /metropolis_theme/beamercolorthemecustommetropolis-highcontrast.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamercolorthemecustommetropolis-highcontrast.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamercolorthemecustommetropolis-highcontrast.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamercolorthemecustommetropolis-highcontrast}[2017/01/23 Metropolis color theme] 21 | \usecolortheme{custommetropolis} 22 | 23 | \definecolor{mAlert}{HTML}{AD003D} 24 | \definecolor{mExample}{HTML}{005580} 25 | 26 | \setbeamercolor{normal text}{% 27 | fg=black, 28 | bg=white 29 | } 30 | \setbeamercolor{alerted text}{% 31 | fg=mAlert, 32 | } 33 | \setbeamercolor{example text}{% 34 | fg=mExample, 35 | } 36 | \mode 37 | \endinput 38 | %% 39 | %% End of file `beamercolorthemecustommetropolis-highcontrast.sty'. 40 | -------------------------------------------------------------------------------- /preamble.tex: -------------------------------------------------------------------------------- 1 | \setbeamertemplate{title page}{ 2 | \begin{minipage}[b][\paperheight]{\textwidth} 3 | \ifx\inserttitlegraphic\@empty\else\usebeamertemplate*{title graphic}\fi 4 | \vspace*{1cm} 5 | \ifx\inserttitle\@empty\else\usebeamertemplate*{title}\fi 6 | \ifx\insertsubtitle\@empty\else\usebeamertemplate*{subtitle}\fi 7 | \usebeamertemplate*{title separator} 8 | \vspace*{5px} 9 | \small{\textbf{Clemens Schmid}} 10 | \newline 11 | \footnotesize{@nevromeCS} 12 | \newline 13 | \footnotesize{github.com/nevrome} 14 | \newline 15 | \footnotesize{\textbf{clemens@nevrome.de}} 16 | \newline 17 | \newline 18 | \small{\textbf{Christoph Rinne}} 19 | \newline 20 | \footnotesize{github.com/chrinne} 21 | \newline 22 | \footnotesize{\textbf{crinne@ufg.uni-kiel.de}} 23 | \newline 24 | \newline 25 | \footnotesize{A project by the \newline \textbf{Johanna Mestorf Academy}} 26 | \newline 27 | \footnotesize{jma.uni-kiel.de} 28 | \newline 29 | \newline 30 | \footnotesize{CAA 2019} 31 | \newline 32 | \footnotesize{R as an archaeological tool: \newline current state and directions (vol. II)} 33 | \newline 34 | \ifx\insertdate\@empty\else\usebeamertemplate*{date}\fi 35 | \vfill 36 | \vspace*{1mm} 37 | \end{minipage} 38 | } 39 | 40 | \titlegraphic{\begin{picture}(0,0)\put(140,-240){\makebox(0,0)[rt]{\includegraphics[width=8cm,scale=1.7]{figures/Logo_SDS_colour_300dpi.png}}}\end{picture}} 41 | 42 | \makeatletter 43 | \let\@@magyar@captionfix\relax 44 | \makeatother 45 | 46 | \makeatletter 47 | \def\beamer@calltheme#1#2#3{% 48 | \def\beamer@themelist{#2} 49 | \@for\beamer@themename:=\beamer@themelist\do 50 | {\usepackage[{#1}]{\beamer@themelocation/#3\beamer@themename}}} 51 | 52 | \def\usefolder#1{ 53 | \def\beamer@themelocation{#1} 54 | } 55 | \def\beamer@themelocation{} 56 | 57 | \usefolder{metropolis_theme} 58 | \usetheme{custommetropolis} 59 | \metroset{sectionpage=progressbar} 60 | 61 | \usepackage{subfig} 62 | \usepackage[justification=centering]{caption} 63 | \usepackage{textcomp} 64 | \usepackage{changepage} 65 | \usepackage[absolute,overlay]{textpos} 66 | \usepackage{mathtools} 67 | %\usepackage[texcoord,grid,gridunit=pt,gridcolor=red!10,subgridcolor=green!10]{eso-pic} 68 | 69 | \definecolor{niceorange}{HTML}{D65D00} 70 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # sdsbrowser - an R Shiny Application for visualisation and analysis of SDS stone artefact data 2 | 3 | This presentation is the result of a three month project organized by [Christoph Rinne](https://www.ufg.uni-kiel.de/en/staff-directory/scientific-collaborators/christoph-rinne) (@chrinne) and [Oliver Nakoinz](https://www.ufg.uni-kiel.de/en/staff-directory/professors/oliver-nakoinz) (@OliverNakoinz) and financed by the [Graduate School "Human Development in Landscapes"](http://www.gshdl.uni-kiel.de/). It was prepared for the session *R as an archaeological tool: current state and directions (vol. II)* at the [CAA2019](https://2019.caaconference.org/) conference in Kraków. 4 | 5 | ## Abstract 6 | 7 | 8 | 9 | SDS (Systematic and Digital documentation of Stone artefacts) is a recording system for stone artefacts proposed by Drafehn et al. 2008 [1]. It was created as an uniform coding and standardized listing system of the conventional attributes recorded at lithic inventories to enable quantitative and comparative analysis. The variable collection and data structure in SDS was compiled from several established documentation systems, most notably Zimmermann 1977 (see [1]). 10 | 11 | Naturally its long history caused technological anachronisms in the way it stores data, complicating the application of modern computational tools and methods. Nevertheless the SDS system is still in use and was implemented for material study in many archaeological projects over the last ten years. These separate individual datasets are now in danger of falling into oblivion although they are a valuable resource for cross-context data comparison as intended by the SDS creators. 12 | 13 | This paper presents our attempt to 1. collect, standardise and modernise SDS data and metadata, 2. analyse and compare different datasets with tools provided in an own R package sdsanalysis and 3. publish and visualise the datasets with the webapp sdsbrowser to make them accessible for future use. Increasing the visibility and usability of old data is of crucial importance for archaeology and the combination of R Package and Shiny App is a powerful framework to simplify this task. 14 | 15 | *** 16 | 17 | [1] A. Drafehn/M. Bradtmöller/D. Mischka, SDS – Systematische und digitale Erfassung von Steinartefakten. Journal Of Neolithic Archaeology 10, 2008. doi:10.12766/jna.2008.25 18 | -------------------------------------------------------------------------------- /metropolis_theme/beamerthemecustommetropolis.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamerthemecustommetropolis.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamerthemecustommetropolis.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamerthemecustommetropolis} 21 | [2017/01/23 v1.2 Metropolis Beamer theme] 22 | \RequirePackage{etoolbox} 23 | \RequirePackage{pgfopts} 24 | \pgfkeys{/custommetropolis/.cd, 25 | .search also={ 26 | /custommetropolis/inner, 27 | /custommetropolis/outer, 28 | /custommetropolis/color, 29 | /custommetropolis/font, 30 | } 31 | } 32 | \pgfkeys{ 33 | /custommetropolis/titleformat plain/.cd, 34 | .is choice, 35 | regular/.code={% 36 | \let\custommetropolis@plaintitleformat\@empty% 37 | \setbeamerfont{standout}{shape=\normalfont}% 38 | }, 39 | smallcaps/.code={% 40 | \let\custommetropolis@plaintitleformat\@empty% 41 | \setbeamerfont{standout}{shape=\scshape}% 42 | }, 43 | allsmallcaps/.code={% 44 | \let\custommetropolis@plaintitleformat\MakeLowercase% 45 | \setbeamerfont{standout}{shape=\scshape}% 46 | \PackageWarning{beamerthemecustommetropolis}{% 47 | Be aware that titleformat plain=allsmallcaps can lead to problems% 48 | } 49 | }, 50 | allcaps/.code={% 51 | \let\custommetropolis@plaintitleformat\MakeUppercase% 52 | \setbeamerfont{standout}{shape=\normalfont}% 53 | \PackageWarning{beamerthemecustommetropolis}{% 54 | Be aware that titleformat plain=allcaps can lead to problems% 55 | } 56 | }, 57 | } 58 | \pgfkeys{ 59 | /custommetropolis/titleformat/.code=\pgfkeysalso{ 60 | font/titleformat title=#1, 61 | font/titleformat subtitle=#1, 62 | font/titleformat section=#1, 63 | font/titleformat frame=#1, 64 | titleformat plain=#1, 65 | } 66 | } 67 | \pgfkeys{/custommetropolis/.cd, 68 | usetitleprogressbar/.code=\pgfkeysalso{outer/progressbar=frametitle}, 69 | noslidenumbers/.code=\pgfkeysalso{outer/numbering=none}, 70 | usetotalslideindicator/.code=\pgfkeysalso{outer/numbering=fraction}, 71 | nosectionslide/.code=\pgfkeysalso{inner/sectionpage=none}, 72 | darkcolors/.code=\pgfkeysalso{color/background=dark}, 73 | blockbg/.code=\pgfkeysalso{color/block=fill, inner/block=fill}, 74 | } 75 | \newcommand{\custommetropolis@setdefaults}{ 76 | \pgfkeys{/custommetropolis/.cd, 77 | titleformat plain=regular, 78 | } 79 | } 80 | \providecommand{\tikzexternalenable}{} 81 | \providecommand{\tikzexternaldisable}{} 82 | \useinnertheme{custommetropolis} 83 | \useoutertheme{custommetropolis} 84 | \usecolortheme{custommetropolis} 85 | \usefonttheme{custommetropolis} 86 | \AtEndPreamble{% 87 | \@ifpackageloaded{pgfplots}{% 88 | \RequirePackage{pgfplotsthemetol} 89 | }{} 90 | } 91 | \newcommand{\metroset}[1]{\pgfkeys{/custommetropolis/.cd,#1}} 92 | \def\custommetropolis@plaintitleformat#1{#1} 93 | \newcommand{\plain}[2][]{% 94 | \PackageWarning{beamerthemecustommetropolis}{% 95 | The syntax `\plain' may be deprecated in a future version of Metropolis. 96 | Please use a frame with [standout] instead. 97 | } 98 | \begin{frame}[standout]{#1} 99 | \custommetropolis@plaintitleformat{#2} 100 | \end{frame} 101 | } 102 | \newcommand{\mreducelistspacing}{\vspace{-\topsep}} 103 | \custommetropolis@setdefaults 104 | \ProcessPgfOptions{/custommetropolis} 105 | \endinput 106 | %% 107 | %% End of file `beamerthemecustommetropolis.sty'. 108 | -------------------------------------------------------------------------------- /metropolis_theme/pgfplotsthemetol.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `pgfplotsthemetol.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% pgfplotsthemetol.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{pgfplotsthemetol} 21 | [2017/01/23 PGFplots colors based on Paul Tol's SRON technical note] 22 | \definecolor{TolDarkPurple}{HTML}{332288} 23 | \definecolor{TolDarkBlue}{HTML}{6699CC} 24 | \definecolor{TolLightBlue}{HTML}{88CCEE} 25 | \definecolor{TolLightGreen}{HTML}{44AA99} 26 | \definecolor{TolDarkGreen}{HTML}{117733} 27 | \definecolor{TolDarkBrown}{HTML}{999933} 28 | \definecolor{TolLightBrown}{HTML}{DDCC77} 29 | \definecolor{TolDarkRed}{HTML}{661100} 30 | \definecolor{TolLightRed}{HTML}{CC6677} 31 | \definecolor{TolLightPink}{HTML}{AA4466} 32 | \definecolor{TolDarkPink}{HTML}{882255} 33 | \definecolor{TolLightPurple}{HTML}{AA4499} 34 | \pgfplotscreateplotcyclelist{mbarplot cycle}{% 35 | {draw=TolDarkBlue, fill=TolDarkBlue!70}, 36 | {draw=TolLightBrown, fill=TolLightBrown!70}, 37 | {draw=TolLightGreen, fill=TolLightGreen!70}, 38 | {draw=TolDarkPink, fill=TolDarkPink!70}, 39 | {draw=TolDarkPurple, fill=TolDarkPurple!70}, 40 | {draw=TolDarkRed, fill=TolDarkRed!70}, 41 | {draw=TolDarkBrown, fill=TolDarkBrown!70}, 42 | {draw=TolLightRed, fill=TolLightRed!70}, 43 | {draw=TolLightPink, fill=TolLightPink!70}, 44 | {draw=TolLightPurple, fill=TolLightPurple!70}, 45 | {draw=TolLightBlue, fill=TolLightBlue!70}, 46 | {draw=TolDarkGreen, fill=TolDarkGreen!70}, 47 | } 48 | \pgfplotscreateplotcyclelist{mlineplot cycle}{% 49 | {TolDarkBlue, mark=*, mark size=1.5pt}, 50 | {TolLightBrown, mark=square*, mark size=1.3pt}, 51 | {TolLightGreen, mark=triangle*, mark size=1.5pt}, 52 | {TolDarkBrown, mark=diamond*, mark size=1.5pt}, 53 | } 54 | \pgfplotsset{ 55 | compat=1.9, 56 | mlineplot/.style={ 57 | mbaseplot, 58 | xmajorgrids=true, 59 | ymajorgrids=true, 60 | major grid style={dotted}, 61 | axis x line=bottom, 62 | axis y line=left, 63 | legend style={ 64 | cells={anchor=west}, 65 | draw=none 66 | }, 67 | cycle list name=mlineplot cycle, 68 | }, 69 | mbarplot base/.style={ 70 | mbaseplot, 71 | bar width=6pt, 72 | axis y line*=none, 73 | }, 74 | mbarplot/.style={ 75 | mbarplot base, 76 | ybar, 77 | xmajorgrids=false, 78 | ymajorgrids=true, 79 | area legend, 80 | legend image code/.code={% 81 | \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); 82 | }, 83 | cycle list name=mbarplot cycle, 84 | }, 85 | horizontal mbarplot/.style={ 86 | mbarplot base, 87 | xmajorgrids=true, 88 | ymajorgrids=false, 89 | xbar stacked, 90 | area legend, 91 | legend image code/.code={% 92 | \draw[#1] (0cm,-0.1cm) rectangle (0.15cm,0.1cm); 93 | }, 94 | cycle list name=mbarplot cycle, 95 | }, 96 | mbaseplot/.style={ 97 | legend style={ 98 | draw=none, 99 | fill=none, 100 | cells={anchor=west}, 101 | }, 102 | x tick label style={ 103 | font=\footnotesize 104 | }, 105 | y tick label style={ 106 | font=\footnotesize 107 | }, 108 | legend style={ 109 | font=\footnotesize 110 | }, 111 | major grid style={ 112 | dotted, 113 | }, 114 | axis x line*=bottom, 115 | }, 116 | disable thousands separator/.style={ 117 | /pgf/number format/.cd, 118 | 1000 sep={} 119 | }, 120 | } 121 | \endinput 122 | %% 123 | %% End of file `pgfplotsthemetol.sty'. 124 | -------------------------------------------------------------------------------- /metropolis_theme/beamercolorthemecustommetropolis.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamercolorthemecustommetropolis.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamercolorthemecustommetropolis.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamercolorthemecustommetropolis}[2017/01/23 Metropolis color theme] 21 | \RequirePackage{pgfopts} 22 | \pgfkeys{ 23 | /custommetropolis/color/block/.cd, 24 | .is choice, 25 | transparent/.code=\custommetropolis@block@transparent, 26 | fill/.code=\custommetropolis@block@fill, 27 | } 28 | \pgfkeys{ 29 | /custommetropolis/color/background/.cd, 30 | .is choice, 31 | dark/.code=\custommetropolis@colors@dark, 32 | light/.code=\custommetropolis@colors@light, 33 | } 34 | \newcommand{\custommetropolis@color@setdefaults}{ 35 | \pgfkeys{/custommetropolis/color/.cd, 36 | background=light, 37 | block=transparent, 38 | } 39 | } 40 | \definecolor{mDarkBrown}{HTML}{604c38} 41 | \definecolor{mDarkTeal}{HTML}{23373b} 42 | \definecolor{mLightBrown}{HTML}{EB811B} 43 | \definecolor{mLightGreen}{HTML}{14B03D} 44 | \newcommand{\custommetropolis@colors@dark}{ 45 | \setbeamercolor{normal text}{% 46 | fg=black!2, 47 | bg=mDarkTeal 48 | } 49 | \usebeamercolor[fg]{normal text} 50 | } 51 | \newcommand{\custommetropolis@colors@light}{ 52 | \setbeamercolor{normal text}{% 53 | fg=mDarkTeal, 54 | bg=black!2 55 | } 56 | } 57 | \setbeamercolor{alerted text}{% 58 | fg=mLightBrown 59 | } 60 | \setbeamercolor{example text}{% 61 | fg=mLightGreen 62 | } 63 | \setbeamercolor{titlelike}{use=normal text, parent=normal text} 64 | \setbeamercolor{author}{use=normal text, parent=normal text} 65 | \setbeamercolor{date}{use=normal text, parent=normal text} 66 | \setbeamercolor{institute}{use=normal text, parent=normal text} 67 | \setbeamercolor{structure}{use=normal text, fg=normal text.fg} 68 | \setbeamercolor{palette primary}{% 69 | use=normal text, 70 | fg=normal text.bg, 71 | bg=normal text.fg 72 | } 73 | \setbeamercolor{frametitle}{% 74 | use=palette primary, 75 | parent=palette primary 76 | } 77 | \setbeamercolor{progress bar}{% 78 | use=alerted text, 79 | fg=alerted text.fg, 80 | bg=alerted text.fg!50!black!30 81 | } 82 | \setbeamercolor{title separator}{ 83 | use=progress bar, 84 | parent=progress bar 85 | } 86 | \setbeamercolor{progress bar in head/foot}{% 87 | use=progress bar, 88 | parent=progress bar 89 | } 90 | \setbeamercolor{progress bar in section page}{ 91 | use=progress bar, 92 | parent=progress bar 93 | } 94 | \newcommand{\custommetropolis@block@transparent}{ 95 | \setbeamercolor{block title}{% 96 | use=normal text, 97 | fg=normal text.fg, 98 | bg= 99 | } 100 | \setbeamercolor{block body}{ 101 | bg= 102 | } 103 | } 104 | \newcommand{\custommetropolis@block@fill}{ 105 | \setbeamercolor{block title}{% 106 | use=normal text, 107 | fg=normal text.fg, 108 | bg=normal text.bg!80!fg 109 | } 110 | \setbeamercolor{block body}{ 111 | use={block title, normal text}, 112 | bg=block title.bg!50!normal text.bg 113 | } 114 | } 115 | \setbeamercolor{block title alerted}{% 116 | use={block title, alerted text}, 117 | bg=block title.bg, 118 | fg=alerted text.fg 119 | } 120 | \setbeamercolor{block title example}{% 121 | use={block title, example text}, 122 | bg=block title.bg, 123 | fg=example text.fg 124 | } 125 | \setbeamercolor{block body alerted}{use=block body, parent=block body} 126 | \setbeamercolor{block body example}{use=block body, parent=block body} 127 | \setbeamercolor{footnote}{fg=normal text.fg!90} 128 | \setbeamercolor{footnote mark}{fg=.} 129 | \setbeamercolor{bibliography entry author}{fg=, bg=} 130 | \setbeamercolor{bibliography entry title}{fg=, bg=} 131 | \setbeamercolor{bibliography entry location}{fg=, bg=} 132 | \setbeamercolor{bibliography entry note}{fg=, bg=} 133 | \custommetropolis@color@setdefaults 134 | \ProcessPgfPackageOptions{/custommetropolis/color} 135 | \mode 136 | \endinput 137 | %% 138 | %% End of file `beamercolorthemecustommetropolis.sty'. 139 | -------------------------------------------------------------------------------- /metropolis_theme/beamerouterthemecustommetropolis.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamerouterthemecustommetropolis.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamerouterthemecustommetropolis.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamerouterthemecustommetropolis}[2017/01/23 Metropolis outer theme] 21 | \RequirePackage{etoolbox} 22 | \RequirePackage{calc} 23 | \RequirePackage{pgfopts} 24 | \pgfkeys{ 25 | /custommetropolis/outer/numbering/.cd, 26 | .is choice, 27 | none/.code=\setbeamertemplate{frame numbering}[none], 28 | counter/.code=\setbeamertemplate{frame numbering}[counter], 29 | fraction/.code=\setbeamertemplate{frame numbering}[fraction], 30 | } 31 | \pgfkeys{ 32 | /custommetropolis/outer/progressbar/.cd, 33 | .is choice, 34 | none/.code={% 35 | \setbeamertemplate{headline}[plain] 36 | \setbeamertemplate{frametitle}[plain] 37 | \setbeamertemplate{footline}[plain] 38 | }, 39 | head/.code={\pgfkeys{/custommetropolis/outer/progressbar=none} 40 | \addtobeamertemplate{headline}{}{% 41 | \usebeamertemplate*{progress bar in head/foot} 42 | } 43 | }, 44 | frametitle/.code={\pgfkeys{/custommetropolis/outer/progressbar=none} 45 | \addtobeamertemplate{frametitle}{}{% 46 | \usebeamertemplate*{progress bar in head/foot} 47 | } 48 | }, 49 | foot/.code={\pgfkeys{/custommetropolis/outer/progressbar=none} 50 | \addtobeamertemplate{footline}{}{% 51 | \usebeamertemplate*{progress bar in head/foot}% 52 | } 53 | }, 54 | } 55 | \newcommand{\custommetropolis@outer@setdefaults}{ 56 | \pgfkeys{/custommetropolis/outer/.cd, 57 | numbering=counter, 58 | progressbar=none, 59 | } 60 | } 61 | \setbeamertemplate{navigation symbols}{} 62 | \defbeamertemplate{frame footer}{none}{} 63 | \defbeamertemplate{frame footer}{custom}[1]{ #1 } 64 | \defbeamertemplate{frame numbering}{none}{} 65 | \defbeamertemplate{frame numbering}{counter}{\insertframenumber} 66 | \defbeamertemplate{frame numbering}{fraction}{ 67 | \insertframenumber/\inserttotalframenumber 68 | } 69 | \defbeamertemplate{headline}{plain}{} 70 | \defbeamertemplate{footline}{plain}{% 71 | \pgfsetfillopacity{0}\begin{beamercolorbox}[wd=\textwidth, sep=1.5ex]{footline}% 72 | \usebeamerfont{page number in head/foot}% 73 | \usebeamertemplate*{frame footer} 74 | \hfill% 75 | \pgfsetfillopacity{1} 76 | \usebeamertemplate*{frame numbering} 77 | \end{beamercolorbox}% 78 | } 79 | \newlength{\custommetropolis@frametitle@padding} 80 | \setlength{\custommetropolis@frametitle@padding}{2.2ex} 81 | \newcommand{\custommetropolis@frametitlestrut@start}{ 82 | \rule{0pt}{\custommetropolis@frametitle@padding +% 83 | \totalheightof{% 84 | \ifcsdef{custommetropolis@frametitleformat}{\custommetropolis@frametitleformat X}{X}% 85 | }% 86 | }% 87 | } 88 | \newcommand{\custommetropolis@frametitlestrut@end}{ 89 | \rule[-\custommetropolis@frametitle@padding]{0pt}{\custommetropolis@frametitle@padding} 90 | } 91 | \defbeamertemplate{frametitle}{plain}{% 92 | \nointerlineskip% 93 | \begin{beamercolorbox}[% 94 | wd=\paperwidth,% 95 | sep=0pt,% 96 | leftskip=\custommetropolis@frametitle@padding,% 97 | rightskip=\custommetropolis@frametitle@padding,% 98 | ]{frametitle}% 99 | \custommetropolis@frametitlestrut@start% 100 | \insertframetitle% 101 | \nolinebreak% 102 | \custommetropolis@frametitlestrut@end% 103 | \end{beamercolorbox}% 104 | } 105 | \setbeamertemplate{frametitle continuation}{% 106 | \usebeamerfont{frametitle} 107 | \romannumeral \insertcontinuationcount 108 | } 109 | \newlength{\custommetropolis@progressinheadfoot} 110 | \newlength{\custommetropolis@progressinheadfoot@linewidth} 111 | \setlength{\custommetropolis@progressinheadfoot@linewidth}{0.4pt} 112 | \setbeamertemplate{progress bar in head/foot}{ 113 | \nointerlineskip 114 | \setlength{\custommetropolis@progressinheadfoot}{% 115 | \paperwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% 116 | }% 117 | \begin{beamercolorbox}[wd=\paperwidth]{progress bar in head/foot} 118 | \tikzexternaldisable% 119 | \begin{tikzpicture} 120 | \fill[bg] (0,0) rectangle (\paperwidth, \custommetropolis@progressinheadfoot@linewidth); 121 | \fill[fg] (0,0) rectangle (\custommetropolis@progressinheadfoot, \custommetropolis@progressinheadfoot@linewidth); 122 | \end{tikzpicture}% 123 | \tikzexternalenable% 124 | \end{beamercolorbox} 125 | } 126 | \AtBeginDocument{% 127 | \apptocmd{\appendix}{% 128 | \pgfkeys{% 129 | /custommetropolis/outer/.cd, 130 | numbering=none, 131 | progressbar=none} 132 | }{}{} 133 | } 134 | \custommetropolis@outer@setdefaults 135 | \ProcessPgfPackageOptions{/custommetropolis/outer} 136 | \endinput 137 | %% 138 | %% End of file `beamerouterthemecustommetropolis.sty'. 139 | -------------------------------------------------------------------------------- /presentation.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | title: "sdsbrowser" 3 | subtitle: Making old data collected in the SDS stone artefact documentation system available and enjoyable 4 | date: "04/2019" 5 | institute: Institute of Pre- and Protohistoric Archaeology, Kiel University 6 | fontsize: 9pt 7 | output: 8 | beamer_presentation: 9 | includes: 10 | in_header: preamble.tex 11 | keep_tex: true 12 | fig_caption: yes 13 | editor_options: 14 | chunk_output_type: console 15 | --- 16 | 17 | ```{r, echo = FALSE} 18 | library(magrittr) 19 | 20 | # https://stackoverflow.com/questions/25646333/code-chunk-font-size-in-rmarkdown-with-knitr-and-latex 21 | def.chunk.hook <- knitr::knit_hooks$get("chunk") 22 | knitr::knit_hooks$set(chunk = function(x, options) { 23 | x <- def.chunk.hook(x, options) 24 | ifelse(options$size != "normalsize", paste0("\\", options$size,"\n\n", x, "\n\n \\normalsize"), x) 25 | }) 26 | knitr::opts_chunk$set(echo = TRUE, cache = TRUE) 27 | ``` 28 | 29 | ## TOC 30 | 31 | \huge 32 | 33 | - Data acquisition and sharing in archaeology 34 | - The SDS System 35 | - Making SDS data accessible: \newline R package + Shiny Webapp 36 | - Lessons for the future 37 | 38 | 39 | 40 | # Data acquisition and sharing 41 | 42 | ## Bad hidden data 43 | 44 | \underline{Problems!} 45 | 46 | - Archaeology often produces **Bad Data** (pretty shitty Big Data) 47 | - **Volume** -- low end of the spectrum 48 | - **Variety** -- a lot! and a significant lack of metadata 49 | - (Velocity) 50 | - **Veracity** -- highly different data quality 51 | - Lack of data (and code) **sharing** 52 | - Lack of **long term storage** strategies 53 | 54 | \underline{Solutions?} 55 | 56 | - Positive pressure 57 | - Funding agencies and Journals require data sharing now 58 | - Open Science and Reproducible Research Movement 59 | 60 | - Tools and enabling features 61 | - Data Storage Providers (e.g. *Archaeology Data Service*) 62 | - Data Journals (e.g. *Journal of Open Archaeology Data*) 63 | - Data Licensing models 64 | - new **Software Frameworks** that simplify good data sharing practices 65 | 66 | 67 | 68 | # The SDS System 69 | 70 | ## SDS -- Systematic and Digital Documentation of Stone Artefacts 71 | 72 | A. Drafehn/M. Bradtmöller/D. Mischka, SDS – Systematische und digitale Erfassung von Steinartefakten (Arbeitsstand SDS 8.05). Journal Of Neolithic Archaeology 10, 2008. [doi:10.12766/jna.2008.25](https://doi.org/10.12766/jna.2008.25) 73 | 74 | \vspace{10px} 75 | 76 | > The following contribution offers a **recording system for stone artefacts**. This **compilation of existing systems** from the Upper Paleolithic to the Neolithic should serve as a starting point for **systematic and quantitative analysis** with a **uniform coding** and standardized listing system of the conventional attributes recorded at lithic inventories. Therewith a valuable basis for **comparative analysis and digital exchange** of the data should be guaranteed. 77 | 78 | \underline{Features:} 79 | 80 | - Description of **individual** artefacts 81 | - **~200** variables (*color*, *weight*, *preservation*, *measurements*) with **>1300** predefined values/categories 82 | - Table layout with separate **form sheets** 83 | - Digit based **value encoding**: 04 -> "green" 84 | 85 | ## SDS -- A form sheet 86 | 87 | \footnotesize 88 | 89 | ```{r, echo = FALSE} 90 | " 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 91 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 92 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 93 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 94 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 95 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 96 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 97 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 8, 0, 2, 1, 0, 0, '...' 98 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 99 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 100 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 101 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 102 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 103 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 104 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 105 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 106 | 'L', 'A', 0, 5, 2, 0, 0, 9, 1, 0, 7, 0, 1, 1, 0, 0, '...' 107 | '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...', '...' " %>% 108 | read.csv(text = ., quote = "'") %>% 109 | knitr::kable( 110 | format = "latex", 111 | col.names = NULL 112 | ) %>% 113 | kableExtra::add_header_above( 114 | c("digits: 4" = 4, "digits: 4" = 4, "digits: 5" = 5, "digits: 5" = 4) 115 | ) %>% 116 | kableExtra::add_header_above( 117 | c("site" = 4, "year" = 4, "feature number" = 5, "excavation number" = 4) 118 | ) %>% 119 | kableExtra::add_header_above( 120 | c("Variable 1" = 4, "Variable 2" = 4, "Variable 3" = 5, "Variable 4" = 4) 121 | ) %>% 122 | kableExtra::add_header_above( 123 | c("Form sheet 1" = 17) 124 | ) 125 | ``` 126 | 127 | ## SDS -- Hierarchy of form sheets 128 | 129 | ![SDS Form sheet organization. FB = Formblatt = Form sheet. Drafehn/Bradtmöller/Mischka 2008, 3.](figures/sds_formsheet_organization.png) 130 | 131 | ## SDS -- The actual implementation 132 | 133 | **10 years of use on 20+ sites by dozens of researchers and students with no common supervision: Cultural Evolution!** 134 | 135 | \underline{Practical solutions (aka \textit{Hacks}):} 136 | 137 | - Elimination of the **digit separation** 138 | - **Ignoring** most variables but **adding** new variables and values 139 | - Creation of a **multi artefact description form sheet** with only ~20 variables 140 | 141 | \underline{Consequences:} 142 | 143 | - Inconsistent and **incongruous file structures** 144 | - **Undocumented variables** and **values** that only appear in individual datasets 145 | - Absolute **domination** of the **multi description system** 146 | 147 | 148 | 149 | # Making SDS data accessible 150 | 151 | ## General steps 152 | 153 | \underline{1. Data collection:} 154 | 155 | - Reconstruct the **SDS user history** 156 | - **Hunt for SDS data** on hard drives and forgotten network storages 157 | 158 | \underline{2. Cleaning:} 159 | 160 | - **Repair or document hacks** to establish a modern SDS layout 161 | - **Merge form sheet tables** 162 | 163 | \Huge 164 | 165 | $$ 166 | \underbrace{1 + 2}_\text{Preparation} +\ 167 | \underbrace{3 + 4 + 5}_\text{R + Shiny} 168 | $$ 169 | 170 | \normalsize 171 | 172 | ## sdsanalysis -- Backend 173 | 174 | \underline{3. Data sharing:} 175 | 176 | - **Host SDS datasets**: JMA Data Exchange Platform 177 | - Provide functions to **download them to R** 178 | 179 | ```{r eval=FALSE} 180 | sdsanalysis::get_available_datasets() 181 | sdsanalysis::get_single_artefact_data("Kuesterberg") -> Kuesterberg 182 | ``` 183 | 184 | \underline{4. Increasing human readability:} 185 | 186 | - Provide functions to **decode the alphanumerical value coding scheme** (*hashes*)p 187 | 188 | ```{r eval=FALSE} 189 | Kuesterberg %>% sdsanalysis::lookup_everything() 190 | ``` 191 | 192 | \usebeamertemplate*{title separator} 193 | 194 | R Package **sdsanalysis**: \url{https://github.com/Johanna-Mestorf-Academy/sdsanalysis} 195 | 196 | ## sdsbrowser -- Webapp 197 | 198 | \underline{5. Data presentation:} 199 | 200 | - Make SDS datasets directly explorable and downloadable **online** 201 | 202 | ![](figures/sds_screenshot.png) 203 | 204 | \usebeamertemplate*{title separator} 205 | 206 | R Shiny Webapp **sdsbrowser**: \url{https://github.com/Johanna-Mestorf-Academy/sdsbrowser} 207 | hosted at: \textbf{\url{http://sds.ufg.uni-kiel.de}} 208 | 209 | # Lessons for the future 210 | 211 | ## Lessons 212 | 213 | \underline{Modesty:} 214 | 215 | - Users will ignore/modify/slaughter overly complicated databases and documentation systems. **Keep it simple** 216 | 217 | \underline{Supervision:} 218 | 219 | - Data collection requires supervision and **technical guidelines** 220 | 221 | \underline{Long term strategies:} 222 | 223 | - Long term data sharing must be discussed **at the very beginning**, because people and data get lost quickly 224 | 225 | \underline{Scripting Languages:} 226 | 227 | - Scripting Languages and Web Frameworks like R and Shiny provide **simple tools** to make **complicated data** more **visible and accessible** 228 | 229 | ## 230 | 231 | \titlepage -------------------------------------------------------------------------------- /metropolis_theme/beamerinnerthemecustommetropolis.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamerinnerthemecustommetropolis.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamerinnerthemecustommetropolis.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamerinnerthemecustommetropolis}[2017/01/23 Metropolis inner theme] 21 | \RequirePackage{etoolbox} 22 | \RequirePackage{keyval} 23 | \RequirePackage{calc} 24 | \RequirePackage{pgfopts} 25 | \RequirePackage{tikz} 26 | \pgfkeys{ 27 | /custommetropolis/inner/sectionpage/.cd, 28 | .is choice, 29 | none/.code=\custommetropolis@disablesectionpage, 30 | simple/.code={\custommetropolis@enablesectionpage 31 | \setbeamertemplate{section page}[simple]}, 32 | progressbar/.code={\custommetropolis@enablesectionpage 33 | \setbeamertemplate{section page}[progressbar]}, 34 | } 35 | \pgfkeys{ 36 | /custommetropolis/inner/subsectionpage/.cd, 37 | .is choice, 38 | none/.code=\custommetropolis@disablesubsectionpage, 39 | simple/.code={\custommetropolis@enablesubsectionpage 40 | \setbeamertemplate{section page}[simple]}, 41 | progressbar/.code={\custommetropolis@enablesubsectionpage 42 | \setbeamertemplate{section page}[progressbar]}, 43 | } 44 | \newcommand{\custommetropolis@inner@setdefaults}{ 45 | \pgfkeys{/custommetropolis/inner/.cd, 46 | sectionpage=progressbar, 47 | subsectionpage=none 48 | } 49 | } 50 | \def\maketitle{% 51 | \ifbeamer@inframe 52 | \titlepage 53 | \else 54 | \frame[plain,noframenumbering]{\titlepage} 55 | \fi 56 | } 57 | \def\titlepage{% 58 | \usebeamertemplate{title page} 59 | } 60 | \setbeamertemplate{title graphic}{ 61 | \vbox to 0pt { 62 | \vspace*{2em} 63 | \inserttitlegraphic% 64 | }% 65 | \nointerlineskip% 66 | } 67 | \setbeamertemplate{title}{ 68 | \raggedright% 69 | \linespread{1.0}% 70 | \inserttitle% 71 | \par% 72 | \vspace*{0.5em} 73 | } 74 | \setbeamertemplate{subtitle}{ 75 | \raggedright% 76 | \insertsubtitle% 77 | \par% 78 | \vspace*{0.5em} 79 | } 80 | \newlength{\custommetropolis@titleseparator@linewidth} 81 | \setlength{\custommetropolis@titleseparator@linewidth}{0.4pt} 82 | \setbeamertemplate{title separator}{ 83 | \tikzexternaldisable% 84 | \begin{tikzpicture} 85 | \fill[fg] (0,0) rectangle (\textwidth, \custommetropolis@titleseparator@linewidth); 86 | \end{tikzpicture}% 87 | \tikzexternalenable% 88 | \par% 89 | } 90 | \setbeamertemplate{author}{ 91 | \vspace*{2em} 92 | \textbf 93 | \insertauthor% 94 | \par% 95 | \vspace*{0.25em} 96 | } 97 | \setbeamertemplate{date}{ 98 | \footnotesize 99 | \insertdate% 100 | \par% 101 | } 102 | \setbeamertemplate{institute}{ 103 | \vspace*{3mm} 104 | \insertinstitute% 105 | \par% 106 | } 107 | \defbeamertemplate{section page}{simple}{ 108 | \begin{center} 109 | \usebeamercolor[fg]{section title} 110 | \usebeamerfont{section title} 111 | \insertsectionhead\par 112 | \ifx\insertsubsectionhead\@empty\else 113 | \usebeamercolor[fg]{subsection title} 114 | \usebeamerfont{subsection title} 115 | \insertsubsectionhead 116 | \fi 117 | \end{center} 118 | } 119 | \defbeamertemplate{section page}{progressbar}{ 120 | \centering 121 | \begin{minipage}{22em} 122 | \raggedright 123 | \usebeamercolor[fg]{section title} 124 | \usebeamerfont{section title} 125 | \insertsectionhead\\[-1ex] 126 | \usebeamertemplate*{progress bar in section page} 127 | \par 128 | \ifx\insertsubsectionhead\@empty\else% 129 | \usebeamercolor[fg]{subsection title}% 130 | \usebeamerfont{subsection title}% 131 | \insertsubsectionhead 132 | \fi 133 | \end{minipage} 134 | \par 135 | \vspace{\baselineskip} 136 | } 137 | \newcommand{\custommetropolis@disablesectionpage}{ 138 | \AtBeginSection{ 139 | % intentionally empty 140 | } 141 | } 142 | \newcommand{\custommetropolis@enablesectionpage}{ 143 | \AtBeginSection{ 144 | \ifbeamer@inframe 145 | \sectionpage 146 | \else 147 | \frame[plain,c,noframenumbering]{\sectionpage} 148 | \fi 149 | } 150 | } 151 | \setbeamertemplate{subsection page}{% 152 | \usebeamertemplate*{section page} 153 | } 154 | \newcommand{\custommetropolis@disablesubsectionpage}{ 155 | \AtBeginSubsection{ 156 | % intentionally empty 157 | } 158 | } 159 | \newcommand{\custommetropolis@enablesubsectionpage}{ 160 | \AtBeginSubsection{ 161 | \ifbeamer@inframe 162 | \subsectionpage 163 | \else 164 | \frame[plain,c,noframenumbering]{\subsectionpage} 165 | \fi 166 | } 167 | } 168 | \newlength{\custommetropolis@progressonsectionpage} 169 | \newlength{\custommetropolis@progressonsectionpage@linewidth} 170 | \setlength{\custommetropolis@progressonsectionpage@linewidth}{0.4pt} 171 | \setbeamertemplate{progress bar in section page}{ 172 | \setlength{\custommetropolis@progressonsectionpage}{% 173 | \textwidth * \ratio{\insertframenumber pt}{\inserttotalframenumber pt}% 174 | }% 175 | \tikzexternaldisable% 176 | \begin{tikzpicture} 177 | \fill[bg] (0,0) rectangle (\textwidth, \custommetropolis@progressonsectionpage@linewidth); 178 | \fill[fg] (0,0) rectangle (\custommetropolis@progressonsectionpage, \custommetropolis@progressonsectionpage@linewidth); 179 | \end{tikzpicture}% 180 | \tikzexternalenable% 181 | } 182 | \def\inserttotalframenumber{100} 183 | \newlength{\custommetropolis@blocksep} 184 | \newlength{\custommetropolis@blockadjust} 185 | \setlength{\custommetropolis@blocksep}{0.75ex} 186 | \setlength{\custommetropolis@blockadjust}{0.25ex} 187 | \providecommand{\custommetropolis@strut}{% 188 | \vphantom{ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz()}% 189 | } 190 | \newcommand{\custommetropolis@block}[1]{ 191 | \par\vskip\medskipamount% 192 | \setlength{\parskip}{0pt} 193 | \ifbeamercolorempty[bg]{block title#1}{% 194 | \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}}{% 195 | \ifbeamercolorempty[bg]{block title}{% 196 | \begin{beamercolorbox}[rightskip=0pt plus 4em]{block title#1}% 197 | }% 198 | {% 199 | \begin{beamercolorbox}[ 200 | sep=\dimexpr\custommetropolis@blocksep-\custommetropolis@blockadjust\relax, 201 | leftskip=\custommetropolis@blockadjust, 202 | rightskip=\dimexpr\custommetropolis@blockadjust plus 4em\relax 203 | ]{block title#1}% 204 | }}% 205 | \usebeamerfont*{block title#1}% 206 | \custommetropolis@strut% 207 | \insertblocktitle% 208 | \custommetropolis@strut% 209 | \end{beamercolorbox}% 210 | \nointerlineskip% 211 | \ifbeamercolorempty[bg]{block body#1}{% 212 | \begin{beamercolorbox}[vmode]{block body#1}}{ 213 | \ifbeamercolorempty[bg]{block body}{% 214 | \begin{beamercolorbox}[vmode]{block body#1}% 215 | }{% 216 | \begin{beamercolorbox}[sep=\custommetropolis@blocksep, vmode]{block body#1}% 217 | \vspace{-\custommetropolis@parskip} 218 | }}% 219 | \usebeamerfont{block body#1}% 220 | \setlength{\parskip}{\custommetropolis@parskip}% 221 | } 222 | \setbeamertemplate{block begin}{\custommetropolis@block{}} 223 | \setbeamertemplate{block alerted begin}{\custommetropolis@block{ alerted}} 224 | \setbeamertemplate{block example begin}{\custommetropolis@block{ example}} 225 | \setbeamertemplate{block end}{\end{beamercolorbox}\vspace*{0.2ex}} 226 | \setbeamertemplate{block alerted end}{\end{beamercolorbox}\vspace*{0.2ex}} 227 | \setbeamertemplate{block example end}{\end{beamercolorbox}\vspace*{0.2ex}} 228 | \setbeamertemplate{itemize items}{\textbullet} 229 | \setbeamertemplate{caption label separator}{: } 230 | \setbeamertemplate{caption}[numbered] 231 | \setbeamertemplate{footnote}{% 232 | \parindent 0em\noindent% 233 | \raggedright 234 | \usebeamercolor{footnote}\hbox to 0.8em{\hfil\insertfootnotemark}\insertfootnotetext\par% 235 | } 236 | \newlength{\custommetropolis@parskip} 237 | \setlength{\custommetropolis@parskip}{0.5em} 238 | \setlength{\parskip}{\custommetropolis@parskip} 239 | \linespread{1.15} 240 | \define@key{beamerframe}{c}[true]{% centered 241 | \beamer@frametopskip=0pt plus 1fill\relax% 242 | \beamer@framebottomskip=0pt plus 1fill\relax% 243 | \beamer@frametopskipautobreak=0pt plus .4\paperheight\relax% 244 | \beamer@framebottomskipautobreak=0pt plus .6\paperheight\relax% 245 | \def\beamer@initfirstlineunskip{}% 246 | } 247 | \providebool{custommetropolis@standout} 248 | \define@key{beamerframe}{standout}[true]{% 249 | \booltrue{custommetropolis@standout} 250 | \begingroup 251 | \setkeys{beamerframe}{c} 252 | \setkeys{beamerframe}{noframenumbering} 253 | \ifbeamercolorempty[bg]{palette primary}{ 254 | \setbeamercolor{background canvas}{ 255 | use=palette primary, 256 | bg=-palette primary.fg 257 | } 258 | }{ 259 | \setbeamercolor{background canvas}{ 260 | use=palette primary, 261 | bg=palette primary.bg 262 | } 263 | } 264 | \setbeamercolor{local structure}{ 265 | fg=palette primary.fg 266 | } 267 | \centering 268 | \usebeamercolor[fg]{palette primary} 269 | \usebeamerfont{standout} 270 | } 271 | \apptocmd{\beamer@reseteecodes}{% 272 | \ifbool{custommetropolis@standout}{ 273 | \endgroup 274 | \boolfalse{custommetropolis@standout} 275 | }{} 276 | }{}{} 277 | \custommetropolis@inner@setdefaults 278 | \ProcessPgfPackageOptions{/custommetropolis/inner} 279 | \endinput 280 | %% 281 | %% End of file `beamerinnerthemecustommetropolis.sty'. 282 | -------------------------------------------------------------------------------- /metropolis_theme/beamerfontthemecustommetropolis.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `beamerfontthemecustommetropolis.sty', 3 | %% generated with the docstrip utility. 4 | %% 5 | %% The original source files were: 6 | %% 7 | %% beamerfontthemecustommetropolis.dtx (with options: `package') 8 | %% --------------------------------------------------------------------------- 9 | %% Copyright 2015 Matthias Vogelgesang and the LaTeX community. A full list of 10 | %% contributors can be found at 11 | %% 12 | %% https://github.com/matze/mtheme/graphs/contributors 13 | %% 14 | %% and the original template was based on the HSRM theme by Benjamin Weiss. 15 | %% 16 | %% This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 17 | %% International License (https://creativecommons.org/licenses/by-sa/4.0/). 18 | %% --------------------------------------------------------------------------- 19 | \NeedsTeXFormat{LaTeX2e} 20 | \ProvidesPackage{beamerfontthemecustommetropolis}[2017/01/23 Metropolis font theme] 21 | \RequirePackage{etoolbox} 22 | \RequirePackage{ifxetex} 23 | \RequirePackage{ifluatex} 24 | \RequirePackage{pgfopts} 25 | \ifboolexpr{bool {xetex} or bool {luatex}}{ 26 | \@ifpackageloaded{fontspec}{ 27 | \PassOptionsToPackage{no-math}{fontspec} 28 | }{ 29 | \RequirePackage[no-math]{fontspec} 30 | } 31 | \newcounter{fontsnotfound} 32 | \newcommand{\checkfont}[1]{% 33 | \suppressfontnotfounderror=1% 34 | \font\x = "#1" at 10pt 35 | \selectfont 36 | \ifx\x\nullfont% 37 | \stepcounter{fontsnotfound}% 38 | \fi% 39 | \suppressfontnotfounderror=0% 40 | } 41 | 42 | \newcommand{\iffontsavailable}[3]{% 43 | \setcounter{fontsnotfound}{0}% 44 | \expandafter\forcsvlist\expandafter% 45 | \checkfont\expandafter{#1}% 46 | \ifnum\value{fontsnotfound}=0% 47 | #2% 48 | \else% 49 | #3% 50 | \fi% 51 | } 52 | \iffontsavailable{Fira Sans Light,% 53 | Fira Sans Light Italic,% 54 | Fira Sans,% 55 | Fira Sans Italic}% 56 | {% 57 | \setsansfont[ItalicFont={Fira Sans Light Italic},% 58 | BoldFont={Fira Sans},% 59 | BoldItalicFont={Fira Sans Italic}]% 60 | {Fira Sans Light}% 61 | }{% 62 | \iffontsavailable{Fira Sans Light OT,% 63 | Fira Sans Light Italic OT,% 64 | Fira Sans OT,% 65 | Fira Sans Italic OT}% 66 | {% 67 | \setsansfont[ItalicFont={Fira Sans Light Italic OT},% 68 | BoldFont={Fira Sans OT},% 69 | BoldItalicFont={Fira Sans Italic OT}]% 70 | {Fira Sans Light OT}% 71 | }{% 72 | \PackageWarning{beamerthemecustommetropolis}{% 73 | Could not find Fira Sans fonts% 74 | } 75 | } 76 | } 77 | \iffontsavailable{Fira Mono, Fira Mono Bold}{% 78 | \setmonofont[BoldFont={Fira Mono Medium}]{Fira Mono}% 79 | }{% 80 | \iffontsavailable{Fira Mono OT, Fira Mono Bold OT}{% 81 | \setmonofont[BoldFont={Fira Mono Medium OT}]{Fira Mono OT}% 82 | }{% 83 | \PackageWarning{beamerthemecustommetropolis}{% 84 | Could not find Fira Mono fonts% 85 | } 86 | } 87 | } 88 | \AtBeginEnvironment{tabular}{% 89 | \addfontfeature{Numbers={Monospaced}}% 90 | } 91 | }{% 92 | \PackageWarning{beamerthemecustommetropolis}{% 93 | You need to compile with XeLaTeX or LuaLaTeX to use the Fira fonts% 94 | } 95 | } 96 | \setbeamerfont{title}{size=\Large,% 97 | series=\bfseries} 98 | \setbeamerfont{author}{size=\small} 99 | \setbeamerfont{date}{size=\small} 100 | \setbeamerfont{section title}{size=\Large,% 101 | series=\bfseries} 102 | \setbeamerfont{block title}{size=\normalsize,% 103 | series=\bfseries} 104 | \setbeamerfont{block title alerted}{size=\normalsize,% 105 | series=\bfseries} 106 | \setbeamerfont*{subtitle}{size=\large} 107 | \setbeamerfont{frametitle}{size=\large,% 108 | series=\bfseries} 109 | \setbeamerfont{caption}{size=\footnotesize} 110 | \setbeamerfont{caption name}{series=\bfseries} 111 | \setbeamerfont{description item}{series=\bfseries} 112 | \setbeamerfont{page number in head/foot}{size=\scriptsize} 113 | \setbeamerfont{bibliography entry author}{size=\normalsize,% 114 | series=\normalfont} 115 | \setbeamerfont{bibliography entry title}{size=\normalsize,% 116 | series=\bfseries} 117 | \setbeamerfont{bibliography entry location}{size=\normalsize,% 118 | series=\normalfont} 119 | \setbeamerfont{bibliography entry note}{size=\small,% 120 | series=\normalfont} 121 | \setbeamerfont{standout}{size=\Large,% 122 | series=\bfseries} 123 | \pgfkeys{ 124 | /custommetropolis/font/titleformat title/.cd, 125 | .is choice, 126 | regular/.code={% 127 | \let\custommetropolis@titleformat\@empty% 128 | \setbeamerfont{title}{shape=\normalfont}% 129 | }, 130 | smallcaps/.code={% 131 | \let\custommetropolis@titleformat\@empty% 132 | \setbeamerfont{title}{shape=\scshape}% 133 | }, 134 | allsmallcaps/.code={% 135 | \let\custommetropolis@titleformat\lowercase% 136 | \setbeamerfont{title}{shape=\scshape}% 137 | \PackageWarning{beamerthemecustommetropolis}{% 138 | Be aware that titleformat title=allsmallcaps can lead to problems% 139 | } 140 | }, 141 | allcaps/.code={% 142 | \let\custommetropolis@titleformat\uppercase% 143 | \setbeamerfont{title}{shape=\normalfont} 144 | \PackageWarning{beamerthemecustommetropolis}{% 145 | Be aware that titleformat title=allcaps can lead to problems% 146 | } 147 | }, 148 | } 149 | \pgfkeys{ 150 | /custommetropolis/font/titleformat subtitle/.cd, 151 | .is choice, 152 | regular/.code={% 153 | \let\custommetropolis@subtitleformat\@empty% 154 | \setbeamerfont{subtitle}{shape=\normalfont}% 155 | }, 156 | smallcaps/.code={% 157 | \let\custommetropolis@subtitleformat\@empty% 158 | \setbeamerfont{subtitle}{shape=\scshape}% 159 | }, 160 | allsmallcaps/.code={% 161 | \let\custommetropolis@subtitleformat\lowercase% 162 | \setbeamerfont{subtitle}{shape=\scshape}% 163 | \PackageWarning{beamerthemecustommetropolis}{% 164 | Be aware that titleformat subtitle=allsmallcaps can lead to problems% 165 | } 166 | }, 167 | allcaps/.code={% 168 | \let\custommetropolis@subtitleformat\uppercase% 169 | \setbeamerfont{subtitle}{shape=\normalfont}% 170 | \PackageWarning{beamerthemecustommetropolis}{% 171 | Be aware that titleformat subtitle=allcaps can lead to problems% 172 | } 173 | }, 174 | } 175 | \pgfkeys{ 176 | /custommetropolis/font/titleformat section/.cd, 177 | .is choice, 178 | regular/.code={% 179 | \let\custommetropolis@sectiontitleformat\@empty% 180 | \setbeamerfont{section title}{shape=\normalfont}% 181 | }, 182 | smallcaps/.code={% 183 | \let\custommetropolis@sectiontitleformat\@empty% 184 | \setbeamerfont{section title}{shape=\scshape}% 185 | }, 186 | allsmallcaps/.code={% 187 | \let\custommetropolis@sectiontitleformat\MakeLowercase% 188 | \setbeamerfont{section title}{shape=\scshape}% 189 | \PackageWarning{beamerthemecustommetropolis}{% 190 | Be aware that titleformat section=allsmallcaps can lead to problems% 191 | } 192 | }, 193 | allcaps/.code={% 194 | \let\custommetropolis@sectiontitleformat\MakeUppercase% 195 | \setbeamerfont{section title}{shape=\normalfont}% 196 | \PackageWarning{beamerthemecustommetropolis}{% 197 | Be aware that titleformat section=allcaps can lead to problems% 198 | } 199 | }, 200 | } 201 | \pgfkeys{ 202 | /custommetropolis/font/titleformat frame/.cd, 203 | .is choice, 204 | regular/.code={% 205 | \let\custommetropolis@frametitleformat\@empty% 206 | \setbeamerfont{frametitle}{shape=\normalfont}% 207 | }, 208 | smallcaps/.code={% 209 | \let\custommetropolis@frametitleformat\@empty% 210 | \setbeamerfont{frametitle}{shape=\scshape}% 211 | }, 212 | allsmallcaps/.code={% 213 | \let\custommetropolis@frametitleformat\MakeLowercase% 214 | \setbeamerfont{frametitle}{shape=\scshape}% 215 | \PackageWarning{beamerthemecustommetropolis}{% 216 | Be aware that titleformat frame=allsmallcaps can lead to problems% 217 | } 218 | }, 219 | allcaps/.code={% 220 | \let\custommetropolis@frametitleformat\MakeUppercase% 221 | \setbeamerfont{frametitle}{shape=\normalfont} 222 | \PackageWarning{beamerthemecustommetropolis}{% 223 | Be aware that titleformat frame=allcaps can lead to problems% 224 | } 225 | }, 226 | } 227 | \pgfkeys{ 228 | /custommetropolis/font/.cd, 229 | titleformattitle/.code=\pgfkeysalso{titleformat title=#1}, 230 | titleformatsubtitle/.code=\pgfkeysalso{titleformat subtitle=#1}, 231 | titleformatsection/.code=\pgfkeysalso{titleformat section=#1}, 232 | titleformatframe/.code=\pgfkeysalso{titleformat frame=#1}, 233 | } 234 | \newcommand{\custommetropolis@font@setdefaults}{ 235 | \pgfkeys{/custommetropolis/font/.cd, 236 | titleformat title=regular, 237 | titleformat subtitle=regular, 238 | titleformat section=regular, 239 | titleformat frame=regular, 240 | } 241 | } 242 | \def\custommetropolis@titleformat#1{#1} 243 | \def\custommetropolis@subtitleformat#1{#1} 244 | \def\custommetropolis@sectiontitleformat#1{#1} 245 | \def\custommetropolis@frametitleformat#1{#1} 246 | \patchcmd{\beamer@title}% 247 | {\def\inserttitle{#2}}% 248 | {\def\inserttitle{\custommetropolis@titleformat{#2}}}% 249 | {}% 250 | {\PackageError{beamerfontthemecustommetropolis}{Patching title failed}\@ehc} 251 | \patchcmd{\beamer@subtitle}% 252 | {\def\insertsubtitle{#2}}% 253 | {\def\insertsubtitle{\custommetropolis@subtitleformat{#2}}}% 254 | {}% 255 | {\PackageError{beamerfontthemecustommetropolis}{Patching subtitle failed}\@ehc} 256 | \patchcmd{\sectionentry} 257 | {\def\insertsectionhead{#2}} 258 | {\def\insertsectionhead{\custommetropolis@sectiontitleformat{#2}}} 259 | {} 260 | {\PackageError{beamerfontthemecustommetropolis}{Patching section title failed}\@ehc} 261 | \@tempswafalse 262 | \patchcmd{\beamer@section} 263 | {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} 264 | {\edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% 265 | \noexpand\custommetropolis@sectiontitleformat{\unexpanded{#1}}}}} 266 | {\@tempswatrue} 267 | {} 268 | \patchcmd{\beamer@section} 269 | {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} 270 | {\def\insertsectionhead{\hyperlink{Navigation\the\c@page}{% 271 | \custommetropolis@sectiontitleformat{#1}}}} 272 | {\@tempswatrue} 273 | {} 274 | \patchcmd{\beamer@section} 275 | {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} 276 | {\protected@edef\insertsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% 277 | \noexpand\custommetropolis@sectiontitleformat{#1}}}} 278 | {\@tempswatrue} 279 | {} 280 | \if@tempswa\else 281 | \PackageError{beamerfontthemecustommetropolis}{Patching section title failed}\@ehc 282 | \fi 283 | \@tempswafalse 284 | \patchcmd{\beamer@subsection} 285 | {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{\unexpanded{#1}}}} 286 | {\edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% 287 | \noexpand\custommetropolis@sectiontitleformat{\unexpanded{#1}}}}} 288 | {\@tempswatrue} 289 | {} 290 | \patchcmd{\beamer@subsection} 291 | {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{#1}}} 292 | {\def\insertsubsectionhead{\hyperlink{Navigation\the\c@page}{% 293 | \custommetropolis@sectiontitleformat{#1}}}} 294 | {\@tempswatrue} 295 | {} 296 | \patchcmd{\beamer@subsection} 297 | {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{#1}}} 298 | {\protected@edef\insertsubsectionhead{\noexpand\hyperlink{Navigation\the\c@page}{% 299 | \noexpand\custommetropolis@sectiontitleformat{#1}}}} 300 | {\@tempswatrue} 301 | {} 302 | \if@tempswa\else 303 | \PackageError{beamerfontthemecustommetropolis}{Patching section title failed}\@ehc 304 | \fi 305 | \patchcmd{\beamer@@frametitle} 306 | {{% 307 | \gdef\insertframetitle{{#2\ifnum\beamer@autobreakcount>0\relax{}\space% 308 | \usebeamertemplate*{frametitle continuation}\fi}}% 309 | \gdef\beamer@frametitle{#2}% 310 | \gdef\beamer@shortframetitle{#1}% 311 | }} 312 | {{% 313 | \gdef\insertframetitle{{\custommetropolis@frametitleformat{#2}\ifnum% 314 | \beamer@autobreakcount>0\relax{}\space% 315 | \usebeamertemplate*{frametitle continuation}\fi}}% 316 | \gdef\beamer@frametitle{#2}% 317 | \gdef\beamer@shortframetitle{#1}% 318 | }} 319 | {} 320 | {\PackageError{beamerfontthemecustommetropolis}{Patching frame title failed}\@ehc} 321 | \custommetropolis@font@setdefaults 322 | \ProcessPgfPackageOptions{/custommetropolis/font} 323 | \endinput 324 | %% 325 | %% End of file `beamerfontthemecustommetropolis.sty'. 326 | --------------------------------------------------------------------------------