In the following example, I want the content in minipage is highlighted by \colorbox if the condition is true. If the condition is false, the content in minipage typeset directly.
The typeset of true-branch however, is not highlighted. I think it is because of \fi.
Then,how to modify this code to make it work as expected?
Code:
\documentclass{article}
\usepackage{xcolor}
\begin{document}
\ifnum 5>1 % or something like \ifx..., \if\empty..., and so on.
\colorbox{red} \fi
{\begin{minipage}{2in}The content maybe very large and complex, I don't want to duplicate it in both true-branch and false-branch\end{minipage}}
\end{document}
