Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I have alternating lines and texts. Example may be a sign-in sheet where there is a line on which a person sign and his name is written immediately below this line. The following code generate the desired output except the last entry. There is relatively more space between the line and the name. Is there a way to reduce that space between the last line and Dr. EEEEE.

  \vspace{1.5cm}     
  \line(1,0){300}\\
  Dr. AAAAA\\
  \vspace{1.1cm}   
  \line(1,0){300}\\
  Dr. BBBBB\\
  \vspace{1.1cm}   
  \line(1,0){300}\\
  Dr. CCCCC  \\
  \vspace{1.1cm}
  \line(1,0){300}\\
  Dr. DDDD \\
  \vspace{1.1cm}   
  \line(1,0){300}\\
  Dr. EEEEE

Thanks

share|improve this question
    
Related Questions: dynamic signature/date line‌​, How to create a signature, date page?. –  Peter Grill Jun 6 '12 at 4:45
    
Please, add code that can be compiled; what I get from that snippet, with a standard preamble, is that the first entry is printed differently from the others. –  egreg Jun 6 '12 at 6:48

1 Answer 1

up vote 2 down vote accepted

you can use a tabular:

\documentclass{article}
\usepackage{array,ragged2e}
\def\HS{\rule[-1cm]{0pt}{1.1cm}}
\begin{document}

\begin{tabular}{@{} >{\Centering}b{300pt}}\hline
\HS  Dr. AAAAA\\\hline
\HS  Dr. BBBBB\\\hline
\HS  Dr. CCCCC\\\hline
\HS  Dr. DDDD \\\hline
     Dr. EEEEE
\end{tabular}

\end{document}
share|improve this answer
    
A slight modification to your answer might be more in line with what your OP wants. See my deleted answer. –  Werner Jun 6 '12 at 6:12
    
Thanks Herbert, but I needed the names to appear after each line and aligned in the center. I am not able to do this as modifying the above code results in the 'noalign' error. –  learner Jun 6 '12 at 23:01
    
@learner: see edited answer –  Herbert Jun 7 '12 at 6:45
    
@Herbert, Thanks. Workes exactly as desired. –  learner Jun 7 '12 at 15:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.