ConTeXters,
I am stymied trying to insert characters into a buffer, or failing that, to back up, removing the \par, and adding characters after the buffer is loaded.
The code I am working with reduces to this:
- % macros=mkvi engine=luajittex
- \starttexdefinition unexpanded startABC
- \begingroup
- \dosingleempty\dostartABC
- \stoptexdefinition
- \starttexdefinition dostartABC [#SETUPS]
- \getrawparameters[ABC][inset=2em,#SETUPS]
- \grabbufferdata[bu:ABC][startABC][stopABC]
- \stoptexdefinition
- \starttexdefinition stopABC
- \setupnarrower[left=\ABCinset]
- \startnarrower[left,right]
- \startlines
- (\,\inlinebuffer[bu:ABC]\,)
- \stoplines
- \stopnarrower
- \endgroup
- \stoptexdefinition
- \starttext
- \startsubject[title={Test of ABC}]
- \startABC[inset=5em]
- “Hope” is the thing with feathers\,—
- That perches in the soul\,—
- And sings the tune without the words\,—
- And never stops\,—\,at all\,—
- \stopABC
- \startABC
- ABCDEFG
- \stopABC
- \stoptext
In line 14, I prefix the buffer with (\, but \,) ends up on another line, after the \par inserted at the end of the buffer. Inlining a second buffer which contains the closing bits with (\inlinebuffer[a,b]) does the same.
Can somebody suggest a path?
---
Rik