| 1 |
sdapslayout package |
| 2 |
=================== |
| 3 |
|
| 4 |
This package provides a set of more complex layouting options on top of the |
| 5 |
sdapsarray package. The following environments are provided: |
| 6 |
|
| 7 |
* :environ:`choicearray` |
| 8 |
* :environ:`rangearray` |
| 9 |
|
| 10 |
The rangearray is not quite as powerful, as it does not expose some of the |
| 11 |
sdapsarray options to the user. Note that much more complex custom layouts can |
| 12 |
be created directly with sdapsarray. |
| 13 |
|
| 14 |
.. warning:: The documentation here is currently incomplete! Pleases refer to the sdapsclassic :environ:`choicegroup` and :environ:`markgroup` documentation! |
| 15 |
|
| 16 |
.. environ:: |
| 17 |
\begin{choicearray}[kwargs] |
| 18 |
\end{choicearray} |
| 19 |
|
| 20 |
The following optional keyword parameters can be passed to the |
| 21 |
environment. These keyword parameters default to the values provided in the |
| 22 |
SDAPS context and can for example be modified globally for the document. |
| 23 |
|
| 24 |
:kwarg align: named alignment group, set to a common name to align multiple environments to each other |
| 25 |
:kwarg noalign: disable alignment (same as setting ``align`` to an empty value) |
| 26 |
:kwarg horizontal: set horizontal mode where each question is one row (default) |
| 27 |
:kwarg layouter: set the sdapsarray layouter (e.g. rotated for rotated column headers) |
| 28 |
:kwarg angle: set the angle of the column headers when in rotated mode |
| 29 |
:kwarg vertical: set vertical mode where each question is one column |
| 30 |
:kwarg type: the question type "multichoice" or "singlechoice" |
| 31 |
:kwarg multichoice: switch to multichoice "Choice" question mode |
| 32 |
:kwarg singlechoice: switch to singlechoice "Option" question mode |
| 33 |
|
| 34 |
|
| 35 |
The choicearray environment represents a tabular layout for a set of multiple |
| 36 |
choice questions which have the same possible answers. A new header is created |
| 37 |
in the metadata to group the questions. |
| 38 |
|
| 39 |
.. warning:: The header is currently *not shown* in the PDF and it cannot |
| 40 |
contain fragile content due to implementation constraints! This is an issue |
| 41 |
with the class which will be fixed. The exact final behaviour is not yet |
| 42 |
specified. |
| 43 |
|
| 44 |
.. sdaps:: Example of a choicearray environment |
| 45 |
|
| 46 |
\begin{choicearray}[layouter=rotated] |
| 47 |
\choice{Choice 1} |
| 48 |
\choice{Choice 2} |
| 49 |
\question{Question one} |
| 50 |
\question{Question two} |
| 51 |
\end{choicearray} |
| 52 |
|
| 53 |
.. sdaps:: Example of a vertical choicearray environment |
| 54 |
|
| 55 |
\begin{choicearray}[layouter=rotated,vertical] |
| 56 |
\choice{Choice 1} |
| 57 |
\choice{Choice 2} |
| 58 |
\question{Question one} |
| 59 |
\question{Question two} |
| 60 |
\end{choicearray} |
| 61 |
|
| 62 |
.. todo:: |
| 63 |
Right now all arguments can be overriden, this should not be the case. It |
| 64 |
would be correct if the variable name is loaded from the kwargs, and then |
| 65 |
the defaults for align and horizontal/vertical should be applied |
| 66 |
|
| 67 |
|
| 68 |
Inside the environment you need to first define all possible answers with |
| 69 |
choice macro and each question using the question macro. |
| 70 |
|
| 71 |
.. environ:: |
| 72 |
\begin{optionarray}[] |
| 73 |
\end{optionarray} |
| 74 |
|
| 75 |
.. todo:: Uh, document this. |
| 76 |
|
| 77 |
.. environ:: |
| 78 |
\begin{rangearray}[] |
| 79 |
\end{rangearray} |
| 80 |
|
| 81 |
.. todo:: Uh, document this. |