I am trying to make a document like this:
Since there's quite a lot of such sections, I want to make a new command like \textwithline{}{}
so I can then type
Author: \textwithline{Joe Shmoe}{First name, Last name}
This author's editor: \textwithline{Billy Willy}{First name, Last name}
in my document.
Note the important features:
- The line must fill all available remaining space
- The text above and below the line must be centered on the line
- The text on the left is variable length (or may be blank)
What is a good way of making such a command? I have tried:
tabular
with\hfill
but it doesn't actually stretch the tabletabular*
but it doesn't "give room" to the text on the leftminipage
but that requires me to hard code width every time\uline{\hfill Billy Willy \hfill}{\hfill First name, Last name \hfill}
with\centering
but then text below line is not centered on the line, but on the page
Best Answer