pretext icon indicating copy to clipboard operation
pretext copied to clipboard

Add @cols attribute to #choices

Open thfunk opened this issue 8 months ago • 2 comments

Would be nice to be able to give multiple choice options in a 2x2 rather than a 4x1. Allowing for something like the following to work:

Multiple-Choice, Not Randomized, One Answer stop signs

What color is a stop sign?

Green

Red

White

Blue

thfunk avatar May 17 '25 04:05 thfunk

One new line of code to make static function with a @cols attribute. See bf1e886c1e0915b760967ecae9f1106054b2da4c

@bnmnetp: I wonder if the RS component can leverage the existing CSS to layout lists in columns? See new example (currently 5.9.7) for 5 choices in 3 columns. Nothing will happen in HTML yet. Maybe we can talk Monday about where I can drop an attribute in the HTML for RS to react to, and/or info on the choices.

Thanks again, @thfunk. This will help cut down on a lot of wasted whitespace in output formats.

rbeezer avatar May 17 '25 16:05 rbeezer

I have this same request. I just wrote a problem with twelve multiple choice (choose all that apply) answers and two columns would be nice. I tried adding cols="2" inside but nothing happened...in HTML.

tjmagnus avatar Jul 10 '25 01:07 tjmagnus