Here's one solution using TikZ
which defines a new environment using the framed
package. You should preferably compile this with xelatex
or lualatex
, since it gives the easiest access to a wide range of fonts. I've added code to make it run under pdflatex
as well.
The code has now been updated to allow some flexibility in the formatting of the different components of the quotation, and the environment takes two arguments:
Environment Syntax
\begin{shadequote}[<alignment>]{<author>}
text of quote
\end{shadequote}
Code
% !TEX TS-program = xeLaTeX
\documentclass[12pt]{article}
\usepackage{ifxetex,ifluatex}
\usepackage{etoolbox}
\usepackage[svgnames]{xcolor}
\usepackage{tikz}
\usepackage{framed}
% conditional for xetex or luatex
\newif\ifxetexorluatex
\ifxetex
\xetexorluatextrue
\else
\ifluatex
\xetexorluatextrue
\else
\xetexorluatexfalse
\fi
\fi
%
\ifxetexorluatex%
\usepackage{fontspec}
\usepackage{libertine} % or use \setmainfont to choose any font on your system
\newfontfamily\quotefont[Ligatures=TeX]{Linux Libertine O} % selects Libertine as the quote font
\else
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{libertine} % or any other font package
\newcommand*\quotefont{\fontfamily{LinuxLibertineT-LF}} % selects Libertine as the quote font
\fi
\newcommand*\quotesize{60} % if quote size changes, need a way to make shifts relative
% Make commands for the quotes
\newcommand*{\openquote}
{\tikz[remember picture,overlay,xshift=-4ex,yshift=-2.5ex]
\node (OQ) {\quotefont\fontsize{\quotesize}{\quotesize}\selectfont``};\kern0pt}
\newcommand*{\closequote}[1]
{\tikz[remember picture,overlay,xshift=4ex,yshift={#1}]
\node (CQ) {\quotefont\fontsize{\quotesize}{\quotesize}\selectfont''};}
% select a colour for the shading
\colorlet{shadecolor}{Azure}
\newcommand*\shadedauthorformat{\emph} % define format for the author argument
% Now a command to allow left, right and centre alignment of the author
\newcommand*\authoralign[1]{%
\if#1l
\def\authorfill{}\def\quotefill{\hfill}
\else
\if#1r
\def\authorfill{\hfill}\def\quotefill{}
\else
\if#1c
\gdef\authorfill{\hfill}\def\quotefill{\hfill}
\else\typeout{Invalid option}
\fi
\fi
\fi}
% wrap everything in its own environment which takes one argument (author) and one optional argument
% specifying the alignment [l, r or c]
%
\newenvironment{shadequote}[2][l]%
{\authoralign{#1}
\ifblank{#2}
{\def\shadequoteauthor{}\def\yshift{-2ex}\def\quotefill{\hfill}}
{\def\shadequoteauthor{\par\authorfill\shadedauthorformat{#2}}\def\yshift{2ex}}
\begin{snugshade}\begin{quote}\openquote}
{\shadequoteauthor\quotefill\closequote{\yshift}\end{quote}\end{snugshade}}
\begin{document}
\begin{shadequote}[l]{Douglas Adams}
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
\end{shadequote}
\begin{shadequote}[r]{Douglas Adams}
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
\end{shadequote}
\begin{shadequote}[c]{Douglas Adams}
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
\end{shadequote}
\begin{shadequote}{}
A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
\end{shadequote}
\end{document}
In this code, the font for the quotation marks is set independently of the main document font. This is because depending on the main font you choose, the very large quotation marks will not look good; Linux Libertine has pretty quotes that seem appropriate for the purpose. If you want to use this environment with another main document font, remove/change the \usepackage{libertine}
.
Sample output

Here is a proposal, using some low level commands. The text is typeset in a \vtop
and its depth is used to place the opening quotes, while the closing quotes will be level with the top line (with some lowering due to size).
Thanks to Jake, I've been able to solve a mystery that bugged me, about a spacing that seems necessary and is due to the inner sep
of TikZ nodes.
\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[ngerman]{babel}
\usepackage{kpfonts}
\usepackage[svgnames]{xcolor}
\definecolor{framecolor}{named}{SteelBlue}
\colorlet{framebgcolor}{PowderBlue!50!White}
\definecolor{quotesignclr}{named}{LightSlateGrey}
\usepackage{changepage}
\usepackage{environ,graphicx}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\newcommand\sopeningquote{\scalebox{2}{\color{quotesignclr}\smash\quotedblbase}}
\newcommand\sclosingquote{\scalebox{2}{\color{quotesignclr}\smash\textquotedblleft}}
\makeatletter
\newsavebox\simplequestbox
\NewEnviron{simplequest}{%
\normalfont
\begin{adjustwidth}{3em}{3em}
\settowidth{\dimen@}{\sopeningquote\kern.4em\sclosingquote}%
\dimen@=\dimexpr\linewidth-\dimen@\relax
\setbox\simplequestbox=\vtop{
\@parboxrestore\itshape
\hsize=\dimexpr\dimen@-\pgfkeysvalueof{/pgf/inner xsep}*2\relax % thanks, Jake
\sbox\z@{\BODY}
\ifdim\wd\z@>\hsize
\noindent\BODY\par
\else
\box\z@
\fi
\xdef\simplequestpd{\the\prevdepth}
}
\begin{tikzpicture}
[background rectangle/.style={draw=framecolor,line width=0.2pt,
fill=framebgcolor,rounded corners}, show background rectangle,
inner frame xsep=-2pt,inner frame ysep=2pt]
\node {\mbox{%
\raisebox{\dimexpr-\dp\simplequestbox+\simplequestpd+.05ex}
[0pt][0pt]{\sopeningquote}%
\kern.2em
\box\simplequestbox
\kern.2em
\raisebox{-1.4ex}[0pt][0pt]{\sclosingquote}}};
\end{tikzpicture}
\end{adjustwidth}
}
\makeatother
\begin{document}
\begin{simplequest}
Dies hier ist ein Blindtext zum Testen von Textausgaben.
Wer diesen Text liest, ist selbst schuld.
\end{simplequest}
\begin{simplequest}
Dies hier ist ein Blindtext
\end{simplequest}
\Large
\begin{simplequest}
Dies hier ist ein Blindtext zum Testen von Textausgaben.
Wer diesen Text liest, ist selbst schuld.
\end{simplequest}
\end{document}
In the picture the similar quotes are: top mine, bottom yours.

A problem may arise in case the text consists of more than one paragraph and the first one is not long enough to fill a line. Should this case present itself in the document, the code might be changed like this:
\makeatletter
\newsavebox\simplequestbox
\NewEnviron{simplequest}[1][]{%
\normalfont
\begin{adjustwidth}{3em}{3em}
\settowidth{\dimen@}{\sopeningquote\kern.4em\sclosingquote}%
\dimen@=\dimexpr\linewidth-\dimen@\relax
\setbox\simplequestbox=\vtop{
\@parboxrestore\itshape
\hsize=\dimexpr\dimen@-\pgfkeysvalueof{/pgf/inner xsep}*2\relax % thanks, Jake
\if\relax\detokenize{#1}\relax
\sbox\z@{\BODY}
\ifdim\wd\z@>\hsize
\noindent\BODY\par
\else
\box\z@
\fi
\else
\sbox\z@{#1}
\hsize\wd\z@
\BODY\par
\fi
\xdef\simplequestpd{\the\prevdepth}
}
\begin{tikzpicture}
[background rectangle/.style={draw=framecolor,line width=0.2pt,
fill=framebgcolor,rounded corners}, show background rectangle,
inner frame xsep=-2pt,inner frame ysep=2pt]
\node {\mbox{%
\raisebox{\dimexpr-\dp\simplequestbox+\simplequestpd+.05ex}
[0pt][0pt]{\sopeningquote}%
\kern.2em
\box\simplequestbox
\kern.2em
\raisebox{-1.4ex}[0pt][0pt]{\sclosingquote}}};
\end{tikzpicture}
\end{adjustwidth}
}
\makeatother
The environment now has an optional argument, the first short line; here's an example:
\begin{simplequest}[Dies hier ist ein Blindtext.]
Dies hier ist ein Blindtext.
Wer diesen Text liest, ist selbst schuld.
\end{simplequest}

One could try getting only the first paragraph, but this might be error prone.
Best Answer
LaTeX tends to require you to use
for double quotes and
for single quotes. The "smart quotes" will be done by the compilers.
if you have already typed your text with " " throughout your document you can use the
csquotes
package to deal with them:Adding this to your preamble will use the double quotation mark character as your delimiter for outer quotes.
csquotes
will then translate it to what it needs to be in your chosen language, which in your case is american english and so will appear as “ ”. You should therefore have nothing else to change in your document.