我正在尝试使用包将 Beamer 演示文稿(包含环境的使用beamerboxesrounded
,并且运行良好)转换为文章beamerarticle
,但我收到了消息
环境 beamerboxesrounded undefined
这是不起作用的代码:
%\documentclass[Palatino, hyperref={pdfpagelabels=false}]{beamer}
\documentclass[12pt]{article}
\usepackage[noxcolor]{beamerarticle}
\usepackage[utf8]{inputenc} % usually not needed (loaded by default)
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{lipsum,wrapfig,xcolor}
\setbeamercovered{dynamic}
\useoutertheme{infolines}
\usetheme{Singapore} % NO
\xdefinecolor{oiB}{rgb}{0.22,0.52,0.72}
\setbeamercolor{disc ques body}{fg=oiB}
\newcommand{\dq}[1]{
\begin{beamerboxesrounded}[shadow = false, lower = disc ques body]{}
#1
\end{beamerboxesrounded}
}
\begin{document}
\begin{frame}
\dq{\lipsum[1]}
\end{frame}
\end{document}
如果我将前三行替换为
\documentclass[Palatino, hyperref={pdfpagelabels=false}]{beamer}
%\documentclass[12pt]{article}
%\usepackage[noxcolor]{beamerarticle}
我应该怎么办?
答案1
\dq
您可以为不同的投影仪模式提供两种不同的定义。
由于您的 beamercolourbox 没有背景颜色或阴影,因此只需更改文本颜色就足以将其复制到文章模式:
%\documentclass[Palatino, hyperref={pdfpagelabels=false}]{beamer}
\documentclass[12pt]{article}
\usepackage[noxcolor]{beamerarticle}
\usepackage[utf8]{inputenc} % usually not needed (loaded by default)
\usepackage[T1]{fontenc}
\usepackage[italian]{babel}
\usepackage{lipsum,wrapfig,xcolor}
\setbeamercovered{dynamic}
\useoutertheme{infolines}
\usetheme{Singapore} % NO
\xdefinecolor{oiB}{rgb}{0.22,0.52,0.72}
\setbeamercolor{disc ques body}{fg=oiB}
\mode<presentation>{
\newcommand{\dq}[1]{
\begin{beamerboxesrounded}[shadow = false, lower = disc ques body]{}
#1
\end{beamerboxesrounded}
}
}
\mode<article>{
\newcommand{\dq}[1]{
\textcolor{oiB}{#1}
}
}
\mode<all>
\begin{document}
\begin{frame}
\dq{\lipsum[1]}
\end{frame}
\end{document}