0

I want a box (or minipage) containing some lines to make a specific height. Vertical spaces can be added automatically to fill between lines to adjust height. The box has to be as close as possible to the right margin.

I was able to manage this situation using parbox, \vfill and \hfill. However i have to set the length of the box using the longest line and \wd.

Is there a way to make this more automatic ? I had no chance using pboxbecause you can't use \vfillthere.

\newsavebox\mybox
\sbox{\mybox}{hello.world_12345@mail.world}
\newlength{\abc}
\setlength{\abc}{18mm}

%other box of height \abc

\hfill

\parbox[c][\abc][t]{\wd\mybox}{ \faMobile\space 123.456.789 \vfill \faEnvelope\space hello.world_12345@mail.world \vfill \faLocationArrow\space 123 liberty street \vfill \faCar\space driving license \vfill \faPassport\space working permit \vfill }

  • 2
    Looks like a tabular to me, rather than a \parbox. Can you complete the document such that it compiles? What is the purpose of \vfill? To which height do you want to spread the lines? – gernot Jun 28 '23 at 15:01
  • 2
    Please, don't show code snippets. Always show a minimal working example. Without, I would guess: Maybe you can use package varwidth and set \baselineskip with infinite glue. – cabohah Jun 28 '23 at 15:02
  • Highly related: https://tex.stackexchange.com/questions/640344/how-can-i-automatically-force-two-side-by-side-floats-of-any-kind-including-tex – John Kormylo Jun 28 '23 at 16:54
  • In the minipages only the width in mandatory but optionally you can also set a fixed height. The issue is ensure that the text inside fit well in that space, If you left room for, said ,4 lines of text , but you type more, the result will be really ugly, with the excess of text overlapping the text following the minipage. – Fran Jun 29 '23 at 06:38

0 Answers0