ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* writing physical quantities in maths mode
@ 2011-03-11  9:14 Ian Lawrence
  2011-03-11  9:33 ` Mojca Miklavec
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Lawrence @ 2011-03-11  9:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Morning all,
I have a need to write a lot of physical quantities - these should be
in text mode. Mostly I can manage, but subscripts are causing me grief

Eg
\startformula
\startmathalignment[n=3]
\NC \text{F}\NC =\NC {\text{GMm} \over \text r^2}\NR
\NC \text {force}_G \NC =\NC {\text{G} \times \text m_1 \times \text
m_2 \over \text r^2}\NR
\NC \text {force \low G} \NC =\NC {\text{G} \times \text m_1 \times
\text m_2 \over \text r^2}\NR
\stopmathalignment
\stopformula

In the second and third equantions I'd like force subscript G all in
roman, not italic, to follow the standard conventin.
The first one puts the G in the correct place, but in italic
The second one manages roman, but it's offset.
I suspect I could kludge this with hskips, but I think there should be
a more elegant solution.
If there is a paper on writing physics in ConTEXt (not maths... I have
found the helpful couple by Aditya Mahajan) that would save me time.

For most relationships I am planning to use predefine quantities, then
slot these in

Like this  in the header
\define \forceQA
{{\sl F}/\Newton}

\define \forceQU
{{\tf force}/{\tf newton}}

\define \forceQ
{{\tf force}}

(etc)

And this in the body


\startformula
{\forceQA \over \massQA} = \accelerationQA
\stopformula

\startformula
{\forceQU \over \massQU} = \accelerationQU
\stopformula

\startformula
{\forceQ \over \massQ} = \accelerationQ
\stopformula


Any more elegant solutions out there?

Thanks

Ian
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: writing physical quantities in maths mode
  2011-03-11  9:14 writing physical quantities in maths mode Ian Lawrence
@ 2011-03-11  9:33 ` Mojca Miklavec
  0 siblings, 0 replies; 2+ messages in thread
From: Mojca Miklavec @ 2011-03-11  9:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Mar 11, 2011 at 10:14, Ian Lawrence <physics.rooted@gmail.com> wrote:
> Morning all,
> I have a need to write a lot of physical quantities - these should be
> in text mode. Mostly I can manage, but subscripts are causing me grief
>
> Eg
> \startformula
> \startmathalignment[n=3]
> \NC \text{F}\NC =\NC {\text{GMm} \over \text r^2}\NR
> \NC \text {force}_G \NC =\NC {\text{G} \times \text m_1 \times \text
> m_2 \over \text r^2}\NR
> \NC \text {force \low G} \NC =\NC {\text{G} \times \text m_1 \times
> \text m_2 \over \text r^2}\NR
> \stopmathalignment
> \stopformula
>
> In the second and third equantions I'd like force subscript G all in
> roman, not italic, to follow the standard conventin.
> The first one puts the G in the correct place, but in italic
> The second one manages roman, but it's offset.

Is this ok?
    \text{force}_{\rm G} (or \text{force}_{\text{G}})

With \rm you stay in math mode, but use roman. You should not use \rm
for "force" since you would get mathematical spacing instead of proper
kerning.

> \startformula
> {\forceQA \over \massQA} = \accelerationQA
> \stopformula

Try to use \frac{}{} instead of \over. There are discussions about
disabling \over in luatex (or at least in MKIV).

Mojca
___________________________________________________________________________________
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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2011-03-11  9:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-11  9:14 writing physical quantities in maths mode Ian Lawrence
2011-03-11  9:33 ` Mojca Miklavec

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