mailing-list for TeXmacs Users

Text archives Help


Re: Math font shape and (possibly) xmacro


Chronological Thread 
  • From: Giovanni Piredda <address@hidden>
  • To: address@hidden
  • Subject: Re: Math font shape and (possibly) xmacro
  • Date: Wed, 18 Nov 2020 23:39:46 +0100


On 18.11.20 21:17, TeXmacs wrote:
Hi Giovanni,

On Mon, Nov 16, 2020 at 09:09:02PM +0100, Giovanni Piredda wrote:
Let us assume we are in math mode, and that I want to write v = 5 m
s⁻¹, with m and s in upright shape; there should be a space between
m and s⁻¹ (they are multiplied together)
There were a few issues with the Computer Modern Roman font.
The right solution is to set 'math-font-shape' to 'right'.
I fixed the CMR issues and created the 'upright' macro to do
exactly what you want (revision 13165).

That said, for high school physics and chemistry teachers,
it would probably be nice to implement special macros for
physical quantities and formulas of chemical compounds.
I am not yet decided about the right way to do this.

For physical quantities, one may not wish to type
all the multiplications. So 1kgm/s^2 or even 1kgm/s2
should be transformed into 1*kg*m/s^2.

Similarly, in chemistry, one might wish to type 'H2O' or 'CH3O-'.

You may try to design a Scheme macro to perform such rewritings ;^)

Best wishes, --Joris


I feel having a macro for physical quantities is interesting for physicists too. One issue for me is how wide of a spacing to put between units. siunitx,written by J. Wright for LaTeX, puts a thin space (\,) and lets users choose a different formatting (https://mirror.easyname.at/ctan/macros/latex/contrib/siunitx/siunitx.pdf, pages 37 and 38). The "SI concise summary" (https://www.bipm.org/utils/common/pdf/si-brochure/SI-Brochure-9-concise-EN.pdf, last page) says "a space" or "a half-high centred dot".

For the input to the Scheme macros (physical quantities and chemical formulae), I have in mind now that something clear to read may be better than something quick to type.

Maybe discussing both of these topics are more interesting in texmacs-dev than here

G.




Archive powered by MHonArc 2.6.19.

Top of page