Baseline characteristics
Compare baseline measurements across two groups.
Paste a results table and get clean, compile-ready LaTeX code.
Select cells with Shift and click, or Shift and arrow keys.
Approximate typeset preview
% \usepackage{booktabs}
% \usepackage{siunitx}
\begin{table}[htbp]
\centering
\sisetup{uncertainty-mode=separate}
\setlength{\belowcaptionskip}{6pt}
\caption{Baseline characteristics}
\begin{tabular}{l S[table-format=2.1(2)] S[table-format=2.1(2)] S[table-format=<1.3]}
\toprule
Variable & {Control} & {Treatment} & {p value} \\
\midrule
Age, years & 54.3 \pm 8.2 & 52.8 \pm 7.9 & 0.340 \\
Female, n (\%) & {32 (53.3)} & {35 (58.3)} & 0.580 \\
BMI, kg/m\ensuremath{^{2}} & 24.8 \pm 3.1 & 25.2 \pm 2.9 & 0.470 \\
Smoker, n (\%) & {12 (20.0)} & {10 (16.7)} & 0.640 \\
CRP, mg/L & 3.2 \pm 1.1 & 5.8 \pm 2.3 & <0.001 \\
\bottomrule
\end{tabular}
\end{table}Start with a results table similar to yours, then replace the illustrative data.
Compare baseline measurements across two groups.
Compare model coefficients with standard errors beneath.
Place two measures beneath each group heading.
Group related rows under a shared label.
Keep a longer set of measurements in one table.
Compare mean scores and highlight the best value.
Create a LaTeX table online in four steps, starting with a spreadsheet.
Copy cells from Excel or import a CSV file.
Choose text, centered or decimal-aligned number columns.
Add a caption and notes, then choose the table rules.
Copy the table and required packages into Overleaf or your document.
A table in TeX combines a column specification with rows of cells.
The tabular environment defines the columns. Ampersands separate cells, while the double backslash ends a row. Booktabs adds horizontal rules.
\begin{tabular}{lr}
\toprule
Variable & Control \\
\midrule
Age, years & 54.3 \\
\bottomrule
\end{tabular}The code panel lists the packages needed for the selected options. Add them to your document preamble.
Decimal alignment makes values easier to compare.
Text columns align at an edge; siunitx S columns align numeric values at the decimal point. Headers and non-numeric entries are protected as text.
1.2 12.345 123 <0.01
1.2 12.345 123 <0.01
1.2 12.345 123 <0.01
Use a tabular environment to define columns and rows. This generator writes it for you and lists the required packages.
Copy cells in Excel and paste them into the editor, or import a CSV or XLSX file. Excel2LaTeX is another option available as an add-in.
The package list depends on your options. For example, booktabs provides horizontal rules and siunitx aligns numbers.
Select a rectangular group of cells and choose Merge selection. The generated code uses multirow or multicolumn as needed.
Choose Number for the column to use siunitx decimal alignment.
Choose column width, wrap text, or use a landscape page. Review legibility after compiling.
Turn on Long table across pages to use the longtable package. Scaled tables cannot break across pages.
Yes. Copy the code and required packages into your project. Beamer slides have less space, so check the table width and use a normal tabular rather than longtable.
No. Editing and generation run in your browser, and the draft is stored only for the current browser session.
Tables are centered by default with the centering command.
Set the arraystretch factor to 1.2 before the table to increase row spacing.
Import a CSV or paste a table from Word or Google Sheets. Line breaks within cells are preserved in the generated LaTeX table.
Enter notes in the table notes field. The generated code includes threeparttable or threeparttablex for a long table.