8

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

David Carlisle
  • 757,742
learner
  • 431

2 Answers2

5

You can adjust vertical spacing using vspace with negative argument as suggested here. Example:

\vspace{-\baselineskip}

4

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}
  • A slight modification to your answer might be more in line with what your OP wants. See my deleted answer. – Werner Jun 06 '12 at 06: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 06 '12 at 23:01
  • @learner: see edited answer –  Jun 07 '12 at 06:45
  • @Herbert, Thanks. Workes exactly as desired. – learner Jun 07 '12 at 15:45