| 1 |
|
| 2 |
<!DOCTYPE html> |
| 3 |
|
| 4 |
<html> |
| 5 |
<head> |
| 6 |
<meta charset="utf-8" /> |
| 7 |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| 8 |
<title>sdapslayout package — sdaps-class 0.1 documentation</title> |
| 9 |
<link rel="stylesheet" href="_static/pygments.css" type="text/css" /> |
| 10 |
<link rel="stylesheet" href="_static/classic.css" type="text/css" /> |
| 11 |
<link rel="stylesheet" type="text/css" href="_static/css/sdapstex.css" /> |
| 12 |
|
| 13 |
<script id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> |
| 14 |
<script src="_static/jquery.js"></script> |
| 15 |
<script src="_static/underscore.js"></script> |
| 16 |
<script src="_static/doctools.js"></script> |
| 17 |
|
| 18 |
<link rel="index" title="Index" href="genindex.html" /> |
| 19 |
<link rel="search" title="Search" href="search.html" /> |
| 20 |
<link rel="next" title="sdapspdf package" href="sdapspdf.html" /> |
| 21 |
<link rel="prev" title="sdapsclassic class" href="sdapsclassic.html" /> |
| 22 |
</head><body> |
| 23 |
<div class="related" role="navigation" aria-label="related navigation"> |
| 24 |
<h3>Navigation</h3> |
| 25 |
<ul> |
| 26 |
<li class="right" style="margin-right: 10px"> |
| 27 |
<a href="genindex.html" title="General Index" |
| 28 |
accesskey="I">index</a></li> |
| 29 |
<li class="right" > |
| 30 |
<a href="sdapspdf.html" title="sdapspdf package" |
| 31 |
accesskey="N">next</a> |</li> |
| 32 |
<li class="right" > |
| 33 |
<a href="sdapsclassic.html" title="sdapsclassic class" |
| 34 |
accesskey="P">previous</a> |</li> |
| 35 |
<li class="nav-item nav-item-0"><a href="index.html">sdaps-class 0.1 documentation</a> »</li> |
| 36 |
<li class="nav-item nav-item-this"><a href="">sdapslayout package</a></li> |
| 37 |
</ul> |
| 38 |
</div> |
| 39 |
|
| 40 |
<div class="document"> |
| 41 |
<div class="documentwrapper"> |
| 42 |
<div class="bodywrapper"> |
| 43 |
<div class="body" role="main"> |
| 44 |
|
| 45 |
<div class="section" id="sdapslayout-package"> |
| 46 |
<h1>sdapslayout package<a class="headerlink" href="#sdapslayout-package" title="Permalink to this headline">¶</a></h1> |
| 47 |
<p>This package provides a set of more complex layouting options on top of the |
| 48 |
sdapsarray package. The following environments are provided:</p> |
| 49 |
<ul class="simple"> |
| 50 |
<li><p><a class="reference internal" href="#choicearray" title="choicearray"><code class="xref tex tex-environ docutils literal notranslate"><span class="pre">choicearray</span></code></a></p></li> |
| 51 |
<li><p><a class="reference internal" href="#rangearray" title="rangearray"><code class="xref tex tex-environ docutils literal notranslate"><span class="pre">rangearray</span></code></a></p></li> |
| 52 |
</ul> |
| 53 |
<p>The rangearray is not quite as powerful, as it does not expose some of the |
| 54 |
sdapsarray options to the user. Note that much more complex custom layouts can |
| 55 |
be created directly with sdapsarray.</p> |
| 56 |
<div class="admonition warning"> |
| 57 |
<p class="admonition-title">Warning</p> |
| 58 |
<p>The documentation here is currently incomplete! Pleases refer to the sdapsclassic <a class="reference internal" href="sdapsclassic.html#choicegroup" title="choicegroup"><code class="xref tex tex-environ docutils literal notranslate"><span class="pre">choicegroup</span></code></a> and <a class="reference internal" href="sdapsclassic.html#markgroup" title="markgroup"><code class="xref tex tex-environ docutils literal notranslate"><span class="pre">markgroup</span></code></a> documentation!</p> |
| 59 |
</div> |
| 60 |
<dl class="tex environ"> |
| 61 |
<dt id="choicearray"> |
| 62 |
<em class="property">\begin{</em><code class="sig-name descname">choicearray</code><em class="property">}</em><span class="sig"> <span class="sig-paren">[</span><em>kwargs</em><span class="sig-paren">]</span></span><br/><span class="sig"></span><br/><em class="property">\end{</em><code class="sig-name descname">choicearray</code><em class="property">}</em><a class="headerlink" href="#choicearray" title="Permalink to this definition">¶</a></dt> |
| 63 |
<dd><p>The following optional keyword parameters can be passed to the |
| 64 |
environment. These keyword parameters default to the values provided in the |
| 65 |
SDAPS context and can for example be modified globally for the document.</p> |
| 66 |
<dl class="field-list simple"> |
| 67 |
<dt class="field-odd">Keyword Arguments</dt> |
| 68 |
<dd class="field-odd"><ul class="simple"> |
| 69 |
<li><p><strong>align</strong> – named alignment group, set to a common name to align multiple environments to each other</p></li> |
| 70 |
<li><p><strong>noalign</strong> – disable alignment (same as setting <code class="docutils literal notranslate"><span class="pre">align</span></code> to an empty value)</p></li> |
| 71 |
<li><p><strong>horizontal</strong> – set horizontal mode where each question is one row (default)</p></li> |
| 72 |
<li><p><strong>layouter</strong> – set the sdapsarray layouter (e.g. rotated for rotated column headers)</p></li> |
| 73 |
<li><p><strong>angle</strong> – set the angle of the column headers when in rotated mode</p></li> |
| 74 |
<li><p><strong>vertical</strong> – set vertical mode where each question is one column</p></li> |
| 75 |
<li><p><strong>type</strong> – the question type “multichoice” or “singlechoice”</p></li> |
| 76 |
<li><p><strong>multichoice</strong> – switch to multichoice “Choice” question mode</p></li> |
| 77 |
<li><p><strong>singlechoice</strong> – switch to singlechoice “Option” question mode</p></li> |
| 78 |
</ul> |
| 79 |
</dd> |
| 80 |
</dl> |
| 81 |
<p>The choicearray environment represents a tabular layout for a set of multiple |
| 82 |
choice questions which have the same possible answers. A new header is created |
| 83 |
in the metadata to group the questions.</p> |
| 84 |
<div class="admonition warning"> |
| 85 |
<p class="admonition-title">Warning</p> |
| 86 |
<p>The header is currently <em>not shown</em> in the PDF and it cannot |
| 87 |
contain fragile content due to implementation constraints! This is an issue |
| 88 |
with the class which will be fixed. The exact final behaviour is not yet |
| 89 |
specified.</p> |
| 90 |
</div> |
| 91 |
<div class="figure"> |
| 92 |
<div class="tabs"> |
| 93 |
<input type="radio" id="tab-code-31" class="tab-code" name="tab-group-31" ><label for="tab-code-31" class="label-code">Example LaTeX code</label><input type="radio" id="tab-rendering-31" class="tab-rendering" name="tab-group-31" checked><label for="tab-rendering-31" class="label-rendering">Result</label><div class="content-code"> |
| 94 |
<div class="highlight"><pre><span></span><span class="k">\begin</span><span class="nb">{</span>choicearray<span class="nb">}</span>[layouter=rotated] |
| 95 |
<span class="k">\choice</span><span class="nb">{</span>Choice 1<span class="nb">}</span> |
| 96 |
<span class="k">\choice</span><span class="nb">{</span>Choice 2<span class="nb">}</span> |
| 97 |
<span class="k">\question</span><span class="nb">{</span>Question one<span class="nb">}</span> |
| 98 |
<span class="k">\question</span><span class="nb">{</span>Question two<span class="nb">}</span> |
| 99 |
<span class="k">\end</span><span class="nb">{</span>choicearray<span class="nb">}</span> |
| 100 |
</pre></div> |
| 101 |
</div><div class="content-rendering"> |
| 102 |
<p><img src="_images/sdaps-33dfefa58981354e1e92db235f30d93f630a87ca.svg" alt="\begin{choicearray}[layouter=rotated] |
| 103 |
\choice{Choice 1} |
| 104 |
\choice{Choice 2} |
| 105 |
\question{Question one} |
| 106 |
\question{Question two} |
| 107 |
\end{choicearray}" /></p> |
| 108 |
</div></div><p class="caption">Example of a choicearray environment</p></div><div class="figure"> |
| 109 |
<div class="tabs"> |
| 110 |
<input type="radio" id="tab-code-32" class="tab-code" name="tab-group-32" ><label for="tab-code-32" class="label-code">Example LaTeX code</label><input type="radio" id="tab-rendering-32" class="tab-rendering" name="tab-group-32" checked><label for="tab-rendering-32" class="label-rendering">Result</label><div class="content-code"> |
| 111 |
<div class="highlight"><pre><span></span><span class="k">\begin</span><span class="nb">{</span>choicearray<span class="nb">}</span>[layouter=rotated,vertical] |
| 112 |
<span class="k">\choice</span><span class="nb">{</span>Choice 1<span class="nb">}</span> |
| 113 |
<span class="k">\choice</span><span class="nb">{</span>Choice 2<span class="nb">}</span> |
| 114 |
<span class="k">\question</span><span class="nb">{</span>Question one<span class="nb">}</span> |
| 115 |
<span class="k">\question</span><span class="nb">{</span>Question two<span class="nb">}</span> |
| 116 |
<span class="k">\end</span><span class="nb">{</span>choicearray<span class="nb">}</span> |
| 117 |
</pre></div> |
| 118 |
</div><div class="content-rendering"> |
| 119 |
<p><img src="_images/sdaps-b7991d2b528a292b0e29ad477da88255d83dec4f.svg" alt="\begin{choicearray}[layouter=rotated,vertical] |
| 120 |
\choice{Choice 1} |
| 121 |
\choice{Choice 2} |
| 122 |
\question{Question one} |
| 123 |
\question{Question two} |
| 124 |
\end{choicearray}" /></p> |
| 125 |
</div></div><p class="caption">Example of a vertical choicearray environment</p></div><div class="admonition-todo admonition" id="id1"> |
| 126 |
<p class="admonition-title">Todo</p> |
| 127 |
<p>Right now all arguments can be overriden, this should not be the case. It |
| 128 |
would be correct if the variable name is loaded from the kwargs, and then |
| 129 |
the defaults for align and horizontal/vertical should be applied</p> |
| 130 |
</div> |
| 131 |
<p>Inside the environment you need to first define all possible answers with |
| 132 |
choice macro and each question using the question macro.</p> |
| 133 |
</dd></dl> |
| 134 |
|
| 135 |
<dl class="tex environ"> |
| 136 |
<dt id="optionarray"> |
| 137 |
<em class="property">\begin{</em><code class="sig-name descname">optionarray</code><em class="property">}</em><span class="sig"> <span class="sig-paren">[</span><em></em><span class="sig-paren">]</span></span><br/><span class="sig"></span><br/><em class="property">\end{</em><code class="sig-name descname">optionarray</code><em class="property">}</em><a class="headerlink" href="#optionarray" title="Permalink to this definition">¶</a></dt> |
| 138 |
<dd><div class="admonition-todo admonition" id="id2"> |
| 139 |
<p class="admonition-title">Todo</p> |
| 140 |
<p>Uh, document this.</p> |
| 141 |
</div> |
| 142 |
</dd></dl> |
| 143 |
|
| 144 |
<dl class="tex environ"> |
| 145 |
<dt id="rangearray"> |
| 146 |
<em class="property">\begin{</em><code class="sig-name descname">rangearray</code><em class="property">}</em><span class="sig"> <span class="sig-paren">[</span><em></em><span class="sig-paren">]</span></span><br/><span class="sig"></span><br/><em class="property">\end{</em><code class="sig-name descname">rangearray</code><em class="property">}</em><a class="headerlink" href="#rangearray" title="Permalink to this definition">¶</a></dt> |
| 147 |
<dd><div class="admonition-todo admonition" id="id3"> |
| 148 |
<p class="admonition-title">Todo</p> |
| 149 |
<p>Uh, document this.</p> |
| 150 |
</div> |
| 151 |
</dd></dl> |
| 152 |
|
| 153 |
</div> |
| 154 |
|
| 155 |
|
| 156 |
<div class="clearer"></div> |
| 157 |
</div> |
| 158 |
</div> |
| 159 |
</div> |
| 160 |
<div class="sphinxsidebar" role="navigation" aria-label="main navigation"> |
| 161 |
<div class="sphinxsidebarwrapper"> |
| 162 |
<h4>Previous topic</h4> |
| 163 |
<p class="topless"><a href="sdapsclassic.html" |
| 164 |
title="previous chapter">sdapsclassic class</a></p> |
| 165 |
<h4>Next topic</h4> |
| 166 |
<p class="topless"><a href="sdapspdf.html" |
| 167 |
title="next chapter">sdapspdf package</a></p> |
| 168 |
<div role="note" aria-label="source link"> |
| 169 |
<h3>This Page</h3> |
| 170 |
<ul class="this-page-menu"> |
| 171 |
<li><a href="_sources/sdapslayout.rst.txt" |
| 172 |
rel="nofollow">Show Source</a></li> |
| 173 |
</ul> |
| 174 |
</div> |
| 175 |
<div id="searchbox" style="display: none" role="search"> |
| 176 |
<h3 id="searchlabel">Quick search</h3> |
| 177 |
<div class="searchformwrapper"> |
| 178 |
<form class="search" action="search.html" method="get"> |
| 179 |
<input type="text" name="q" aria-labelledby="searchlabel" /> |
| 180 |
<input type="submit" value="Go" /> |
| 181 |
</form> |
| 182 |
</div> |
| 183 |
</div> |
| 184 |
<script>$('#searchbox').show(0);</script> |
| 185 |
</div> |
| 186 |
</div> |
| 187 |
<div class="clearer"></div> |
| 188 |
</div> |
| 189 |
<div class="related" role="navigation" aria-label="related navigation"> |
| 190 |
<h3>Navigation</h3> |
| 191 |
<ul> |
| 192 |
<li class="right" style="margin-right: 10px"> |
| 193 |
<a href="genindex.html" title="General Index" |
| 194 |
>index</a></li> |
| 195 |
<li class="right" > |
| 196 |
<a href="sdapspdf.html" title="sdapspdf package" |
| 197 |
>next</a> |</li> |
| 198 |
<li class="right" > |
| 199 |
<a href="sdapsclassic.html" title="sdapsclassic class" |
| 200 |
>previous</a> |</li> |
| 201 |
<li class="nav-item nav-item-0"><a href="index.html">sdaps-class 0.1 documentation</a> »</li> |
| 202 |
<li class="nav-item nav-item-this"><a href="">sdapslayout package</a></li> |
| 203 |
</ul> |
| 204 |
</div> |
| 205 |
<div class="footer" role="contentinfo"> |
| 206 |
© Copyright 2016, Benjamin Berg. |
| 207 |
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3. |
| 208 |
</div> |
| 209 |
</body> |
| 210 |
</html> |