Latex Dl



Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}{{hits.length}} results for {{searchQueryText}}

Tables are common elements in most scientific documents, LaTeX provides a large set of tools to customize tables, change the size, combine cells, change the colour of cells and so on. This article explains how.

  • 7Captions, labels and references
  • 8Changing the appearance of a table

To set up a TeX/LaTeX system on macOS, download and open this disk image. Then drag the MiKTeX icon onto the Applications folder. Please read the tutorial, if you want step-by-step guidance. Date: 3/26/2021. File name: miktex-21.3-darwin-x8664.dmg. LaTeX online services like Papeeria, Overleaf, ShareLaTeX, Datazar, and LaTeX base offer the ability to edit, view and download LaTeX files and resulting PDFs. CTAN You can obtain LaTeX from CTAN, which is the primary source of distribution for LaTeX. Rtf2latex2e: as its name implies, converts RTF to LaTeX; so you'd need some way to convert HTML to RTF (though that's relatively easy, can be done with most any word processor). Pandoc: Haskell program for converting between various mark-up languages, including HTML and LaTeX. UCARâ„¢ Latex DL 450 Emulsion Polymer Please Contact Dow for distribution options available for this product. Unable to complete action, likely due to connectivity to Dow's back end service. Please try again later or contact your Customer Service Representative.

Below you can see the simplest working example of a table

The tabular environment is the default LaTeX method to create tables. You must specify a parameter to this environment, {c c c} tells LaTeX that there will be three columns and that the text inside each one of them must be centred.

The tabular environment is more flexible, you can put separator lines in between each column.

It was already said that the tabular environment is used to type tables. To be more clear about how it works below is a description of each command.

{ |c|c|c| }
This declares that three columns, separated by a vertical line, are going to be used in the table. Each c means that the contents of the column will be centred, you can also use r to align the text to the right and l for left alignment.
hline
This will insert a horizontal line on top of the table and at the bottom too. There is no restriction on the number of times you can use hline.
cell1 & cell2 & cell3
Each & is a cell separator and the double-backslash sets the end of this row.

Below you can see a second example.

This example shows double vertical and horizontal lines, when properly used help to keep the information within the table well organized.

When formatting a table you might require a fixed length either for each column or for the entire table. In the example below a fixed column width is established.

First, to use the parameters shown in the example, you must import the package array in the preamble of your LaTeX file with the next command

In the tabular environment, the parameter m{5em} sets a length of 5em for first column (1cm for the other two) and centres the text in the middle of the cell. The aligning options are m for middle, p for top and b for bottom. In standard tables new lines must be inserted manually so the table won't stretch out of the text area, when using this parameters the text is automatically formatted to fit inside each cell.

If you don't need to control the width of each cell, but of the entire table and then distribute the space within evenly, use the package tabularx. See the example below:

The environment tabularx is similar to tabular but more flexible, it's available after adding the line usepackage{tabularx} to the preamble. Notice that the environment opening statement is different, in the example the table width is set to 0.8 the width of the text. You can use any of the LaTeX units for such length.

The prefix inside braces | >{raggedrightarraybackslash}X | >{centeringarraybackslash}X | >{raggedleftarraybackslash}X | sets the alignment of each column: the first one to left, the second one to center and the third one to right.

Latex deluxe table

Rows and columns can be combined in a bigger cell. The example below is an example of the multicolumn command to combine columns.

Let's see each part of the command multicolumn{4}{|c|}{Country List} :

{4}
The number of columns to be combined, 4 in this case.
{|c|}
Delimiters and alignment of the resulting cell, in this case the text will be centred and a vertical line will be drawn at each side of the cell.
{Country List}
Text to be displayed inside the cell.

To combine rows the package multirow must be imported with

in your preamble, then you can use the multirow command in your document:

The command multirow takes three parameters. The first one is the number of rows to be combined, 3 in the example. The second parameter is the width of the column, 4em in the example. Finally, the third parameter is the content of the cell.

If you have to insert a very long table, which takes up two or more pages in your document, use the longtable package. First, add to the preamble the line

This will make the command longtable available.

longtable behaviour is similar to the default tabular, but generates tables that can be broken by the standard LaTeX page-breaking algorithm. There are four elements long-table specific.

endfirsthead
Everything above this command will appear at the beginning of the table, in the first page.
endhead
Whatever you put before this command and below endfirsthead will be displayed at the top of the table in every page except the first one.
Del
endfoot
Similar to endhead, what you put after endhead and before this command will appear at the bottom of the table in every page except the last one.
endlastfoot
Similar to endfisthead. The elements after endfoot and before this command will be displayed at the bottom of the table but only in the last page where the table appears.

Positioning a table is easy if they're inside a float table environment.

The parameter h! passed to the table environment declaration establishes that this table must be placed here, and override LaTeX defaults. Other positioning parameters can be passed also:

h
Will place the table here approximately.
t
Position the table at the top of the page.
b
Position the table at the bottom of the page.
p
Put the table in a special page, for tables only.
!
Override internal LaTeX parameters.
H
Place the table at this precise location, pretty much like h!.

For further examples on table positioning see the Positioning images and tables article.

In this example there are a few more commands.:

centering
Centres the table relative to the float container element.
[1ex]
This adds extra space to the cell.

Latex Dl Mask

Tables can be captioned, labelled and referenced by means of the table environment.

There are three important commands in the example:

caption{Table to test captions and labels}
As you may expect this command sets the caption for the table, if you create a list of tables this caption will be used there. You can place it above or below the table.
label{table:1}
If you need to refer the table within your document, set a label with this command. The label will number the table, and combined with the next command will allow you to reference it.
ref{table:1}
This code will be substituted by the number corresponding to the referenced table.

Note: The document may need to be compiled more than once for the labels to work.

List of tables

To create a list of tables is straightforward.

The caption of each table will be used to generate this list. For languages supported by the babel package, the title 'List of tables' will be translated accordingly. See the article about International language support for more info.

Several table elements can be modified to achieve a good-looking document. Below you will learn how to modify the line thickness, the line colour and the background colour of the cells in your table.

Line width and cell padding

The readability of the table sometimes is improved by incrementing the column spacing and row stretch.

A description of the commands is provided below:

setlength{arrayrulewidth}{1mm}
This sets the thickness of the borders of the table. In the example is 1mm but you can use other units, see the article Lengths in LaTeX for a complete list.
Latex
setlength{tabcolsep}{18pt}
The space between the text and the left/right border of its containing cell is set to 18pt with this command. Again, you may use other units if needed.
renewcommand{arraystretch}{1.5}
The height of each row is set to 1.5 relative to its default height.

Colour alternating rows

It is a common practice to use two colours for alternating rows in a tables to improve readability. This can be achieved in LaTeX with the package xcolor and the table parameter.


Notice the braces right before the command

and after the tabular environment. The command rowcolors takes three parameters each passed inside braces:

  • the row to start,
  • the colour for odd rows and
  • the colour for even rows.

See the xcolor package documentation (at the further reading section) for a list of available colours and how to create your own. In the example the colours green and yellow are mixed in different proportions.

For the command to work make sure to add


to the preamble of your LaTeX file.

Colouring a table (cells, rows, columns and lines)

All elements in a table can be customized to use a specific colour. Again, this functionality is provided by xcolor so you must add

to the preamble. Below you can see an example.

Below is a description about how to change the colour of each element in the table:

  • Colour of the lines. The command arrayrulecolor is used for this. In the example an HTML format is used, but other formats are available too, see the xcolor documentation for a complete list (link provided at the further reading section).
  • Background colour of a cell. Use the command cellcolor. You can either enter the name directly inside the braces (red, gray, green and so on) or pass a format parameter inside brackets (HTML in the example) and then set the desired colour inside the braces using the established format.
  • Background colour of a row. In this case rowcolor will accomplish that. The same observations about colour selection mentioned in the two previous commands are valid for this one.
  • Background colour of a column. This one is a bit tricky, the easiest way is to define a new column type. The command define a column type called s whose alignment is p, the column width is 3cm and the colour is set with HTML format to AAACED. This new column type is used in the tabular environment.

quick description of parameters in the tabular environment

Tables can be created using tabular environment.

where options can be:

  • pos : Vertical position. It can assume the following values:
tthe line at the top is aligned with the text baseline
bthe line at the bottom is aligned with the text baseline
c or nonethe table is centred to the text baseline
  • cols : Defines the alignment and the borders of each column. It can have the following values:
lleft-justified column
ccentred column
rright-justified column
p{'width'}paragraph column with text vertically aligned at the top
m{'width'}paragraph column with text vertically aligned in the middle (requires array package)
b{'width'}paragraph column with text vertically aligned at the bottom (requires array package)
|vertical line
||double vertical line
*{num}{form}the format form is repeated num times; for example *{3}{|l}| is equal to |l|l|l|

To separate between cells and introducing new lines use the following commands:

&column separator
start new row (additional space may be specified after using square brackets, such as [6pt])
hlinehorizontal line between rows
newlinestart a new line within a cell (in a paragraph column)
cline{i-j}partial horizontal line beginning in column i and ending in column j


For more information see

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Commands

Field specific

Class files

Advanced TeX/LaTeX

Showing first {{hits.length}} results of {{hits_total}} for {{searchQueryText}}{{hits.length}} results for {{searchQueryText}}

Tables are common elements in most scientific documents, LaTeX provides a large set of tools to customize tables, change the size, combine cells, change the colour of cells and so on. This article explains how.

  • 7Captions, labels and references
  • 8Changing the appearance of a table

Below you can see the simplest working example of a table

The tabular environment is the default LaTeX method to create tables. You must specify a parameter to this environment, {c c c} tells LaTeX that there will be three columns and that the text inside each one of them must be centred.

The tabular environment is more flexible, you can put separator lines in between each column.

It was already said that the tabular environment is used to type tables. To be more clear about how it works below is a description of each command.

{ |c|c|c| }
This declares that three columns, separated by a vertical line, are going to be used in the table. Each c means that the contents of the column will be centred, you can also use r to align the text to the right and l for left alignment.
hline
This will insert a horizontal line on top of the table and at the bottom too. There is no restriction on the number of times you can use hline.
cell1 & cell2 & cell3
Each & is a cell separator and the double-backslash sets the end of this row.

Below you can see a second example.

This example shows double vertical and horizontal lines, when properly used help to keep the information within the table well organized.

When formatting a table you might require a fixed length either for each column or for the entire table. In the example below a fixed column width is established.

First, to use the parameters shown in the example, you must import the package array in the preamble of your LaTeX file with the next command

In the tabular environment, the parameter m{5em} sets a length of 5em for first column (1cm for the other two) and centres the text in the middle of the cell. The aligning options are m for middle, p for top and b for bottom. In standard tables new lines must be inserted manually so the table won't stretch out of the text area, when using this parameters the text is automatically formatted to fit inside each cell.

Latex dl full

If you don't need to control the width of each cell, but of the entire table and then distribute the space within evenly, use the package tabularx. See the example below:

The environment tabularx is similar to tabular but more flexible, it's available after adding the line usepackage{tabularx} to the preamble. Notice that the environment opening statement is different, in the example the table width is set to 0.8 the width of the text. You can use any of the LaTeX units for such length.

The prefix inside braces | >{raggedrightarraybackslash}X | >{centeringarraybackslash}X | >{raggedleftarraybackslash}X | sets the alignment of each column: the first one to left, the second one to center and the third one to right.

Rows and columns can be combined in a bigger cell. The example below is an example of the multicolumn command to combine columns.

Let's see each part of the command multicolumn{4}{|c|}{Country List} :

{4}
The number of columns to be combined, 4 in this case.
{|c|}
Delimiters and alignment of the resulting cell, in this case the text will be centred and a vertical line will be drawn at each side of the cell.
{Country List}
Text to be displayed inside the cell.

To combine rows the package multirow must be imported with

in your preamble, then you can use the multirow command in your document:

The command multirow takes three parameters. The first one is the number of rows to be combined, 3 in the example. The second parameter is the width of the column, 4em in the example. Finally, the third parameter is the content of the cell.

If you have to insert a very long table, which takes up two or more pages in your document, use the longtable package. First, add to the preamble the line

This will make the command longtable available.

longtable behaviour is similar to the default tabular, but generates tables that can be broken by the standard LaTeX page-breaking algorithm. There are four elements long-table specific.

endfirsthead
Everything above this command will appear at the beginning of the table, in the first page.
endhead
Whatever you put before this command and below endfirsthead will be displayed at the top of the table in every page except the first one.
endfoot
Similar to endhead, what you put after endhead and before this command will appear at the bottom of the table in every page except the last one.
endlastfoot
Similar to endfisthead. The elements after endfoot and before this command will be displayed at the bottom of the table but only in the last page where the table appears.

Positioning a table is easy if they're inside a float table environment.

The parameter h! passed to the table environment declaration establishes that this table must be placed here, and override LaTeX defaults. Other positioning parameters can be passed also:

h
Will place the table here approximately.
t
Position the table at the top of the page.
b
Position the table at the bottom of the page.
p
Put the table in a special page, for tables only.
!
Override internal LaTeX parameters.
H
Place the table at this precise location, pretty much like h!.

For further examples on table positioning see the Positioning images and tables article.

In this example there are a few more commands.:

centering
Centres the table relative to the float container element.
[1ex]
This adds extra space to the cell.

Tables can be captioned, labelled and referenced by means of the table environment.

There are three important commands in the example:

caption{Table to test captions and labels}
As you may expect this command sets the caption for the table, if you create a list of tables this caption will be used there. You can place it above or below the table.
label{table:1}
If you need to refer the table within your document, set a label with this command. The label will number the table, and combined with the next command will allow you to reference it.
ref{table:1}
This code will be substituted by the number corresponding to the referenced table.

Note: The document may need to be compiled more than once for the labels to work.

List of tables

To create a list of tables is straightforward.

The caption of each table will be used to generate this list. For languages supported by the babel package, the title 'List of tables' will be translated accordingly. See the article about International language support for more info.

Several table elements can be modified to achieve a good-looking document. Below you will learn how to modify the line thickness, the line colour and the background colour of the cells in your table.

Line width and cell padding

The readability of the table sometimes is improved by incrementing the column spacing and row stretch.

A description of the commands is provided below:

setlength{arrayrulewidth}{1mm}
This sets the thickness of the borders of the table. In the example is 1mm but you can use other units, see the article Lengths in LaTeX for a complete list.
setlength{tabcolsep}{18pt}
The space between the text and the left/right border of its containing cell is set to 18pt with this command. Again, you may use other units if needed.
renewcommand{arraystretch}{1.5}
The height of each row is set to 1.5 relative to its default height.

Colour alternating rows

It is a common practice to use two colours for alternating rows in a tables to improve readability. This can be achieved in LaTeX with the package xcolor and the table parameter.


Notice the braces right before the command

and after the tabular environment. The command rowcolors takes three parameters each passed inside braces:

  • the row to start,
  • the colour for odd rows and
  • the colour for even rows.

See the xcolor package documentation (at the further reading section) for a list of available colours and how to create your own. In the example the colours green and yellow are mixed in different proportions.

For the command to work make sure to add


to the preamble of your LaTeX file.

Colouring a table (cells, rows, columns and lines)

All elements in a table can be customized to use a specific colour. Again, this functionality is provided by xcolor so you must add

to the preamble. Below you can see an example.

Below is a description about how to change the colour of each element in the table:

  • Colour of the lines. The command arrayrulecolor is used for this. In the example an HTML format is used, but other formats are available too, see the xcolor documentation for a complete list (link provided at the further reading section).
  • Background colour of a cell. Use the command cellcolor. You can either enter the name directly inside the braces (red, gray, green and so on) or pass a format parameter inside brackets (HTML in the example) and then set the desired colour inside the braces using the established format.
  • Background colour of a row. In this case rowcolor will accomplish that. The same observations about colour selection mentioned in the two previous commands are valid for this one.
  • Background colour of a column. This one is a bit tricky, the easiest way is to define a new column type. The command define a column type called s whose alignment is p, the column width is 3cm and the colour is set with HTML format to AAACED. This new column type is used in the tabular environment.

quick description of parameters in the tabular environment

Tables can be created using tabular environment.

where options can be:

Latex Dl Free

  • pos : Vertical position. It can assume the following values:
tthe line at the top is aligned with the text baseline
bthe line at the bottom is aligned with the text baseline
c or nonethe table is centred to the text baseline
  • cols : Defines the alignment and the borders of each column. It can have the following values:
lleft-justified column
ccentred column
rright-justified column
p{'width'}paragraph column with text vertically aligned at the top
m{'width'}paragraph column with text vertically aligned in the middle (requires array package)
b{'width'}paragraph column with text vertically aligned at the bottom (requires array package)
|vertical line
||double vertical line
*{num}{form}the format form is repeated num times; for example *{3}{|l}| is equal to |l|l|l|

To separate between cells and introducing new lines use the following commands:

&column separator
start new row (additional space may be specified after using square brackets, such as [6pt])
hlinehorizontal line between rows
newlinestart a new line within a cell (in a paragraph column)
cline{i-j}partial horizontal line beginning in column i and ending in column j


For more information see

Latex Dl Size

Overleaf guides

LaTeX Basics

Mathematics

Figures and tables

References and Citations

Languages

Document structure

Formatting

Fonts

Presentations

Del

Commands

Field specific

Class files

Latex Delta Symbol

Advanced TeX/LaTeX