怎么把excel的表格插入beamer 模板

latex彩色表格
彩色表格需要使用colortbl宏包提供的一些命令:\columncolor、\rowcolor、\cellcolor等。
\columncolor[hcolor model i]{hcolouri} [hleft overhangi][hright
overhangi]
The last two arguments control how far the panel overlaps past
the widest entry in the column. If the right overhang argument is
omitted then it defaults to left overhang. If they are both omitted
they default to \tabcolsep (in tabular) or \arraycolsep (in
\rowcolor takes the same argument forms as \columncolor.
\cellcolor can be placed anywhere in the tabular cell to which
it applies.
\arrayrulecolor{颜色}&指定线条的颜色&
\doublerulesepcolor{颜色}&指定双线内间隔的颜色
交替背景色的设置:
需要用到一个技巧性的命令,就是xcolor宏包提供的命令\rowcolors,注意需要宏包的table选项支持,即:
\usepackage[table]{xcolor}
如上命令可以使表格带上背景色,它的语法是:
\rowcolors []{}{}{}
各个参数的解释还是看 xcolor 的文档:
这里的row参数是起始行数,odd-row
color&表示奇数行颜色,even-row
color表示偶数行颜色如:\rowcolors{1}{blue!20}{blue!10}&表示从第一行开始,奇数行为蓝色20%,偶数行为蓝色10%。
commands参数通常是不填写的,有时可以填写为\hline,即两行之间插入的命令。
需要注意的是:
在 beamer 里使用这个命令需要在 documentclass 的选项中增加 table
\documentclass[.., table, ..]{beamer}
以上网友发言只代表其个人观点,不代表新浪网的观点或立场。查看: 40933|回复: 31
beamer 的常见设置汇总
本帖最后由 xkliuctex 于
10:40 编辑
在使用beamer 制作讲义时,发现了很多有意思的设置,经过论坛搜索,在这里进行汇总设置,请大家补充,好让后来者收益。我正在制作示例文件,做好后发上来。
1. 默认定理环境是不显示编号的,通过导言区使用开始使用定理编号\setbeamertemplate{theorems}[numbered]复制代码2.图和表格的标题显示标号\setbeamertemplate{caption}[numbered]&&复制代码3. 取消导航条\setbeamertemplate{navigation symbols}{} 复制代码4. 使用 metapost 动画\usepackage{xmpmulti}
\DeclareGraphicsRule{*}{mps}{*}{}&&复制代码5. 通过使用如下命令使得一段不编译 \iffalse
& &....
& & \fi复制代码6.&&改变列表标号计数器&&\begin{enumerate}
& &\addtocounter{enumi}{3} 改变列表标号计数器
& &&&......
&&\end{enumerate}复制代码7. 项目列表&&\begin{enumerate}
& &\item&&直接显示,带编号
& &\item&4-&&&显示为第四张,带编号
& &\item&4-&[]&&显示为第四张,不带编号
& &\item&4-&[在这里输入你的符号]&&显示为第四张,带编号“在这里输入你的符号”&&%可以在[]内随意定义符号
& &\item&4-&[在这里输入你的符号]&&显示为第四张,带编号“在这里输入你的符号”
& &\item&-4&[在这里输入你的符号]&&显示为第四张,带编号“在这里输入你的符号”,然后该条目隐藏
& &&&......
&&\end{enumerate}复制代码8. 以下代码用以整体缩小表格\usepackage{graphicx} %Put this in the preamble.
.....
\newsavebox{\tablebox}
\begin{lrbox}{\tablebox}
\begin{tabular}{||l||l||l||l||}
& &\hline\hline{\textbf{Geographic Location}} &
{\textbf{Site}} &
{\textbf{IP Address}} &
{\textbf{Top Level Directory}} \\
&&\hline\hline
United States & \tt ftp.shsu.edu & 192.92.115.10 & \it /tex-archive\\
&&\hline\hline
England & \tt ftp.tex.ac.uk & 131.151.79.32 & \it /tex-archive\\
&&\hline\hline
Germany & \tt ftp.uni-stuttgart.de & 129.69.8.13 & \it /tex-archive\\
& &\hline\hline
\end{tabular}
\end{lrbox}复制代码然后\scalebox{0.5}{\usebox{\tablebox}}复制代码或者\resizebox{0.8\textwidth}{!}{\usebox{\tablebox}}复制代码9 使用beamer制作幻灯片时,若用pdflatex编译,一定编译两次,才可以使得标签正确显示;pdflatex支持除eps以外的各种格式的图片,插图方式与论文一样。
10. 将图、表标题等使用中文(\renewcommand\contentsname{目\ 录}
\renewcommand\listfigurename{插图目录}
\renewcommand\listtablename{表格目录}
%\renewcommand\abstractname{摘\ 要}&&%err undefined
%\renewcommand\refname{参考文献}& && && &%article类型
\renewcommand\bibname{参\ 考\ 文\ 献}& & %book类型
\renewcommand\indexname{索\ 引}
\renewcommand\figurename{图}
\renewcommand\tablename{表}
\renewcommand\partname{部分}复制代码11 使用如下命令定制定理等,显示“定理”等,编号按照节标题独立编号\newtheorem{mythl}{\hei 引理}[section]
\newtheorem{mytht}{\hei 定理}[section]
\newtheorem{mythr}{\hei 注}[section]
\newtheorem{mythc}{\hei 推论}[section]
\newtheorem{mythd}{\hei 定义}[section]
\newtheorem{mytha}{\hei 公理}
\newtheorem{mythp}{\hei 命题}
\newtheorem{mythe}{\hei 练习}
\newtheorem{myli}{\hei 例}[section]复制代码例如定理,代码为:\begin{mytht}
.......
\end{mytht}复制代码12. 定义颜色\definecolor{beamer@blendedred}{rgb}{0.7,0.2,0.2} % use structure theme to change
\definecolor{beamer@blendedblue}{rgb}{0.2,0.2,0.7} % use structure theme to change复制代码设定 结构 的前景色\setbeamercolor{structure}{fg=beamer@blendedred}复制代码13.使用继承方式来批量改变block标题颜色和block主干颜色,利用“&颜色&!&数字&!&颜色&”来进行混合\setbeamercolor{block title}{use=structure,fg=structure.fg,bg=structure.fg!20!bg}
\setbeamercolor{block title alerted}{use=alerted text,fg=alerted text.fg,bg=alerted text.fg!20!bg}
\setbeamercolor{block title example}{use=example text,fg=example text.fg,bg=example text.fg!20!bg}
\setbeamercolor{block body}{parent=normal text,use=block title,bg=block title.bg!50!bg}
\setbeamercolor{block body alerted}{parent=normal text,use=block title alerted,bg=block title alerted.bg!50!bg}
\setbeamercolor{block body example}{parent=normal text,use=block title example,bg=block title example.bg!50!bg}
\setbeamercolor{titlelike}{parent=structure,bg=white!90!red}复制代码14.设置使用衬线字体做正文(默认全是无衬线,按这个设置,仅标题是无衬线)\usefonttheme[stillsansseriflarge,stillsansserifsmall]{serif}复制代码15.设置半透明化尚未出现的内容(方便提醒自己下面要讲什么)\setbeamercovered{transparent}复制代码16.取消导航条\setbeamertemplate{navigation symbols}{}& &复制代码17.以下命令中通过选择show或者hide控制相应节的显示\tableofcontents[currentsection,currentsubsection,subsectionstyle=show/show/hide]复制代码18. 同一个位置动态显示两个block,用下面方法\begin{frame}
& &&&\only&1&{\begin{itemize}
& &&&\item item1
& &&&\item item2
& &&&\end{itemize}}
& &&&\only&2&{\begin{itemize}
& &&&\item item3
& &&&\item item4
& &&&\end{itemize}}
\end{frame}复制代码19. 利用\onslide&2-& 可以将某个段落实现在按顺序出现,& &的用法参见 \item& &,呵呵
20.加入动画的命令,不过还没试验,等我试了再说\begin{frame}{平板压实的应用\ding{223} 亨特机}
\vskip-.2cm
\includemovie[poster,text=(Hunter Machinery),mouse,repeat]{11cm}{7.4cm}{./image/pro.swf}
\end{frame}复制代码
<p id="rate_01" onmouseover="showTip(this)" tip="&威望 + 5
" class="mtn mbn">
占个位以后补充用
This surely will benefit many people. Well done!
Just a suggestion, the latex source code might look better when enclosed within the &[ code ]& and &[ /code ]& (remove the extra white spaces). E.g.,&&
\resizebox{0.8\textwidth}{!}{\usebox{\tablebox}}
复制代码
原帖由 helene 于
06:56 发表
This surely will benefit many people. Well done!
Just a suggestion, the latex source code might look better when enclosed within the &[ code ]& and &[ /code ]& (remove the extra white spaces). ...
呵呵,我改了一下,继续添加中
第二次安装还是trial
特着急 请赐教!:'(
学习了:lol :victory:
楼主怎么还不来~
太好了,受用
Beamer做的东西好看,但是花时间!
好在学校今年的多媒体教室全部安装了Adobe Reader,不用我再去自己安装了:)
原帖由 秀才 于
21:43 发表
Beamer做的东西好看,但是花时间!
好在学校今年的多媒体教室全部安装了Adobe Reader,不用我再去自己安装了:)
实际上花点功夫是必要的,呵呵
Powered by

我要回帖

更多关于 beamer 的文章

 

随机推荐