1

My universities thesis style requirements dictate that a declaration page is furnished with information boxes (signature etc.). I can extend the signature lines to the end of the \parbox boundary manually (the 8.595cm) but I am assuming that there is an automatic way to achieve this, I may need to change the font size in the future and hence the parbox width so it looks alright. A minimal example (modified from the answer of Sebastiano):

% Extend signature lines to the length of the parbox automatically 
\documentclass[%12pt,
            oneside]{memoir}

\begin{document}

\mainmatter
\chapter*{\centering Declaration}

\begin{centering}

\parbox{10.5cm}{I declare that this thesis has been composed solely by myself and, except where otherwise stated and clearly indicated, is based on my own work and research carried out in the School of [School Name] at [University Name] between [Month] [Year] and [Month] [Year]. \\[8pt]}

\parbox{10.5cm}{I declare that this thesis has not been nor will be used for admission to a degree conferred by any other university or institution and neither has it previously been used for admission to a degree conferred by [University Name]. \\[26pt]}

% Doing it manually by eye sight led to a length of 8.595cm
\begin{tabular}{@{}p{1.5cm}p{8.595cm}@{}}
    Signature: & \hspace{0.2cm}\hrulefill \vspace{0.9cm}\\
    Name: & \hspace{0.2cm}\hrulefill \vspace{0.9cm} \\
    Date: & \hspace{0.2cm}\hrulefill \vspace{0.9cm}
\end{tabular}

\end{centering}

\end{document}

I would like it to look like this automatically if possible, this was achieved manually but even then, the right hand side lines are not flush with the \parbox text.

How I want it to look automatically

\textwidth produced this abomination:

\textwidth

I tried to use different margin lengths contained here but none seemed to work, I am not sure if I need to put the table in a \parbox too or if there is a way to calculate extending the signature line so it is flush. Any help would be appreciated, I couldn't find anything in other answers to help with this problem.

1
  • 1
    Thank you very much to have cited me :-)
    – Sebastiano
    Commented Jul 7, 2021 at 12:28

1 Answer 1

2

Like this?

enter image description here

With use of tabularx (which is loaded by memoir):

\documentclass[12pt,
            oneside]{memoir}

\begin{document}

\mainmatter
\chapter*{\centering Declaration}

\begin{center}

\parbox{10.5cm}{I declare that this thesis has been composed solely by myself and, except where otherwise stated and clearly indicated, is based on my own work and research carried out in the School of [School Name] at [University Name] between [Month] [Year] and [Month] [Year]. \\[8pt]}

\parbox{10.5cm}{I declare that this thesis has not been nor will be used for admission to a degree conferred by any other university or institution and neither has it previously been used for admission to a degree conferred by [University Name]. \\[26pt]}

% Doing it manually by eye sight led to a length of 8.595cm
\begin{tabularx}{10.5cm}{@{} l @{\quad} X<{\rule{0pt}{9mm}} @{}}
    Signature:  &   \\  \cline{2-2}
    Name:       &   \\  \cline{2-2}
    Date:       &   \\  \cline{2-2}
\end{tabularx}
    \end{center}

\end{document}

Note: centering˙ is not an environment but switch, i,e, should be used as \centering(after it all is centered), Instead of it I usecenter` environment

2
  • That is perfect and what I wanted, thank you. I didn't know the difference between center and centering and will look into it in more detail as I have used it elsewhere in my document, is it usually center is the appropriate one or is it dependent upon context?
    – user245306
    Commented Jul 7, 2021 at 12:34
  • 1
    \centering is usually used in floats (figure˙, tableO or environments, in which you like to have centered content. In contrary to center` environment, it not insert additional vertical space as environment center do.
    – Zarko
    Commented Jul 7, 2021 at 12:46

You must log in to answer this question.