Edit or customize an inserted table

Get to know the table editor menu

In Visual Editor, select one or more of your table’s cells to display the table editor menu:

Image showing the insert table menu

Some menu icons remain greyed out (inactive) until you select a suitable range of cells required to complete those actions. For example, you can only merge cells after you’ve selected two or more cells in a row.

Here’s a short summary of the icons and drop-down menus.

  • Delete or move the table caption.

  • Change the table borders.

  • Set the alignment of a column or merged cell.

  • Adjust column width.

  • Merge cells in a row.

  • Delete rows or columns.

  • Insert rows and columns.

  • Delete the entire table. To restore an accidentally deleted table, use the Undo button () on the toolbar located above the Visual Editor and Code Editor.

  • Get help.

  • Send feedback to Overleaf.

How to edit table cells

There are two ways to start editing a cell:

  1. Double-click on the cell you want to edit.

  2. Use the tab or arrow keys to navigate to a particular cell, then press Enter.

Here are some tips for editing cell content using Visual Editor:

  • Use LaTeX commands, not the toolbar, to apply bold or italic styles to cell text:

    • use \textbf{...} for bold text.

    • use \textit{...} for italic text.

    • use \textbf{... \textit{...}...} for text in bold italic.

  • Cells can contain inline mathematics via \( ... \).

Visual Editor will preview the styled text and inline math.

Example: styled text and math in table cells

The next screenshot shows Visual Editor previewing the following cell content:

  • \(\sqrt{a^2+b^2}\)

  • \textbf{bold}, \textit{italic}, \textbf{\textit{bold italic}}

Visual editor preview of a table

How to select one or more columns or rows

  1. Use the row or column selectors to select a particular row or column.

  2. Hold down the Shift key to select multiple rows or columns.

Image that highlights column selectors and row selectors
""

You can also select multiple rows or columns by clicking on (selecting) a cell and dragging the selection (mouse) pointer.

How to change the table caption

To edit the caption text

  1. Click on the default caption text, which is the word Caption.

 Image that highlights the table caption
""
  1. The LaTeX \caption command is displayed.

  2. Add your preferred caption between the braces {...}

Image that displays the editing view of the table caption
""

To remove the caption or place it above or below the table

  1. Select any table cell to display the table editor menu.

  2. From the caption drop-down menu, select your preferred option:

    • No caption: Remove it.

    • Caption above: Place the caption above the table.

    • Caption below: Place the caption below the table.

The caption menu for the table

The caption drop-down is disabled if the tabular environment is not directly inside a table environment. This is demonstrated by the following example in which the tabular environment is directly inside a center environment.

\documentclass{article}
\usepackage{hologo} % for the XeTeX logo
\begin{document}
\begin{center}
\begin{tabular}{lcc}
\hline
    \TeX{} engine&Year released&Native UTF-8\\
\hline
    pdf\TeX&1996&No\\ 
    \hologo{XeTeX}&2004&Yes\\ 
    Lua\TeX&2007&Yes\\
    LuaHB\TeX&2019&Yes\\ 
    \hline
    \end{tabular}
    \end{center}
    \end{document}

Open this example in Overleaf and switch to Visual Editor.

If you open the code above in Overleaf then switch to Visual Editor, you’ll see the caption drop-down is greyed out (disabled):

Greyed-out caption dropdown
""

How to add borders to table cells

At the moment, Visual Editor provides basic support for borders, accessible from the borders drop-down menu which currently has three user-selectable options:

  • All borders: All cells have a border.

  • No borders: No cells have a border.

  • Booktabs: A three-lined table.

Menu options for border cells

A table inserted from the toolbar starts with the No borders option. If you add borders using LaTeX code, the button will display Custom borders.

How to change the table’s label

  1. Click on the default label text tab:my_label.

  2. The LaTeX \label command is displayed.

  3. Add your preferred label between the braces {...}.

Adding labels to tables

The label text is an identifier used to reference this table elsewhere in your document. You can read more about using labels in our article on cross-referencing.

How to change the alignment of a table column

Table columns can be right-, left-, or center-aligned. Follow these steps to change a column’s alignment:

  1. Select the column(s) whose alignment you want to change.

  2. The alignment icon () becomes active.

  3. Select the drop-down menu, then choose the preferred alignment: left, centered, or right.

  4. The following screenshot shows how to right-align all cells in column 1 of a table:

Selecting right-alignment for cells in a table

Last updated

Was this helpful?