I would like to underline the whole line with texts anywhere I choose on the line. I found this answer, which is almost what I want. I tried

\titleline{homework \hfill assignment}

but it does not output what I expect. Why is that? Also, here is a visualization of what I want to produce:enter image description here


There are a large number of ways one can achieve this. Here's one using a tabular for the "underline":

enter image description here


  \begin{tabular}{ @{} p{\linewidth} @{} }
    \makebox[0pt][r]{#3} \\



\titleline{Very long left}{Medium center}{R}


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.