Formatting directives in flexmat tables
Text Formatting
- Italic Text: Use
\ibefore your text to make it italic. Example:\iThis text is italic. - Bold Text: Use
\bto bold your text. Example:\bThis text is bold.
Superscript
To create superscripts, use \super followed by the number or text you want to superscript. Example: H\super2 for H2.
Line Formatting
- Horizontal Line:
\hlinecreates a single horizontal line across the table row. - Double Horizontal Line:
\dhlineis used for creating a double horizontal line. - Vertical Line: Use
\vlineto insert a vertical line.
Table Formatting
- Row Header:
\rowheaderwill format the current row as a header row, typically making the text bold and adding double underline. - Horizontal Merge: Use
\hmerge_nto merge ‘n’ number of cells horizontally. Replace ‘n’ with the number of cells. Example:\hmerge_2merges the next two cells horizontally. - Vertical Merge:
\vmerge_nmerges ‘n’ number of cells vertically. Replace ‘n’ with the number of cells to merge. Example:\vmerge_3merges the next three cells vertically.
Text Alignment in Cells
- Right Alignment:
\qraligns the text in a cell to the right. - Left Alignment:
\qlaligns text to the left in a cell. - Center Alignment:
\qccenters the text in a cell.
Example Use
* Save the file name
asdocx setfile, save(Example 1.docx) replace
⠀
flexmat reset
⠀
* Set vertical lines
flexmat addrow, data(\vlineVariables, \vlineCoefficients, \vlineR \super3)
flexmat addrow, data(Price, 0.235, 0.78) row(2)
⠀
* Make the text 0.980 bold and use superscript 3 with it
flexmat addrow, data(MPG, 0.3658, \b0.980\super3) row(3)
flexmat addrow, data(Weight, 0.9874, 0.8741) row(4)
⠀
* Export
asdocx export
