Opened 7 years ago

Last modified 7 years ago

#4797 new enhancement

Is there a way to define a LaTex formatted text to dfine a symob for a variable in OM?

Reported by: ali.shirazi@… Owned by: Adeel Asghar
Priority: high Milestone: Future
Component: OMEdit Version: v1.13.0-dev-nightly
Keywords: Cc:

Description

Hello,

I am postprocessing my simulation results from the OM _res.mat outout files using DyMat in Python, where I use matplotlib package to generate graphs of the imported results.

I am wondering if there is a way or place in OM (e.g. somewhere within the annotation feature etc) where I can define a symbol for a variable using LaTex formatted text (e.g. adding subscript, superscript, greek letters etc) along with the name, unit and description of the variable. If there is a way to do so inside the .mo file, and assuming that the symbols list will be written somewhere in the _res.mat or _init.xml files, then all the symbols can be nicely handled by matplotlib which does support LaTex.

I think that is a nice feature that could be added to OM in the near future, if it already does not exist.

Cheers,
Ali Shirazi

Change History (1)

comment:1 by Martin Sjölund, 7 years ago

You can try:

model M
  Real '$x = {-b \\pm \\sqrt{b^2-4ac} \\over 2a}.$' = 3;
end M;
Note: See TracTickets for help on using tickets.