From 2efa5f04e23854f7905262ecba3bd55978259f8f Mon Sep 17 00:00:00 2001 From: Practice_of_Mechanical_Design <> Date: Fri, 4 Nov 2022 06:32:04 +0100 Subject: [PATCH] Initial commit --- .gitignore | 303 +++++++++++++++++++++++++++++++++++ Bibliography.bib | 6 + LICENSE | 11 ++ Packages.tex | 142 ++++++++++++++++ Readme.md | 7 + Sources.tex | 10 ++ Template_Presentation.tex | 31 ++++ TitlePage.tex | 8 + beamercolorthemeutokyo.sty | 10 ++ beamerinnerthemeutokyo.sty | 58 +++++++ beamerouterthemeutokyo.sty | 23 +++ beamerthemeutokyo.sty | 14 ++ images/UTokyo_Logo.svg | 37 +++++ images/UTokyo_Logo_small.svg | 36 +++++ images/clocktower.svg | 64 ++++++++ sections/ExampleSection.tex | 31 ++++ 16 files changed, 791 insertions(+) create mode 100644 .gitignore create mode 100644 Bibliography.bib create mode 100644 LICENSE create mode 100644 Packages.tex create mode 100644 Readme.md create mode 100644 Sources.tex create mode 100644 Template_Presentation.tex create mode 100644 TitlePage.tex create mode 100644 beamercolorthemeutokyo.sty create mode 100644 beamerinnerthemeutokyo.sty create mode 100644 beamerouterthemeutokyo.sty create mode 100644 beamerthemeutokyo.sty create mode 100644 images/UTokyo_Logo.svg create mode 100644 images/UTokyo_Logo_small.svg create mode 100644 images/clocktower.svg create mode 100644 sections/ExampleSection.tex diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d03ff84 --- /dev/null +++ b/.gitignore @@ -0,0 +1,303 @@ +# ---> TeX +## Core latex/pdflatex auxiliary files: +*.aux +*.lof +*.log +*.lot +*.fls +*.out +*.toc +*.fmt +*.fot +*.cb +*.cb2 +.*.lb + +## Intermediate documents: +*.dvi +*.xdv +*-converted-to.* +# these rules might exclude image files for figures etc. +# *.ps +# *.eps +# *.pdf + +## Generated if empty string is given at "Please type another file name for output:" +*.pdf + +## Bibliography auxiliary files (bibtex/biblatex/biber): +*.bbl +*.bcf +*.blg +*-blx.aux +*-blx.bib +*.run.xml + +## Build tool auxiliary files: +*.fdb_latexmk +*.synctex +*.synctex(busy) +*.synctex.gz +*.synctex.gz(busy) +*.pdfsync + +## Build tool directories for auxiliary files +# latexrun +latex.out/ + +## Auxiliary and intermediate files from other packages: +# algorithms +*.alg +*.loa + +# achemso +acs-*.bib + +# amsthm +*.thm + +# beamer +*.nav +*.pre +*.snm +*.vrb + +# changes +*.soc + +# comment +*.cut + +# cprotect +*.cpt + +# elsarticle (documentclass of Elsevier journals) +*.spl + +# endnotes +*.ent + +# fixme +*.lox + +# feynmf/feynmp +*.mf +*.mp +*.t[1-9] +*.t[1-9][0-9] +*.tfm + +#(r)(e)ledmac/(r)(e)ledpar +*.end +*.?end +*.[1-9] +*.[1-9][0-9] +*.[1-9][0-9][0-9] +*.[1-9]R +*.[1-9][0-9]R +*.[1-9][0-9][0-9]R +*.eledsec[1-9] +*.eledsec[1-9]R +*.eledsec[1-9][0-9] +*.eledsec[1-9][0-9]R +*.eledsec[1-9][0-9][0-9] +*.eledsec[1-9][0-9][0-9]R + +# glossaries +*.acn +*.acr +*.glg +*.glo +*.gls +*.glsdefs +*.lzo +*.lzs +*.slg +*.slo +*.sls + +# uncomment this for glossaries-extra (will ignore makeindex's style files!) +# *.ist + +# gnuplot +*.gnuplot +*.table + +# gnuplottex +*-gnuplottex-* + +# gregoriotex +*.gaux +*.glog +*.gtex + +# htlatex +*.4ct +*.4tc +*.idv +*.lg +*.trc +*.xref + +# hyperref +*.brf + +# knitr +*-concordance.tex +# TODO Uncomment the next line if you use knitr and want to ignore its generated tikz files +# *.tikz +*-tikzDictionary + +# listings +*.lol + +# luatexja-ruby +*.ltjruby + +# makeidx +*.idx +*.ilg +*.ind + +# minitoc +*.maf +*.mlf +*.mlt +*.mtc[0-9]* +*.slf[0-9]* +*.slt[0-9]* +*.stc[0-9]* + +# minted +_minted* +*.pyg + +# morewrites +*.mw + +# newpax +*.newpax + +# nomencl +*.nlg +*.nlo +*.nls + +# pax +*.pax + +# pdfpcnotes +*.pdfpc + +# sagetex +*.sagetex.sage +*.sagetex.py +*.sagetex.scmd + +# scrwfile +*.wrt + +# svg +svg-inkscape/ + +# sympy +*.sout +*.sympy +sympy-plots-for-*.tex/ + +# pdfcomment +*.upa +*.upb + +# pythontex +*.pytxcode +pythontex-files-*/ + +# tcolorbox +*.listing + +# thmtools +*.loe + +# TikZ & PGF +*.dpth +*.md5 +*.auxlock + +# titletoc +*.ptc + +# todonotes +*.tdo + +# vhistory +*.hst +*.ver + +# easy-todo +*.lod + +# xcolor +*.xcp + +# xmpincl +*.xmpi + +# xindy +*.xdy + +# xypic precompiled matrices and outlines +*.xyc +*.xyd + +# endfloat +*.ttt +*.fff + +# Latexian +TSWLatexianTemp* + +## Editors: +# WinEdt +*.bak +*.sav + +# Texpad +.texpadtmp + +# LyX +*.lyx~ + +# Kile +*.backup + +# gummi +.*.swp + +# KBibTeX +*~[0-9]* + +# TeXnicCenter +*.tps + +# auto folder when using emacs and auctex +./auto/* +*.el + +# expex forward references with \gathertags +*-tags.tex + +# standalone packages +*.sta + +# Makeindex log files +*.lpz + +# xwatermark package +*.xwm + +# REVTeX puts footnotes in the bibliography by default, unless the nofootinbib +# option is specified. Footnotes are the stored in a file with suffix Notes.bib. +# Uncomment the next line to have this generated file ignored. +#*Notes.bib + diff --git a/Bibliography.bib b/Bibliography.bib new file mode 100644 index 0000000..69b36ed --- /dev/null +++ b/Bibliography.bib @@ -0,0 +1,6 @@ +@Misc{ example, + author = {Example Author}, + title = {Example Title}, + howpublished = {\url{google.com}}, + note = {Retrieved 2022-10-24} +} diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7a3094a --- /dev/null +++ b/LICENSE @@ -0,0 +1,11 @@ +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +Version 2, December 2004 + +Copyright (C) 2004 Sam Hocevar + +Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed. + +DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/Packages.tex b/Packages.tex new file mode 100644 index 0000000..956ffa4 --- /dev/null +++ b/Packages.tex @@ -0,0 +1,142 @@ +%-------------------- +%encoding +%-------------------- +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} + +%-------------------- +%language +%-------------------- +\usepackage{babel} + +%-------------------- +%images +%-------------------- +\usepackage{graphicx} +\graphicspath{ {./images/} } +%image placement +\usepackage{float} +%svg images +\usepackage{svg} +%captions +\usepackage{caption} +\newcommand*{\captionsource}[2]{% + \caption{#1} + \vspace{-3mm} + \caption*{\footnotesize Quelle: #2} +} + +%-------------------- +%german quotation style +%-------------------- +\usepackage[% +left = \glqq,% +right = \grqq,% +leftsub = \glq,% +rightsub = \grq% +]{dirtytalk} + +%-------------------- +%references +%-------------------- +\usepackage{hyperref} + +%-------------------- +%better tables +%-------------------- +%enable X columns (columns with automatic width) +\usepackage{tabularx} +\newcolumntype{Y}{>{\centering\arraybackslash}X} %for centered X column +%table longer than one page +\usepackage{longtable} +%colorfull tables +\usepackage{colortbl} +%enable line break in nomenclature +\usepackage{array} +%multirows in tables +\usepackage{multirow} +%footnotes for tables +\usepackage{threeparttable} +%enable rotation of table headers +\newcommand\rothead{\bfseries\rotatebox{90}} + +%-------------------- +%header and footer +%-------------------- +\usepackage{fancyhdr} + +%-------------------- +%custom font sizes +%-------------------- +\usepackage{anyfontsize} + +%-------------------- +%bibliography +%-------------------- +%\usepackage[square, numbers]{natbib} +\usepackage[style=authortitle]{biblatex} +\bibliography{Bibliography.bib} + +%-------------------- +%for calculating the number of pages +%-------------------- +\usepackage{refcount} + +%-------------------- +%conditional formating +%-------------------- +\usepackage{ifthen} + +%-------------------- +%symbols +%-------------------- +%special symbols +\usepackage{fontawesome} + +%-------------------- +%equations +%-------------------- +%math symbols and more +\usepackage{amsmath} +%si units +\usepackage[output-decimal-marker={,}]{siunitx} +%decimal comma +\usepackage{icomma} +%stealth arrows in math +\usepackage{mathabx} + +%-------------------- +%drawings +%-------------------- +\usepackage{tikz,pgfplots} +\pgfplotsset{compat=1.7} +\usetikzlibrary{calc} +\usetikzlibrary{3d} +\usetikzlibrary{arrows} +\usetikzlibrary{patterns} +\usetikzlibrary{shapes.geometric} +\usepackage{pgf-umlsd} +\usepackage{environ} +%enable resizing TikZ pictures +\makeatletter +\newsavebox{\measure@tikzpicture} +\NewEnviron{scaletikzpicturetowidth}[1]{% + \def\tikz@width{#1}% + \def\tikzscale{1}\begin{lrbox}{\measure@tikzpicture}% + \BODY + \end{lrbox}% + \pgfmathparse{#1/\wd\measure@tikzpicture}% + \edef\tikzscale{\pgfmathresult}% + \BODY +} +\makeatother +\tikzset{ + invisible/.style={opacity=0}, + visible on/.style={alt={#1{}{invisible}}}, + alt/.code args={<#1>#2#3}{% + \alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path + }, +} +% landscape +\usepackage{pdflscape} + diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..50dae03 --- /dev/null +++ b/Readme.md @@ -0,0 +1,7 @@ +# How to use this template +1. fork template +1. refactor +1. commit + +## Notes +Requires you to enable [--shell escape](https://tex.stackexchange.com/questions/516604/how-to-enable-shell-escape-or-write18-visual-studio-code-latex-workshop) diff --git a/Sources.tex b/Sources.tex new file mode 100644 index 0000000..e3b709e --- /dev/null +++ b/Sources.tex @@ -0,0 +1,10 @@ +\section{Sources}% +\label{sec:Sources} + +\begin{frame}[t, allowframebreaks] + \frametitle{\secname} + + \setbeamertemplate{bibliography item}{} + \AtNextBibliography{\small} + \printbibliography[heading=none] +\end{frame} diff --git a/Template_Presentation.tex b/Template_Presentation.tex new file mode 100644 index 0000000..56408e4 --- /dev/null +++ b/Template_Presentation.tex @@ -0,0 +1,31 @@ +\documentclass[aspectratio=169, english, 17pt, xcolor=table]{beamer} +\renewcommand<>\cellcolor[1]{\only#2{\beameroriginal\cellcolor{#1}}} +\usetheme{utokyo} + +\input{Packages.tex} + +\def \TITLE{Example Title} +\def \SUBTITLE{Example Subtitle} +\def \TITLEIMAGE{\includesvg[width = 30 mm]{./images/clocktower.svg}} +\def \AUTHOR{Example Author\\123456\\example@invalid.com} +\def \COMPACTAUTHOR{Example Author} +\def \DATE{Example Date} + +\setbeamertemplate{frametitle continuation}{} + +%TODO: REMOVE +\nocite{*} + +\begin{document} + \definecolor{utokyo-blue}{HTML}{187fc3} + \definecolor{utokyo-yellow}{HTML}{f9be00} + + \input{TitlePage.tex} + + \input{sections/ExampleSection.tex} + + \input{TitlePage.tex} + + \input{Sources.tex} + +\end{document} diff --git a/TitlePage.tex b/TitlePage.tex new file mode 100644 index 0000000..d21a255 --- /dev/null +++ b/TitlePage.tex @@ -0,0 +1,8 @@ +\setcounter{framenumber}{-1} + +\title{\TITLE} +\subtitle{\SUBTITLE} +\author[\COMPACTAUTHOR]{\AUTHOR} +\date{\DATE} + +\maketitle diff --git a/beamercolorthemeutokyo.sty b/beamercolorthemeutokyo.sty new file mode 100644 index 0000000..40bcd28 --- /dev/null +++ b/beamercolorthemeutokyo.sty @@ -0,0 +1,10 @@ +\mode +\definecolor{utokyo-blue}{HTML}{187fc3} +\definecolor{utokyo-yellow}{HTML}{f9be00} +\setbeamertemplate{itemize item}{\color{utokyo-blue}$\blacksquare$} +\setbeamertemplate{itemize subitem}{\color{utokyo-blue}$\blacktriangleright$} +\setbeamercolor{section in toc}{fg=black} +\setbeamertemplate{sections/subsections in toc}[square] +%\setbeamercolor{section number projected}{fg=THRed, bg=THRed} +\mode + diff --git a/beamerinnerthemeutokyo.sty b/beamerinnerthemeutokyo.sty new file mode 100644 index 0000000..f841f9a --- /dev/null +++ b/beamerinnerthemeutokyo.sty @@ -0,0 +1,58 @@ +\mode +% Requirement +\RequirePackage{tikz} + +\setbeamertemplate{background}{ + \begin{tikzpicture} + \definecolor{utokyo-blue}{HTML}{187fc3}; + \definecolor{utokyo-yellow}{HTML}{f9be00}; + \useasboundingbox (0,0) rectangle(\the\paperwidth,\the\paperheight); + \ifnum\insertframenumber>0\relax% + \fill[white,opacity=1] (0,0) rectangle(\the\paperwidth,\the\paperheight); + \node [below left] at (\the\paperwidth, \the\paperheight - 5mm) + {\includesvg[height = 1.2 cm]{./images/UTokyo_Logo.svg}}; + \node [above] at (0.7, 0) + {\includesvg[height = 1.5 cm]{./images/clocktower.svg}}; + \node[below right] at (current bounding box.north west) { + \footnotesize + \hspace{.05\paperwidth} + { + \ifx\SUBTITLE\@empty + \tiny\inserttitle~| \insertshortauthor~| \insertdate + \else + \tiny\inserttitle~ -- \insertsubtitle~| \insertshortauthor~| \insertdate + \fi + }}; + \node[above left] at (current bounding box.south east) { + {\large\insertframenumber} + }; + \fill[color=utokyo-yellow] (0.5,1.7) rectangle(.9,\the\paperheight); + \else + \node [above left] at (\the\paperwidth,0) + {\includesvg[height=.3\paperheight]{./images/UTokyo_Logo_small.svg}}; + \fi + \end{tikzpicture} +} + +% Title page +\defbeamertemplate*{title page}{utokyo}[1][] +{ + \begin{center} + \Large + \textbf{\inserttitle}\\ + \ifx\SUBTITLE\@empty + \else + \large + \insertsubtitle\\ + \fi + \ifx\TITLEIMAGE\@empty + \else + \TITLEIMAGE\\ + \fi + \normalsize + \insertauthor\\ + \insertdate + \end{center} +} + +\mode diff --git a/beamerouterthemeutokyo.sty b/beamerouterthemeutokyo.sty new file mode 100644 index 0000000..cffa5ab --- /dev/null +++ b/beamerouterthemeutokyo.sty @@ -0,0 +1,23 @@ +\mode + +% Frame title +\defbeamertemplate*{frametitle}{texsx}[1][] +{ +\vskip1cm% + \begin{beamercolorbox}[wd=\paperwidth,ht=1cm]{frametitle} + \begin{tikzpicture} + \definecolor{utokyo-gray}{HTML}{231815}; + \definecolor{utokyo-blue}{HTML}{187fc3}; + \definecolor{utokyo-yellow}{HTML}{f9be00}; + \useasboundingbox[fill=utokyo-blue](0,0) rectangle(.675*\the\paperwidth, 1.5cm); + \ifx\insertframesubtitle\@empty% + {\node[anchor=west, white,font=\large] at (1,0.75){\insertframetitle};} + \else% + {\node[anchor= west, white,font=\large] at (1,1.05){\insertframetitle};% + \node[anchor= west, white,font=\normalsize] at (1,0.35){\insertframesubtitle};}% + \fi + \end{tikzpicture} + \end{beamercolorbox} +} + +\mode diff --git a/beamerthemeutokyo.sty b/beamerthemeutokyo.sty new file mode 100644 index 0000000..725e946 --- /dev/null +++ b/beamerthemeutokyo.sty @@ -0,0 +1,14 @@ +\mode + +% Requirement +\RequirePackage{tikz} + +% Settings +\useinnertheme{utokyo} +\useoutertheme{utokyo} +\usecolortheme{utokyo} + +\setbeamertemplate{navigation symbols}{} +\setbeamertemplate{blocks}[rounded][shadow=true] + +\mode diff --git a/images/UTokyo_Logo.svg b/images/UTokyo_Logo.svg new file mode 100644 index 0000000..a7d0979 --- /dev/null +++ b/images/UTokyo_Logo.svg @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/UTokyo_Logo_small.svg b/images/UTokyo_Logo_small.svg new file mode 100644 index 0000000..bd9195d --- /dev/null +++ b/images/UTokyo_Logo_small.svg @@ -0,0 +1,36 @@ + + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/images/clocktower.svg b/images/clocktower.svg new file mode 100644 index 0000000..1bc04cb --- /dev/null +++ b/images/clocktower.svg @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sections/ExampleSection.tex b/sections/ExampleSection.tex new file mode 100644 index 0000000..5421b10 --- /dev/null +++ b/sections/ExampleSection.tex @@ -0,0 +1,31 @@ +\section{Example Section}% +\label{sec:Example Section} + +\begin{frame}[t] + \frametitle{\secname} + \framesubtitle{example subtitle} + example text + \begin{itemize} + \item test + \item test + \begin{itemize} + \item test + \item test + \end{itemize} + \item test + \end{itemize} +\end{frame} + +\begin{frame}[t] + \frametitle{example only title} + example text + \begin{itemize} + \item test + \item test + \begin{itemize} + \item test + \item test + \end{itemize} + \item test + \end{itemize} +\end{frame}