@@ -137,6 +137,15 @@ =head1 DESCRIPTION
137
137
unnecessary in a static output format.) Default: 1, except 0 for
138
138
DropDownTF.
139
139
140
+ =item C<S<< inlineSize => number >>>
141
+
142
+ In PDF output, this controls break point between printing the list of
143
+ options as an inline list [A/B/C] or multiline bullet list. If the total
144
+ number of characters (of all items combined) is greater than or equal to
145
+ this setting, or an item contains a '[', '/', or ']' character, then the
146
+ list of options is printed as a bullet list, otherwise an inline list is
147
+ used. Default: 25
148
+
140
149
=back
141
150
142
151
To insert the drop-down into the problem text when using PGML:
@@ -231,6 +240,7 @@ sub new {
231
240
choices => $choices ,
232
241
placeholder => $options {placeholder } // ' ' ,
233
242
showInStatic => $options {showInStatic } // 1,
243
+ inlineSize => $options {inlineSize } // 25,
234
244
values => $options {values } // [],
235
245
noindex => $options {noindex } // 0
236
246
}, $class ;
@@ -437,15 +447,13 @@ sub MENU {
437
447
$menu = qq( <fillin name="$name "/>) ;
438
448
}
439
449
} elsif ($main::displayMode eq " TeX" && $self -> {showInStatic }) {
440
- # if the total number of characters is not more than
441
- # 30 and not containing / or ] then we print out
450
+ # Unless the total number of characters is greater than or equal to the
451
+ # inlineSize setting (default 25), or contains [, ], or / then we print out
442
452
# the select as a string: [A/B/C]
443
- if (length (join (' ' , @list )) < 25
444
- && !grep (/ (\/ |\[ |\] )/ , @list ))
445
- {
453
+ unless (length (join (' ' , @list )) >= $self -> {inlineSize } || grep (/ (\/ |\[ |\] )/ , @list )) {
446
454
$menu = ' [' . join (' /' , map { $self -> quoteTeX($_ ) } @list ) . ' ]' ;
447
455
} else {
448
- # otherwise we print a bulleted list
456
+ # Otherwise we print a bulleted list.
449
457
$menu = ' \par\vtop{\def\bitem{\hbox\bgroup\indent\strut\textbullet\ \ignorespaces}\let\eitem=\egroup' ;
450
458
$menu = " \n " . $menu . " \n " ;
451
459
foreach my $option (@list ) {
0 commit comments