Tag Info

New answers tagged

8

In this code I define a \parunderbrace command, with two arguments, which adjusts automatically to the width of the formula: \documentclass{article} \usepackage{mathtools} \usepackage{ragged2e} \newlength\ubwidth \newcommand\parunderbrace[2]{\settowidth\ubwidth{$#1$}\underbrace{#1}_{\parbox{\ubwidth}{\scriptsize\RaggedRight#2}}} \begin{document} \[ ...


14

If you want to change the behaviour of \underbrace globally you could say \documentclass{article} \usepackage{amsmath} \makeatletter \let\ams@underbrace=\underbrace \def\underbrace#1_#2{% \setbox0=\hbox{$\displaystyle#1$}% \ams@underbrace{#1}_{\parbox[t]{\the\wd0}{#2}}% } \makeatother \begin{document} $\underbrace{f(x) = a^2 + 2ab + b^2}_{This is some ...


4

Here is a solution without using the wrapfig package. The idea is to define a macro \newcommand{\MyWrapFigure} with two arguments; the first is the figure and the second is the wrapping text. The macro calculates the dimensions of the figure and indents the text horizontally and vertically, accordingly. Caution should be taken, however, when using such ...


5

I know you asked for a non-wrapfig answer, though it is unclear why. They can work together. More importantly, I think, is that tcolorbox doesn't care much about how things outside the "colorboxes" look or behave, while wrapfig only cares about wrapping things around other things.... \documentclass{book} \usepackage[most]{tcolorbox} \usepackage{lipsum, ...



Top 50 recent answers are included