From: Otared Kavian <otared@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: \definemathfence commands
Date: Sun, 10 Sep 2017 12:09:35 +0200 [thread overview]
Message-ID: <7A94CE98-D2BD-4033-AB55-BDEDEC1BB1D4@gmail.com> (raw)
Hi everyone,
With the command \definemathfence it is possible to define for instance the following command
\definemathfence[duality][angle][command=yes,factor=auto]
so that $\duality{T,\phi}$ results in $\langle T,\phi \rangle$ and the \langle and \rangle are appropriately scaled when necessary.
How can one create a command called \bracparenth in order to get a left bracket on the left and a right parenthesis on the right, that is
$\bracparenth{a,b} = [a,b)$
and so that when necessary it scales automatically.
Below is the example for \duality.
Thanks in advance: OK
%%% begin mathfence-example.tex
\definemathfence[duality][angle][command=yes,factor=auto]
\definemathfence[parenth][parenthesis][command=yes,factor=auto]
\starttext
The action of $T$ on a smooth function $\phi$ is denoted by
\startformula
\duality{T,\phi}
\stopformula
while the scalar product of two functions $f$ and $g$ is denoted $\parenth{f|g}$.
\stoptext
%%% end mathfence-example.tex
___________________________________________________________________________________
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 reply other threads:[~2017-09-10 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-10 10:09 Otared Kavian [this message]
2017-09-10 17:09 ` 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=7A94CE98-D2BD-4033-AB55-BDEDEC1BB1D4@gmail.com \
--to=otared@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).