ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* [NTG-context]  Using Farad with \unit messes up feet, µ not recognised as prefix
@ 2023-10-03 10:31 Marco Patzer
  2023-10-03 13:42 ` [NTG-context] " Wolfgang Schuster
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Patzer @ 2023-10-03 10:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi!

I struggle using the unit Farad (unit of capacitance):

\starttext

%% prints 10 10 ft
\unit{10 F}
\unit{20 ft}

\registerunit  [F=Farad]
\setupunittext [Farad=F]

%% prints 10 F 20 F⋅t
\unit{10 F}
\unit{20 ft}

\stoptext

When registering Farad as new unit it messes up feet. This looks
like a bug to me, since “20 ft” does not contain a capital “F” and
units are case-sensitive. How to use Farad correctly without messing
up other units?

2nd issue: The prefix “µ” is not recognised:

\starttext
%% prints 10 nm 20 30 µm
\unit{10 nm}
\unit{20 µm}
\unit{30 um}
\stoptext

I would expect “20 µm” to produce the correct result. Can we make
“µm” also produce the same result as “um”?

Marco

LMTX 2023.09.04 19:15
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context] Re: Using Farad with \unit messes up feet, µ not recognised as prefix
  2023-10-03 10:31 [NTG-context] Using Farad with \unit messes up feet, µ not recognised as prefix Marco Patzer
@ 2023-10-03 13:42 ` Wolfgang Schuster
  2023-10-03 14:27   ` Marco Patzer
  0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Schuster @ 2023-10-03 13:42 UTC (permalink / raw)
  To: mailing list for ConTeXt users, Marco Patzer

Marco Patzer schrieb am 03.10.2023 um 12:31:
> Hi!
>
> I struggle using the unit Farad (unit of capacitance):

The unit "farad" exists.

> \starttext
>
> %% prints 10 10 ft
> \unit{10 F}
> \unit{20 ft}
>
> \registerunit  [F=Farad]
> \setupunittext [Farad=F]
>
> %% prints 10 F 20 F⋅t
> \unit{10 F}
> \unit{20 ft}
>
> \stoptext
>
> When registering Farad as new unit it messes up feet. This looks
> like a bug to me, since “20 ft” does not contain a capital “F” and
> units are case-sensitive. How to use Farad correctly without messing
> up other units?

The unit for feet is "foot" and "ft" is a combination of a prefix 
(femto) and a unit (tonne).

You can list the individual parts in the log file with the 
"physics.units" tracker.

To get a short unit you have to use the following method (it works 
because farad exists):

     \registerunitshortcut [F=farad]

Wolfgang

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context]  Re: Using Farad with \unit messes up feet, µ not recognised as prefix
  2023-10-03 13:42 ` [NTG-context] " Wolfgang Schuster
@ 2023-10-03 14:27   ` Marco Patzer
  2023-10-03 15:06     ` Marco Patzer
  0 siblings, 1 reply; 4+ messages in thread
From: Marco Patzer @ 2023-10-03 14:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 3 Oct 2023 15:42:57 +0200
Wolfgang Schuster <wolfgang.schuster.lists@gmail.com> wrote:

> Marco Patzer schrieb am 03.10.2023 um 12:31:
> > Hi!
> >
> > I struggle using the unit Farad (unit of capacitance):  
> 
> The unit "farad" exists.

You're right \unit{10 Farad} works.

> The unit for feet is "foot" and "ft" is a combination of a prefix 
> (femto) and a unit (tonne).

Makes sense if you think about it. Never crossed my mind that ft not
meaning feet in this instance and also never contemplated the
existence of a “femto tonne”.

> You can list the individual parts in the log file with the 
> "physics.units" tracker.

That gives some insight, indeed. Thanks.

What about:

\unit{10 um}
\unit{10 µm}

Can I assign µ to mean micro (prefix)?

Marco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [NTG-context]  Re: Using Farad with \unit messes up feet, µ not recognised as prefix
  2023-10-03 14:27   ` Marco Patzer
@ 2023-10-03 15:06     ` Marco Patzer
  0 siblings, 0 replies; 4+ messages in thread
From: Marco Patzer @ 2023-10-03 15:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, 3 Oct 2023 16:27:22 +0200
Marco Patzer <lists@homerow.info> wrote:

> What about:
> 
> \unit{10 um}
> \unit{10 µm}
> 
> Can I assign µ to mean micro (prefix)?

Found it:

\registerunit [prefix] [µ=micro]

\starttext
  \unit{10 micro meter} \crlf
  \unit{10 µm}
\stoptext

Should this be the default (µ assigned to micro)?

Marco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-10-03 15:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-03 10:31 [NTG-context] Using Farad with \unit messes up feet, µ not recognised as prefix Marco Patzer
2023-10-03 13:42 ` [NTG-context] " Wolfgang Schuster
2023-10-03 14:27   ` Marco Patzer
2023-10-03 15:06     ` Marco Patzer

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).