Raspberry Pi 4 - LyX

Raspberry Pi 4: Chronicling the Desktop Experience – Typeset beautifully with LyX – Week 28

This is a weekly blog about the Raspberry Pi 4 (“RPI4”), the latest product in the popular Raspberry Pi range of computers.

LyX is a document processor that encourages an approach to writing based on the structure of your documents (WYSIWYM) and not simply their appearance (WYSIWYG).

Why would you need LyX? Mainly because it combines the power and flexibility of TeX/LaTeX with a friendly and intuitive graphical interface. I’ve used it to produce notes, academic papers, theses, and letters. Some folk have even written books with the software.

Installation

Raspberry Pi 4 - LyX - Installing
Click for full size image

LyX is available in the Raspbian repositories. To install the software:

$ sudo apt install lyx

As you can see from the screen image, this command installs a whole raft of other software. And it’ll consume a fair chunk of hard disk space, 406MB of space to be precise.

You get version 2.3.2 of LyX. That version was released way back in December 2018. You’re missing on substantial development as there have been 3 later releases of the program. On my Intel machine with the Arch distribution I get version 2.3.4.3, the latest version, whereas with Ubuntu 20.04 I get version 2.3.4.2.

A good test of an installation of LyX is to perform some routine functions. One of these tests is to export a document to the PDF format. I usually start with the project’s own tutorial document. Sadly the export wasn’t plain sailing, with the RPI4 generating the following error dialog box.

Raspberry Pi 4 - cannot convert file

The fix was simple. The Tutorial document uses SVG graphics. Now LyX has supported SVG images since version 1.6.6. But you also need to have Inkscape installed, which was missing from my system. Run the command:

$ sudo apt install inkscape

Go to LyX’s menu bar, and select Tools | Reconfigure. Now exporting the PDF proceeded without a hitch.

How’s performance of LyX on the RPI4? Pretty impressive in my opinion. Start up times are quick, about 3-4 seconds from a cold startup.┬áIn operation, things are good too. The software never felt sluggish; definitely quick enough for most usage.

How’s memory consumption? With LyX open with no document loaded, memory consumption of the program is a mere 52.2MB of RAM. Frugal! With the project’s tutorial file loaded, this increases to 61MB of RAM, and with the User Guide memory consumption stands at 68.2MB. Even with really large documents, you won’t have any issues running LyX on any of the 3 RPI4 models.

The chart below is not an attempt to benchmark the speed of LyX on the RPI4. Instead, it illustrates the time it takes to export LyX’s User Manual to PDF format on 3 different processors including the RPI4’s Cortex-A72 CPU. A few points I would make. Most of the CPU usage is consumed by pdflatex, not LyX. And pdflatex only uses a single core. What the graph seeks to show is how long a fairly routine operation takes on the RPI4 compared to 2 Intel machines, both of which are very mainstream. Use that as a barometer for other regular activities.

Raspberry Pi 4 - LyX - Export PDF

Summary

I’ve deliberately tried to avoid this blog post turning into a review of LyX itself. I’m really only looking at the program from an RPI4 perspective. But I have to say, if you’ve never used LyX, and want to produce beautifully typeset documents, I strongly recommend LyX. It’s excellent open source software.

These days, I’m writing more and more in RMarkdown than TeX/LaTeX. RMarkdown has now become a core component of most of my projects. It maintains order, and ensures reproducibility and consistency. On my desktop Intel machine I write RMarkdown in RStudio. But sadly RStudio isn’t available in the Raspbian repositories. And despite the full source code being available, I’ve not been introduced to a solitary soul who has managed to compile it for the RPI4. Have you?


Read all my blog posts about the RPI4.

Raspberry Pi 4 Blog
Week 36Manage your personal collections on the RPI4
Week 35Survey of terminal emulators
Week 34Search the desktop with the latest version of Recoll
Week 33Personal Information Managers on the RPI4
Week 32Keep a diary with the RPI4
Week 31Process complex mathematical functions, plot 2D and 3D graphs with calculators
Week 30Internet radio on this tiny computer. A detailed survey of open source software
Week 29Professionally manage your photo collection with digiKam
Week 28Typeset beautifully with LyX
Week 27Software that teaches young people how to learn basic computing skills and beyond
Week 26Firefox revisited - Raspbian now offers a real alternative to Chromium
Week 25Turn the Raspberry Pi 4 into a low power writing machine
Week 24Keep the kids learning and having fun
Week 23Lots of choices to view images
Week 22Listening to podcasts on the RPI4
Week 21File management on the RPI4
Week 20Open Broadcaster Software (OBS Studio) on the RPI4
Week 19Keep up-to-date with these news aggregators
Week 18Web Browsers Again: Firefox
Week 17Retro gaming on the RPI4
Week 16Screen capturing with the RPI4
Week 15Emulate the Amiga, ZX Spectrum, and the Atari ST on the RPI4
Week 14Choose the right model of the RPI4 for your desktop needs
Week 13Using the RPI4 as a screencaster
Week 12Have fun reading comics on the RPI4 with YACReader, MComix, and more
Week 11Turn the RPI4 into a complete home theater
Week 10Watching locally stored video with VLC, OMXPlayer, and others
Week 9PDF viewing on the RPI4
Week 8Access the RPI4 remotely running GUI apps
Week 7e-book tools are put under the microscope
Week 6The office suite is the archetypal business software. LibreOffice is tested
Week 5Managing your email box with the RPI4
Week 4Web surfing on the RPI4 looking at Chromium, Vivaldi, Firefox, and Midori
Week 3Video streaming with Chromium & omxplayerGUI as well as streamlink
Week 2A survey of open source music players on the RPI4 including Tauon Music Box
Week 1An introduction to the world of the RPI4 looking at musikcube and PiPackages

This blog is written on the RPI4.

One comment

  1. If you want to have your system less cluttered, you could install rsvg library instead of inkscape (debian derivates find it as a librsvg2-bin package).

Share your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.