3

i want to draw horizontal lines between rows in the table.

I have tried like this so far,

\begin{tabular}{|c|c|}
    \hline
    attribute& Art. 16.1.b\&c Aggregated generation per type\\
    \hline
     DocumentType& A75:actual generation per type A74:wind and solar generation\\
     ProcessType& A16:realised\\
     In\_Domain& Used\\
     PsrType& May be used\\
     TimeInterval& Used\\
     \hline
\end{tabular}

This output i am getting enter image description here

Expected output link

https://ibb.co/89dBZGN

Thanks got the expected result:

Answer:

\begin{tabular}{|c|c|}
    \hline
    attribute& Art. 16.1.b\&c Aggregated generation per type\\
    \hline
     DocumentType& A75:actual generation per type A74:wind and solar generation\\
     \hline
     ProcessType& A16:realised\\
     \hline
     In\_Domain& Used\\
     \hline
     PsrType& May be used\\
     \hline
     TimeInterval& Used\\
     \hline
\end{tabular} 

Thanks.

2
  • 5
    Have you tried adding additional \hline commands?
    – chrisma
    Dec 3, 2018 at 13:57
  • 1
    @chrisma yes i have got the result after using the \hline. Dec 3, 2018 at 14:05

1 Answer 1

6

Additional horizontal lines can be added by using the \hline command between rows, just as the top and bottom lines were added.

\documentclass{article}
\begin{document}

\begin{tabular}{|c|c|}
    \hline
    attribute& Art. 16.1.b\&c Aggregated generation per type\\
    \hline
    DocumentType& A75:actual generation per type A74:wind and solar generation\\
    \hline
    ProcessType& A16:realised\\
    \hline
\end{tabular} 

\end{document}

LaTeX

1
  • \hline must be preceded by double backslash except the first one. However, I omitted the last \\
    – DawnSong
    May 15 at 10:14

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.