Graphics, Figures & Tablestable

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ubuntu2014
Posts: 29
Joined: Mon Oct 06, 2014 12:42 am

table

Post by ubuntu2014 »

Hello.
I have made a table in LaTeX
Here is the code :

Code: Select all

\documentclass{beamer}
\begin{document}
\begin{tabular}{| l | c | c | r |}
  \hline
 &6&4& \\ \hline 2&8&1&7 \\ \hline &5&3& \\\hline
\end{tabular}
\end{document}
In this table I just want to omit the empty square boxes.
How do I do that ?
Please see the attachment.
CodeCogsEqn.gif
CodeCogsEqn.gif (874 Bytes) Viewed 4438 times

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

Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

table

Post by Johannes_B »

You can do this using a tabular environment and a bit of trickery, but i somehow have the feeling that you might be better off with TikZ.

Code: Select all

\documentclass{article}
\usepackage{array}
\begin{document}
\begin{tabular}{| l | c | c | r |}
	\cline{2-3}
	\multicolumn{1}{c|}{}	&6&4&\multicolumn{1}{c}{}
	\\ \hline 2&8&1&7 \\ \hline
	\multicolumn{1}{c|}{}	&5&3&
	\multicolumn{1}{c}{}\\\cline{2-3}
\end{tabular}
\end{document}
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ubuntu2014
Posts: 29
Joined: Mon Oct 06, 2014 12:42 am

Re: table

Post by ubuntu2014 »

Thankyou.
It works perfectly if I make a document but how to put this on codecogs.com ? Am I missing a trick or codecogs doesn't support LaTeX ?
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

Re: table

Post by Johannes_B »

As far as i can tell from a quick look, codecog is some kind of online LaTeX equation editor.

So, the question coming to my mind is: What do you want to do?
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
ubuntu2014
Posts: 29
Joined: Mon Oct 06, 2014 12:42 am

Re: table

Post by ubuntu2014 »

Actually, I want to put this code on that website, codecogs.com and then I want to download it in the form of a transparent image so that I can easily use it in other places.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

table

Post by Johannes_B »

Use the standalone class along with its conversion option. You need to have a converter instaled on your system, the default looking place is Image Magick, which is free software. Result is the attached png. More details on options of the conversion can be found in the documentations.

Code: Select all

    \documentclass{article}
    \usepackage{array}
    \begin{document}
    \begin{tabular}{| l | c | c | r |}
            \cline{2-3}
            \multicolumn{1}{c|}{}   &6&4&\multicolumn{1}{c}{}
            \\ \hline 2&8&1&7 \\ \hline
            \multicolumn{1}{c|}{}   &5&3&
            \multicolumn{1}{c}{}\\\cline{2-3}
    \end{tabular}
    \end{document}
Attachments
ubuntuTabularExportPng.png
ubuntuTabularExportPng.png (2.55 KiB) Viewed 4295 times
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
Post Reply