1WEBQUIZ:(A) FOR WEBQUIZ:(A)
2
3
4
6 WebQuiz: a LaTeX package for writing online quizzes -
7
8 WebQuiz makes it possible to use LaTeX to write interactive online
9 quizzes. The quizzes are first written in LaTeX and then converted
10 into HTML using WebQuiz, which is written in python. The conversion
11 from LaTeX to HTML is done behind the scenes using TeX4ht. The idea is
12 that you should be able to produce nice online quizzes using WebQuiz
13 and basic knowledge of LaTeX.
14
15 WebQuiz is designed to be used from the command-line. For example, if
16 quiz1.tex is a LaTeX file for a quiz then:
17
18 latex quiz1
19 produces a "readable" DVI file for the quiz
20
21 pdflatex quiz1
22 produces a "readable" PDF file for the quiz
23
24 webquiz quiz1
25 creates the web page quiz1.html
26
27 If you prefer to use LaTeX from a GUI for LaTeX then it should be pos‐
28 sible to configure it to use WebQuiz directly. As an example, the man‐
29 ual provides some details about how to do this for TeXShop.
30
32 usage: webquiz [-h] [-q] [-d] [-s] [--latex | -l | -x] [-r RCFILE]
33 [-i | -e | --settings [SETTINGS]] [quiz_file [quiz_file ...]]
34
35 A LaTeX package for writing online quizzes
36
37 positional arguments:
38 quiz_file latex quiz files
39
40 optional arguments:
41
42 -h, --help
43 show this help message and exit
44
45 -q, --quiet
46 Suppress tex4ht messages (also -qq etc)
47
48 -d, --draft
49 Use make4ht draft mode
50
51 -s, --shell-escape
52 Shell escape for tex4ht/make4ht
53
54 --latex
55 Use latex to compile document with make4ht (default)
56
57 -l, --lua
58 Use lualatex to compile the quiz
59
60 -x, --xelatex
61 Use xelatex to compile the quiz
62
63 -r RCFILE, --rcfile RCFILE
64 Specify location of the webquiz rc-file
65
66 -i, --initialise, --initialize
67 Install web components of webquiz
68
69 -e, --edit-settings
70 Edit default settings for webquiz
71
72 --settings <SETTINGS>
73 List default settings for webquiz
74
76 To use WebQuiz you need to have a standard LaTeX distribution
77 installed, such as TeXLive, that includes TeX4ht. In addition, you need
78 to have Python3 installed. As WebQuiz uses scalable vector graphics
79 (SVG) you should check that all of the dependencies of dvisvgm are
80 installed on your system, especially if you plan on using graphics or
81 images.
82
83 Once the TeX components of WebQuiz package have been installed you can
84 install the web components of WebQuiz using the following command,
85 which needs to be run from the command line:
86
87 > webquiz --initialise
88
89 If you want to install the web components of WebQuiz into a system
90 directory then you need to run this command from an administrators
91 account, so using sudo on a unix-like system. For more details about
92 the installation and configuration of WebQuiz please see Section 3.2 of
93 the WebQuiz manual.
94
95 Please see the manual for more details about initialising and using
96 WebQuiz.
97
99 On both unix-like systems (including macosx), and windows systems
100 (using either TeXLive or MiKTeX), you can install WebQuiz by download‐
101 ing the WebQuiz zip file from:
102 http://mirrors.ctan.org/macros/latex/contrib/webquiz.zip
103
104 To install the package, unzip this file and change directory to the
105 webquiz/scripts subdirectory run:
106
107 > webquiz --tex-install
108
109 (or webquiz.bat --text-install on windows). This commands unpacks the
110 webquiz files into their standard locations in the TeX install tree to
111 it should be run from an administrators account, or using sudo on a
112 unix-like system. Roughly what this command does is the following:
113
114 · It creates a symbolic link, or equivalent, to the main WebQuiz exe‐
115 cutable, which is the file webquiz.py in the scripts directory
116
117 · Copies the latex directory to somewhere in the TeX search path and
118 then runs mktexlsr so that LaTeX and WebQuiz can find these files.
119
120 · Copies the python code into the TeX scripts subdirectory
121
122 · Copies the WebQuiz doc subdirectory into the TeX doc/latex subdirec‐
123 tory.
124
125 If you are using MiKTeX you may need to open the MiKTeX console, go to
126 the Tasks menu and then rebuild the TeX filename database.
127
128 Once the files above are in place initialise WebQuiz by following the
129 installation instructions above.
130
131 Mainly for development purposes, there is another undocumented com‐
132 mand-line option for removing these files from TEXMFMAIN:
133
134 > sudo webquiz/scripts/webquiz --tex-uninstall
135
137 In order to work WebQuiz needs the following programs to be installed
138 on your system:
139
140 · An up-to-date LaTeX distribution, such as that provided by TeXLive.
141 In particular, you need to have TeX4ht and make4ht installed. Unfor‐
142 tunately, since TeXLive 2018 was released there have been a signifi‐
143 cat bunber of updates to a number of packahges that WebQuiz uses,
144 including updates to TeX4ht, make4ht, tikz and pstricks. For this
145 reason, it is strongly recommended that you all packages from ctan_
146 before using WebQuiz_.
147
148 · python3 As of writing python 3.7.2 is available.
149
150 · Javascript
151
152 · If you plan to use pstricks with WebQuiz, or if you want to compile
153 the online manual for WebQuiz, then you need to ensure that
154 ghostscript and dvisvgm are installed and properly configured on your
155 system. See the WebQuiz manual and the dvisvgm documentation for more
156 details
157
158 · A web server. To view online quizzes you of course need a web server.
159 As described in the Installation section you will also need to copy
160 of the WebQuiz components onto your web server using the command:
161
162 > webquiz --initialise
163
165 The LaTeX component of WebQuiz was written by Andrew Mathas and the
166 python, css and javascript code was written by Andrew Mathas (and Don
167 Taylor), based on an initial protype of Don Taylor's from 2001. Since
168 2004 the program has been maintained and developed by Andrew Mathas.
169 Although the program has changed substantially since 2004 Don's idea of
170 using TeX4ht, and some of his code, is still very much in use.
171
172 Copyright (C) 2004-2019
173
175 GNU General Public License, Version 3, 29 June 2007
176
177 This program is free software: you can redistribute it and/or modify it
178 under the terms of the GNU_General Public License (GPL) as published by
179 the Free Software Foundation, either version 3 of the License, or (at
180 your option) any later version.
181
182 This program is distributed in the hope that it will be useful, but
183 WITHOUT ANY WARRANTY; without even the implied warranty of MER‐
184 CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
185 Public License for more details.
186
187
188
189
190PACKAGE LATEX WEBQUIZ:(A)