3

There are several questions involved:


How do I create the title page? At the moment, I am stuck with the folloing:

    % Title page
    \defbeamertemplate*{title page}{myClass}
    {
        \thispagestyle{empty}
    \vspace{-0.5cm}

    \begin{figure}
        \begin{minipage}[t!]{0.5\linewidth}
        \includegraphics[width=0.8\linewidth]{Image1} 
        \end{minipage} \hfill
        \begin{minipage}[t!]{0.3\linewidth}
        \hfill
        \includegraphics[width=0.8\linewidth]{Image2} 
        \end{minipage}
    \end{figure}

    \vspace{3 mm}

    { % Title
        \usebeamerfont{title}
        \usebeamercolor[fg]{title}
        \inserttitle \\
    }

    { % Subtitle
        \ifx
        \insertsubtitle \@empty
        \else
        \vskip 0.4em
        \usebeamerfont{subtitle}
        \usebeamercolor[fg]{title}
        \insertsubtitle \par
        \fi \par \vfill
    }

    { % Author
        \usebeamerfont{author}
        \usebeamercolor{normal text}
        \insertauthor \\

    }

    { % Date
        \usebeamerfont{author}
        \usebeamercolor{normal text}
        \insertdate \\

    }
}

Problem: Depending on what the user enters, the whole layout is broken easily. How can I assign fixed boxes wherein the text adapts automatically.


The frame title This is the code at present:

% Frame title
\defbeamertemplate*{frametitle}{myClass}
{
    \begin{beamercolorbox}[leftskip=15pt,rightskip=15pt,wd=\paperwidth]{}
    \usebeamerfont*{frametitle}
    \usebeamercolor[fg]{frametitle}
    \raisebox{0.3em}{\insertframetitle}
    \hfill
    \includegraphics[width=0.2\linewidth, height=\paperheight, keepaspectratio]{Image2}
    \end{beamercolorbox}
}

Problem: The frame title text should adapt automatically within a confined area without compromising the logo position.

5
  • 1
    Whether you write your own class or just a beamer theme is probably just a matter of taste. I would probably just write a theme. It feels like the more "beamer way" of doing things. Apart from that I don't really understand your problem. You want the title, sub title, and so on to have a fixed height?
    – Benjamin
    Commented Dec 16, 2015 at 11:40
  • The answer to the first question does help. Thank you. And, yes, I would like the title, etc., be located inside a "box" of fixed measures. Which kind of box is suitable and how can I control the geometry inside the box (especially if I mix text and picture inside)?
    – user94223
    Commented Dec 16, 2015 at 11:58
  • 1
    That depends on the specific problem. But as you are using beamer it is probably a good choice to use the beamercolorbox (like you are already doing for the frametitle). Carefully read the chapter in the beamer manual (12.5). There is for example an height option to set a fixed height of the box. Although I don't think it is a good idea to make the elements on the title page of fixed height and therefore limit for example the length of the title and subtitle to one line. Your design should adapt in that case.
    – Benjamin
    Commented Dec 16, 2015 at 12:11
  • I totally agree that the inserted text should adapt within a specific area. How do I define that? I tried consulting the manual. I cannot find the solution to specific problems: If a user enters a frame title text too long, the logo is "newlined". It is supposed to stay fixed. How can I manage that? Sorry, is that too stupid?
    – user94223
    Commented Dec 16, 2015 at 13:56
  • You want to shrink the text if it is too big? That should be possible, but I don't know how to do that by heart and it would be probably worth a new question. My thought was that the layout should adapt properly for multiline titles. A nice trick to keep following elements to move on a page independently of the actual height of the previous elements is to but them into a box with zero height and then add a fixed vertical space. \vbox to 0pt {My Element with unknown height}\vspace{2em}. Maybe that is helpful in your case.
    – Benjamin
    Commented Dec 16, 2015 at 14:07

1 Answer 1

1

A solution for the absolute positioning: I use tikzpicture as shown below.

\defbeamertemplate*{frametitle}{myClass}
{
    \begin{beamercolorbox}[sep=0.3cm, wd=\paperwidth]{}
    \usebeamerfont*{frametitle}
    \usebeamercolor[fg]{frametitle}
    \raisebox{1.5em}{\insertframetitle}
    \hfill
    \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=north west, xshift=-2.75cm, yshift=-0.35cm] at (current page.north east)
    {
        \includegraphics[width=0.2\linewidth, height=\paperheight, keepaspectratio]{Image2}
    };
    \end{tikzpicture}
    \end{beamercolorbox}
}

You must log in to answer this question.

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