Code: Select all
\newsavebox{\X}
\sbox{\X}{\textbf{\colorbox{yellow}{[framed black text]}}}
\usebox{\X}
Code: Select all
\def\comment{\colorbox{yellow}}{}
\comment{Text in yellow}
Code: Select all
\newsavebox{\X}
\sbox{\X}{\textbf{\colorbox{yellow}{[framed black text]}}}
\usebox{\X}
Code: Select all
\def\comment{\colorbox{yellow}}{}
\comment{Text in yellow}
NEW: TikZ book now 40% off at Amazon.com for a short time.
Code: Select all
\documentclass{article}
\usepackage{xcolor}
\newcommand*\comment[1]{\colorbox{yellow}{\textbf{#1}}}
\begin{document}
\comment{bold text with yellow background}
\end{document}
NEW: TikZ book now 40% off at Amazon.com for a short time.