My document is mainly made up of justified text, but with sections made of two column & left flushed text (actually verses). Below is a MWE.

As in Flush a left-flushed box right, I want the text of the second column to be:

  • left flushed, and
  • that the longest line of this secund colum is also left-flushed and right-aligned ?

Here, a shema, where | are the limits of text area:

|Some normally justi-|
|fied text.          |
|                    |
|Foo            Fus  |
|Bar            Roooh|<- the right end of the longest line matches the text-area limit
|Baz            Da!  |

As I want the solution to be generic, and as I don't necessary know the number of lines of the "two-columned" text (there could be a pagebreak in it), I found the solution suggested in the thread (and in its duplicate) made of a tabular+\hfill not convinient.

Question: Is there a simple way to stretch the \columnsep dimension used in the multicols environment, as an \hfill would do?




        Foo foo foo\newline
        Bar, barbar\newline
        Bazbazbaz baz babaz

        Fusss fus,\newline
        Daaaa !

  • varwidth package might help.
    – Manuel
    Commented Dec 2, 2015 at 21:30

1 Answer 1


Since you are manually breaking the lines anyway it is easiest to box them (otherwise if you let TeX's normal paragraph breaker break the paragraph in to lines, they will all be full width even if they have short text).

enter image description here

If each line is its natural width you just have to unbox and re-box the right hand column so that the column is set to the width of its content then the existing glue that multicols uses will push the column to the right.



         \global\dimen\tw@\dp\count@ \fi
       \global\dimen\tw@\dp\mult@rightbox \fi



        \hbox{Foo foo foo}
        \hbox{Bar, barbar}
        \hbox{Bazbazbaz baz babaz}


        \hbox{Fusss fus,}
        \hbox{Daaaa !}


You must log in to answer this question.

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