writelatextable - writes a 2D array to a LaTeX table

버전 1.0.0.0 (4.63 KB) 작성자: Anthony Bathgate
Writes a 2d array to a LaTeX table given heading and format specifiers.
다운로드 수: 403
업데이트 날짜: 2011/9/15

라이선스 보기

It can make nice looking LaTeX tables.

It was designed to work with a GUI (latextableassist.m), which simplifies the compilation of table formats.

By specifying the output file name, table caption, label, column format, and column headings it writes a LaTeX table that can have different column dividers and headings that span multiple rows and/or columns.

The table's body is filled with the content of a 2D number array and formatted with a cell array of strings combining LaTeX style column format strings (like '|c|') and printf style ones (like '%10.8e') to get strings like '|c%10.8e|'.

The column headings are defined using an array of structs like:
Headers(1).text = 'Altitude [km]';
Headers(1).format = '|||c||';
Headers(1).rows = [1 2];
Headers(1).cols = [1];
to give the first heading entry shown in the attached picture.

Captions and LaTeX labels can also be chosen.

Assembling the format strings and header structs by hand can get tedious so I recommend using this in conjunction with latextableassist.m but it isn't required.

If the headings span rows and/or columns you will need the LaTeX multirow package.

인용 양식

Anthony Bathgate (2024). writelatextable - writes a 2D array to a LaTeX table (https://www.mathworks.com/matlabcentral/fileexchange/32908-writelatextable-writes-a-2d-array-to-a-latex-table), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2009a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 LaTeX에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0