Note that GenTokens Options can be quite complex and the effect of various special cases be difficult to grasp. Do not hesitate to use AI assistants which have shown themselves extremely good at determining the issues you might encounter and explaining the solution.

There are 18 identical sets of options, relating to the tokens [GenTokens1] to [GenTokens18] respectively.
The top part of each set of options specifies the text and tokens that should appear on each line, and the range of dates for which these lines should be generated.
Text and Tokens to Display on Each Generated Line

You must make sure that you do not use DayValues in the tokens. Instead, place a pound sign "#" (without the quotes) where a DayValue should occur. At run-time, the # will be replaced by the proper DayValues, based on the values you set for Generate Lines Until and Step By, described further down this topic, starting at the DayValue of the current GenTokens token.

You can use special cases to override the text and tokens to display for some particular occasions.
Blank Lines on Outside Days
Blank lines on outside days omits the text and tokens from lines whose dates fall outside the month. The line will still have the paragraph formatting specified by the applicable line-ending options, including formatting selected by an outside-day condition. To omit the entire line, including its line ending, on selected days, use a Special Case with the Skip Line line ending.
This can be useful to be able to place all tokens in the same textbox and still be able to set the monthly outside days GridOption to Delete or Group Delete. If that is your intention, and the DayValue of the [GenTokens] token is potentially outside the month, then make sure that you place a never delete token in front of the [GenTokens] token.
Begin on WeekStart
The Begin on WeekStart option should be checked if you wish the GenTokens to begin on the first day of the week that contains the first of the month, as opposed to starting on the first of the month (the weekday used to determine the start of the week is the one specified in the week start option of the GridOptions script line property).
For ordinary GenTokens use, this option is similar to the two choices for the template’s First Date setting. When a GenTokens is placed in the same textbox and after a mini-calendar token, Begin on WeekStart is ignored. To start on the week containing the first of the month, add the :ws embedded tokens weekstart modifier to the mini-calendar marker. The modifier, rather than this checkbox, controls the date associated with DayValue 1.
Generate lines until
The Generate lines until option is used to tell Q++Studio how many lines should be generated. The possible values are:
![]()
This setting, when selected, displays an additional control Step by, whose default value is 1, but which allows you to specify that each new line generated is more than 1 day after the previous one.
Note that the calculation takes into account the value of the first date of template property of the current template, so that in the case of a value of Week of the 1st, the number of lines will usually be more than the number of days in the month, since these grids start at the beginning of the week prior to the 1st of the month. |
|
Relative DayValue |
Using this setting will generate lines until the DayValue relative to the DayValue of the GenTokens reaches a certain value. By relative, we mean within the same month (ie. modulo 42). So for example, if we have a [85GenTokens1] token and a relative DayValue of 17, then lines will be generated for DayValues from 85 to 101 (= 2*42 + 17). |
Day of Month |
This setting is useful when months are split across 2 columns. An example may have [1GenTokens1] running until the Day of Month 17, and an [18GenTokens2] running until the End of the Month. |
![]()
➢This setting, when selected, displays an additional control Step by which allows you to specify that each new line generated is more than one day after the previous one.
![]()
By changing this value, to 7 for example, you can display thicker lines to separate months in planner-style diaries such as the one shown on the right (or here).
In the example above, the horizontal rules are displayed using one vertical textbox per weekday, with GenTokens running from [1GenTokens1] to [7GenTokens1], each a Number of Lines value of 27 and using a Step by value of 7 days.
To determine how many times to step by 7 days, you can refer to the minimum and maximum number of weeks needed to cover a given number of months table found in the appendices |
|
Minimum Number of Lines or EOM |
This setting is a variation of the Number of Lines setting, above, and is usually used when months are split across 2 columns, and you wish to have the same index GenTokens for both halves of the month.
➢This setting, when selected, displays an additional control Step by which allows you to specify that each new line generated is more than one day after the previous one.
Using this setting, generation stops when the specified number of lines or the end of the month is reached, whichever comes first. Here, minimum means the smaller of those two limits, not a guaranteed minimum number of lines.
Use this mode when the first column contains 16 or more days (Number of Lines is 16 or above). It prevents the second column from continuing beyond the end of the month when fewer days remain. |
Number of Lines / EOM |
This setting is a variation of the Number of Lines setting, above, and is usually used when months are split across 2 columns, and you wish to have the same index GenTokens for both halves of the month.
➢This setting, when selected, displays an additional control Step by which allows you to specify that each new line generated is more than one day after the previous one.
Using this setting, lines of the first half of the month will be generated until the number specified is reached, and lines of the second half of the month will be generated until the end of the month is reached.
Use this mode when the first column contains 15 or fewer days (Number of Lines is 15 or below). The first column uses that number of lines, while the second continues to the end of the month even when more days remain than the first-column count.
For this option, Q++Studio uses the DayValue of the current GenTokens token to determine which half of the month it represents. DayValues from 1 to 9 are treated as the first half; DayValues of 10 or above are treated as the second half. For example, [8GenTokens1] is treated as the first half, while [16GenTokens1] is treated as the second half. |
Line Endings and Formatting

You can specify the default line ending to use and also different line endings (and paragraph formatting to use in special cases.
Default line ending |
This setting specifies which line ending settings to use by default, ie. if none of the Special Cases below are true.
Note that if you select Hard Return for this setting, each line generated will have the paragraph attributes of the current [GenTokens]. This is important because, if there is no paragraph mark after the GenTokens token, any rules above/below that are part of the paragraph attributes of the token will not be visible in the GridTemplate, but will become visible in the output file because each generated line ends with a line ending (even the last generated line). |
No line ending when token line is blank |
This setting allows you to specify that there should be no line ending whenever the series of tokens converts to a blank line.
This is particularly useful to generate monthly or yearly tables of events that do not occur everyday (holidays, planetary events, ...). This is similar, but more powerful than using duration suffixes with holidays tokens.
Note that this option considers a token line to be blank if all it contains is non-visible characters and spaces, so that a line containing a tab and a Moon token would be counted as blank on dates when there are no Moon phases, although the tab is still there. |
You can also specify a series of Special Cases that apply special line ending and paragraph formatting (you can also override the text and tokens to display for some particular occasions).

➢Note that GenTokens Options can be quite complex and the effect of various special cases be difficult to grasp. Do not hesitate to use AI assistants which have shown themselves extremely good at determining the issues you might encounter and explaining the solution.
For example, you might want to separate weeks with a line under and shade dates of the current week.Such an example would be handled by special cases as follows:

Q++Studio tests enabled Special Cases in numerical order and stops at the first match. For example, if Cases 1 and 3 both match a date, only Case 1 applies. Check the order whenever cases overlap, and use conditions that must be false where needed to prevent an earlier case from matching unintended dates.
To see the details of the condition or line ending used, without modifying it, you do not need to click on the button edit; simply place your mouse over the control and a pop-up hint will display a summary of the settings used. |
![]() |
![]() |
To avoid having to copy multiple settings manually between the various GenTokens, you can use the Copy to/from button located at the top right of the TabSheet to copy GenTokens options and sub-options all at once.
See also: GenTokens Tokens, Special Case Conditions, Line Endings and Formatting, Copying GenTokens Options.
Topic 175265, last updated on 16-Sep-2026