Continuing work on tab stops
Weekly progress update since 2023-07-26 • 2023-08-02 • Michael Rees
As mentioned in the last post, I'm in the middle of a move—in fact, I'll be in my new apartment within 24 hours of wriiting this post!—so I've had very little time to work on Burro.
I have continued work on tab stops, and we now have a parser for the .tab_list
command. This was straightforward because I was able to leverage the new curly brace syntax parser. The only tricky thing was handling the default auto-incrementing name for tabs if an explicit name isn't provided. I tried rewriting the entire parser to be a struct with state to keep track of how many tabs are present, but after some lifetime issues, I threw that out and settled on a simpler approach instead. You can view the progress on the tabs
branch in the repository.
I've also realized that tabs will be a good chance to use percentages as units. Say the user wants the tab to span 30% of the page. Rather than calculating that value in picas from the page area, we'll allow the user to use .length[30%]
in the tab definition. We'll accept similar values for the other arguments.
(Percentages are currently accepted, but they're interpreted as percentages of points. This isn't really used anywhere else yet, so changing this behavior shouldn't be a problem.)