LaTeX forum ⇒ GeneralAlign three supervisors text in same row Topic is solved

LaTeX specific issues not fitting into one of the other forums of this category.
ziselos
Posts: 11
Joined: Sun Mar 04, 2018 12:03 pm

Align three supervisors text in same row

Postby ziselos » Mon Mar 12, 2018 7:28 pm

Hello,
I use the code below (in XeLatex) in order to import three thesis supervisors signature, name and title.
  1. \documentclass[a4paper]{report}
  2. \begin{document}
  3.  
  4. Supervisors\\[12pt]
  5. \newcommand\Sigline[4][t]{%
  6. \parbox[#1]{.333\linewidth}{\raggedright#2}%
  7. \parbox[#1]{.333\linewidth}{\raggedright#3}%
  8. \parbox[#1]{.333\linewidth}{\raggedright#4}%
  9. }
  10.  
  11.  
  12. \Sigline{\textit{(Signature)}}{\textit{(Signature)}}{\textit{(Signature)}} \\[3\baselineskip]
  13. \Sigline{\dotfill}{\dotfill}{\dotfill}\\
  14. \Sigline{First Name}{First Name}{First Name} \\
  15. \Sigline{First Title}{Second Title}{Third Title} \\
  16. \end{document}


I hve 2 problems:
1) I use dotfill, so the dots have no space between them (as you can see if you run the code)
2) First two rows are not align (left) with the other two

Tags:

rais
Posts: 153
Joined: Sun Nov 16, 2014 8:51 pm

Postby rais » Tue Mar 13, 2018 8:51 am

The first problem I did't understand. If you want spaces between your dotfills, make the \parboxes a little smaller and put \hfill between them.
For your second problem, add \noindent before the first \parbox in your \Sigline definition: you've got a paragraph break before the first use of \Sigline (empty line(s)).

KR
Rainer

User avatar
Stefan Kottwitz
Site Admin
Posts: 8792
Joined: Mon Mar 10, 2008 9:44 pm

Postby Stefan Kottwitz » Tue Mar 13, 2018 9:03 am

Hi!

To support this, what Rainer said, with some code:

  1. \documentclass[a4paper]{report}
  2. \begin{document}
  3.  
  4. \noindent Supervisors\\[12pt]
  5. \newcommand\Sigline[4][t]{%
  6. \noindent
  7. \parbox[#1]{.25\linewidth}{\raggedright#2}\hfill%
  8. \parbox[#1]{.25\linewidth}{\raggedright#3}\hfill%
  9. \parbox[#1]{.25\linewidth}{\raggedright#4}%
  10. }
  11.  
  12. \Sigline{\textit{(Signature)}}{\textit{(Signature)}}{\textit{(Signature)}} \\[3\baselineskip]
  13. \Sigline{\dotfill}{\dotfill}{\dotfill}\\
  14. \Sigline{First Name}{First Name}{First Name} \\
  15. \Sigline{First Title}{Second Title}{Third Title} \\
  16. \end{document}


Stefan
Site admin

ziselos
Posts: 11
Joined: Sun Mar 04, 2018 12:03 pm

Postby ziselos » Thu Mar 15, 2018 9:57 pm

That was exactly what i wanted. Thank you both!


Return to “General”

Who is online

Users browsing this forum: No registered users and 14 guests