Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a nested table in Rich Text Format (rtf)

Tags:

rtf

How do you make a table within a cell in rtf? Here's the simplest table I know:

{\rtf\ansi\deff0

\trowd
\intbl
\cellx1000 Item 1\cell
\cellx2000 Item 2\cell
\row

}

How do I replace Item 1 and Item 2 with tables that have an arbitrary number of rows & columns?

like image 888
dmodo Avatar asked Sep 12 '25 00:09

dmodo


1 Answers

Use itapX notation for table level definition. Try this:

{\rtf\ansi\deff0


\trowd

\intbl\itap1\cellx2000
\ql{Item 1 - Before}
\par 

\intbl\itap2
\ql{Table inside item 1 \line }
{\nestcell{\nonesttables\par}\pard}
{\*\nesttableprops \trowd\cellx1000\nestrow}

\intbl\itap1
\ql{Item 1 - After}
\cell

\intbl\itap1\cellx4000
\ql{Item 2}
\cell

\row
\pard\itap0

}

For other examples or tests see the sigma-z project "PHPRtfLite". Other samples and basic editor for help you.

https://github.com/phprtflite/PHPRtfLite

like image 130
Bráulio Figueiredo Avatar answered Sep 16 '25 10:09

Bráulio Figueiredo