From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/97711 Path: news.gmane.org!.POSTED!not-for-mail From: Rik Kabel Newsgroups: gmane.comp.tex.context Subject: How do I insert characters before \par Date: Fri, 31 Mar 2017 18:46:39 -0400 Message-ID: <8a3aeff7-ba65-d963-e5be-7006b49bb8af@rik.users.panix.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0474210669220442464==" X-Trace: blaine.gmane.org 1491000458 31996 195.159.176.226 (31 Mar 2017 22:47:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 31 Mar 2017 22:47:38 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Apr 01 00:47:31 2017 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from zapf.boekplan.nl ([5.39.185.232] helo=zapf.ntg.nl) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cu5KK-00074w-Md for gctc-ntg-context-518@m.gmane.org; Sat, 01 Apr 2017 00:47:28 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 86337101B70; Sat, 1 Apr 2017 00:46:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rnwo8wvr5Ve3; Sat, 1 Apr 2017 00:46:54 +0200 (CEST) Original-Received: from zapf.ntg.nl (localhost [IPv6:::1]) by zapf.ntg.nl (Postfix) with ESMTP id E3493101B65; Sat, 1 Apr 2017 00:46:54 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by zapf.ntg.nl (Postfix) with ESMTP id 1E370101B65 for ; Sat, 1 Apr 2017 00:46:54 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zapf.boekplan.nl Original-Received: from zapf.ntg.nl ([127.0.0.1]) by localhost (zapf.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ri_aOb_S2jyO for ; Sat, 1 Apr 2017 00:46:53 +0200 (CEST) Original-Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by zapf.ntg.nl (Postfix) with ESMTPS id 1522E1015A8 for ; Sat, 1 Apr 2017 00:46:42 +0200 (CEST) Original-Received: from [192.168.201.10] (cpe-24-194-22-135.nycap.res.rr.com [24.194.22.135]) by mailbackend.panix.com (Postfix) with ESMTPSA id B1D6E1ABF6 for ; Fri, 31 Mar 2017 18:46:41 -0400 (EDT) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.16 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: "ntg-context" Xref: news.gmane.org gmane.comp.tex.context:97711 Archived-At: This is a multi-part message in MIME format. --===============0474210669220442464== Content-Type: multipart/alternative; boundary="------------C8855F483D6953593254B3A1" This is a multi-part message in MIME format. --------------C8855F483D6953593254B3A1 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 --------------C8855F483D6953593254B3A1 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit

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

--------------C8855F483D6953593254B3A1-- --===============0474210669220442464== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX18KSWYgeW91ciBxdWVzdGlvbiBpcyBvZiBpbnRlcmVz dCB0byBvdGhlcnMgYXMgd2VsbCwgcGxlYXNlIGFkZCBhbiBlbnRyeSB0byB0aGUgV2lraSEKCm1h aWxsaXN0IDogbnRnLWNvbnRleHRAbnRnLm5sIC8gaHR0cDovL3d3dy5udGcubmwvbWFpbG1hbi9s aXN0aW5mby9udGctY29udGV4dAp3ZWJwYWdlICA6IGh0dHA6Ly93d3cucHJhZ21hLWFkZS5ubCAv IGh0dHA6Ly9jb250ZXh0LmFhbmhldC5uZXQKYXJjaGl2ZSAgOiBodHRwczovL2JpdGJ1Y2tldC5v cmcvcGhnL2NvbnRleHQtbWlycm9yL2NvbW1pdHMvCndpa2kgICAgIDogaHR0cDovL2NvbnRleHRn YXJkZW4ubmV0Cl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f --===============0474210669220442464==--