Summer of Code - Getting Started: Difference between revisions

Jump to navigation Jump to search
Line 138: Line 138:
Text objects in plots (like titles, labels, texts...) in the OpenGL renderer only support plain text mode without any formatting possibility. Support for TeX and/or LaTeX formatting needs to be added.
Text objects in plots (like titles, labels, texts...) in the OpenGL renderer only support plain text mode without any formatting possibility. Support for TeX and/or LaTeX formatting needs to be added.


The TeX formatting support actually only consists of a very limited subset of the TeX language. This can be implemented directly in C++ into Octave by extending the existing text engine, avoiding to add a dependency on a full TeX system.
* The TeX formatting support actually only consists of a very limited subset of the TeX language. This can be implemented directly in C++ into Octave by extending the existing text engine, avoiding to add a dependency on a full TeX system. Essentially, support for Greek letters, super/sub-scripts, and several mathematical symbols needs to be supported.  For example,


On the other hand, the LaTeX formatting support is expected to provide full LaTeX capabilities. This will require to use an external LaTeX system to produce text graphics in some format (to be specified) that is then integrated into Octave plots.
:<pre>\alpha \approx \beta_0 + \gamma^\chi</pre>
 
Would be rendered as,
 
:&alpha; &asymp; &beta;<sub>0</sub> + &gamma;<sup>&chi;</sup>
 
This is analogous to how special characters may be included in a wiki using html.
 
:<pre>&alpha; &asymp; &beta;<sub>0</sub> + &gamma;<sup>&chi;</sup></pre>
 
* On the other hand, the LaTeX formatting support is expected to provide full LaTeX capabilities. This will require to use an external LaTeX system to produce text graphics in some format (to be specified) that is then integrated into Octave plots.


The matplotlib project [http://matplotlib.sourceforge.net/users/usetex.html has already done this in Python] and might be used as an example of how to do this in Octave.  Mediawiki has also also done [http://en.wikipedia.org/wiki/Wikipedia:Texvc something similar].
The matplotlib project [http://matplotlib.sourceforge.net/users/usetex.html has already done this in Python] and might be used as an example of how to do this in Octave.  Mediawiki has also also done [http://en.wikipedia.org/wiki/Wikipedia:Texvc something similar].