Graphics, Figures & Tablesvertical lines

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
wayne
Posts: 8
Joined: Wed Sep 01, 2010 10:46 am

vertical lines

Post by wayne »

Hi,

I want to make a table with vertical lines to separate the columns so i do:
\begin{tabular}{|l|c|}
aaa & aaa \\
\hline
bbb & bbb \\
\hline
\end{tabular}

But it does not work, the vertical lines are not printed!

Does anyone has an idea why??

thanks

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

vertical lines

Post by localghost »

Please, always post a full example. It is recommendable to abstain from vertical lines for better legibility of tables. Apart from that I have no problem with your code.

Code: Select all

\documentclass{article}

\begin{document}
  \begin{tabular}{|l|c|}\hline
    aaa & aaa \\ \hline
    bbb & bbb \\ \hline
  \end{tabular}
\end{document}

Best regards and welcome to the board
Thorsten
wayne
Posts: 8
Joined: Wed Sep 01, 2010 10:46 am

Re: vertical lines

Post by wayne »

Thank you.

But for me, it does not work...
Is there another way to set the vertical lines?
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

vertical lines

Post by frabjous »

"It does not work" is not a helpful reply. In what way doesn't it work? What happens? Do you get errors? Do you not get errors, but the lines don't show up? Does it matter what viewer you use, or compilation method?

Does it not even work when you process the simple document Thorsten listed, or does it only not work in your larger document? If the former, then tell us what TeX distribution you're using, what viewer and what compilation method, and post the resulting log file as an attachment. If the latter, then do as you have been instructed, and create a minimal working example that will allow us to recreate the problem. No one can diagnose what they cannot duplicate.

I also suggest reading "How to Ask Questions the Smart Way".
Post Reply