14

Unfortunately I cannot solve the error with \noalign on my own:

enter image description here

\begin{document}
\noindent  \LARGE{\textbf{John Smith}}  \\
\vspace{-2ex} 
\hline 
\normalsize

\begin{center}
\begin{tabular}{l l}
Name of University    & \hspace{1in} \href{mailto:john.smith@email.com}     {john.smith@email.com} \\
Department/Institution    & \hspace{1in}  \href{www.johnsmith.com} {www.johnsmith.com}   \\
Address             & \hspace{1in} Skype: \Absender  \\
City Name, State 12345-6789 & \hspace{1in} Phone: +1 (123) 456-7899 \\
\end{tabular}
\end{center}

I don't understand how to solve this.

  • 3
    Welcome! \hline only makes sense in a tabular – egreg Nov 24 '16 at 7:25
  • Also the \\ after John Smith is completely wrong (never end a paragraph with \\ (the negative space following tries to mask some of this error but not having \\ would be better. – David Carlisle Nov 24 '16 at 7:49
17

Use \hrulefill outside tabular environment for horizontal line and for a constant space in a table column, give it in the declaration line as follows:

\documentclass{article}
\usepackage{hyperref}
\begin{document}
\noindent  \LARGE{\textbf{John Smith}} 

\noindent\hrulefill 

\normalsize

\begin{center}
\begin{tabular}{l @{\hskip1in}l}
Name of University    &  \href{mailto:john.smith@email.com}     {john.smith@email.com} \\
Department/Institution    &   \href{www.johnsmith.com} {www.johnsmith.com}   \\
Address             &  Skype: Absender  \\ %%removed \ from \Absender
City Name, State 12345-6789 &  Phone: +1 (123) 456-7899 \\
\end{tabular}
\end{center}
\end{document}

Output:

enter image description here

| improve this answer | |
7

I came across this, I missed the linebreak \\ at the end of the row before the \hline.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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