Create some test document, and type in it:
foo
bar
bar
foo
Next, put the caret on the 1st foo line, and change it's outline level from "Body text" to "Level 1", as shown in this screenshot:
Repeat this action for 2nd foo line.
The same way, change the outline level of bar lines from "Body text" to "Level 2".
After these actions, you can use {toc \u}
to build a table of contents.
From my point of view, the \u
switch intended for use with custom heading styles (if you want to use something like "My Heading 1" and "My Heading 2" instead of build-in "Heading 1" and "Heading 2" and then create TOC based on these custom styles).
But, you also can create TOC based on your custom styles using the \t
switch.
That's mean, \u
and \t
do very similar job. \u
is more automated, while \t
gives you ability for more precise "tuning".