Printing a formatted table

版本 1.19.0.0 (13.8 KB) 作者: Daniel Wirtz
Allows to display and print simple text tables in MatLab. Plain and LaTeX format supported.
2.7K 次下载
更新时间 2015/7/27

查看许可证

@@ ATTENTION @@
I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.
@@@@
This class allows to display and print a table with arbitrary number of columns.

The first row can be distinguished from others by a HasHeader flag and the column separator string can be customized.

Basic automatic conversion allows to pass common, easily string-representable data types, and optionally sprintf-compatible format strings or callbacks can be passed for either all entries or entry-specific.

Optionally a caption can be added to the PrintTable upon construction, directly taking sprintf-like arguments.

Allows to save the table in the formats 'txt' (plain text), 'tex' (LaTeX tabular) and 'pdf' (Basically using pdflatex on 'tex' output).

The table can easily be transposed and sorted.

In difference to the submission #33717 I make use of classes and have more possibilities regarding output and appearance.

Now a basic automatic $Math$-Environment detection for LaTeX is available.

引用格式

Daniel Wirtz (2024). Printing a formatted table (https://www.mathworks.com/matlabcentral/fileexchange/33815-printing-a-formatted-table), MATLAB Central File Exchange. 检索时间: .

MATLAB 版本兼容性
创建方式 R2011b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.19.0.0

I've merged my separate submissions into KerMor/matlabtools (http://de.mathworks.com/matlabcentral/fileexchange/52299-kermor-matlabtools), which contains this submission. Please refer to that package to retrieve the current status.
Added a simple "sort" function

1.18.0.0

Bugfix for PrintTable LaTeX Table generation (printTex would throw an error sometimes)

1.16.0.0

- Stripping newlines automatically
- Soem verbose comments for LaTeX output about creating script

1.15.0.0

- bugfix for $$ wrapping also in txt mode
- added "append" method to join two tables

1.14.0.0

-New property "TexMathModeDetection" for cell content wrapping with $$
-New property "StripInsertedTabChars" for automatic stripping of tab chars
- Added a short comment of the applied settings to LaTeX output.
- Smaller improvements

1.13.0.0

Improved compatibility (no more wiggles ~)

1.12.0.0

Improved automatic TabCharLength computation

1.9.0.0

- More datatypes handled for "stringification"
- No more table title for TightPDF LaTeX export (one line)

1.8.0.0

- Added a ctranspose overload
- TabCharLen now public property
- Small fixes

1.5.0.0

-Saving to PDF now possible
-Option "TightPDF" for pdf to contain only actual table or be an article page
-HasRowHeader tag for easy formatting of non-first column entries
-Constructor takes caption with sprintf-arguments
-Bugfixes, Demos

1.4.0.0

Fixed some bugs and added LaTeX format output and optional captions to the PrintTable.

1.0.0.0