TABLE OF CONTENTS
::pwtk::latex::tabulateFigs
SYNOPSIS
proc ::pwtk::latex::tabulateFigs {latexFile figList titleList infoList textList {npage 1} {ncol -1} {composite 0}} {
PURPOSE
Tabulate figures into a LaTeX document.
ARGUMENTS
- latexFile -- name of the resulting LaTeX file
- figList -- list of figures to tabulate
- titleList -- title for each figure (written above the figure), e.g., name of the I/O file from where the figure originates
- infoList -- info text for each figure (written above the figure), e.g., type of structure (initial|latest|optimized)
- textList -- text for each figure (written below the figure), e.g., a total energy
- npage -- (optional) on how many pages to arrange figures
- ncol -- (optional) in how many tabular columns to arrange figures
- composite -- (optional) if true, do not write the LaTeX file but store the generated snippet into memory (typically used when tabulateFigs is called multiple times; the last time, tabulateFigs should be called with composite=false to write the LaTeX file)
TODO
{npage 1} {ncol -1} {composite 0} arguments are not elegant, transform into options
SOURCE
variable fid variable content if { ! $composite } { set fid [open $latexFile w] make_head if { [info exists content] } { eval $content unset content } make_longtable $figList $titleList $infoList $textList $npage $ncol make_tail close $fid } else { append content [list make_longtable "$figList" "$titleList" "$infoList" "$textList" $npage $ncol]\n } }