Units in latex

Messages in english

Modérateur : xcasadmin

XcasEngGuy
Messages : 78
Inscription : mer. janv. 13, 2010 3:20 pm

Units in latex

Message par XcasEngGuy » ven. janv. 15, 2021 7:29 pm

I like the way the new version handles variable names in Latex, separating products of variables with a dot in a very consistant manner, makeing mass*var not end up looking like massvar in the latex output for example. Thank you very much for that.

I have been working with units lately which allows me to generate a full set of equations for computer modeling, taking units into account. In the Latex output, the units often run together, making them hard to read. Also, a small note, the unit for inch in the Phys menu is "inch" in the Length submenu and "in" in the Area and Vol submenus. "_inch" is the unit that works.

I have attached a sample units calculation I did to make a set of equations ready for a Fortran program (yes, I'm old) as an example of what I mean.

Matt
Pièces jointes
Sample.zip
(50 Kio) Téléchargé 20 fois

lukamar
Messages : 300
Inscription : ven. juin 30, 2017 9:55 am
Localisation : Zagreb, Croatia

Re: Units in latex

Message par lukamar » ven. janv. 22, 2021 10:15 pm

Hi Matt,

I see what you mean. In latex, it is recommended to let the typesetter handle implicit multiplication, i.e. to simply separate factors by spaces in the input file; however, this approach does not work well for units.
Rather by resorting to explicit multiplication with \cdot, I fixed the issue by including a small space \, between successive units in the giac->latex conversion routine. This makes units appear lightly separated from each other, which I hope will be enough for high readability.
The fix will appear in one of the subsequent releases.

Luka

XcasEngGuy
Messages : 78
Inscription : mer. janv. 13, 2010 3:20 pm

Re: Units in latex

Message par XcasEngGuy » sam. janv. 23, 2021 1:42 am

Great. I look forward to that.

Matt

Répondre