Debian Codegraph @

texmf-dist/doc/latex/webquiz/README.rst

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