![](https://pics.latexstudio.net/data/images/201912/0f235c8000b17de.jpg) 如图所示,我希望把学校logo放在右上角方框内,但是一旦放在那里就会被标题栏的灰色背景遮挡住。所以我想能不能像PowerPoint一样把logo的图层调到最上层。 我使用了这两个主题,具体关于logo位置的代码我也看不到,自己也不会调整,所以才来这里求助。 ```tex \usetheme{Madrid} \usecolortheme{beaver} ``` 下面是全部代码: ```tex \documentclass[aspectratio=169]{beamer} \usepackage[utf8]{inputenc} \usetheme{Madrid} \usecolortheme{beaver} %------------------------------------------------------------ %This block of code defines the information to appear in the %Title page \setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number] \title[About Beamer] %optional {About the Beamer class in presentation making} \subtitle{A short story} \author[Arthur, Doe] % (optional) {A.~B.~Arthur\inst{1} \and J.~Doe\inst{2}} \institute[VFU] % (optional) { \inst{1}% Faculty of Physics\\ Very Famous University \and \inst{2}% Faculty of Chemistry\\ Very Famous University } \date[VLC 2014] % (optional) {Very Large Conference, April 2014} \logo{\includegraphics[height=1cm]{JNU_logo.eps}} %\logo{\vspace{7.5cm}\flushright\includegraphics[width=2cm]{JNU_Logo_Character.eps}} %End of title page configuration block %------------------------------------------------------------ %------------------------------------------------------------ %The next block of commands puts the table of contents at the %beginning of each section and highlights the current section: \AtBeginSection[] { \begin{frame} \frametitle{Table of Contents} \tableofcontents[currentsection] \end{frame} } %------------------------------------------------------------ \begin{document} %The next statement creates the title page. \frame{\titlepage} %--------------------------------------------------------- %This block of code is for the table of contents after %the title page \begin{frame} \frametitle{Table of Contents} \tableofcontents \end{frame} %--------------------------------------------------------- \section{First section} %--------------------------------------------------------- %Changing visivility of the text \begin{frame} \frametitle{Sample frame title} This is a text in second frame. For the sake of showing an example. \begin{itemize} \item<1-> Text visible on slide 1 \item<2-> Text visible on slide 2 \item<3> Text visible on slides 3 \item<4-> Text visible on slide 4 \end{itemize} \end{frame} %--------------------------------------------------------- %--------------------------------------------------------- %Example of the \pause command \begin{frame} In this slide \pause the text will be partially visible \pause And finally everything will be there \end{frame} %--------------------------------------------------------- \section{Second section} %--------------------------------------------------------- %Highlighting text \begin{frame} \frametitle{Sample frame title} In this slide, some important text will be \alert{highlighted} because it's important. Please, don't abuse it. \begin{block}{Remark} Sample text \end{block} \begin{alertblock}{Important theorem} Sample text in red box \end{alertblock} \begin{examples} Sample text in green box. The title of the block is ``Examples". \end{examples} \end{frame} %--------------------------------------------------------- %--------------------------------------------------------- %Two columns \begin{frame} \frametitle{Two-column slide} \begin{columns} \column{0.5\textwidth} This is a text in first column. $$E=mc^2$$ \begin{itemize} \item First item \item Second item \end{itemize} \column{0.5\textwidth} This text will be in the second column and on a second tought this is a nice looking layout in some cases. This text will be in the second column and on a second tought this is a nice looking layout in some cases.This text will be in the second column and on a second tought this is a nice looking layout in some cases.This text will be in the second column and on a second tought tTThis text will be in the second column and on a second tought this is a nice looking layout in some cases.his text will be in the second column and on a second tought this is a nice looking layout in some cases.his is a nice looking layout in some cases. \end{columns} \end{frame} %--------------------------------------------------------- \end{document} ```

2 回答2

0
用`texdoc beamer`命令查看Beamer的说明书,搜索setbeamertemplate的frametitle小节,有详细说明。 下面是一个例子,请参考。 ```tex \documentclass[aspectratio=169]{beamer} \usepackage[utf8]{inputenc} \usepackage{mwe}% 实际工作中不需要 \usetheme{Madrid} \usecolortheme{beaver} % 设置页眉 \makeatletter \setbeamertemplate{frametitle}{ \begin{beamercolorbox}[sep=0.12cm,wd=\paperwidth]{frametitle}% \usebeamerfont{frametitle}% \if@tempswa\else\csname beamer@ftecenter\endcsname\fi% \strut\hspace*{0.5em}\insertframetitle {% \ifx\insertframesubtitle\@empty% \else% {\ |\ \usebeamerfont{framesubtitle}\usebeamercolor[fg]{frametitle}\insertframesubtitle\strut}% \fi% }% \hfill \begin{beamercolorbox}[wd=0.21\paperwidth]{frametitle}% \vspace*{-0.1cm}% \includegraphics[width=0.05\paperwidth, keepaspectratio]{example-image}% 换成你的logo \end{beamercolorbox}% \end{beamercolorbox}% } \makeatother %------------------------------------------------------------ %This block of code defines the information to appear in the %Title page \setbeamertemplate{navigation symbols}{} \setbeamertemplate{footline}[frame number] \title[About Beamer] %optional {About the Beamer class in presentation making} \subtitle{A short story} \author[Arthur, Doe] % (optional) {A.~B.~Arthur\inst{1} \and J.~Doe\inst{2}} \institute[VFU] % (optional) { \inst{1} Faculty of Physics\\ Very Famous University \and \inst{2}% Faculty of Chemistry\\ Very Famous University } \date[VLC 2014] % (optional) {Very Large Conference, April 2014} %\logo{\includegraphics[height=1cm]{JNU_logo.eps}} %\logo{\vspace{7.5cm}\flushright\includegraphics[width=2cm]{JNU_Logo_Character.eps}} %End of title page configuration block %------------------------------------------------------------ %------------------------------------------------------------ %The next block of commands puts the table of contents at the %beginning of each section and highlights the current section: \AtBeginSection[] { \begin{frame} \frametitle{Table of Contents} \tableofcontents[currentsection] \end{frame} } %------------------------------------------------------------ \begin{document} %The next statement creates the title page. \frame{\titlepage} %--------------------------------------------------------- %This block of code is for the table of contents after %the title page \begin{frame} \frametitle{Table of Contents} \tableofcontents \end{frame} %--------------------------------------------------------- \section{First section} %--------------------------------------------------------- %Changing visivility of the text \begin{frame} \frametitle{Sample frame title} \framesubtitle{subtitle} This is a text in second frame. For the sake of showing an example. \begin{itemize} \item<1-> Text visible on slide 1 \item<2-> Text visible on slide 2 \item<3> Text visible on slides 3 \item<4-> Text visible on slide 4 \end{itemize} \end{frame} \end{document} ``` 使用中,需要根据实际对参数进行适当调整。

回答: 2019-12-10 09:55

顺便说一下,你的MWE不叫MWE,一是太长,二是没有图,运行不了。 请认真阅读置顶贴中什么叫MWE。
  • 非常感谢! – zhaoxiaojun 2019-12-10 10:25 回复
  • 非常感谢! – zhaoxiaojun 2019-12-10 10:25 回复
  • 非常感谢! – zhaoxiaojun 2019-12-10 10:25 回复
0
<p>你应该把mwe贴上来,才方便直接调试</p>
  • 回复 undefined :谢谢,我已经添加上了。 – zhaoxiaojun 2019-12-10 09:26 回复
  • 回复 undefined :你把用了主题的代码放上来,再去看mwe宏包,texdoc mwe,提供一份完整的、可直接编译的代码 – sikouhjw 2019-12-10 09:16 回复
  • 回复 undefined :是这样的,我在用beamer做一个报告,使用了“Madrid”主题,想调整一下学校Logo的位置,但是我自己也找不到具体的设置代码。 – zhaoxiaojun 2019-12-10 09:11 回复
  • 回复 undefined :最小工作示例,见https://wenda.latexstudio.net/note/view/1.html – sikouhjw 2019-12-10 09:08 回复
  • 不好意思,我刚开始学,不懂mwe是什么,您能告诉我吗? – zhaoxiaojun 2019-12-10 09:07 回复

你的回答

请登录后回答

你的回答将会帮助更多人,请务必认真回答问题。