From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: No escape to TeX for inline typing?
Date: Tue, 17 Feb 2015 16:30:13 +0100 [thread overview]
Message-ID: <4B8AA680-2B16-457E-A0B0-2C62DDE83254@gmail.com> (raw)
In-Reply-To: <CAO8LnPEamoQLBPnwEe+SD3axaY9JpRTiSEpaX=c2+EjLwWzJHA@mail.gmail.com>
> Am 17.02.2015 um 16:04 schrieb Christoph Reller <christoph.reller@gmail.com>:
>
> Hi,
>
> How do I escape to TeX from inside an inline typing command? It works fine from a typing environment.
>
> MWE:
>
> \setuptyping[TEX][escape={[[,]]}]
> \definetype[typeTEX][option=TEX]
> \starttext
> \startTEX
> \I\can [[\em escape]]
> \stopTEX
> \typeTEX{\I\cannot [[\em escape]]}
> \stoptext
>
> Thank you for any feedback!
The \type command doesn’t support a escape function but it can be added an additional line in the code (buff-ver.miv):
\def\buff_verbatim_type_normal#1%
{\buff_verbatim_initialize_type_two
\dostarttaggedchained\t!verbatim\currenttype\??type
\ctxcommand{typestring{
data = \!!bs\detokenize{#1}\!!es,
tab = "\typeparameter\c!tab",
method = "\typeparameter\c!option",
+ escape = \!!bs\typeparameter\c!escape\!!es,
nature = "inline",
compact = "\typeparameter\c!compact", % none | all | last (all needed in tabulate etc for manuals)
}}%
\dostoptagged
\buff_verbatim_right_of_type
\egroup}
To enable the function add „escape=yes” (or your own delimiters) to \definetype.
Wolfgang
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
next prev parent reply other threads:[~2015-02-17 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-17 15:04 Christoph Reller
2015-02-17 15:30 ` Wolfgang Schuster [this message]
2015-02-18 6:03 Christoph Reller
2015-02-28 13:00 Christoph Reller
2015-03-01 10:30 ` Hans Hagen
2015-03-03 10:56 Christoph Reller
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=4B8AA680-2B16-457E-A0B0-2C62DDE83254@gmail.com \
--to=schuster.wolfgang@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).