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.

How to draw a highlighted box around a bulleted item.

share|improve this question
    
Related Question: Box around a few items in an itemize environment. –  Peter Grill May 23 '13 at 20:54
add comment

2 Answers

Use the color package and \colorbox, like so:

\documentclass{report}
\usepackage{color}
\begin{document}
\begin{itemize}
\item Hello
\item \colorbox{yellow}{I rule}
\item World
\end{itemize}
\end{document}

If you meant something else by "highlighted box", let me know.

share|improve this answer
    
no.i want to outline the item using a rectangle and highlight it –  user4852 Apr 14 '11 at 8:17
    
Do you mean you want a framed box? Try \fbox{Test} Framed and filled? –  Emre Apr 14 '11 at 8:21
    
\fbox {\item {Test}} is not working.i also want to blink that rectangle –  user4852 Apr 14 '11 at 8:25
    
Put the \fbox after the \item: \item \fbox{Text} I believe it blinks if you convert it to HTML –  Emre Apr 14 '11 at 8:31
1  
Before itemize insert \newlength\mybox \settowidth{\mybox}{rule} \addtolength{\mybox}{0.4in} then use \item \hspace{-0.25in}\framebox[\mybox][r]{Boxed text} –  Emre Apr 14 '11 at 8:51
show 2 more comments

Here a solution of the German forum MrUnix

\documentclass{article}

\usepackage{picture,}
\makeatletter
\newcommand\fboxitem[1]{%
 \setlength\@tempdima{\itemsep}%
 \addtolength\@tempdima{\dimexpr\labelsep+\fboxsep+\fboxrule\relax}%
 \item\leavevmode\put(-\the\@tempdima,0){%
  \fbox{\hspace*{\dimexpr\itemsep+\labelsep\relax}%
         \parbox[t]{\dimexpr\linewidth-\fboxsep-\fboxrule\relax}{%
    #1}}}}
\makeatother


\begin{document}

\begin{itemize}
\item Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen
\fboxitem{Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen Text im Rahmen}

\end{itemize}

\end{document}

enter image description here

share|improve this answer
add comment

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.