TABLE2LATEX
Version 3.0 (1.21 KB) by
ELENI ALOUPOGIANNI
TABLE2LATEX converts a table to the tabular form for use in LaTeX.
table2latex converts a table to the tabular form for use in LaTeX.
Input args
T: a table of elements
selectedCols: index vector of table columns that need to be
printed. Default: All columns.
label: the label for references to the table. Default: Empty.
caption: the caption of the table. Default: Empty.
colWidths: the widths for each column. Default: Equally adjusted
width.
isLandscape: flag to rotate table to landscape mode. Default:
Vertical mode.
notes: a cell array of additional notes after the table. Default: Not
used.
isAfterpage: flag to execute commands after pagebreak. Default: no
afterpage.
Output args
Ttex: the formatted text for the table
Dependencies
None
LaTeX requirements for landscape view:
\usepackage{afterpage}
\usepackage{pdflscape} %rotates page
LaTeX requirements for table notes:
\usepackage[flushleft]{threeparttable}
Usage
Ttex = table2latex(T);
Ttex = table2latex(T, [1:5]);
Ttex = table2latex(T, [], 'tab:table1', 'Experimental Values', [], false, {'These are example values.'}, false);
The function prints the formatted table, which then
can be copied and pasted to LaTeX as is.
Created by foxelas [https://github.com/foxelas/] (2022)
Cite As
ELENI ALOUPOGIANNI (2025). TABLE2LATEX (https://github.com/foxelas/Matlab-assisting-functions/releases/tag/3.0), GitHub. Retrieved .
MATLAB Release Compatibility
Created with
R2019b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
3.0 | See release notes for this release on GitHub: https://github.com/foxelas/Matlab-assisting-functions/releases/tag/3.0 |
||
2.1 | See release notes for this release on GitHub: https://github.com/foxelas/Matlab-assisting-functions/releases/tag/2.1 |
||
2.0 | See release notes for this release on GitHub: https://github.com/foxelas/Matlab-assisting-functions/releases/tag/2.0 |
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.