Graphics, Figures & TablesI dont know how to give columns titles in tabular !

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
jack666sparrow
Posts: 6
Joined: Sun Jul 06, 2014 3:34 pm

I dont know how to give columns titles in tabular !

Post by jack666sparrow »

Hi

am new to this forum and am glad that I found it , anyway my first question is how can I give titles to the columns


This is the table I created , Columns are ccc|ccccc
I want to insert those samples into columns titles

c = p
c = q
c = r

c = p -> q
c = ^ and operator
c = q -> r
c = ->
c = p -> r

Code: Select all

\begin{tabular}{ccc|ccccc}
	T&T&T&T&T&T&T&T\\
	T&T&F&T&F&F&T&F\\
	T&F&T&F&F&T&T&T\\
	T&F&F&F&F&T&T&F\\
	F&T&T&T&T&T&T&T\\
	F&T&F&T&F&F&T&T\\
	F&F&T&T&T&T&T&T\\
	F&F&F&T&T&T&T&T\\
\end{tabular}
Last edited by cgnieder on Tue Jul 08, 2014 10:40 am, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org
LaTeX Beginner's Guide LaTeX Cookbook LaTeX TikZ graphics TikZによるLaTeXグラフィックス
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

I dont know how to give columns titles in tabular !

Post by Johannes_B »

I really don't know what you are asking for. Can you give a screenshot, or post something hand-drawn of what you are trying to achieve?

BTW: Please read up on Minimal Working Examples

EDIT: Or are you looking for something as simple as this?

Code: Select all

\documentclass{article}
\usepackage{mathtools}
\usepackage{booktabs}
\begin{document}
\begin{tabular}{ccc|ccccc}
	\toprule
$c = p $&
$c = q $&
$c = r $&
$c = p \rightarrow q $&
$c = \string^ \text{and operator} $&
$c = q \rightarrow r $&
$c = \rightarrow $&
$c = p \rightarrow r $\\
\midrule
T&T&T&T&T&T&T&T\\
T&T&F&T&F&F&T&F\\
T&F&T&F&F&T&T&T\\
T&F&F&F&F&T&T&F\\
F&T&T&T&T&T&T&T\\
F&T&F&T&F&F&T&T\\
F&F&T&T&T&T&T&T\\
F&F&F&T&T&T&T&T\\
\bottomrule
\end{tabular}
\end{document}
Hint: You can click on Open in writelatex directly above the code to see the output.
The smart way: Calm down and take a deep breath, read posts and provided links attentively, try to understand and ask if necessary.
jack666sparrow
Posts: 6
Joined: Sun Jul 06, 2014 3:34 pm

I dont know how to give columns titles in tabular !

Post by jack666sparrow »

Hi brother
I was able to solve my problem when I ask my professor about it
the answer was :

in the tabular I insert this

$symbol1$ & $symbol2$ & \\\hline
Last edited by cgnieder on Tue Jul 08, 2014 10:42 am, edited 1 time in total.
User avatar
Johannes_B
Site Moderator
Posts: 4182
Joined: Thu Nov 01, 2012 4:08 pm

I dont know how to give columns titles in tabular !

Post by Johannes_B »

Now i am curious, can you extent your answer, maybe give a minimal working example (just as i did above), to show the result?
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