I need to fit the size of the text automatically within a box with predefined sizes. I have a minimum font size for little text and I want to reduce the size for large texts, as can be seen in the figure below.

P.S. I do not know how many words the text will have.

enter image description here

  • 1
    (1) Resizing text like this is officially evil. (2) What have you tried? (3) I can't see your picture, only 'enter image description here'. – cfr Jun 8 '17 at 23:46
  • Of course, you mean that you have a maximum font size for short text and you want to reduce the size for longer texts. I see essentially only one way, using a loop: typeset the text in a temporary parbox, measure its height, if it is too high then reduce the font size and start over, otherwise you are done, place the box (or “unvbox” it) where it is meant to go. – GuM Jun 8 '17 at 23:57
  • 4

Your Answer

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

Browse other questions tagged or ask your own question.