matze / mtheme

A modern LaTeX Beamer theme
6.44k stars 845 forks source link

How can we chang Title slid #290

Closed shivakumarpatil closed 7 years ago

shivakumarpatil commented 7 years ago

Is it possible to get title page with center justification. Title of the Talk , Authors, Institutes, Institute logo and Date all should be justified at the center.

SFr682k commented 7 years ago

A solution is the following workaround using beamer's default title page: (Note that this also changes the order of the displayed information)

\documentclass{beamer}

\usetheme{metropolis}

% ADD THESE LINES AFTER LOADING THE metropolis THEME
\setbeamertemplate{title page}[default]
\setbeamercolor{titlelike}{parent=frametitle}   % adds a dark background to the title box, may be deleted
% --------

\title{Presentation title}
\subtitle{Presentation subtitle}
\author{Author}
\institute{Institute}
\begin{document}
    \frame{\maketitle}
\end{document}

This results in titlepage-centered

If you want to remove the background of the frame title and add a title line, remove the \setbeamercolor{titlelike}{parent=frametitle} (indicated with a comment) and replace the \frame{\maketitle} with the following code:

\frame{%
    \maketitle
    \begin{tikzpicture}[remember picture, overlay]
        \def\xmargin{1cm}     % Left and right margin of the title line
        \def\yshift{1.25cm}   % Moves the title line upwards (-1.25cm moves title line downwards)

        \draw[mLightBrown,line width=0.5pt] (current page.west) ++(\xmargin,\yshift) -- ++({\paperwidth-2*\xmargin},0);
    \end{tikzpicture}
}

It is not required to load tikz in this example since metopolis loads it automatically

You may adjust \xmargin and \ymargin to justify the title line
Also, it could be necessary to compile the presentation twice since the separation line uses tikz's remember picture option

If everything went right your title frame looks like this: titlepage-centered-withline

shivakumarpatil commented 7 years ago

Thank you very much

On Sat, Sep 9, 2017 at 8:24 PM, Sebastian Friedl notifications@github.com wrote:

A solution is the following workaround using beamer's default title page: (Note that this also changes the order of the displayed information)

\documentclass{beamer}

\usetheme{metropolis}

% ADD THESE LINES AFTER LOADING THE metropolis THEME \setbeamertemplate{title page}[default] \setbeamercolor{titlelike}{parent=frametitle} % adds a dark background to the title box, may be deleted % --------

\title{Presentation title} \subtitle{Presentation subtitle} \author{Author} \institute{Institute} \begin{document} \frame{\maketitle} \end{document}

This results in [image: titlepage-centered] https://user-images.githubusercontent.com/23553692/30241034-1564ae28-957c-11e7-9fc5-c00e2cbe9a1f.jpg

If you want to remove the background of the frame title and add a title line, remove the \setbeamercolor{titlelike}{parent=frametitle} (indicated with a comment) and replace the \frame{\maketitle} with the following code:

\frame{% \maketitle \begin{tikzpicture}[remember picture, overlay] \def\xmargin{1cm} % Left and right margin of the title line \def\yshift{1.25cm} % Moves the title line upwards (-1.25cm moves title line downwards)

    \draw[mLightBrown,line width=0.5pt] (current page.west) ++(\xmargin,\yshift) -- ++({\paperwidth-2*\xmargin},0);
\end{tikzpicture}

}

It is not required to load tikz in this example since metopolis loads it automatically

You may adjust \xmargin and \ymargin to justify the title line Also, it could be necessary to compile the presentation twice since the separation line uses tikz's remember picture option

If everything went right your title frame looks like this: [image: titlepage-centered-withline] https://user-images.githubusercontent.com/23553692/30241161-2194497c-957e-11e7-9648-55f6ffbe5d82.jpg

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/matze/mtheme/issues/290#issuecomment-328282103, or mute the thread https://github.com/notifications/unsubscribe-auth/AHmHT6OIEjl4aciQKaalQNQBOLjh9V_Zks5sgqafgaJpZM4PRo21 .

-- Shivakumar G.Patil

Ph.D Research ScholarDepartment of Civil EngineeringIIT Madras,ChennaiPin-600036

matze commented 7 years ago

Thanks @SFr682k for helping out.