Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

There is are some very nice answers to the question of how to put large quotation marks around a block of text at Block quote with big quotation marks. Using the first answer (which uses tikz) but with white text on a black background gives me a large white rectangle over the text. How can you change it to work with slides (I am using beamer) that have white text on a black background?

Example that gives the problematic white box over the text.

\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}
share|improve this question
1  
Could you provide a MWE showing this so that we don't have to guess at what packages/themes you're using, please? This is the sort of question where that could make all the difference. –  Loop Space Aug 15 '12 at 13:10
    
@AndrewStacey, added. –  Raphael Aug 15 '12 at 13:22

1 Answer 1

up vote 4 down vote accepted

The "large white rectangle over the text" is actually a large Azure rectangle under the text. You can see this by changing the text colour to something else (black, for example). This colour is positioned by the snugshade environment which comes from the framed package. It's colour is determined by the colour shadecolor. To remove it altogether, remove the \begin{snugshade} and \end{snugshade} from the definition of the shadequote environment. To just change the colour, replace the Azure by something more fitting, say Maroon.

\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}

Change colour of shaded rectangle

share|improve this answer
    
Thanks very much! Maybe this should be a separate question but I get the left quotes too near to the text and right quotes too far exactly as in your example. Any idea how to fix that? –  Raphael Aug 15 '12 at 13:29
    
Editing the xshift settings fixes it it seems. –  Raphael Aug 15 '12 at 13:40
    
@Raphael Yes, I noticed that too. I suspect there are several things one could tweak to get the look just right. –  Loop Space Aug 15 '12 at 13:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.