mailing-list for TeXmacs Users

Text archives Help


Re: [TeXmacs] De-italicize single-letter units


Chronological Thread 
  • From: Michael Shea <address@hidden>
  • To: Giovanni Piredda <address@hidden>
  • Cc: texmacs-users <address@hidden>
  • Subject: Re: [TeXmacs] De-italicize single-letter units
  • Date: Mon, 18 Mar 2019 08:23:11 -0500

Note. I am not really following the NIST convention here, as I am using a different font. This is my personal preference as I want to emphasis to students the symbols are units not variables, and I don't think just using the 'normal' variant is distinctive enough. 

Also, regarding the space, I use put a space after the number in regular math-mode before the \unit command. 
Here is an example of what this macro looks like in action.

image.png
PS - I am on Windows too. 

On Mon, Mar 18, 2019 at 8:13 AM Michael Shea <address@hidden> wrote:
I am using the following macro for unit type setting in 1.99.8 and I am happy with the results. 

image.png


On Sat, Mar 9, 2019 at 8:48 PM Giovanni Piredda <address@hidden> wrote:



Am 09.03.2019 um 23:25 schrieb Joseph Stavitsky:

The letters circled in red in the referenced image are italicized because they are a single letter following a number. If I understand correctly, TeXmacs interprets them as variables when my intent is to specify unit abbreviations. Is there a global setting to prevent this and/or a way to correct individual letters?

Platform: Win10 x64 

TexMacs version: 1.99.8

One possibility is to mark the letter as text in 1.99.9 (and it shold be te same in 1.99.8 that you are using). Once that you are inside an equation ,from the menu:"Insert" then "text".

It is also possible to define a macro "unit", that you could use for the measurement units; I copy here a macro that I wrote and put in a package which I can add to documents

 <assign|unit|<macro|name|<with|font-shape|normal|math-font-shape|right|<arg|name>>>>

I use this by inserting it with a slash inside the formula

\unit

and then press return: it gives me a field in which I then type the unit, whic appears in upright font. It seems to me that there is another way too to insert macros, but I have not learnt it :-)

I tested it minimally, it seems to work; and it is easy enough that it should work ... And I do not know if it is written best, that it what I learnt from the manual till now.

Finally, I think it is SI convention to insert a space between the number and the unit, pls. see #15 in https://physics.nist.gov/cuu/Units/checklist.html

PNG image

PNG image




Archive powered by MHonArc 2.6.19.

Top of page