# Draw red box around verse

This is a follow-up question to: How to center a verse horizontally

I am using the solution given by @Herbert. Is there a way to put a color box around selected few verses I desire?

-
Have a look to the package adjustbox. –  Marco Daniel Jan 30 '12 at 18:55

You can use the mdframed package to put a box the full width, or specify the margins to have it indented:

\documentclass{article}
\usepackage{fontspec}
\usepackage{lipsum}
\usepackage[framemethod=tikz,xcolor=true]{mdframed}
\usepackage{varwidth}

\newenvironment{Verse}
{\center\varwidth{\linewidth}}
{\endvarwidth\endcenter}

\begin{document}

\lipsum[1]

\begin{mdframed}[
tikzsetting={draw=red,ultra thick},skipabove=5pt,
]
\begin{Verse}
foo bar\\
baz
\end{Verse}
\end{mdframed}
\begin{mdframed}[
tikzsetting={draw=red,ultra thick},skipabove=5pt,
rightmargin=2cm,leftmargin=2cm
]
\begin{Verse}
foo bar\\
baz
\end{Verse}
\end{mdframed}
\end{document}

-
You can also use userdefinedwidth. The possibilities by varwidth are not supported. –  Marco Daniel Jan 30 '12 at 20:27