I would like to add a pair of gray quotation marks around the text without affecting the surrounded text. For this I tried to use \makebox
with zero width. However, I was still getting:
To my understanding, as the box has zero width, I should get vertically aligned text. I suspect that this may have something to do with the \leavevmode
inside \makebox
, but I don't know how to properly cancel this extra horizontal spacing.
Below is a minimal working example.
\documentclass{article}
\usepackage{xcolor}
\usepackage{blindtext}
\ExplSyntaxOn
\NewDocumentEnvironment { excerpt } { }
{
\raisebox{-.5ex}{\makebox[0pt]{\Large\textcolor{gray!55}{``}}}
}
{
\unskip \nobreakspace
\raisebox{-.5ex}{\makebox[0pt]{\Large\textcolor{gray!55}{''}}}
}
\ExplSyntaxOff
\begin{document}
\blindtext
\begin{excerpt}
\blindtext
\end{excerpt}
\begin{excerpt}
Text for testing.
\end{excerpt}
Text for testing.
\end{document}