Hello, in this post I talk about tables and the tabular environment.
Why is that environment (the tabular environment) so important? well, this is a float environment, which means it is an easy-to-manipulate environment. We can modify the position, alignment, create captions, labels, etc.
The syntax of that command is
\begin{tabular}Your Table Here\end{tabular}
We must put thetabular
environment inside thetable
environment. This command has some optional commands, the full command to create a table is the following
\begin{table}[position] align \begin{tabular}{columns} My Table \end{tabular}\end{table}
position options
We can specify the position of the table with the following options
h
to put the tablehere, it is, at the current position of your cursor in the codeb
to put the table at thebottom of the current paget
to put the table at thetop of the current page
If we want to put the table in the current position and we can put
!
, this ignores the restrictions and the table is attempted to put in the specified position
align options
We can align our table with the following commands
\centering
\flushleft
\flushright
columns options
Here we specify the number of columns and their position
l
text to the leftc
centered textr
text to the right|
put a vertical line between columns
Until now we have checked how to align and create new columns, let's start our table
\hline
generates a horizontal line&
jumps to the next column (we have declared the number of columns in thecolumns option. If we put more columns there will be an error)\\
jumps to the next row
Examples
You can find some exampleshere
I encourage you to play with these commands and create your table.
This is all for today, thanks :)
Top comments(0)
For further actions, you may consider blocking this person and/orreporting abuse