大引文块引文 - 黑底白字

大引文块引文 - 黑底白字

对于如何在文本块周围添加大引号的问题,有一些非常好的答案带大引号的块引用。使用第一个答案(使用 tikz),但使用黑色背景上的白色文本,会在文本上显示一个大的白色矩形。如何更改它以适用于黑色背景上的白色文本的幻灯片(我使用的是 beamer)?

在文本上出现有问题的白框的示例。

\PassOptionsToPackage{svgnames}{xcolor}
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine} % or any other font package (or none)
\newcommand*\quotefont{\fontfamily{fxl}} % selects Libertine for quote font
\usepackage{tikz}
\usepackage{framed}
% Make commands for the quotes
\newcommand*{\openquote}{\tikz[remember picture,overlay,xshift=-15pt,yshift=-10pt]
 \node (OQ) {\quotefont\fontsize{60}{60}\selectfont``};\kern0pt}
\newcommand*{\closequote}{\tikz[remember picture,overlay,xshift=15pt,yshift=10pt]
 \node (CQ) {\quotefont\fontsize{60}{60}\selectfont''};}
% select a colour for the shading
\definecolor{shadecolor}{named}{Azure}
% wrap everything in its own environment
\newenvironment{shadequote}%
{\begin{snugshade}\begin{quote}\openquote}
{\hfill\closequote\end{quote}\end{snugshade}}

%\usetheme{Darmstadt}
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}

\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}

\makeatletter

\makeatother

\begin{document}
\begin{frame}
\begin{shadequote}
A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools.\par\emph{Douglas Adams}
\end{shadequote}
\end{frame}

\end{document}

答案1

“文本上方的大白色矩形”实际上是一个很大的Azure长方形在下面文本。您可以通过将文本颜色更改为其他颜色(例如黑色)来看到这一点。此颜色由snugshade来自framed包的环境定位。它的颜色由颜色决定shadecolor。要将其全部删除,请从环境定义中删除\begin{snugshade}和。要仅更改颜色,请将替换为更合适的颜色,例如。\end{snugshade}shadequoteAzureMaroon

\PassOptionsToPackage{svgnames}{xcolor}
\documentclass{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine} % or any other font package (or none)
\newcommand*\quotefont{\fontfamily{fxl}} % selects Libertine for quote font
\usepackage{tikz}
\usepackage{framed}
% Make commands for the quotes
\newcommand*{\openquote}{\tikz[remember picture,overlay,xshift=-15pt,yshift=-10pt]
 \node (OQ) {\quotefont\fontsize{60}{60}\selectfont``};\kern0pt}
\newcommand*{\closequote}{\tikz[remember picture,overlay,xshift=15pt,yshift=10pt]
 \node (CQ) {\quotefont\fontsize{60}{60}\selectfont''};}
% select a colour for the shading
\definecolor{shadecolor}{named}{Maroon}
% wrap everything in its own environment
\newenvironment{shadequote}%
{\begin{snugshade}\begin{quote}\openquote}
{\hfill\closequote\end{quote}\end{snugshade}}

%\usetheme{Darmstadt}
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}

\setbeamercolor{background canvas}{bg=black}
\setbeamercolor{normal text}{fg=white}

\makeatletter

\makeatother

\begin{document}
\begin{frame}
\begin{shadequote}
A common mistake that people make when trying to design something completely
foolproof is to underestimate the ingenuity of complete fools.\par\emph{Douglas Adams}
\end{shadequote}
\end{frame}

\end{document}

更改阴影矩形的颜色

相关内容