I am working on a poster template with a not so easy to reproduce style with nested blocks. To that end, I have to create a minipage whose width depends on \linewidth minus some fixed value. In a nutshell, I want to subtract something in the width specification of the minipage.

How can I express \linewidth "MINUS" 2ex in my template?

  • 5
    Just load the calc package and use \linewidth-2ex; you probably mean -2em, though.
    – egreg
    Mar 13, 2013 at 12:38
  • 5
    Or precede it with \dimexpr: \begin{minipage}{\dimexpr\linewidth-2ex} Mar 13, 2013 at 12:46
  • @egreg: I didn't know about the calc package. This answers the question (hint). (Note: I did mean 2ex since it is determined by a different vertical margin.)
    – bitmask
    Mar 13, 2013 at 12:52

1 Answer 1


The calc package allows for expressing operations on dimensions in the argument to minipage, \parbox, \setlength and other places.

So, after \usepackage{calc}, you're allowed to say


Without any package the same can be accomplished by


but calc is more powerful.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .