ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Rik Kabel <context@rik.users.panix.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: How do I insert characters before \par
Date: Fri, 31 Mar 2017 18:46:39 -0400	[thread overview]
Message-ID: <8a3aeff7-ba65-d963-e5be-7006b49bb8af@rik.users.panix.com> (raw)


[-- 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
___________________________________________________________________________________

                 reply	other threads:[~2017-03-31 22:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8a3aeff7-ba65-d963-e5be-7006b49bb8af@rik.users.panix.com \
    --to=context@rik.users.panix.com \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).