ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: context@vivaldi.net
To: ConTeXt <ntg-context@ntg.nl>
Subject: Bar within math
Date: Sat, 30 May 2020 22:39:21 +0200	[thread overview]
Message-ID: <211ff680cf73b11742b4f90b912606ec@vivaldi.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Hello,

it seems that bar (even with option 'continue=yes') is not rendered in 
place of '~' within math. See the sample:

----
\definebar[MyBar][color=green,rulethickness=2.8,order=background,offset=1.5,continue=yes]

\starttext
   1 + 2 = \startbar[MyBar]3~kN\stopbar

   $1 + 2 = \startbar[MyBar]3~\text{kN}\stopbar$
\stoptext
----

In the sample 'kN' is a unit, which should be separated by space from 
the result (here: 3);
I am used to put the unit into the math environment and enclose it into 
\text{...}.

Is there a way to make the bar be rendered in places of blanks within 
math, too (like if it was inside $ ... $ - as the first line of the 
sample)?
Or is there a better way to add an unbroken background to a (part of) 
math expression followed by a text (unit)?

Best regards,

Lukas

[-- Attachment #2: Bar.mkiv --]
[-- Type: text/plain, Size: 207 bytes --]

\definebar[MyBar][color=green,rulethickness=2.8,order=background,offset=1.5,continue=yes]

\starttext
  1 + 2 = \startbar[MyBar]3~kN\stopbar

  $1 + 2 = \startbar[MyBar]3~\text{kN}\stopbar$
\stoptext

[-- Attachment #3: Bar.pdf --]
[-- Type: application/pdf, Size: 7631 bytes --]

[-- Attachment #4: Type: text/plain, Size: 493 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
___________________________________________________________________________________

                 reply	other threads:[~2020-05-30 20:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=211ff680cf73b11742b4f90b912606ec@vivaldi.net \
    --to=context@vivaldi.net \
    --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).