From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Overriding / redefining / disabling standard commands
Date: Mon, 25 Jun 2018 23:52:59 +0200 [thread overview]
Message-ID: <5B31643B.5000601@gmail.com> (raw)
In-Reply-To: <8ece00df-881e-09bf-1122-86b7cf48bcf6@rik.users.panix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1000 bytes --]
> Rik Kabel <mailto:context@rik.users.panix.com>
> 25. Juni 2018 um 22:49
> List,
>
> What is the preferred way to override a standard command?
>
> My use case is that I am trying to produce html (and epub, but that
> has a long long way to go) from the same source I use for pdf. Some
> features are not needed, and I have separate environment files for
> each output format to accommodate the differences.
>
> I would like to override the standard \index command in one of those
> environment files, eliminating the generation of index references.
> There may be other constructs as well that would benefit from this
> simplification while allowing a common content source file.
You can use the “*export” mode to disable commands when the export is
enabled.
\startmode[ebook]
\setupbackend[export=yes]
\stopmode
\starttext
\index{Knuth}\input knuth
\index{Ward}\input ward
\index{Zapf}\input zapf
\startnotmode[*export]
\completeregister[index]
\stopnotmode
\stoptext
Wolfgang
[-- Attachment #1.2: Type: text/html, Size: 2085 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
___________________________________________________________________________________
next prev parent reply other threads:[~2018-06-25 21:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-25 20:49 Rik Kabel
2018-06-25 21:52 ` Wolfgang Schuster [this message]
2018-06-25 23:11 ` Rik
2018-06-26 0:11 ` Alan Braslau
2018-06-26 0:50 ` Rik Kabel
2018-06-26 2:00 ` Alan Braslau
2018-06-26 2:44 ` Rik Kabel
2018-06-26 7:35 ` Hans Hagen
2018-06-26 12:56 ` Alan Braslau
2018-06-26 13:22 ` Hans Hagen
2018-06-26 6:34 ` Wolfgang Schuster
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=5B31643B.5000601@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).