ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Bruce Horrocks <ntg@scorecrow.com>
To: ntg-context mailing list <ntg-context@ntg.nl>
Subject: [NTG-context] Re: combining \definetyping and \definebuffer
Date: Sat, 29 Jul 2023 21:06:58 +0100	[thread overview]
Message-ID: <01114796-B1D5-4D78-8EAD-507BC8460E93@scorecrow.com> (raw)
In-Reply-To: <e8650da8-61e9-d9d0-331a-1b802e31147b@fiee.net>

Your example seems to work: I see the \getbuffer[MyBuffer] command typed (not executed) with colour coding on the keyword and line numbered; then the block text fakewords from the visual module; then the \fakewords macro shown (again not executed) as per the default for typing.

What were you exepcting if not this?

(onTeXt  ver: 2023.07.18 22:07 LMTX)

> On 29 Jul 2023, at 20:09, Henning Hraban Ramm <texml@fiee.net> wrote:
> 
> Hi,
> I’d like to use a custom buffer ("MyBuffer") to use a custom typing style ("MyCode"). How does that work?
> 
> 
> """
> \usemodule[visual]
> 
> \definetyping[MyCode]
> 
> \setuptyping[MyCode][
>  option=tex,
>  numbering=file,
> ]
> 
> \definebuffer[MyBuffer]
> 
> \startMyBuffer
> \fakewords{10}{20}
> \stopMyBuffer
> 
> \starttext
> 
> \startMyCode
> \fakeword
> \stopMyCode
> 
> \getMyBuffer
> 
> \typeMyBuffer
> 
> \stoptext
> """

—
Bruce Horrocks
Hampshire, UK

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

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

  reply	other threads:[~2023-07-29 20:19 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-29 19:09 [NTG-context] " Henning Hraban Ramm
2023-07-29 20:06 ` Bruce Horrocks [this message]
2023-07-29 20:35   ` [NTG-context] " Henning Hraban Ramm
2023-07-29 20:35   ` Henning Hraban Ramm
2023-07-29 20:49     ` Max Chernoff
2023-07-29 21:13       ` Henning Hraban Ramm
2023-07-29 21:16     ` Hans Hagen
2023-07-30 12:36       ` Henning Hraban Ramm

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=01114796-B1D5-4D78-8EAD-507BC8460E93@scorecrow.com \
    --to=ntg@scorecrow.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).