LaTeX Table Generator

Type or paste your data into a grid, merge cells, set column alignment and line style, and get a tabular or table environment ready for Overleaf.

ทำงานในเบราว์เซอร์ของคุณ ไฟล์ไม่ออกจากอุปกรณ์ ดูวิธีตรวจสอบ

…

วิธีทำ

  1. 1
    Enter or paste your data

    Type into the grid, or paste cells from a spreadsheet, CSV or Markdown table into the paste box and press Replace the table.

  2. 2
    Shape the table

    Add or delete rows and columns with the buttons; the actions apply at the selected cell.

  3. 3
    Merge cells

    Click a cell, Shift+click the opposite corner (or use Tap to extend), then press Merge selected cells.

  4. 4
    Set alignment

    Use the drop-down above each column for left, centre, right or wrapping text.

  5. 5
    Choose the style

    Pick booktabs or a ruled style, header rows, font size, caption, label and placement.

  6. 6
    Copy the code

    Copy the table or the full test document, add the listed packages to your preamble and compile.

เกี่ยวกับเครื่องมือนี้

Writing a LaTeX table by hand means counting ampersands, remembering double backslashes at the end of every row and escaping every percent sign, underscore and dollar sign in your data. One missing ampersand and the document stops compiling with an error that points at the wrong line. Merged cells are worse: a multirow cell needs blank placeholders in the rows below it, and the horizontal lines between those rows must skip the merged column, which means working out cline ranges by hand. This generator gives you a spreadsheet-like grid instead. Type into the cells or paste a block copied from Excel, Google Sheets, LibreOffice, a CSV file or a Markdown table, and the grid grows to fit. Select a block of cells and merge it; the tool writes multirow and multicolumn for you, keeps the placeholders in the right places and draws partial rules with cline where a merged block continues. Each column gets left, centre, right or wrapping p alignment. You choose the line style: booktabs with toprule, midrule and bottomrule (the style most journals prefer), a full grid, an outer frame, a header line only or no lines at all. Header rows can be bold, special characters are escaped automatically, and the output can be a bare tabular, a floating table with caption and label, or a complete test document you can compile straight away.

Line styles and what journals expect

The booktabs manual argues for tables without vertical rules and with only three horizontal ones: above the header, below the header and at the end. Most publishers and thesis templates follow that advice, and it is the default here. A full grid with vertical bars is still common in lab reports and some school templates, so it is one click away. When you mix booktabs with merged rows, the rules between those rows are simply left out, which matches booktabs style.

Merging cells

Click a cell, then Shift+click another (on a phone, turn on Tap to extend) to select a rectangle and press Merge. The text of the covered cells is joined into the first one so nothing is lost. A merge across rows needs the multirow package; a merge across columns uses the built-in multicolumn command. Split cell removes a merge. Inserting or deleting rows and columns keeps existing merges in step.

Limits

This is not a full LaTeX editor and it does not compile your document. It does not create decimal-aligned siunitx columns, longtable tables that break across pages, coloured individual cells or rotated headers; add those by hand after copying. Formulas inside cells work if you turn escaping off and type them with dollar signs yourself. The table and your settings are saved only in this browser.

ตัวอย่างพร้อมวิธีทำ

A results table has 4 columns (Method, Accuracy (%), Time (s), Notes) and 3 data rows; one note reads 8 layers & dropout. With booktabs, one header row and a caption, the tool writes begin{tabular}{lrrl}, a toprule, the bold header with Accuracy (\%), a midrule, three data rows with 8 layers \& dropout, and a bottomrule, wrapped in a table float with caption Results by method and label tab:results. Merging the two Ours rows in the first column adds \multirow{2}{*}{...} and a note that the multirow package is needed.

สรุปสั้น ๆ

คำถามที่พบบ่อย

How do I paste a table from Excel or Google Sheets?

Select the cells in the spreadsheet and copy them. Paste into the box under the grid and press Replace the table, or select a cell and press Paste at the selected cell to drop the block in at that spot. Copied cells arrive as tab-separated text, which the tool splits into rows and columns. CSV files, semicolon-separated files and Markdown pipe tables work the same way.

Which packages do I need in my preamble?

The tool lists them above the code. booktabs is needed for the toprule, midrule and bottomrule style, multirow for cells merged down several rows, and xcolor with the table option for striped rows. Plain multicolumn merges and the grid styles need no extra packages. The Full test document tab includes the right usepackage lines.

Why are my percent signs and underscores escaped?

In LaTeX the characters & % $ # _ { } ~ ^ and backslash have special meanings, so typing them directly breaks the table or the whole document. The tool turns them into \&, \%, \_ and so on. If a cell contains maths or a LaTeX command on purpose, switch escaping off and write those cells in LaTeX yourself.

How do I make a column wrap long text?

Set the column's alignment to Wrap (p) and enter a width such as 4cm or 0.3\textwidth in the style settings. The column then becomes p{4cm} and long text breaks onto several lines inside the cell instead of pushing the table off the page.

How do I refer to the table in my text?

Keep Floating table environment on and give the table a label such as tab:results. In your text write Table~\ref{tab:results}; LaTeX fills in the number when you compile. The caption sits above the table by default, as most style guides ask, and can be moved below it.

My table is too wide for the page. What can I do?

Choose a smaller font size such as \small or \footnotesize, turn long text columns into wrap (p) columns, reduce the number of columns by swapping rows and columns, or put the table on a landscape page with the pdflscape package. The checks under the code warn when a table has more than 8 columns.

ฟรีทั้งหมดไม่มีค่าใช้จ่าย ไม่ต้องสมัคร
ไฟล์เป็นส่วนตัวทุกอย่างทำงานในเบราว์เซอร์ของคุณ
ใช้ง่ายในภาษาของคุณมีหลายภาษา