0

I have a string called \subtitle, and that string comes up at multiple locations. This string contains a linebreak, so that it shows up better at the front page. I define this string in main.tex

\subtitle{Teaching Robots Dynamic Interaction Tasks\\
by Performing Demonstrations}

Now I also have a title page, in which this string also shows up. But the vertical spacing between the lines is a bit messed up. If I print the string with

{\makeatletter
\ifdefvoid{\@subtitle}{}{\titlestyle\fontsize{30}{80}\selectfont\@subtitle}
\makeatother}

with an extravagant spacing between lines, it shows up like this: titlepage

Since the string does not fit at one line, it automatically breaks the string between the words 'Dynamic' and 'Interaction', which is totally fine, and it puts the vertical space of 80 between those lines. The desired result is that this vertical space also shows up between the second and third lines also at 80. How do I do this? I don't want to alter the string \subtitle, since I also use this string at the frontpage.

3
  • Try \fontsize{30}{36} (the second argument is the line spacing) Commented Mar 2, 2022 at 12:47
  • Yes I know, but this only changes the spacing between the first and second line. I want to know how to change the spacing between the second and third line.
    – suitendaal
    Commented Mar 2, 2022 at 13:07
  • Ah, I see. Sorry, I misunderstood. Please, show a minimal example. What you show is not the standard behaviour, so it's hard to find out what's happening Commented Mar 2, 2022 at 13:21

1 Answer 1

1

Insert the string \subtile into a parbox to make the title page.

a

\documentclass[12pt,a4paper]{article}

\title{Main Title}

\newcommand{\subtitle}{Teaching Robots Dynamic Interaction Tasks\\
    by Performing Demonstrations}

\begin{document}    
    
    \parbox{\textwidth}{\centering \fontsize{30}{80}\selectfont \subtitle}
    
\end{document}

You must log in to answer this question.

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