Annotating PDFs was long a difficult enterprise on any operating system. In Windows, it used to require an expensive copy of Adobe Acrobat Pro; in Linux, the glorious PDFtk tool has long been around for basic page reorganization tasks, but on-page editing has remained a real headache. I need this functionality particularly to correct digitally submitted student work.
Recently I discovered Xournal++, which does nearly everything I need it to, and then some, on all the major platforms. It is actually intended for notetaking using tablets, but I use it on my laptop and simply add coloured text fields around the content of existing PDF files. It stores a metadata file, so you can return to edit your document later; when done, simply export a second PDF file to return to your student.
The main feature I have not yet been able to find is word processor-type text formatting (cursive; smart quotes). This would be helpful to have when correcting students’ mechanics. Amazingly, it does allow for TeX math input.
posted by paul
on 3 jan mmxx at 09:27 EST
For a long time, the track changes function in .docx documents could not safely be used in LibreOffice, at least not when collaborating with someone using Microsoft Word, as changes would simply disappear. Fortunately, this has since been solved. Even so, I occasionally experience formatting issues when pinging a document back and forth between the two software suites, notably in footnotes. More generally, when preparing copy for submission to a publisher you don’t want to take any chances: if they ask for a Word-formatted document, you had best do your final checks in Microsoft Office.
For Linux users, Office 365 has long appeared to promise the solution: Microsoft functionality within the browser. If I recall correctly, when it first launched its features were still a little limited. I recently got hold of a licence through work, and they seem to have made large strides: the ribbon looks impressively comprehensive, and even the speech-to-text engine works surprisingly well without any voice training.
For some reason, however, the one reason to turn to Microsoft Office in the first place, collaboration, is crippled by the absence of that key function: track changes is only available in the desktop distribution. This is the more disappointing because I am actively involved in a book project with a team sufficiently large that we desperately need realtime collaboration, and the team’s technical expertise is sufficiently diverse that any solution that does not involve native .docx editing is out. There seem to be a number of commercial solutions on the market, but if Microsoft can’t get it right I’m skeptical (and I could never get the team to splash out on software). Are there any other solutions out there?
No track changes support here!
posted by paul
on 3 jan mmxx at 09:04 EST
Wireless networking using spartan system managers such as Debian’s /etc/network or Arch’s netctl is one of those typical Linux things where if you haven’t done it in a while you can spend hours either just getting set up or, arguably worse, reconstructing how the whole thing has fallen apart when you don’t recall making any substantial changes that stopped your networking from, well, working. It’s worth investing a bit of time learning how these systems work, however, because the user-friendly GUI alternatives rely in part on the same backends, so roughing it will help you understand the system.
With wireless networking, you’ll typically want your system to autoselect the strongest registered network in range, which is done using wpa_supplicant. Your network manager will be communicating with this utility. In Debian, this means your wireless profiles are configured in /etc/wpa_supplicant/wpa_supplicant.conf and given ID strings there (using the field id_str) that are then recalled in /etc/network/interfaces. Instructions on the Debian Wiki are helpful, only rather than reproducing the id_str field in /etc/network/interfaces it says to reproduce the SSID and PSK fields generated into /etc/wpa_supplicant/wpa_supplicant.conf. In Arch, wpa_supplicant is used behind the scenes only, by netctl-auto; all configuration takes place in files in /etc/netctl/.
When running into issues with Arch’s netctl, of course the first step is to consult https://wiki.archlinux.org/index.php/Netctl. I find that some things are more prominently there listed than others, so here’s a few pointers to keep in mind:
- Step one when troubleshooting is to make sure that you have one and only one wireless network manager running, as competing managers (e.g. Network Manager and netctl) will cause fatal conflicts simply for being installed concurrently, given that each installs its own systemd services. Check for manager conflicts by scrutinizing the output of systemctl --type=service.
- netctl-auto implicitly relies on wpa_supplicant, but rather than reading a static /etc/(wpa_supplicant/)wpa_supplicant.conf as you would find on Debian or elsewhere, it dynamically creates /run/network/wpa_supplicant_wlan.conf or similar on the basis of the profiles in /etc/netctl/, then has wpa_supplicant read that configuration file. However, if any one of the profiles defined in /etc/netctl/ has an error in it, netctl-auto (or the corresponding command systemctl start email@example.com) will throw an error suggesting something is wrong with the .conf, which indeed won’t exist; and it does not matter whether the erroneous profile is active, in range, or neither. Sometimes in fact I get the error that a certain email address is not listed in the password store, a reference to the pass program, which confuses me in a number of ways: I’m not sure where it is sourcing that password, and the error will appear whether or not I have pass installed and an entry for the relevant email address set up for it. But the solution here is simply to return the contents of /etc/netctl/ to a configuration that has previously worked, or to start from scratch by removing all profiles if no such earlier state can be reconstructed. wifi-menu is helpful for setting up basic profiles, only systems like Eduroam are more complex and call for manual setup. Remember to use wifi-menu with the -o switch to ensure passphrase hashing.
- I often forget the syntax for resetting all the relevant network states so I can try a configuration just tweaked, but it really is defeat to have to restart the system. The most important commands in this context are:
- ip link set wlan down (substitute your own adapter name for wlan)
- killall wpa_supplicant (or how does one go about this step?)
- After this you are hopefully able to run systemctl start firstname.lastname@example.org.
- Other important commands include:
- List physical interfaces using iwconfig
- Scan for routers within range using iwlist scan or, more conveniently, wifi-menu.
posted by paul
on 3 jan mmxx at 08:44 EST
I will have my motherboard replaced tomorrow. What with SSDs now soldered or glued onto the motherboard, I thought it best to clone my full SSD as backup.
My SSD has two partitions:
- A master boot record, unencrypted;
- A single Linux partition, LUKS-encrypted.
Cloning the full physical volume is straightforward (superuser privileges are understood for all the following operations):
- Boot from a live system so the source partitions are not mounted;
- Mount your destination volume, so you can store the clone as a disk image file and have the remainder of the device left for other storage;
- Run dd if=/dev/nvme0n1 conv=sync,noerror bs=64K status=progress of=/media/backupdrive/backup.img (where nvme0n1 is the physical volume, not a partition, and backupdrive your mount point).
I was able to leave my newly purchased USB HDD in standard formatting to do this. A 1TB mirror took about two hours I think. Remember though to use a destination drive that is at least as large as the source; unlike with the old 1.44MB disks, you cannot assume that a 1TB disk can be backed up onto a 1TB disk.
The puzzle was to mount the partitions below the image to verify that the mirror was successful. Here you’ll want to take the following steps:
- Mount the external HDD (ideally on a system that does not have the source partitions mounted, as their UUIDs will be identical);
- Run losetup -P /dev/loop0 /media/backupdrive/backup.img; this will automatically create loop devices /dev/loop0p1 and /dev/loop0p2 for your partitions on a recent system;
- To access the encrypted partition, run cryptsetup luksOpen /dev/loop0p2 imgroot, which will prompt for the passphrase and mount the partition under /dev/mapper/imgroot;
- Mount the mapper device as you would mount any regular partition: mount /dev/mapper/imgroot /media/imgroot.
Now you can inspect the integrity of your backup at your leisure. To unmount, remember to observe the proper sequence:
- Unmount the mapper device;
- cryptsetup luksClose the mapper device;
- losetup -d /dev/loop0
- Unmount the external HDD.
Now if the need should ever arise, I should be able to boot from archiso and simply dd if=/path/to/backup.img conv=sync,noerror bs=64K status=progress of=/dev/nvme0n1 to restore my partitions.
posted by paul
on 13 june mmxix at 11:31 EST
As noted in my Arch setup monsterpost, I have learned to set up a new network printer as follows:
# lpadmin -p imageRUNNER1133 -L “HiWi-Raum\ Mediävistik” -E -v dnssd://Canon%20imageRUNNER1133%20series._pdl-datastream._tcp.local/ -m cel-ir1133-pcl-en.ppd
Unfortunately, when I got back from vacation the network printer threw an “unable to locate printer” error whenever I sent it a print job. As I had been using Avahi address resolution, I suspect that’s where the problem is, but the Avahi daemon appears to be running fine.
To get around the issue, I’ve reverted to IP-based addressing, thus:
# lpadmin -p imageRUNNER1133 -L “HiWi-Raum\ Mediävistik” -E -v ldp://126.96.36.199/ -m cel-ir1133-pcl-en.ppd
It is also worth noting, perhaps, that there’s a tool called system-config-printer that allows for easy graphical printer setup.
posted by paul
on 10 sep mmxviii at 09:35 EST