0

I'm still quite new to LaTeX and can't figure this one out. For my report, I am using the template given by my university available for download here http://www.tudelft.nl/fileadmin/Files/tudelft/themasites/Huisstijl/report_style.zip. The problem is that I cannot figure out how to fix the uneven linespacing in my title, as well as the horziontal justification, which I would like to have \flushleft to prevent uneven space size between the words https://gyazo.com/95f6838cade892bf230774a835492384.

I have found that the \largetitlestyle used for the title is defined in tudelft-report.cls, line 119 and the title is set up in line 485. However, adding either \flushleft or \raggedright does not change anything. I would be very grateful for any kind of tips as to how to continue! I have pasted some parts below, as the complete code is quite lengthy.

EDIT: Following the advice of @Johannes_B, I have now tried adding \par to the line {\largetitlestyle\color{\@titlecolor}\fontsize{42}{55}\selectfont\@title \par}. However, LaTeX returns an error stating that there is no line to end. I could not find out how the syntax for paragraphs works in this environment. Any thoughts?

\def\largetitlefont{\fontfamily{Roboto-LF}}
\def\largetitleseries{\fontseries{t}}
\def\largetitleshape{\fontshape{n}}
\def\largetitlestyle{\largetitlefont\largetitleseries\largetitleshape}
\def\titleshape{\fontshape{n}}

      %% Calculate the top left and bottom right coordinates of the front and
      %% back boxes.
      \ifKV@cover@frontbottom
          \coordinate (front top left) at (tcorner);
          \coordinate (back top left) at ($(tcorner)+(-     \@cover@splitboxwidth,\@cover@splitboxheight)$);
      \else  
          \coordinate (front top left) at ($(tcorner)+(0pt,\@cover@frontboxheight)$);
          \coordinate (back top left) at ($(tcorner)+(-\@cover@splitboxwidth,0pt)$);
      \fi
      \coordinate (front bottom right) at ($(front top left)+(\@cover@frontboxwidth,-\@cover@frontboxheight)$);
      \coordinate (back bottom right) at ($(back top left)+(\@cover@splitboxwidth,-\@cover@splitboxheight)$);
      %% Draw the front box in black.
      %% \fill[fill=tudelft-black](front top left) rectangle (front bottom right);
      %% Calculate the width and height of the front text box.
      \setlength\@cover@fronttextwidth{\@cover@frontboxwidth}
      \addtolength\@cover@fronttextwidth{+4\@cover@margin}
      \setlength\@cover@fronttextheight{\@cover@frontboxheight}
      \addtolength\@cover@fronttextheight{+8\@cover@margin}
      %% Create the front text box.
      \node at (front top left)[anchor=north west,inner sep=\@cover@margin]{
          \begin{minipage}[t][\@cover@fronttextheight]{\@cover@fronttextwidth}
              %% Print the title and optional subtitle at the top in white.
            {\largetitlestyle\color{\@titlecolor}\fontsize{42}{55}\selectfont\@title}
            %%{\tudsffamily\color{\@titlecolor}\fontsize{42}{55}\selectfont\@title}
3
  • 2
    Welcome! We need something we can compile in order to help. A complete but minimal document which we can use to reproduce the problem.
    – cfr
    Commented Aug 7, 2016 at 0:42
  • Welcome, this is a bug in the class provided by the university. File a bug report, it is their job to provide decent files.
    – Johannes_B
    Commented Aug 7, 2016 at 6:57
  • Is tehre any news here?
    – Johannes_B
    Commented Aug 12, 2016 at 7:28

1 Answer 1

1

It is not your job to fix the files the university provides. But maybe they want an output like this?

tudelftShitTitle

You need to add proper paragraph breaks to update the line spacer. See Title page line spacing

tudelftTitleBitBetter

Add a comment that the class file is changed and not the oriiginal (a name change would be even better) and change line 440 to read

{\titlefont\color{\@titlecolor}\fontsize{58}{58}\selectfont\raggedright\@title\par}

Add \par for subtitle and author as well. More occurences may come up.

6
  • Hey, thanks for the reply. I edited my original post with what I tried to do, but to no avail :( Could you explain where to add the \par?
    – C.H.
    Commented Aug 29, 2016 at 20:10
  • @user111515 Long time ago, can you tell me what the name of the zip file is, or what it extracts to?
    – Johannes_B
    Commented Aug 29, 2016 at 20:49
  • Hey! The zip file can be found here:tudelft.nl/fileadmin/Files/tudelft/themasites/Huisstijl/…. It contains the main .tex file 'report.tex'. I believe the title formatting is done in 'tudelft-report.cls'. On line 485 of that file, the title is printed. I have tried adding \par on that line, but it states that there is no line to end. Adding \par in 'report.tex' title{} environment gives a runway argument error. Any thoughts?
    – C.H.
    Commented Aug 30, 2016 at 10:47
  • @C.H. I had more than one template from your university, because i ansered another question of that university the very same day. See the edit. It is really sad to know that the maintainers of the class cannot fix an issue as simple as that within three weeks.
    – Johannes_B
    Commented Aug 30, 2016 at 19:20
  • Thanks for the answer! However, adding the \par in the line you specified brings up an error: ./report.tex:40: LaTeX Error: There's no line here to end. See the LaTeX manual or LaTeX Companion for explanation. Type H <return> for immediate help. ...
    – C.H.
    Commented Aug 30, 2016 at 20:31

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .