ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: "Mojca Miklavec" <mojca.miklavec.lists@gmail.com>
Subject: Re: In-line syntax highlighting for type
Date: Wed, 25 Oct 2006 16:28:19 +0200	[thread overview]
Message-ID: <6faad9f00610250728s656b71a3v38b95060f9a244e4@mail.gmail.com> (raw)
In-Reply-To: <Pine.WNT.4.63.0610251016150.3532@nqvgln>

On 10/25/06, Aditya Mahajan <adityam@umich.edu> wrote:
> On Wed, 25 Oct 2006, Aditya Mahajan wrote:
>
> > On Wed, 25 Oct 2006, Hans Hagen wrote:
> >
> >> Aditya Mahajan wrote:
> >>> Hi,
> >>>
> >>> How can I define a command that is the inline version of \startTEX ...
> >>> \stopTEX. (I need to show inline commands in color).
> >>
> >> \setupcolors[state=start]
> >>
> >> \setuptype[option=TEX]
> >>
> >> \definetype[typeTEX][option=tex]
> >>
> >> \starttext
> >>
> >> \type+\type{\type is a wonderful macro}+, isn't it?
> >>
> >> \typeTEX+\typeTEX{\typeTEX is a wonderful macro}+, isn't it?
> >>
> >> \stoptext
> >
> > Thanks, that looks easy :-)
> >
> > However, there seems to be a bug, sometimes the color spills across
> > the type boundary.

I wanted to warn you about that, but you were faster. A workaround is
to create an additional space: so to \type{\commands }like that.

There are many bugs in \type-ing code, but the code is rather complex
... even Taco complaind about complexity.

Hopefully lua will be able to do the task better ;)

Mojca

  reply	other threads:[~2006-10-25 14:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-25  0:11 Aditya Mahajan
2006-10-25  7:54 ` Hans Hagen
2006-10-25 13:57   ` Aditya Mahajan
2006-10-25 14:17     ` Aditya Mahajan
2006-10-25 14:28       ` Mojca Miklavec [this message]
2006-10-25 16:38         ` Hans Hagen
2006-10-25 17:32         ` Hans Hagen
2006-10-25 18:08     ` Hans Hagen
2006-10-25 18:28       ` Aditya Mahajan
2006-10-25 19:03         ` Hans Hagen

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=6faad9f00610250728s656b71a3v38b95060f9a244e4@mail.gmail.com \
    --to=mojca.miklavec.lists@gmail.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).