自定义标题导致未定义的控制序列

自定义标题导致未定义的控制序列

模板:http://www.nathanieljohnston.com/2009/08/latex-poster-template/

我正在尝试通过复制 .sty 文件中使用的格式在标题中添加“顾问”元素。

请注意,我在标题中添加了另一列,其中包含“logo”元素。这个可以正常工作,而当我从 main.tex 和 .sty 中获取它时,我得到了相同的错误。


当我将 advisor 元素添加到我的 main.tex 文件时,出现错误:

Undefined control sequence. l.88 \advisor {Faculty Advisor} % Advisor

当我从 main.tex 中删除 \advisor 标签,但将元素保留在我的 sty 文件中时:

Undefined control sequence. \beamer@@tmpl@headline ...}\large {\insertadvisor }} \usebeamercolor {instit... l.94

beamerthemeconfposter.sty 切片:

\setbeamertemplate{headline}{
 \leavevmode
  \begin{columns}
   \begin{column}{12em}
    \usebeamercolor{logo in headline}{\color{fg}\large{\insertlogo}}
   \end{column}
   \begin{column}{\linewidth}
    \vskip1cm
    \centering
    \usebeamercolor{title in headline}{\color{jblue\Huge{\textbf{\inserttitle}}\\[0.5ex]}
    \usebeamercolor{author in headline}{\color{fg}\Large{\insertauthor}\\[1ex]}
    \usebeamercolor{advisor in headline}{\color{fg}\large{\insertadvisor}}
    \usebeamercolor{institute in headline}{\color{fg}\large{\insertinstitute}\\[1ex]}
    \vskip0.5cm
   \end{column}
   \vspace{1cm}
  \end{columns}
 \vspace{0.5in}
 \hspace{0.5in}\begin{beamercolorbox}[wd=47in,colsep=0.15cm]{cboxb}\end{beamercolorbox}
 \vspace{0.1in}
}

主文本:

\logo{\tikzoverlay[text width=15em] at (1cm,2cm) {\includegraphics[width=15em]{logo.png}};}


\title{My title} % Poster title

\author{My Name} % Author(s)

\advisor{Faculty Advisor} % Advisor     <-------- ERROR


\institute{My Institute} % Institution(s)

\begin{document}         %              <------- ERROR

有人能帮我修改标题定义吗?

答案1

\advisor没有默认可用的宏。作为一种解决方法,您可以\insertadvisor自己定义。

请注意,字体命令(例如\Huge或)\large是开关,不接受参数。

\documentclass[final]{beamer}
\usepackage[scale=1.24]{beamerposter}
\usetheme{confposter}
\usepackage{exscale}

\title{This Was Made in \LaTeX}
\author{Your Name}
\institute{Department and University Name}
\newcommand{\insertadvisor}{Faculty Advisor}

\setbeamertemplate{headline}{
 \leavevmode
  \begin{columns}
   \begin{column}{12em}
    \usebeamercolor{logo in headline}{\color{fg}\large{\insertlogo}}
   \end{column}
   \begin{column}{\linewidth}
    \vskip1cm
    \centering
    \usebeamercolor{title in headline}{\color{jblue}\Huge \textbf{\inserttitle}\\[0.5ex]}
    \usebeamercolor{author in headline}{\color{fg}\Large \insertauthor\\[1ex]}
    \usebeamercolor{author in headline}{\color{fg}\large \insertadvisor}
    \usebeamercolor{institute in headline}{\color{fg}\large \insertinstitute\\[1ex]}
    \vskip0.5cm
   \end{column}
   \vspace{1cm}
  \end{columns}
 \vspace{0.5in}
 \hspace{0.5in}\begin{beamercolorbox}[wd=47in,colsep=0.15cm]{cboxb}\end{beamercolorbox}
 \vspace{0.1in}
}

\begin{document}
\begin{frame}[t]

\end{frame}
\end{document}

相关内容