如何在 LaTeX 中水平居中标题?

How to horizontally center title in LaTeX?

我无法让它工作。我有这个:

%--------------------------------------------------------------------------------------
%   TITLE SECTION 
%--------------------------------------------------------------------------------------
\setbeamertemplate{title}[center]
\setbeamertemplate{frametitle}[default][center]

\title{My title is here....!} % Poster title

自动左对齐!虽然我希望它在中间对齐。

我做错了什么?

这是我正在使用的模板:https://www.overleaf.com/15692924fftndxdzdqbs#/59666612/

以下对我来说很好。

\documentclass[]{article}
\begin{document}
\begin{center}
 {\huge My Title}
\end{center}
\end{document}

我通过用户 samcarter 得到了答案,你可以在这里找到:

https://tex.stackexchange.com/questions/428173/how-to-horizontally-align-title

% !TeX TS-program = xelatex
\documentclass[final]{beamer}

\usepackage[scale=1.150]{beamerposter} 
\usetheme{MUWposter} 

\title{Titel des Posters, Schriftgröße variabel} % Poster title
\author{AutorInnen, Schriftgröße variabel} % Author(s)
\institute{Klinik, Medizinische Universität Wien, Schriftgröße variabel} % Institution(s)


\setbeamertemplate{headline}{
 \leavevmode
  \begin{columns}
   \begin{column}{0.04\linewidth}
   \end{column}
   \begin{column}{0.9\linewidth}
    \vskip12cm
%    \raggedright
        \centering
    \usebeamercolor{title in headline}{\color{blueMUW}\Huge{\textbf{\inserttitle}}\[1.5ex] \par}
    \usebeamercolor{author in headline}{\color{blueMUW}\LARGE{\insertauthor}\[1ex]}
    \usebeamercolor{institute in headline}{\color{blueMUW}\normalsize{\insertinstitute}}
    \vskip1cm
   \end{column}
   \begin{column}{0.05\linewidth}
   \end{column}
   %\vspace{1cm}
  \end{columns}
 %\vspace{0.5in}
 %\hspace{0.5in}\begin{beamercolorbox}[wd=35in,colsep=0.15cm]{cboxb}\end{beamercolorbox}
 %\vspace{0.1in}
 \vspace*{-0.1cm}
}

\begin{document}

\begin{frame}[t] % The whole poster is enclosed in one beamer frame
test
\end{frame} % End of the enclosing frame

\end{document}