请你详细准确地表述你的需求和预期效果。
如果你只想把长条状的Logo放在首页的左上角,你可以如下做:
\documentclass{beamer}
\usepackage[UTF8,noindent]{ctexcap}
\usepackage{tikz}
\usepackage{graphicx}
\usetheme{AnnArbor}
\usecolortheme{crane}
\institute[NJUPT]{南京邮电大学}
\author[Robert$\cdot$Charlie]{贺XX}
\title[Beamer模板]{这是文档的大标题}
\date{\today}
\subtitle{这是文档的小标题}
\subject{模板}
% 自定义 logo 的位置
% 在左上角添加校徽
% 设置背景图位置 这里的xshift和yshift可以调节相对位置
\setbeamertemplate{background}{%
\begin{tikzpicture}[overlay, remember picture]
\node[xshift=3em,yshift=-3.3em] at (current page.north west) {\includegraphics[height=.15\paperheight]{NJUPT.png}};
\end{tikzpicture}
}
\begin{document}
\maketitle
\setbeamertemplate{background}{} %还原背景图层
% 不过我觉得更优雅的办法是写入\maketitle里代码会更好一点
\begin{frame}{目录}
\tableofcontents
\end{frame}
\section{这是第一部分}
\begin{frame}{第一节标题}{第一节小标题}
内容...
\end{frame}
\end{document}
效果如下:
补充,你想要实现类似HDUbeamer的效果@u79794 我显然没有手搓一个模板的水平,只能在用户层简单地实现如下的效果:
\documentclass{beamer}
\usepackage[UTF8,noindent]{ctexcap}
\usepackage{tikz}
\usepackage{graphicx}
\usetheme{AnnArbor}
\usecolortheme{crane}
\institute[NJUPT]{南京邮电大学}
\author[Robert$\cdot$Charlie]{贺XX}
\title[Beamer模板]{这是文档的大标题}
\date{\today}
\subtitle{这是文档的小标题}
\subject{模板}
% 设置背景图位置 这里的xshift和yshift可以调节相对位置
\setbeamertemplate{logo}{%
\begin{tikzpicture}[overlay, remember picture]
\node[xshift=15em,yshift=-9em] at (current page.north west) {\includegraphics[height=.1\paperheight]{long-logo.jpg}};
\end{tikzpicture}
}
\begin{document}
\maketitle
\setbeamertemplate{logo}{} %重置logo效果
\setbeamertemplate{background}{
\begin{tikzpicture}[overlay, remember picture]
\node[xshift=-1em,yshift=-1em,opacity=.3] at (current page.east) {\includegraphics[height=.7\paperheight]{NJUPT.png}};
\end{tikzpicture}
}
\begin{frame}{目录}
\tableofcontents
\end{frame}
\section{这是第一部分}
\begin{frame}{第一节标题}{第一节小标题}
内容...
\end{frame}
\end{document}
注意上面的代码需要保证long-long.jpg
和NJUPT.png
的路径,效果如下:
BTW,既然你想实现HDUbeamer的效果,我建议你站在S老师巨人的肩膀上,修改HDUbeamer.cls
会更好,最好不要重复造轮子。
Happy LaTeXing, and welcome to the LaTeX studio!
问 logo插入未得到理想情况