ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How do I insert characters before \par
@ 2017-03-31 22:46 Rik Kabel
  0 siblings, 0 replies; only message in thread
From: Rik Kabel @ 2017-03-31 22:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 1627 bytes --]

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:

         1. % macros=mkvi engine=luajittex
         2. \starttexdefinition unexpanded startABC
         3.    \begingroup
         4.    \dosingleempty\dostartABC
         5. \stoptexdefinition
         6. \starttexdefinition dostartABC [#SETUPS]
         7.      \getrawparameters[ABC][inset=2em,#SETUPS]
         8.      \grabbufferdata[bu:ABC][startABC][stopABC]
         9. \stoptexdefinition
        10. \starttexdefinition stopABC
        11.      \setupnarrower[left=\ABCinset]
        12.      \startnarrower[left,right]
        13.        \startlines
        14.          (\,\inlinebuffer[bu:ABC]\,)
        15.        \stoplines
        16.      \stopnarrower
        17.    \endgroup
        18. \stoptexdefinition
        19. \starttext
        20. \startsubject[title={Test of ABC}]
        21. \startABC[inset=5em]
        22.    “Hope” is the thing with feathers\,—
        23.     That perches in the soul\,—
        24.     And sings the tune without the words\,—
        25.     And never stops\,—\,at all\,—
        26. \stopABC
        27. \startABC
        28. ABCDEFG
        29. \stopABC
        30. \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


[-- Attachment #1.2: Type: text/html, Size: 2529 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-31 22:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-31 22:46 How do I insert characters before \par Rik Kabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).