On Thursday, 11 September 2025 18:46:31 BST Marc Chantreux wrote: > hello groff people, > > Since 2009, I wrote most of my talks using a simple vim plugin > of mine: > > https://github.com/eiro/slides.vim > > when conference runners ask for slides, I write do a screenshot > for all the slides and convert -o slides.pdf *.png which isn't > convenient and the resulting pdf is heavy for nothing. > > so I wondered if I can use .nf for each slides and a sed script > to add a page break at the end of each slides. > > https://github.com/eiro/slides.vim/blob/master/test.roff > > I have 3 problems here: > * rendering the utf-8 symbols that are not supported by roff famillies > * remove the extra spaces between lines (because I use symbols like > │ or ─ to write diagrams and tables) > * monospace positionning is ruined by the byte sizes of the utf-8 symbols. > > before I try to fix those all, I would like to know your feeling about > it: > > * how far am I from a decent solution ? > * should I try to script something to transform a ascii diagram to a > pic source ? (it seems to me the simplest thing is just to fix > the current rendering) > > thanks for any food for thought > > regards
Hi Mark, This probably will not be much help, since you want to do it as character based. But if you want to do slides with groff, I know of three possible routes:- Using gpresent by Bob Diertens, which is not part of groff but can be found at <https://bob.diertens.org/corner/useful/gpresent/>. If you are familiar with groff's mom macros, building slides is fully supported and if you have all the groff packages installed there is an example demonstration. If you have used the ms macros with groff there is an example of slides here <https://lists.gnu.org/archive/html/groff/2018-03/msg00064.html> As you are considering generating text from a vim document perhaps the "raw" commands for slides documented in the man page for gropdf may help. All 3 methods produce pdfs in a special presentation mode (which most pdf viewers support (but not all transitions). In this mode the viewer switches to a full screen mode and you can control the slide progression with either keys or mouse. The slides can contain pic, tbl, eqn and images, like any groff document. If your text is utf-8 you need to have -Kutf8 on the groff command, and to have installed suitable fonts for the characters you input. For emojis there are several fonts suitable which can be installed, unfortunately coloured emojis are only supported in nroff's utf-8 device, the pdf emoji fonts are currently a single colour (but you can pick a colour for each emoji). Cheers Deri