Name

IO_PRLATEX — Function to print a table in latex format

Calling Sequence

[LATEX_CODE]=IO_PRLATEX(ChemFICH,DATA_NUM,DATA_TXT,[TYPE,NBDEC,TITLES,CAPTION,TABCODE])

Parameters

ChemFICH

Path of the file where data should be printed in.

DATA_NUM

Numerical data matrix (matrix NxP).

DATA_TXT

Text data matrix (string matrix NxP2).

TYPE

Either 'NORMAL' to print under the latex environment 'table' or 'LONG' to print under the 'longtable' environment (default is 'NORMAL').

NBDEC

Number of decimals to retain in the printing format (matrix 1xP1, default is [1 .. 1])

TITLES

Titles of the P1+P2 columns (string matrix, default is ['C1' .. 'C(P1+P2)']).

TABCODE

Name of the latex label given to the table (default is 'tab:').

Description

  • This function prints in a text file containing the latex code of numerical and string matrices. LONG options should be used if the matrix spans over several pages.

Examples

    // Target file
   fpath=TMPDIR+'\table.tex';
   
   // Data
   NUM=rand(20,5);
   TXT = msprintf('Variable %d\n',(1:20)');
   
   // Printing the latex code
   IO_PRLATEX(fpath,NUM,TXT);    
   
   

See Also

IO_PRDATA , mclose , mfprintf

Authors

Julien Lerat

CEMAGREF Antony, HBAN Unit, julien.lerat@cemagref.fr