Skip to content
Snippets Groups Projects
Commit f7823646 authored by tuhe's avatar tuhe
Browse files

CI/CD

parent f59abddb
Branches
No related tags found
No related merge requests found
Pipeline #7465 failed
Showing
with 10 additions and 3042 deletions
...@@ -117,12 +117,13 @@ pages: ...@@ -117,12 +117,13 @@ pages:
- xvfb-run -s "-screen 0 1400x900x24" python test_slider.py - xvfb-run -s "-screen 0 1400x900x24" python test_slider.py
- cd .. - cd ..
- cp tests/expected public/expected -rf - cp tests/expected public/expected -rf
- cp tests/test_images public/test_images -rf - ls tests
- cp tests/tests_images public/tests_images -rf
- cat public/index.html - cat public/index.html
- echo "in tests/expected" - echo "in tests/expected"
- ls tests/expected - ls tests/expected
- echo "in public/expected" - echo "in public/tests_images"
- ls public/expected - ls public/tests_images
# - apt install -y python3-sphinx # - apt install -y python3-sphinx
# - echo "hello" > public/index.html # - echo "hello" > public/index.html
# - pip install -U -r pythontools/requirements_full.txt --no-cache --upgrade # - pip install -U -r pythontools/requirements_full.txt --no-cache --upgrade
......
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<table border="1"> <table border="1">
<tr><td>What?</td><td>Current run</td><td>Expected</td></tr> <tr><td>What?</td><td>Current run</td><td>Expected</td></tr>
<tr><td>Index before svg update (index_a.png)</td><td><img src="test_images/index_a.png"></td><td><img src="expected/index_a.png"></td></tr> <tr><td>Index before svg update (index_a.png)</td><td><img src="tests_images/index_a.png"></td><td><img src="expected/index_a.png"></td></tr>
<tr><td>Index after svg update (index_b.png)</td><td><img src="test_images/index_b.png"></td><td><img src="expected/index_b.png"></td></tr> <tr><td>Index after svg update (index_b.png)</td><td><img src="tests_images/index_b.png"></td><td><img src="expected/index_b.png"></td></tr>
<tr><td>Front page</td><td><img src="test_images/index_front.png"></td><td><img src="expected/index_front.png"></td></tr> <tr><td>Front page</td><td><img src="tests_images/index_front.png"></td><td><img src="expected/index_front.png"></td></tr>
</table> </table>
Download index file: <a href="test_images/index.pdf">test_images/index.pdf</a> Download index file: <a href="tests_images/index.pdf">test_images/index.pdf</a>
</body></html> </body></html>
\ No newline at end of file
...@@ -287,7 +287,6 @@ def svg_edit_to_importable(svg_edit_file,verbose=False): ...@@ -287,7 +287,6 @@ def svg_edit_to_importable(svg_edit_file,verbose=False):
# inkscape:label="Layer 1" # inkscape:label="Layer 1"
# style="display:inline"> # style="display:inline">
# {{svg_end}} # {{svg_end}}
# </g></svg>
# </jinja2> # </jinja2>
def add_png_background_to_svg(svg_input, png_file, svg_output=None): def add_png_background_to_svg(svg_input, png_file, svg_output=None):
if not svg_output: svg_output = svg_input if not svg_output: svg_output = svg_input
...@@ -305,8 +304,9 @@ def add_png_background_to_svg(svg_input, png_file, svg_output=None): ...@@ -305,8 +304,9 @@ def add_png_background_to_svg(svg_input, png_file, svg_output=None):
mds_id = svg.find(mds) mds_id = svg.find(mds)
mds_dex = mds_id+len(mds) mds_dex = mds_id+len(mds)
svg_end = svg[mds_dex:].replace("</svg>", "</g></svg>")
data = {'png_file' : rp, 'svg_start': svg[:mds_dex],'svg_end': svg[mds_dex:]} data = {'png_file' : rp, 'svg_start': svg[:mds_dex],'svg_end': svg_end}
svg = jinjafy_comment(data, jinja_tag="jinja2") svg = jinjafy_comment(data, jinja_tag="jinja2")
si = svg.find("<svg") + 4 si = svg.find("<svg") + 4
......
% WARNING! This file was automatically generated; see slider/DTU_Beamer_files for original version.
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\usepackage{booktabs}
\usepackage{siunitx}
\usepackage[inkscape=true,inkscapeformat=pdf,inkscapelatex=true]{svg}
\svgpath{osvgs/}
\usepackage{url}
\usepackage{pmboxdraw}
\usepackage{amssymb}
\usepackage{pgffor}
\usetheme[department=compute]{DTU}
\newcommand{\tabitem}{{\color{dtured}$\bullet$} }
\usepackage[absolute,overlay]{textpos}
\textblockorigin{0mm}{0mm}
\setlength{\TPHorizModule}{\paperwidth}
\setlength{\TPVertModule}{\paperheight}
% Latin Modern
\usepackage{lmodern}
\newcommand{\overlabel}[1]{ \begin{textblock}{1}(0,0) \url{#1} \end{textblock} }
% Verdana font type
%\usepackage{verdana}
% Helvetica
%\usepackage{helvet}
% Times (text and math)
%\usepackage{newtx, newtxmath}
% \usetheme[department=compute]{DTU}
\makeatletter
\def\osvg{\@ifnextchar[{\@with}{\@without} }
\def\@with[#1]#2{
\foreach[count=\n] \x in {#1}{
\iftoggle{overlabel_includesvgs}{
\IfFileExists{osvgs/x_do_not_edit_#2-l\n_nofonts.pdf}{
\begin{textblock}{1}(0,0)
\includegraphics<\x>[width=1.0\linewidth]{osvgs/x_do_not_edit_#2-l\n_nofonts}
\end{textblock}
}{ File: \url{osvgs/x_do_not_edit_#2-l\n_nofonts.pdf} does not exist; bad layer import? Check \url{osvgs/#2.svg} including layer information.
}
}
}
\olabel{#2}
}
\def\@without#1{
% Try to include first 10 layer files if they are there.
\foreach[count=\n] \x in {1,...,10}{
\iftoggle{overlabel_includesvgs}{
\IfFileExists{osvgs/x_do_not_edit_#1-l\n_nofonts.pdf}{
\begin{textblock}{1}(0,0)
\includegraphics<\n->[width=1.0\linewidth]{osvgs/x_do_not_edit_#1-l\n_nofonts}
\end{textblock}
}{
}
}
}
\olabel{#1}
}
\newcommand{\olabel}[1]{
\iftoggle{overlabel_includelabels}{
\begin{textblock}{1}(0,0) \url{#1} \end{textblock}
}{
\begin{textblock}{1}(0,0) {\color{white} \url{#1} } \end{textblock}
}
}
\makeatother
\makeatother
\ifdefined\bluem
% nothing.
\else
\newcommand\bluem[1]{{\textcolor[rgb]{0.20, 0.40, 0.80}{ #1 }}}
\newcommand\redm[1]{{\textcolor[rgb]{0.60, 0.00, 0.00}{ #1 }}}
\newcommand\greenm[1]{{\textcolor[HTML]{398E00}{ #1 }}}
\newcommand\yellowm[1]{{\textcolor[rgb]{1.00, 0.80, 0.00}{ #1 }}}
\newcommand\bluet[1]{{\textcolor[rgb]{0.20, 0.40, 0.80}{\textbf{#1}}}}
\newcommand\redt[1]{{\textcolor[rgb]{0.60, 0.00, 0.00}{\textbf{#1}}}}
\newcommand\greent[1]{{\textcolor[HTML]{398E00}{\textbf{#1}}}}
\newcommand\yellowt[1]{{\textcolor[rgb]{1.00, 0.80, 0.00}{\textbf{#1}}}}
\fi
\ No newline at end of file
% beamercolorthemeDTU.sty
% This file is a part of the DTU beamer package and makes sure that
% the DTU colours are available. This file does neither redefine
% beamer settings, nor does it add new configurations. It has to be
% maintained for backward compatibility.
%
% Changelog
% 2011-06-23 jowr Replaced the old colour definitions with the new ones from the design guide
% 2011-07-05 jowr Added alternative colours for the graphs
% 2011-08-16 jowr Moved colour definitions to resources folder, also used in poster class
% 2014-09-27 jowr Added documentation and prepared merge to git repository
%
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Load the file if it exists, throw a warning otherwise
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
\InputIfFileExists{dtucolours}{
\PackageInfo{dtubeamer}{Successfully loaded the DTU colours.}
}{
\PackageWarning{dtubeamer}{Could not load the colours from dtucolours.sty. This compilation is likely to fail.}
}%
\mode<presentation>
% The new design does not need any adaption here, black is
% the default colour.
\mode<all>
\ No newline at end of file
% Copyright 2014 by Remus Mihail Prunescu
% LaTeX Support Group 2014
% DTU Official Presentation
% For PDFLATEX
\usefonttheme{professionalfonts}
% Title font
\setbeamerfont{title}{size=\large, series=\bfseries}
\setbeamercolor{title}{fg=black}
% Subtitle font
\setbeamerfont{subtitle}{size=\small, series=\normalfont}
% Author font
\setbeamerfont{author}{size=\small, series=\normalfont}
% Footline
\setbeamerfont{framecounter in head/foot}{size=\tiny}
\setbeamerfont{department in head/foot}{size=\tiny, series=\bfseries}
\setbeamerfont{title in head/foot}{size=\tiny}
\setbeamerfont{date in head/foot}{size=\tiny}
% Frametitle
\setbeamerfont{frametitle}{size=\large, series=\bfseries}
\setbeamerfont{block body}{size=\small}
\setbeamerfont{section title}{size=\small}
\setbeamerfont{block body alerted}{size=\small}
\setbeamerfont{block body example}{size=\small}
\setbeamerfont{block title}{size=\large,parent={structure,block body}}
\setbeamerfont{block title alerted}{parent={block title,alerted text}}
\setbeamerfont{block title example}{parent={block title,example text}}
\setbeamerfont{itemize/enumerate body}{size=\small}
% Colors
\setbeamercolor{frametitle}{fg=black}
\setbeamercolor{structure}{fg=black}
\ No newline at end of file
% Copyright 2007 by Till Tantau
% Copyright 2010 by Remus Mihail Prunescu
% LaTeX Support Group 2010
% DTU Official Presentation
\mode<presentation>
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Title page: DTU
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\defbeamertemplate*{title page}{DTU}[1][]
{
% Set bInTitle to true to make sure the right footline is printed
\global\edef\bInTitle{true}
\linespread{1.45}
% Content of the title page
% Title + Subtitle
\vspace{\dimTitleOffset}
\begin{beamercolorbox}[left]{title box}
\usebeamerfont{title}\usebeamercolor[fg]{title}\inserttitle\par
\ifx\insertsubtitle\@empty
\else
\vspace{\dimSubtitleOffset}
{\usebeamerfont{subtitle}\usebeamercolor[fg]{subtitle}\insertsubtitle\par}
\fi
\end{beamercolorbox}
\vspace{\dimAuthorOffset}
% Author
\begin{beamercolorbox}[left]{author box}
\usebeamerfont{author}\usebeamercolor[fg]{author}\insertauthor
\end{beamercolorbox}
\vspace{\dimInstituteOffset}% Institute
\begin{beamercolorbox}[left]{institute box}
\usebeamerfont{institute}\usebeamercolor[fg]{author}\insertinstitute
\end{beamercolorbox}
% Title graphic
{\usebeamercolor[fg]{titlegraphic}\inserttitlegraphic\par}
% Fill the space till bottom
\vskip0pt plus 1filll
}
\mode
<all>
% Copyright 2014 by Remus Mihail Prunescu
% LaTeX Support Group 2014
% DTU Official Presentation
\mode<presentation>
\setbeamercolor*{framecounter in head/foot}{parent=palette tertiary}
\setbeamercolor*{department in head/foot}{parent=palette tertiary}
\setbeamercolor*{title in head/foot}{parent=palette tertiary}
\setbeamercolor*{date in head/foot}{parent=palette tertiary}
% No navigation symbols
\setbeamertemplate{navigation symbols}{}
% Header
\setbeamertemplate{headline}
{
\ifdefstring{\bDTUWhiteFrame}{true}
{
\insertFrameDTUWhiteLogo
}
{
\ifdefstring{\bInTitle}{true}
{
\insertTitleDTULogo
}
{
\insertFrameDTULogo
}
}
}
% Footer
\setbeamertemplate{footline}
{
\ifdefstring{\bInTitle}{true}
{
\vspace{-0.35\paperheight}
\begin{beamercolorbox}[wd=\paperwidth]{title bottom}
\vbox{%
\makebox[0pt][l]{\hspace{\dimDTUDepLogoXOffset}\insertdepartmentlogoA}%
\vbox{%
\hspace{\dimDTUFriseXOffset}%
\makebox[0pt][l]{\insertDTUFrise}%
\vspace{\dimDTUDepFriseOffset}%
}%
}%
\vspace{\dimDTUFriseYOffset}
\end{beamercolorbox}
\global\def\bInTitle{false}
}
{
\ifdefstring{\bDTUWhiteFrame}{true}
{
}
{ %
\hbox{ %
\hspace{\dimTextLeftMargin}\hspace{-1.5pt}\insertframenumber %
\setlength{\widthframenumber}{2em + \widthof{\insertframenumber}} %
\setlength{\widthdepartment}{1em + \widthof{\insertdepartmentandinstitute}} %
\setlength{\widthdate}{1em + \widthof{00 00000000 0000}} % Tue: Added extra 0's (2 to 7) to prevent wrap
\setlength{\widthtitle}{\textwidth-\widthframenumber-\widthdepartment-\widthdate-\dimTextLeftMargin-\dimTextLeftMargin} %
%\parbox[t]{\widthframenumber}{\insertframenumber} %
\parbox[t]{\widthdepartment}{\insertdepartmentandinstitute} %
\parbox[t]{\widthtitle}{\raggedleft\insertshorttitleinfooter} %
\parbox[t]{\widthdate}{\raggedleft\DTUDateFormat\insertdate} %
\vspace{\dimFootlineYOffset} %
}
}
}
}
% Position the frame title so that it would get into the headline
\setbeamertemplate{frametitle}
{
\vspace{\dimPlaceTitleInHeader}
\ifdefstring{\inShowSection}{true}
{
\usebeamerfont{section title}\color{black!20}%
\ifnumcomp{\thesection}{=}{0}{%
\ \par%
}
{%
\insertsection\par
}
}
{
\vspace{\dimFrameTitleOffset}
}
\vspace{-1pt}\usebeamerfont{frametitle}%
\ifdefstring{\bDTUWhiteFrame}{true}{\color{white}}{\color{black}}%
\insertframetitle
\vspace{\dimAfterFrameTitleOffset}
}
\mode
<all>
% Copyright Remus Mihail Prunescu
% LaTeX Support Group
% DTU Official Presentation
\mode<presentation>
\RequirePackage{etoolbox}
\RequirePackage{datetime}
\RequirePackage{keyval}
\RequirePackage{calc}
% Enlarge slide size
\beamer@paperwidth 1.09375\beamer@paperwidth%
\beamer@paperheight 1.09375\beamer@paperheight%
% Extra package
\InputIfFileExists{departments}%
{\ClassInfo{}{The file departments.tex with department logo file naming has been loaded.}}%
{\ClassInfo{}{The file departments.tex is missing. Consult the manual.}%
}%
% Default values for options
\newcommand{\inDepartmentShortName}{elektro}
\newcommand{\inLanguage}{english}
\newcommand{\inShowSection}{true}
% Check language
\@ifpackagewith{babel}{danish}{%
\renewcommand{\inLanguage}{danish}%
}{}
% Save options
\DeclareOptionBeamer{department}{\renewcommand{\inDepartmentShortName}{#1}}
\DeclareOptionBeamer{showsection}{\renewcommand{\inShowSection}{#1}}
\ProcessOptionsBeamer
% % % % % % % % % % % %
% Define Dimensions
% % % % % % % % % % % %
\newcommand{\dimDTULogoWidth}{0.0394\paperwidth} % Percent
\newcommand{\dimDTULogoHeight}{0.0777\paperheight} % Percent
\newcommand{\dimDTULogoYOffset}{0.0404\paperheight} % Percent
\newcommand{\dimDTULogoXOffset}{0.9176\paperwidth} % Percent
\newcommand{\dimDTUDepLogoXOffset}{0.062\paperwidth} % Percent
\newcommand{\dimDTUDepLogoHeight}{0.0897\paperheight} % Percent
\newcommand{\dimDTUFriseYOffset}{0.03\paperheight} % Percent
\newcommand{\dimDTUFriseXOffset}{0.418\paperwidth} % Percent
\newcommand{\dimDTUFriseHeight}{0.3412\paperheight} % Percent
\newcommand{\dimDTUDepFriseOffset}{0.018\paperheight} % Percent
\newcommand{\dimTitleOffset}{0.148\paperheight}
\newcommand{\dimSubtitleOffset}{0.0175\paperheight}
\newcommand{\dimFrameTitleOffset}{0.033\paperheight}
\newcommand{\dimAfterFrameTitleOffset}{-0.008\paperheight}
\newcommand{\dimAuthorOffset}{0.06\paperheight}
\newcommand{\dimInstituteOffset}{0.027\paperheight}
\newcommand{\dimFootlineYOffset}{0.025\paperheight} % Tue: This was 0.0355 in original file
\newcommand{\dimLeftMarginI}{0.02\paperwidth}
\newcommand{\dimTextLeftMargin}{0.0669\paperwidth} % Percent
\newcommand{\dimPlaceTitleInHeader}{-0.09\paperheight}
\makeatletter
\setbeamersize{text margin left=\dimTextLeftMargin, text margin right=\dimTextLeftMargin}
\makeatother
% % % % % % % % % % % %
% End of Dimensions
% % % % % % % % % % % %
% New commands to be used in the DTU template
%\newcommand{\insertdepartmentandinstitute}{\departmenttitle , \institutetitle}
\newcommand{\insertdepartmentandinstitute}{\departmenttitle}
\newcommand{\insertDTULogo}{\includegraphics[width=\dimDTULogoWidth]{tex_dtu_logo}}
\newcommand{\insertDTUWhiteLogo}{}
\newcommand{\inserttitlefootline}{}
\newcommand{\inserttitleheadline}{}
\newcommand{\institutetitle}{}
% Internal variable to check if \titlepage was called: false by default
\def\bInTitle{false}
\def\bDTUWhiteFrame{false}
% Process language
% Is it DK or UK?
\ifdefstring{\inLanguage}{danish}
{
\renewcommand{\institutetitle}{Danmarks Tekniske Universitet}
\renewcommand{\insertDTUWhiteLogo}{\includegraphics[height=\dimDTULogoHeight]{tex_dtu_dk_a1_neg}}
}
{
\ifdefstring{\inLanguage}{english}
{
\renewcommand{\institutetitle}{Technical University of Denmark}
\renewcommand{\insertDTUWhiteLogo}{\includegraphics[height=\dimDTULogoHeight]{tex_dtu_uk_a1_neg}}
}
{
% Undefined language
% Default values are used
}
}
\ifcsdef{department@\inDepartmentShortName}
{
\activateDepartmentInfo{\inLanguage}{\inDepartmentShortName}
}
{
\PackageError{DTU Beamer Template}{Department is undefined. Reverting to default (elektro).}{Check the user guide for defined departments. If you cannot find it then contact support group to add the department.}
\activateDepartmentInfo{\inLanguage}{elektro}
}
% Command for generating the department title
\newcommand{\departmenttitle}{\thedepartmentNameText}
% Command for inserting the department logo
\newcommand{\insertdepartmentlogoA}{%
\ifdefstring{\inDepartmentShortName}{admin}
{
}
{
\includegraphics[height=\dimDTUDepLogoHeight]{\thedepartmentLogo}
}
}
% Command for inserting frise
\newcommand{\insertDTUFrise}{\includegraphics[height=\dimDTUFriseHeight]{\thedepartmentFrise}}
% Command used from frame DTU logo (headline)
\newcommand{\insertFrameDTULogo}
{
\vspace{\dimDTULogoYOffset}
\begin{beamercolorbox}[right]{logo in head/foot}%
\insertDTULogo\makebox[\dimDTULogoWidth][]{}
\end{beamercolorbox}
}
\newcommand{\insertFrameDTUWhiteLogo}
{
\vspace{\dimDTULogoYOffset}
\begin{beamercolorbox}[right]{logo in head/foot}%
\insertDTUWhiteLogo\makebox[\dimDTULogoWidth][]{}
\end{beamercolorbox}
}
% Command used in title page for inserting the DTU logo in headline
\newcommand{\insertTitleDTULogo}
{
\insertFrameDTULogo
}
% Change themes
\usefonttheme{DTU}
\useoutertheme{DTU}
\useinnertheme{DTU}
\usecolortheme{DTU}
% Left margin for list environment
\setlength{\leftmargini}{\dimLeftMarginI}
% Adjust bullets placement
\setlength\labelsep{3pt}
\setbeamersize{text margin left=\dimTextLeftMargin}
% Itemize
\setbeamertemplate{items}[circle]
\setbeamercolor{itemize item}{fg=dtured}
\setbeamercolor{itemize subitem}{fg=dtured}
\setbeamerfont{section in toc}{size=\small}
\setbeamerfont{subsection in toc}{size=\scriptsize}
\setbeamertemplate{enumerate items}[circle]
\setbeamercolor{item projected}{fg=white,bg=dtured}
% Table of contents
\setbeamertemplate{section in toc}{%
\color{dtured}$\bullet$ \inserttocsection \par}
\setbeamertemplate{subsection in toc}{
\hskip1em{\color{dtured}$\bullet$} \inserttocsubsection \par}
% Fix space between sections and subsections in toc
\makeatletter
\patchcmd{\beamer@sectionintoc}
{\vfill}
{\vskip\itemsep}
{}
{}
\pretocmd{\beamer@subsectionintoc}
{\vskip0.5\itemsep}
{}
{}
\makeatother
% Date format
\newcommand{\DTUDateFormat}{\DTUDate}
\newdateformat{DTUDate}{\THEDAY.\THEMONTH.\THEYEAR}
% Customize blocks
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor{block title}{fg=white,bg=dtured}
\setbeamerfont{block title}{series=\bfseries\small}
\setbeamercolor{block body}{fg=black,bg=white}
\newcommand{\defaultDTUFrameStyle}{
\setbeamertemplate{background}{}
\color{black}
}
% White DTU frame
\makeatletter
\define@key{beamerframe}{dtuwhitelogo}[true]{%
\global\def\bDTUWhiteFrame{true}
\color{white}
}
\define@key{beamerframe}{bgfilename}{%
\setbeamertemplate{background}{
\includegraphics[width=\paperwidth,height=\paperheight,keepaspectratio]{#1}
}
}
% Default framestyle
\pretocmd{\beamer@@@@frame}
{
\global\def\bDTUWhiteFrame{false}
\defaultDTUFrameStyle
}
{}{}
\makeatother
% Lengths for footer
\newlength{\widthframenumber}
\newlength{\widthdepartment}
\newlength{\widthtitle}
\newlength{\widthdate}
% Short title for the footer
\makeatletter
\newcommand\insertshorttitleinfooter{%
\beamer@shorttitle%
}
\makeatother
% Description list
\setbeamercolor{description item}{fg=dtured}
\mode
<all>
tests/automatic/blank.png

3.09 KiB

File deleted
% departments.tex
% This file is a part of the DTU letter package and contains the file path for
% the grahic file, and text name for the different departments.
%
% Changelog
% 2010-04-07 Added % at the end of each line to make it possible to use the definitions in the documentation
% 2010-04-09 Added the 5th mandatory argument (long text name)
% 2010-04-23 Moved the new argument, #6, to #4 and added all info. However two graphic files are missing and I have therefore made a test: if the graphic file is missing the administration logo is used.
% 2013-02-11 Added compute and diplom department entries. Added check to see that the department macros are defined, otherwise an error is printed.
%
%\makeDepartmentInfo{<danish|english>}{<departmentname>}{<text graphic file name>}{<Big department logo file name>}{<department text name>}{<department long text name>}
%
\RequirePackage{etoolbox}
\newcommand\setDepartmentNameLogo[1]{\def\@departmentNameLogo{#1}}%
\newcommand\thedepartmentNameLogo{\@departmentNameLogo}%
\newcommand\setDepartmentNameText[1]{\def\@departmentNameText{#1}}%
\newcommand\thedepartmentNameText{\@departmentNameText}%
\newcommand\setDepartmentLongNameText[1]{\def\@departmentLongNameText{#1}}%
\newcommand\thedepartmentLongNameText{\@departmentLongNameText}%
\newcommand\setDepartmentLogo[1]{\def\@departmentLogo{#1}}%
\newcommand\thedepartmentLogo{\@departmentLogo}%
\newcommand\setDepartmentFrise[1]{\def\@departmentFrise{#1}}%
\newcommand\thedepartmentFrise{\@departmentFrise}%
%
\newcommand\createDepartment[1]{%
\expandafter\def\csname department@#1\endcsname{#1}}%
%
\newcommand\aliasDepartment[2]{%
\expandafter\def\csname department@#2\endcsname{#1}}%
%
\ifundef{\makeDepartmentInfo}{%
\newcommand\makeDepartmentInfo[7]{%
\def\@departmentcmd{\csname department@#2\endcsname}
\createDepartment{#2}
\expandafter\def\csname namelogo#1@\@departmentcmd\endcsname{\setDepartmentNameLogo{#3}}%
\expandafter\def\csname deplogo#1@\@departmentcmd\endcsname{\setDepartmentLogo{#4}}%
\expandafter\def\csname depfrise#1@\@departmentcmd\endcsname{\setDepartmentFrise{#5}}%
\expandafter\def\csname nametext#1@\@departmentcmd\endcsname{\setDepartmentNameText{#6}}%
\expandafter\def\csname namelongtext#1@\@departmentcmd\endcsname{\setDepartmentLongNameText{#7}}%
}%
}{}%
%
\newcommand\activateDepartmentInfo[2]{%
\ifcsname department@#2\endcsname%
\def\@departmentcmd{\csname department@#2\endcsname}%
\else%
\def\@departmentcmd{\department@admin}%
\fi%
\csname namelogo#1@\@departmentcmd\endcsname% TODO test if command exists before executing it
\csname nametext#1@\@departmentcmd\endcsname%
\csname namelongtext#1@\@departmentcmd\endcsname%
\csname deplogo#1@\@departmentcmd\endcsname%
\csname depfrise#1@\@departmentcmd\endcsname%
% \fromdepartment{\thedepartmentLongNameText}
}%
%
\makeDepartmentInfo{danish} {aqua}{tex_aqua_dk}{tex_dtu_aqua_a}{tex_dtu_aqua_frise}{DTU Aqua}{Institut for Akvatiske Ressourcer}%
\makeDepartmentInfo{english}{aqua}{tex_aqua_uk}{tex_dtu_aqua_a_uk}{tex_dtu_aqua_frise}{DTU Aqua}{National Institute of Aquatic Resources}%
\makeDepartmentInfo{danish} {byg}{tex_byg_dk}{tex_dtu_byg_a}{tex_dtu_byg_frise}{DTU Byg}{Institut for Byggeri og Anl\ae g}%
\makeDepartmentInfo{english}{byg}{tex_byg_uk}{tex_dtu_byg_a_uk}{tex_dtu_byg_frise}{DTU Civil Engineering}{Department of Civil Engineering}%
\makeDepartmentInfo{danish}{compute}{tex_compute_uk}{tex_dtu_compute_a}{tex_dtu_frise}{DTU Compute}{Institut for Matematik og Computer Science}
\makeDepartmentInfo{english}{compute}{tex_compute_uk}{tex_dtu_compute_a_uk}{tex_dtu_frise}{DTU Compute}{Department of Applied Mathematics and Computer Science}
\makeDepartmentInfo{danish} {elektro}{tex_elektro_dk}{tex_dtu_elektro_a}{tex_dtu_frise}{DTU Elektro}{Institut for Elektroteknologi}
\makeDepartmentInfo{english}{elektro}{tex_elektro_uk}{tex_dtu_elektro_a_uk}{tex_dtu_frise}{DTU Electrical Engineering}{Department of Electrical Engineering}
\makeDepartmentInfo{danish} {energi}{tex_energikonvertering_dk}{tex_dtu_energi_a}{tex_dtu_energi_frise}{DTU Energi}{Institut for Energikonvertering og -lagring}
\makeDepartmentInfo{english}{energi}{tex_energikonvertering_uk}{tex_dtu_energi_a_uk}{tex_dtu_energi_frise}{DTU Energy}{Department of Energy Conversion and Storage}
\makeDepartmentInfo{danish} {fotonik}{tex_fotonik_dk}{tex_dtu_fotonik_a}{tex_dtu_frise}{DTU Fotonik}{Institut for Fotonik}
\makeDepartmentInfo{english}{fotonik}{tex_fotonik_uk}{tex_dtu_fotonik_a_uk}{tex_dtu_frise}{DTU Fotonik}{Department of Photonics Engineering}
\makeDepartmentInfo{danish} {fysik}{tex_fysik_dk}{tex_dtu_fysik_a}{tex_dtu_fysik_frise}{DTU Fysik}{Institut for Fysik}
\makeDepartmentInfo{english}{fysik}{tex_fysik_uk}{tex_dtu_fysik_a_uk}{tex_dtu_fysik_frise}{DTU Physics}{Department of Physics}
\makeDepartmentInfo{danish} {food}{tex_fodevareinstituttet_dk}{tex_dtu_fdevareinstituttet_a}{tex_dtu_frise}{DTU F\o devareinstituttet}{F\o devareinstituttet}
\makeDepartmentInfo{english}{food}{tex_fodevareinstituttet_uk}{tex_dtu_fdevareinstituttet_a_uk}{tex_dtu_frise}{DTU Food}{National Food Institute}
\makeDepartmentInfo{danish} {kemi}{tex_kemi_dk}{tex_dtu_kemi_a}{tex_dtu_kemi_frise}{DTU Kemi}{Institut for Kemi}
\makeDepartmentInfo{english}{kemi}{tex_kemi_uk}{tex_dtu_kemi_a_uk}{tex_dtu_kemi_frise}{DTU Chemistry}{Department of Chemistry}
\makeDepartmentInfo{danish} {kemiteknik}{tex_kemiteknik_dk}{tex_dtu_kemiteknik_a}{tex_dtu_kemiteknik_frise}{DTU Kemiteknik}{Institut for Kemiteknik}
\makeDepartmentInfo{english}{kemiteknik}{tex_kemiteknik_uk}{tex_dtu_kemiteknik_a_uk}{tex_dtu_kemiteknik_frise}{DTU Chemical Engineering}{Department of Chemical and Biochemical Engineering}
\makeDepartmentInfo{danish} {management}{tex_management_dk}{tex_dtu_management_a}{tex_dtu_frise}{DTU Management}{Institut for Systemer, Produktion og Ledelse}
\makeDepartmentInfo{english}{management}{tex_management_uk}{tex_dtu_management_a_uk}{tex_dtu_frise}{DTU Management Engineering}{Department of Management Engineering}
\makeDepartmentInfo{danish} {mekanik}{tex_mekanik_dk}{tex_dtu_mekanik_a}{tex_dtu_mek_frise}{DTU Mekanik}{Institut for Mekanisk Teknologi}
\makeDepartmentInfo{english}{mekanik}{tex_mekanik_uk}{tex_dtu_mekanik_a_uk}{tex_dtu_mek_frise}{DTU Mechanical Engineering}{Department of Mechanical Engineering}
\makeDepartmentInfo{danish} {miljo}{tex_miljo_dk}{tex_dtu_milj_a}{tex_dtu_miljoe_frise}{DTU Milj\o}{Institut for Vand og Milj\o teknologi}
\makeDepartmentInfo{english}{environmentalEng}{tex_miljo_uk}{tex_dtu_milj_a_uk}{tex_dtu_miljoe_frise}{DTU Environment}{Department of Environmental Engineering}
\makeDepartmentInfo{danish} {nanotek}{tex_nanotek_dk}{tex_dtu_nanotek_a}{tex_dtu_frise}{DTU Nanotek}{Institut for Mikro- og Nanoteknologi}
\makeDepartmentInfo{english}{nanotek}{tex_nanotek_uk}{tex_dtu_nanotek_a_uk}{tex_dtu_frise}{DTU Nanotech}{Department of Micro- and Nanotechnology}
\makeDepartmentInfo{danish} {space}{tex_space_dk}{tex_dtu_space_a}{tex_dtu_space_frise}{DTU Space}{Institut for Rumforskning og Rumteknologi}
\makeDepartmentInfo{english}{space}{tex_space_uk}{tex_dtu_space_a_uk}{tex_dtu_space_frise}{DTU Space}{National Space Institute}
\makeDepartmentInfo{danish} {systembiologi}{}{tex_dtu_systembiologi_a}{tex_dtu_frise}{DTU Systembiologi}{Institut for Systembiologi}
\makeDepartmentInfo{english}{systembiologi}{}{tex_dtu_systembiologi_a_uk}{tex_dtu_frise}{DTU Systems Biology}{Department of Systems Biology}
\makeDepartmentInfo{danish} {transport}{tex_transport_dk}{tex_dtu_transport_a}{tex_dtu_transport_frise}{DTU Transport}{Institut for Transport}
\makeDepartmentInfo{english}{transport}{tex_transport_uk}{tex_dtu_transport_a_uk}{tex_dtu_transport_frise}{DTU Transport}{Department of Transport}
\makeDepartmentInfo{danish} {vaterinaerinstituttet}{tex_veterinaertinstituttet_dk}{tex_dtu_veterinerinstituttet_a}{tex_dtu_vet_frise}{DTU Veterin\ae rinstituttet}{Veterin\ae rinstituttet}
\makeDepartmentInfo{english}{vaterinaerinstituttet}{tex_veterinaertinstituttet_uk}{tex_dtu_veterinerinstituttet_a_uk}{tex_dtu_vet_frise}{DTU Vet}{National Veterinary Institute}
\makeDepartmentInfo{danish} {vindenergi}{tex_vindenergi_dk}{tex_dtu_vindenergi_a}{tex_dtu_vindenergi_frise}{DTU Vindenergi}{Institut for Vindenergi}
\makeDepartmentInfo{english}{vindenergi}{tex_vindenergi_uk}{tex_dtu_vindenergi_a_uk}{tex_dtu_vindenergi_frise}{DTU Wind Energy}{Department of Wind Energy}
% Extra
\makeDepartmentInfo{danish} {bibliotek}{tex_bibliotek_dk}{tex_dtu_bibliotek_a}{tex_dtu_bibliotek_frise}{DTU Bibliotek}{Danmarks Tekniske Informationcenter}%
\makeDepartmentInfo{english}{bibliotek}{tex_bibliotek_uk}{tex_dtu_bibliotek_uk_a}{tex_dtu_bibliotek_frise}{DTU Library}{Technical Information Center of Denmark}%
\makeDepartmentInfo{danish} {admin}{tex_dtu_navn_dk}{}{tex_dtu_frise}{Danmarks Tekniske Universitet}{}%
\makeDepartmentInfo{english}{admin}{tex_dtu_navn_uk}{}{tex_dtu_frise}{Technical University of Denmark}{}%
\makeDepartmentInfo{danish} {riso}{tex_riso_dk}{tex_ris_dtu_a}{tex_dtu_frise}{Ris\o\ DTU}{Nationallaboratoriet for B\ae redygtig Energi}
\makeDepartmentInfo{english}{riso}{tex_riso_uk}{tex_ris_dtu_a_uk}{tex_dtu_frise}{Ris\o\ DTU}{National Laboratory for Sustainable Energy}
\makeDepartmentInfo{danish}{diplom}{tex_diplom_dk}{tex_dtu_diplom_a}{tex_dtu_frise}{Center for Diplomingeni\o ruddannelse}{DTU Diplom}
\makeDepartmentInfo{english}{diplom}{tex_diplom_dk}{tex_dtu_diplom_a_uk}{tex_dtu_frise}{Center for Diplomingeni\o ruddannelse}{DTU Diplom}
% dtucolours.sty
% This file has been a part of the DTU beamer package and is now
% moved to the resources folder because there are other parts of the
% DTU package that need the colours as well.
%
% Changelog
% 2011-06-23 jowr Replaced the old colour definitions with the new ones from the design guide
% 2011-07-05 jowr Added alternative colours for the graphs
% 2011-08-16 jowr Moved colour definitions to resources folder, also used in poster class
% 2012-06-19 jowr Added colours for cooperation with IPU
% 2014-09-27 jowr Replaced definecolor with providecolor, do not overwrite custom colour definitions
%
%
\RequirePackage{xcolor}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define primary colours (designguide v2.3, page 13)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecolor{dtured} {rgb}{0.60, 0.00, 0.00} % Primærfarve 1 - CMYK: 0/ 91/ 72/ 23 - RGB: 153/ 0/ 0
\providecolor{dtugrey} {rgb}{0.60, 0.60, 0.60} % Primærfarve 2 - CMYK: 0/ 0/ 0/ 56 - RGB: 153/153/153
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define secondary colours (designguide v2.3, page 13)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Please note that dtured and dtubrown have the same rgb and hex values and only differ in cmyk and pms notation.
\providecolor{dtuyellow} {rgb}{1.00, 0.80, 0.00} % Sekundærfarve 12 - CMYK: 0/ 25/100/ 0 - RGB: 255/204/ 0 - HEX: FFCC00
\providecolor{dtuorange} {rgb}{1.00, 0.60, 0.00} % Sekundærfarve 1 - CMYK: 0/ 50/100/ 0 - RGB: 255/153/ 0 - HEX: FF9900
\providecolor{dtulightred} {rgb}{1.00, 0.00, 0.00} % Sekundærfarve 3 - CMYK: 0/100/100/ 0 - RGB: 255/ 0/ 0 - HEX: FF0000
\providecolor{dtubrown} {rgb}{0.60, 0.00, 0.00} % Sekundærfarve 4 - CMYK: 0/100/100/ 50 - RGB: 153/ 0/ 0 - HEX: 990000
\providecolor{dtupurple} {rgb}{0.80, 0.20, 0.60} % Sekundærfarve 6 - CMYK: 25/100/ 0/ 0 - RGB: 204/ 51/153 - HEX: CC3399
\providecolor{dtuviolet} {rgb}{0.40, 0.00, 0.60} % Sekundærfarve 9 - CMYK: 75/ 75/ 0/ 0 - RGB: 102/ 0/153 - HEX: 660099
\providecolor{dtudarkblue} {rgb}{0.20, 0.40, 0.80} % Sekundærfarve 13 - CMYK: 75/ 50/ 0/ 0 - RGB: 51/102/204 - HEX: 3366CC
\providecolor{dtulightblue} {rgb}{0.20, 0.80, 1.00} % Sekundærfarve 10 - CMYK: 50/ 0/ 0/ 0 - RGB: 51/204/255 - HEX: 33CCFF
\providecolor{dtulightgreen}{rgb}{0.60, 0.80, 0.20} % Sekundærfarve 11 - CMYK: 25/ 0/100/ 0 - RGB: 153/204/ 51 - HEX: 99CC33
\providecolor{dtudarkgreen} {rgb}{0.40, 0.80, 0.00} % Sekundærfarve 14 - CMYK: 50/ 0/100/ 0 - RGB: 102/204/ 0 - HEX: 66CC00
\providecolor{dtucoolgrey} {rgb}{0.59, 0.58, 0.57} % Farve til poster - CMYK: 0/ 1/ 5/ 39 - RGB: 150/148/145 - HEX: 969491
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define colours for drawings and graphs (designguide v2.3, page 14)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecolor{graph01}{named}{dtuorange}
\providecolor{graph02}{named}{dtupurple}
\providecolor{graph03}{named}{dtulightblue}
\providecolor{graph04}{named}{dtubrown}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define alternate colours for drawings and graphs
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define alternate colours for graphs, which are compatible with black
% and white printers. The initial set of colours makes it hard to distinguish
% between the two lighter and the two darker colours.
\providecolor{graph01alt}{named}{dtuviolet}
\providecolor{graph02alt}{named}{dtuyellow}
\providecolor{graph03alt}{named}{dtulightred}
\providecolor{graph04alt}{named}{dtulightgreen}
\providecolor{graph05alt}{named}{dtugrey}
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Define colours for IPU related documents, from IPU Designguide (16.09.2008)
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\providecolor{ipugreen} {rgb}{0.00, 0.40, 0.20} % Dark green, 1st standard colour - CMYK: 088/000/095/026 - RGB: 000/102/051
\providecolor{ipugrey} {rgb}{0.45, 0.47, 0.49} % Dark grey, 2nd standard colour - CMYK: 015/000/000/075 - RGB: 114/121/126
\providecolor{ipulightgreen}{rgb}{0.36, 0.67, 0.15} % Light green, 1sr secondary colour - CMYK: 070/000/100/000 - RGB: 091/172/038
\providecolor{ipulightgrey} {rgb}{0.85, 0.86, 0.87} % Light grey, 2nd secondary colour - CMYK: 003/000/003/020 - RGB: 217/220/222
%
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Old definitions
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% \providecolor{dtured} {cmyk}{0.00, 0.95, 0.72, 0.27}
% \providecolor{dtudarkgray} {cmyk}{0.00, 0.00, 0.00, 0.56}
% \providecolor{dtugray} {cmyk}{0.00, 0.00, 0.00, 0.37}
% \providecolor{dtulightgray} {cmyk}{0.00, 0.00, 0.00, 0.19}
% \providecolor{dtudarkblue} {cmyk}{1.00, 0.72, 0.00, 0.38}
% \providecolor{dtublue} {cmyk}{0.60, 0.44, 0.00, 0.24}
% \providecolor{dtulightblue} {cmyk}{0.30, 0.22, 0.00, 0.12}
% \providecolor{dtudarkgreen} {cmyk}{1.00, 0.00, 0.83, 0.47}
% \providecolor{dtugreen} {cmyk}{0.725,0.004,1.00, 0.004}
% \providecolor{dtuyellow} {cmyk}{0.00, 0.00, 1.00, 0.00}
% \providecolor{dtuorange} {cmyk}{0.00, 0.34, 0.91, 0.00}
% \providecolor{dtudarkorange}{cmyk}{0.00, 0.51, 1.00, 0.00}
% \providecolor{dtupurpur} {cmyk}{0.00, 0.94, 0.00, 0.43}
% \providecolor{dtupurple} {cmyk}{0.83, 1.00, 0.00, 0.23}
%
\documentclass[aspectratio=43]{beamer}
\usepackage{etoolbox}
\newtoggle{overlabel_includesvgs}
\newtoggle{overlabel_includelabels}
\toggletrue{overlabel_includesvgs}
\toggletrue{overlabel_includelabels}
\input{beamer_slider_preamble.tex}
\title{Example slide show}
\author{Author}
\begin{document}
\begin{frame}
\maketitle
\end{frame}
% This slideshow is made using slider. Install using: pip install beamer-slider
% check http://gitlab.compute.dtu.dk/tuhe/slider for more information.
\begin{frame}\osvg{myoverlay} % Use the \osvg{labelname} - tag to create new overlays. Run the command `slider` in the terminal and check the ./osvgs directory for the svg files!
\title{Slide with an overlay}
This is some example text!
\end{frame}
\end{document}
\relax
\providecommand\hyper@newdestlabel[2]{}
\providecommand{\transparent@use}[1]{}
\providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
\HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
\global\let\oldcontentsline\contentsline
\gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
\global\let\oldnewlabel\newlabel
\gdef\newlabel#1#2{\newlabelxx{#1}#2}
\gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
\AtEndDocument{\ifx\hyper@anchor\@undefined
\let\contentsline\oldcontentsline
\let\newlabel\oldnewlabel
\fi}
\fi}
\global\let\hyper@last\relax
\gdef\HyperFirstAtBeginDocument#1{#1}
\providecommand\HyField@AuxAddToFields[1]{}
\providecommand\HyField@AuxAddToCoFields[2]{}
\providecommand\babel@aux[2]{}
\@nameuse{bbl@beforestart}
\babel@aux{english}{}
\@writefile{nav}{\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {1}{1}}}
\@writefile{nav}{\headcommand {\slideentry {0}{0}{2}{2/2}{}{0}}}
\@writefile{nav}{\headcommand {\beamer@framepages {2}{2}}}
\@writefile{nav}{\headcommand {\beamer@partpages {1}{2}}}
\@writefile{nav}{\headcommand {\beamer@subsectionpages {1}{2}}}
\@writefile{nav}{\headcommand {\beamer@sectionpages {1}{2}}}
\@writefile{nav}{\headcommand {\beamer@documentpages {2}}}
\@writefile{nav}{\headcommand {\gdef \inserttotalframenumber {2}}}
\gdef\svg@ink@ver@settings{{\m@ne }{inkscape}{1}}
\gdef \@abspage@last{2}
This diff is collapsed.
This diff is collapsed.
\headcommand {\slideentry {0}{0}{1}{1/1}{}{0}}
\headcommand {\beamer@framepages {1}{1}}
\headcommand {\slideentry {0}{0}{2}{2/2}{}{0}}
\headcommand {\beamer@framepages {2}{2}}
\headcommand {\beamer@partpages {1}{2}}
\headcommand {\beamer@subsectionpages {1}{2}}
\headcommand {\beamer@sectionpages {1}{2}}
\headcommand {\beamer@documentpages {2}}
\headcommand {\gdef \inserttotalframenumber {2}}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment