7

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

2

2 Answers 2

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

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

\vspace{-\baselineskip}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .