You define the order in the Group Key Section ie;
[ORDERS GROUP|ORDER STATE:Course:Starters,Mains,Desserts]
This is a sample of my kitchen ticket template;
[LAYOUT]
<C00>
<C00>
<C00>
<C00>
<C22>ORDER {TICKET NO}
{ENTITIES}
<J00>Date:{TICKET DATE}|Time:{TIME}
<F>-
{ORDERS}
<C00>
<C00>
<C00>
<C00>
<C00>
<B>
[ORDERS]
<EB>
<L01>{QUANTITY} x {NAME}
<DB>
{SORTED ORDER TAGS}
[ORDERS GROUP|ORDER STATE:Course:Starters,Mains,Desserts]
<C00>
<F>-
<C11>** {GROUP KEY} **
<C00>x{QUANTITY SUM}
<C00>
[ORDERS:Void]
<J10>{QUANTITY} x {NAME}|**Void**
{SORTED ORDER TAGS}
[SORTED ORDER TAGS]
-- Format for order tags
<L00> [=(TN('{ORDER TAG QUANTITY}') > 1 ? ' {ORDER TAG QUANTITY}x ' : ' ')] {ORDER TAG NAME}
[ENTITIES:Table]
-- Table entity format
<C11>Table: {ENTITY NAME}
[ENTITIES:Customer]
-- Customer entity format
<C11>Customer: {ENTITY NAME}
<C00>Phone: {ENTITY DATA:Phone}
Which gives;
ORDER 53
Table: T06
Date:15/10/2015 Time:19:32
------------------------------------------
------------------------------------------
** Starters **
x1
1 x Starter
------------------------------------------
** Mains **
x2
1 x Main
1 x Special
------------------------------------------
** Desserts **
x1
1 x Dessert
Sticky Toffee
Custard
My setup uses product caption tags and a order added rule to turn the tag into a state for the course.
I also have ask question which allows selecting of orders and change of course if say child wants a main served with the starters.