Debian Codegraph @

texmf-dist/doc/latex/sdaps/html/FAQ.html

raw
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>Frequently Asked Questions &#8212; 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="Creating custom layouts using base commands" href="customlayout.html" />
21 <link rel="prev" title="Welcome to sdaps-class’s documentation!" href="index.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="customlayout.html" title="Creating custom layouts using base commands"
31 accesskey="N">next</a> |</li>
32 <li class="right" >
33 <a href="index.html" title="Welcome to sdaps-class’s documentation!"
34 accesskey="P">previous</a> |</li>
35 <li class="nav-item nav-item-0"><a href="index.html">sdaps-class 0.1 documentation</a> &#187;</li>
36 <li class="nav-item nav-item-this"><a href="">Frequently Asked Questions</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="frequently-asked-questions">
46 <h1>Frequently Asked Questions<a class="headerlink" href="#frequently-asked-questions" title="Permalink to this headline">¶</a></h1>
47 <div class="section" id="numeric-field-input">
48 <h2>Numeric field input<a class="headerlink" href="#numeric-field-input" title="Permalink to this headline">¶</a></h2>
49 <p>Sometimes the input of longer numbers is required. Freeform text cannot be used
50 so that other methods are necessary. The method presented here is a field of
51 checkboxes, but further options may exist depending on the solution:</p>
52 <ul class="simple">
53 <li><p>Use of a unique questionnaire ID and be careful when handing out the questionnaire</p></li>
54 <li><p><a class="reference internal" href="customlayout.html#codeboxes"><span class="std std-ref">Codeboxes</span></a>, i.e. text fields where a barcode sticker is placed</p></li>
55 </ul>
56 <p>In this example, each digit of an 8 digit number is asked for using an
57 <a class="reference internal" href="sdapsclassic.html#optiongroup" title="optiongroup"><code class="xref tex tex-environ docutils literal notranslate"><span class="pre">optiongroup</span></code></a> environment.</p>
58 <div class="figure">
59 <div class="tabs">
60 <input type="radio" id="tab-code-1" class="tab-code" name="tab-group-1" ><label for="tab-code-1" class="label-code">Example LaTeX code</label><input type="radio" id="tab-rendering-1" class="tab-rendering" name="tab-group-1" checked><label for="tab-rendering-1" class="label-rendering">Result</label><div class="content-code">
61 <div class="highlight"><pre><span></span><span class="k">\begin</span><span class="nb">{</span>optiongroup<span class="nb">}</span>[vertical]<span class="nb">{</span>Please enter the 8 digit number<span class="nb">}</span>
62 <span class="c">% Set the value as it would be 1 based otherwise, so we can just</span>
63 <span class="c">% use it directly from the data export</span>
64 <span class="k">\choice</span><span class="na">[val=0]</span><span class="nb">{</span>0<span class="nb">}</span>
65 <span class="k">\choice</span><span class="na">[val=1]</span><span class="nb">{</span>1<span class="nb">}</span>
66 <span class="k">\choice</span><span class="na">[val=2]</span><span class="nb">{</span>2<span class="nb">}</span>
67 <span class="k">\choice</span><span class="na">[val=3]</span><span class="nb">{</span>3<span class="nb">}</span>
68 <span class="k">\choice</span><span class="na">[val=4]</span><span class="nb">{</span>4<span class="nb">}</span>
69 <span class="k">\choice</span><span class="na">[val=5]</span><span class="nb">{</span>5<span class="nb">}</span>
70 <span class="k">\choice</span><span class="na">[val=6]</span><span class="nb">{</span>6<span class="nb">}</span>
71 <span class="k">\choice</span><span class="na">[val=7]</span><span class="nb">{</span>7<span class="nb">}</span>
72 <span class="k">\choice</span><span class="na">[val=8]</span><span class="nb">{</span>8<span class="nb">}</span>
73 <span class="k">\choice</span><span class="na">[val=9]</span><span class="nb">{</span>9<span class="nb">}</span>
74 <span class="k">\question</span><span class="na">[text=d1]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
75 <span class="k">\question</span><span class="na">[text=d2]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
76 <span class="k">\question</span><span class="na">[text=d3]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
77 <span class="k">\question</span><span class="na">[text=d4]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
78 <span class="k">\question</span><span class="na">[text=d5]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
79 <span class="k">\question</span><span class="na">[text=d6]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
80 <span class="k">\question</span><span class="na">[text=d7]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
81 <span class="k">\question</span><span class="na">[text=d8]</span><span class="nb">{</span><span class="s">$</span><span class="nv">\bigsqcup</span><span class="s">$</span><span class="nb">}</span>
82 <span class="k">\end</span><span class="nb">{</span>optiongroup<span class="nb">}</span>
83 </pre></div>
84 </div><div class="content-rendering">
85 <p><img src="_images/sdaps-2c3a847be98e0b18c8f30e20a7f2031e80a45561.svg" alt="\begin{optiongroup}[vertical]{Please enter the 8 digit number}
86 % Set the value as it would be 1 based otherwise, so we can just
87 % use it directly from the data export
88 \choice[val=0]{0}
89 \choice[val=1]{1}
90 \choice[val=2]{2}
91 \choice[val=3]{3}
92 \choice[val=4]{4}
93 \choice[val=5]{5}
94 \choice[val=6]{6}
95 \choice[val=7]{7}
96 \choice[val=8]{8}
97 \choice[val=9]{9}
98 \question[text=d1]{$\bigsqcup$}
99 \question[text=d2]{$\bigsqcup$}
100 \question[text=d3]{$\bigsqcup$}
101 \question[text=d4]{$\bigsqcup$}
102 \question[text=d5]{$\bigsqcup$}
103 \question[text=d6]{$\bigsqcup$}
104 \question[text=d7]{$\bigsqcup$}
105 \question[text=d8]{$\bigsqcup$}
106 \end{optiongroup}" /></p>
107 </div></div><p class="caption">Using optiongroup to input longer numbers</p></div></div>
108 <div class="section" id="how-can-one-use-images">
109 <h2>How can one use images?<a class="headerlink" href="#how-can-one-use-images" title="Permalink to this headline">¶</a></h2>
110 <p>The normal LaTeX commands will work as usual. As the image needs to be
111 available during and after the <cite>setup</cite> step of SDAPS extra steps will be
112 required though. The basic problem is that the given LaTeX file is copied
113 into a new directory and the images may not be available then. The following
114 ways exist to deal with this:</p>
115 <blockquote>
116 <div><ol class="arabic simple">
117 <li><p>Copy all images by passing <cite>–add</cite> for each image</p></li>
118 <li><p>Place all images into a directory and use <cite>–add</cite> on the directory</p></li>
119 </ol>
120 </div></blockquote>
121 <p>The second option is a good strategy if you have more images. In the example
122 below a directory called <cite>images</cite> is used which has one file called <cite>sdaps.png</cite>.
123 The <cite>\graphicspath</cite> command is used so that the image can be refered to by its
124 filename rather than the full relative path.</p>
125 <div class="figure">
126 <div class="tabs">
127 <input type="radio" id="tab-code-2" class="tab-code" name="tab-group-2" ><label for="tab-code-2" class="label-code">Example LaTeX code</label><input type="radio" id="tab-rendering-2" class="tab-rendering" name="tab-group-2" checked><label for="tab-rendering-2" class="label-rendering">Result</label><div class="content-code">
128 <div class="highlight"><pre><span></span>The SDAPS logo for the website is <span class="k">\raisebox</span><span class="nb">{</span>-0.8cm<span class="nb">}{</span><span class="k">\includegraphics</span><span class="na">[width=2cm]</span><span class="nb">{</span>sdaps.png<span class="nb">}}</span>.
129 </pre></div>
130 Required code in preamble:<div class="highlight"><pre><span></span><span class="k">\usepackage</span><span class="nb">{</span>graphicx<span class="nb">}</span>
131 <span class="c">% Do not add a leading ./ as that will cause issues under some conditions!</span>
132 <span class="k">\graphicspath</span><span class="nb">{{</span>images/<span class="nb">}}</span>
133 </pre></div>
134 </div><div class="content-rendering">
135 <p><img src="_images/sdaps-d3d2ac4eea088d60f5d7fea1d2102a6f07432254.svg" alt="The SDAPS logo for the website is \raisebox{-0.8cm}{\includegraphics[width=2cm]{sdaps.png}}." /></p>
136 </div></div><p class="caption">Using `graphicx` together with `\\graphicspath` to place images into a subdirectory</p></div><p>With that done, you need to run the following to setup the project</p>
137 <div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>$ sdaps setup tex PROJECT_DIR questionnaire.tex --add images
138 </pre></div>
139 </div>
140 </div>
141 <div class="section" id="adjusting-corner-mark-positions">
142 <h2>Adjusting corner mark positions<a class="headerlink" href="#adjusting-corner-mark-positions" title="Permalink to this headline">¶</a></h2>
143 <p>It is possible to adjust the positions of the corner marks. Currently this
144 needs to be done manually. You can override the positions and also update
145 the default page margins using code like the following in the preamble.</p>
146 <p>This requires SDAPS version 1.9.10 or later.</p>
147 <div class="highlight-tex notranslate"><div class="highlight"><pre><span></span><span class="c">% Re-define the default margins (10mm -&gt; 12mm, 12mm -&gt; 15mm)</span>
148 <span class="k">\ExplSyntaxOn</span>
149 <span class="k">\dim</span><span class="nb">_</span>gset:Nn <span class="k">\g</span><span class="nb">_</span>sdaps<span class="nb">_</span>edge<span class="nb">_</span>left<span class="nb">_</span>margin<span class="nb">_</span>dim <span class="nb">{</span> 12mm <span class="nb">}</span>
150 <span class="k">\dim</span><span class="nb">_</span>gset:Nn <span class="k">\g</span><span class="nb">_</span>sdaps<span class="nb">_</span>edge<span class="nb">_</span>right<span class="nb">_</span>margin<span class="nb">_</span>dim <span class="nb">{</span> 12mm <span class="nb">}</span>
151 <span class="k">\dim</span><span class="nb">_</span>gset:Nn <span class="k">\g</span><span class="nb">_</span>sdaps<span class="nb">_</span>edge<span class="nb">_</span>top<span class="nb">_</span>margin<span class="nb">_</span>dim <span class="nb">{</span> 15mm <span class="nb">}</span>
152 <span class="k">\dim</span><span class="nb">_</span>gset:Nn <span class="k">\g</span><span class="nb">_</span>sdaps<span class="nb">_</span>edge<span class="nb">_</span>bottom<span class="nb">_</span>margin<span class="nb">_</span>dim <span class="nb">{</span> 15mm <span class="nb">}</span>
153 <span class="k">\ExplSyntaxOff</span>
154
155 <span class="c">% Modify the top, bottom and left/right margins, these should be 2mm larger</span>
156 <span class="k">\geometry</span><span class="nb">{</span>top=15mm<span class="nb">}</span>
157 <span class="k">\geometry</span><span class="nb">{</span>bottom=17mm<span class="nb">}</span>
158 <span class="k">\geometry</span><span class="nb">{</span>hmargin=14mm<span class="nb">}</span>
159 </pre></div>
160 </div>
161 </div>
162 </div>
163
164
165 <div class="clearer"></div>
166 </div>
167 </div>
168 </div>
169 <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
170 <div class="sphinxsidebarwrapper">
171 <h3><a href="index.html">Table of Contents</a></h3>
172 <ul>
173 <li><a class="reference internal" href="#">Frequently Asked Questions</a><ul>
174 <li><a class="reference internal" href="#numeric-field-input">Numeric field input</a></li>
175 <li><a class="reference internal" href="#how-can-one-use-images">How can one use images?</a></li>
176 <li><a class="reference internal" href="#adjusting-corner-mark-positions">Adjusting corner mark positions</a></li>
177 </ul>
178 </li>
179 </ul>
180
181 <h4>Previous topic</h4>
182 <p class="topless"><a href="index.html"
183 title="previous chapter">Welcome to sdaps-class’s documentation!</a></p>
184 <h4>Next topic</h4>
185 <p class="topless"><a href="customlayout.html"
186 title="next chapter">Creating custom layouts using base commands</a></p>
187 <div role="note" aria-label="source link">
188 <h3>This Page</h3>
189 <ul class="this-page-menu">
190 <li><a href="_sources/FAQ.rst.txt"
191 rel="nofollow">Show Source</a></li>
192 </ul>
193 </div>
194 <div id="searchbox" style="display: none" role="search">
195 <h3 id="searchlabel">Quick search</h3>
196 <div class="searchformwrapper">
197 <form class="search" action="search.html" method="get">
198 <input type="text" name="q" aria-labelledby="searchlabel" />
199 <input type="submit" value="Go" />
200 </form>
201 </div>
202 </div>
203 <script>$('#searchbox').show(0);</script>
204 </div>
205 </div>
206 <div class="clearer"></div>
207 </div>
208 <div class="related" role="navigation" aria-label="related navigation">
209 <h3>Navigation</h3>
210 <ul>
211 <li class="right" style="margin-right: 10px">
212 <a href="genindex.html" title="General Index"
213 >index</a></li>
214 <li class="right" >
215 <a href="customlayout.html" title="Creating custom layouts using base commands"
216 >next</a> |</li>
217 <li class="right" >
218 <a href="index.html" title="Welcome to sdaps-class’s documentation!"
219 >previous</a> |</li>
220 <li class="nav-item nav-item-0"><a href="index.html">sdaps-class 0.1 documentation</a> &#187;</li>
221 <li class="nav-item nav-item-this"><a href="">Frequently Asked Questions</a></li>
222 </ul>
223 </div>
224 <div class="footer" role="contentinfo">
225 &#169; Copyright 2016, Benjamin Berg.
226 Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 3.4.3.
227 </div>
228 </body>
229 </html>