From 3612324435d3af13d2986c0a32c8e113f231c6f8 Mon Sep 17 00:00:00 2001
From: "jakob.stendahl" <jakob.stendahl@infomedia.dk>
Date: Mon, 23 Jan 2023 10:55:50 +0100
Subject: Improve margins on missing sections

---
 UiO_profile.cls | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

(limited to 'UiO_profile.cls')

diff --git a/UiO_profile.cls b/UiO_profile.cls
index dbdeb80..c2042e5 100644
--- a/UiO_profile.cls
+++ b/UiO_profile.cls
@@ -68,10 +68,8 @@
 %\subsectionfont{\color{UioBlue}}
 
 % Titlepage
-\newcommand{\deliverabletitle}[2]{
-    \def\@shortdeltitle{#1}
-    \def\@deltitle{#2}
-    \title{\@shortdeltitle}
+\newcommand{\subtitle}[1]{
+    \def\@subtitle{#1}
 }
 \newcommand{\deliverableversion}[1]{
     \def\@deliverableversion{#1}
@@ -128,27 +126,27 @@
   
       % Tittel  
       \node[anchor=north west] (title) at ([shift={(10mm,-10mm)}]names.south west) {
-        \ifdefined\@shortdeltitle
-          \Huge\@shortdeltitle
+        \ifdefined\thetitle
+          \Huge\thetitle
         \else
         \fi
       };
 
       % Undertittel
-      \node[anchor=north west] (subtitle) at ([shift={(0,-5mm)}]title.south west) {
-        \ifdefined\@deltitle
-          \@deltitle
+      \node[anchor=north west] (subtitle) at ([shift={(0,\ifdefined\thetitle -5mm\else 0\fi)}]title.south west) {
+        \ifdefined\@subtitle
+          \@subtitle
         \else
         \fi
       };
     
       % Forfatter  
-      \node[anchor=north west] (author) at ([shift={(0,-5mm)}]subtitle.south west) {
+      \node[anchor=north west] (author) at ([shift={(0,-5mm)}]\ifdefined\@subtitle subtitle\else title\fi.south west) {
         \theauthor
       };
     
       % Studieprogram
-      \node[anchor=north west] (program) at ([shift={(0,-5mm)}]author.south west) {
+      \node[anchor=north west] (program) at ([shift={(0,-5mm)}]\ifdefined\theauthor author\else subtitle\fi.south west) {
         \ifdefined\@programname
           \@programname
         \else
@@ -164,7 +162,7 @@
       };
     
       % Institutt
-      \node[anchor=north west] (institute) at ([shift={(0,-5mm)}]points.south west) {
+      \node[anchor=north west] (institute) at ([shift={(0,-5mm)}]\ifdefined\@studypoints points\else program\fi.south west) {
         \ifdefined\@institute
          \@institute
         \else
@@ -185,4 +183,4 @@
   \end{titlepage}
 }
 
-%\renewcommand*{\maketitle}{\uiotitlepage}
\ No newline at end of file
+%\renewcommand*{\maketitle}{\uiotitlepage}
-- 
cgit v1.2.3

