3

I use \boxed a lot to help me isolate elements in my notes. I would like to define a \snugboxed command so that it produces a tighter-fitting box than \boxed around the element inside my $..$ environment. Is that possible ?

for example in such code as this, ideally the box would fit the element inside tighter:

 $ f_{n+1}(\theta) = E  \theta^{Z_{n+1} } = 
 E \left(  \boxed{E\theta^{Z_{n+1}}|Z_n} \right) = 
  \sum \boxed{E  \left( \theta^{Z_{n+1}} | Z_n    \right)} 
  P(Z_n=k) \leftarrow \boxed{E  \theta^{Z_{n+1}} | Z_n}     $ 
is the random variable here !

thank you !

10

\boxed is just a thin wrapper around \fbox and so uses the same \fboxsep padding, so if you (locally, or for the whole document) use

\setlength\fboxsep{0pt}

You will get a tighter fitting frame.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.