GeneralAlign three supervisors text in same row

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

Align three supervisors text in same row

Post by ziselos »

Hello,
I use the code below (in XeLatex) in order to import three thesis supervisors signature, name and title.

Code: Select all

\documentclass[a4paper]{report}
\begin{document}

Supervisors\\[12pt]
\newcommand\Sigline[4][t]{%
  \parbox[#1]{.333\linewidth}{\raggedright#2}%
  \parbox[#1]{.333\linewidth}{\raggedright#3}%
  \parbox[#1]{.333\linewidth}{\raggedright#4}%
}

  
  \Sigline{\textit{(Signature)}}{\textit{(Signature)}}{\textit{(Signature)}} \\[3\baselineskip]
  \Sigline{\dotfill}{\dotfill}{\dotfill}\\
  \Sigline{First Name}{First Name}{First Name} \\
  \Sigline{First Title}{Second Title}{Third Title} \\
  \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

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

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

Align three supervisors text in same row

Post by rais »

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: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Align three supervisors text in same row

Post by Stefan Kottwitz »

Hi!

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

Code: Select all

\documentclass[a4paper]{report}
\begin{document}
 
\noindent Supervisors\\[12pt]
\newcommand\Sigline[4][t]{%
  \noindent
  \parbox[#1]{.25\linewidth}{\raggedright#2}\hfill%
  \parbox[#1]{.25\linewidth}{\raggedright#3}\hfill%
  \parbox[#1]{.25\linewidth}{\raggedright#4}%
}
 
  \Sigline{\textit{(Signature)}}{\textit{(Signature)}}{\textit{(Signature)}} \\[3\baselineskip]
  \Sigline{\dotfill}{\dotfill}{\dotfill}\\
  \Sigline{First Name}{First Name}{First Name} \\
  \Sigline{First Title}{Second Title}{Third Title} \\
\end{document}
Stefan
LaTeX.org admin
ziselos
Posts: 15
Joined: Sun Mar 04, 2018 12:03 pm

Align three supervisors text in same row

Post by ziselos »

That was exactly what i wanted. Thank you both!
Post Reply