Moving course website to quarto

23 April, 2023 (2 minute read). Category: Web. Tags: hugo, quarto.

For some years now, I have been maintaining the course notes for my graduate course as a website rather than a PDF document. I started with handwritten course notes the first time I taught the course, and then I typed them up in ConTeXt the next year. However, I wanted to add interactivity to my notes and that was not possible with PDF. (Technically, it is possible using Javascript, but Javascript in PDF has very limited support). So I experimented with maintaining my notes as a website and have been doing so for multiple years now.

Read more >

Stripping metadata from PDF files

2 November, 2021 (3 minute read). Category: CLI. Tags: pdf, metadata, qpdf, exifinfo.

Sometimes, for example when sending a review of a paper, I do not want the pdf file to contain any metadata. Ideally, the editorial process should take care of this, but I do not want to take any chances. In this post1, I explain a simple method to strip metadata from PDF files.

Read more >

LuaTeX as a scripting language

16 August, 2021 (5 minute read). Category: CLI. Tags: script, mtxrun, yad, programming.

This post is not really about ConTeXt but about how I could use ConTeXt to quickly hash out an idea which involved some text processing.

One of my long running (for more than a decade now) ConTeXt projects is typesetting my CV. I maintain the list of publications as an XML file. I parse the file using ConTeXt’s XML helper’s and convert the data to a Lua table, and then typeset it using ConTeXt Lua Documents. When starting with this project, I chose XML as a data format for two reasons. First, XML scema can be validated using a Schema. Second, I thought that since XML is so popular, there must be good tools for authoring XML documents.

Read more >

Include multi-page PDF

19 August, 2020 (2 minute read). Category: Luatex. Tags: externalfigure, include.

As an academic, I often have to write letters and grant applications where I need to need to prepare a single PDF which includes the letter or the grant application with one of more research papers “attached” at the end. In principle, I could generate the letter/grant separately and use a tool such as qpdf to merge multiple files into a single file. But I find it much easier to generate everything from a single tex file.

Read more >

Adjust spacing in itemize environments

25 July, 2020 (2 minute read). Category: Formatting. Tags: itemize, spacing.

Today I was working on a LaTeX doc and needed to adjust spacing around the LaTeX itemize environment. I wanted a list of item with no space before the list environment and the list of items, no space between the items, but space after the environment. The TeX FAQ has a summary of how to adapt spacing around itemize environment in LaTeX. Reading that made me appreciate the control provided by ConTeXt. So, I thought that it is worthwhile to show that.

Read more >

Finding the meaning of a command

16 June, 2020 (1 minute read). Category: CLI. Tags: \show.

ConTeXt has a nice command to find a meaning of a command. Sometimes the easiest way to find the meaning of a macro is to simply use \show\macroname In LMTX, context defaults to running with --batchmode, which means that you then have to hunt for the output of \show in the console output. ConTeXt comes with a nice script to simply get the meaning of a macro on console. $ mtxrun --script interface --meaning <macroname> For example:

Read more >

PDF with embedded video on linux

16 May, 2020 (2 minute read). Category: Pdf Viewers. Tags: linux, pdfpc, video.

I occassionally give presentations where the presentation must include embedded videos. I typically include the movie using

\externalfigure[movie.mov][height=..., width=..., preview=yes, repeat=yes]

Unfortunately, I could not find any reliable method to play such movies in linux. So, whenever I needed to make a presentation with embedded video, I would take out a rusty 9 year old Macbook and lug that around. Not anymore!

Read more >

Creating a clean presentation style in 40 commits (redux)

14 May, 2020 (19 minute read). Category: Design. Tags: git, presentation, tutorial.

A while back, a had created a git based tutorial for learning how to create a presentation style in ConTeXt. I chose a git based style so that it was easy to see what changed in each commit and what effect did the change have on the output. But it is cumbersome to work with, especially if you are new to ConTeXt as well as git.

Read more >

t-vim: A tale of two editors

29 April, 2020 (3 minute read). Category: T-Vim. Tags: efficiency.

Since I am looking at merging a few pull requests for t-vim, I thought that this will also be a good time to implement a simple feature that was on hold for a while: the ability to use the module with Neovim instead of vim.

Read more >
Next Page >