WEBQUIZ:(A)

πŸŽ€ WEBQUIZ πŸŽ€

okay bestie, this is the WEBQUIZ manual page, and it's giving everything you need to make online quizzes with LaTeX πŸ’–

✨ NAME ✨

WebQuiz is a LaTeX package for writing online quizzes πŸ¦‹

So basically, WebQuiz lets you write interactive online quizzes using LaTeX. You write the quiz in LaTeX first, then WebQuiz (which is written in python) turns it into HTML. The behind-the-scenes conversion from LaTeX to HTML is handled by TeX4ht. The whole vibe is that you can make super cute online quizzes with WebQuiz as long as you know basic LaTeX πŸ“

WebQuiz is made for the command line πŸ’… If quiz1.tex is a LaTeX file for a quiz, then:

latex quiz1
pdflatex quiz1
webquiz quiz1
  • latex quiz1 makes a "readable" DVI file for the quiz πŸ“„
  • pdflatex quiz1 makes a "readable" PDF file for the quiz πŸ“„
  • webquiz quiz1 creates the web page quiz1.html 🌐

If you'd rather use a GUI for LaTeX, it should be possible to set it up to use WebQuiz directly. The manual has the details for doing this with TeXShop, so go check it out 🫢


🧚 USAGE 🧚

usage: webquiz [-h] [-q] [-d] [-s] [--latex | -l | -x] [-r RCFILE]
       [-i | -e | --settings [SETTINGS]] [quiz_file [quiz_file ...]]

A LaTeX package for writing online quizzes πŸ’œ

Positional arguments

  • quiz_file β€” the latex quiz files you want to work on πŸ“

Optional arguments

  • -h, --help β€” shows this help message and exits πŸ™ˆ
  • -q, --quiet β€” hushes the tex4ht messages (you can also go -qq etc, if you're extra 🀫)
  • -d, --draft β€” uses make4ht draft mode ✏️
  • -s, --shell-escape β€” shell escape for tex4ht/make4ht πŸ”₯
  • --latex β€” uses latex to compile the document with make4ht. This one's the default, so you don't have to ask for it πŸ’…
  • -l, --lua β€” uses lualatex to compile the quiz 🌸
  • -x, --xelatex β€” uses xelatex to compile the quiz 🌸
  • -r RCFILE, --rcfile RCFILE β€” tells webquiz where the webquiz rc-file lives πŸ“‚
  • -i, --initialise, --initialize β€” installs the web components of webquiz 🌈
  • -e, --edit-settings β€” lets you edit the default settings for webquiz βš™οΈ
  • --settings <SETTINGS> β€” lists the default settings for webquiz πŸ‘€

🌷 INSTALLATION 🌷

To use WebQuiz you need a standard LaTeX distribution, like TeXLive, that includes TeX4ht. You also need Python3 installed 🐍 WebQuiz uses scalable vector graphics (SVG), so please check that all of the dependencies of dvisvgm are installed on your system. This is extra important if you plan on using graphics or images πŸ–ΌοΈ

Once the TeX components of the WebQuiz package are installed, you can install the web components with the following command, run from the command line:

> webquiz --initialise
If you want to install the web components of WebQuiz into a system directory, you need to run this command from an administrator's account. On a unix-like system that means using sudo ⚠️

For more details about installing and configuring WebQuiz, check out Section 3.2 of the WebQuiz manual πŸ“– The manual also has more about initialising and using WebQuiz, so please go read it 🫢


πŸ“¦ INSTALLATION FROM THE CTAN ZIPFILE πŸ“¦

On both unix-like systems (macOS included) and windows systems (using either TeXLive or MiKTeX), you can install WebQuiz by downloading the WebQuiz zip file from:

http://mirrors.ctan.org/macros/latex/contrib/webquiz.zip

To install it, unzip the file, change directory to the webquiz/scripts subdirectory, and run:

> webquiz --tex-install

(or webquiz.bat --text-install on windows). This command unpacks the webquiz files into their standard spots in the TeX install tree πŸ—‚οΈ So it should be run from an administrator's account, or with sudo on a unix-like system. Roughly, here's what it does:

  • It creates a symbolic link, or equivalent, to the main WebQuiz executable, which is the file webquiz.py in the scripts directory πŸ”—
  • It copies the latex directory somewhere in the TeX search path, then runs mktexlsr so that LaTeX and WebQuiz can find these files πŸ”
  • It copies the python code into the TeX scripts subdirectory 🐍
  • It copies the WebQuiz doc subdirectory into the TeX doc/latex subdirectory πŸ“š

If you're on MiKTeX, you may need to open the MiKTeX console, go to the Tasks menu, and rebuild the TeX filename database πŸ› οΈ

Once the files above are in place, initialise WebQuiz by following the installation instructions above 🌸

Mainly for development purposes, there's another undocumented command-line option for removing these files from TEXMFMAIN. Use it with care πŸ™ˆ

> sudo webquiz/scripts/webquiz --tex-uninstall

πŸ’» SYSTEM REQUIREMENTS πŸ’»

In order to work, WebQuiz needs these programs installed on your system:

  • An up-to-date LaTeX distribution, like the one TeXLive provides. In particular, you need TeX4ht and make4ht installed. Honestly this part is a little chaotic πŸ’€ Since TeXLive 2018 came out, there have been a significant number of updates to a bunch of packages that WebQuiz uses, including updates to TeX4ht, make4ht, tikz and pstricks. So it's strongly recommended that you update all packages from ctan before using WebQuiz ⚠️
  • python3. As of writing, python 3.7.2 is available 🐍
  • Javascript 🌈
  • If you plan to use pstricks with WebQuiz, or if you want to compile the online manual for WebQuiz, you need ghostscript and dvisvgm installed and properly configured on your system. Check the WebQuiz manual and the dvisvgm documentation for more details πŸ“š
  • A web server 🌐 To view online quizzes you obviously need one. Like the Installation section said, you'll also need to copy the WebQuiz components onto your web server using this command:
> webquiz --initialise

πŸ‘‘ AUTHORS πŸ‘‘

The LaTeX component of WebQuiz was written by Andrew Mathas 🫢 The python, css and javascript code was written by Andrew Mathas (and Don Taylor), based on an initial prototype of Don Taylor's from 2001. Since 2004 the program has been maintained and developed by Andrew Mathas. The program has changed a LOT since 2004, but Don's idea of using TeX4ht, and some of his code, is still very much in use πŸ’œ

Copyright (C) 2004-2019 ©️


πŸ“œ LICENSE πŸ“œ

GNU General Public License, Version 3, 29 June 2007

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version 🌈

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details πŸŽ€


That's the whole WEBQUIZ page, bestie πŸ’– It's from the LaTeX package, manual page WEBQUIZ:(A) πŸ¦‹βœ¨