For a multiple-choice exam, to ease the grading procedure, it is often preferred to ask students to write their answers collectively in an answer sheet with their choices of answers filled in boxes. However, LaTeX, in particular the exam document class, does not directly provide the feature to automatically generate such boxes. In this post, we will let LaTeX to automatically generate these answering boxes, and with correct answers filled in when the
answers document class option is turned on. The effects are displayed below, with correct answers shown and not shown, respectively. Their respective PDF files are also available: Without answers; with answers.
On GNU/Linux, it is easy to create SOCKS proxies using programs such as ssh or tor. However, many applications on GNU/Linux, such as LibreOffice and genymotion (up to the date on which this post is written), can be configured to directly use HTTP proxies (or web proxies), but not SOCKS proxies. In this post, we will use privoxy, a non-cache web proxy, to enable these applications to use SOCKS proxies.
Pip is a package management system for installing and managing Python software packages. To enable auto completion for
pip in zsh, the documentation of pip suggests adding the following line to
eval "`pip completion --zsh`"
However, merely having this line would not enable auto completion for
pip3. To enable auto completion for
pip3 as well, add the following line after the line above:
compctl -K _pip_completion pip3
~/.inputrc is the user configuration file of GNU readline, which provides customizable command line user interfaces for many important interactive programs, such as Bash and Python interactive shell. However, many of its useful features are disabled by default. In this post, we will walk through a decent
~/.inputrc file to release the power of readline.
Libinput is a library to handle input devices in Wayland and X.Org. It can be used as a drop-in replacement for evdev and synaptics in X.Org, and it is supported by a wide range of desktop environments, including GNOME and Xfce. In this post, we will see how to enable natural scrolling for trackpads using libinput. We will also leave mouses alone, i.e., no natural scrolling for mouses.
First, we need to know the name of the trackpad to enable natural scrolling for. This can be easily known by executing
xinput --list. My output includes the following:
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ bcm5974 id=13 [slave pointer (2)]
It is easy to see that my trackpad is