I'm using quite a few \colorbox
and \colorfbox
in a document but they weren't sitting at the same heights (because some words contained g and this seemed to push the box down.
The solution I found (in another stackoverflow question actually) was to use \strut
.
Only problem with that is that it defaulted to being very high.
I couldn't figure out how to shrink the height (I'm very new to Latex) and was wondering if there's a simple way to specify the height of the \strut
command?
For example I have \colorbox{newredred}{{\color{white}{\strut\tt fun}}}
.
Is what I'm asking possible? Please remember, I'm very new to LaTeX and don't really understand much about the renewing commands or setting custom commands.
Best Answer
For example :
#1 the height #2 the depth
example :