ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: Simon Pepping <spepping@scaprea.hobby.nl>
Subject: Re: Nath, and problems smashing
Date: Sat, 12 Apr 2003 22:37:52 +0200	[thread overview]
Message-ID: <20030412203752.GB5029@scaprea> (raw)
In-Reply-To: <3445877568.20030411224228@iol.it>

Hi,
On Fri, Apr 11, 2003 at 10:42:28PM +0200, Giuseppe Bilotta wrote:
> Hello,
> 
> as I might have mentioned before, I'm working on a ConTeXt module
> that would give part of the functionality available in the LaTeX
> package Nath; as I'm not really an expert in either of the topics
> involved, I'm going at it slowly, starting with the simple things;
> the first thing I implemented was a natural way to write
> extensible arrows. It came up pretty fine and works quite good,
> but there seems to be a sizing problem.

A good idea.
 
> As you may notice if you compile the nathtest document, sub and
> superscripts to the single-line arrows are much to high or low;
> browsing about I noticed that in AMS-LaTeX the minus that extends
> the single-line arrows is "smashed", to prevent this problem; I
> did try to smash it (replacing \mathop- with \mathop{\smash-}),
> but it didn't seem to help.

You require two smashes to get the height and depth equal to that of
rightarrow.

\usemodule[nath]

\starttext

Arrowfiller: 
\setbox0\hbox to 6pt{\arrowfiller \hfill }
height: \the\ht0,
depth: \the\dp0.

Smash in arrowfiller: 
\def\arrowfiller {\cleaders \hbox {\mathematics {\mkern -3mu\mathord
{\smash -}\mkern -3mu}}}
\setbox0\hbox to 6pt{\arrowfiller \hfill }
height: \the\ht0,
depth: \the\dp0.

Another smash in the opening minus:
\setbox0\hbox {$\mathop {\mathopen {\smash -}\mkern -6mu \doarrowfill
{\ifsuper \the \supertoks \fi }{\ifsuber \the \subertoks \fi } \mkern
-6mu\mathclose {\rightarrow }}$}
height: \the\ht0,
depth: \the\dp0.

Rightarrow:
\setbox0\hbox {$\rightarrow$}
height: \the\ht0,
depth: \the\dp0.

\stoptext

Regards, Simon

-- 
Simon Pepping
email: spepping@scaprea.hobby.nl

  reply	other threads:[~2003-04-12 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-11 20:42 Giuseppe Bilotta
2003-04-12 20:37 ` Simon Pepping [this message]
2003-04-13 12:03   ` Re[2]: " Giuseppe Bilotta

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=20030412203752.GB5029@scaprea \
    --to=spepping@scaprea.hobby.nl \
    --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).