nschloe/matlab2tikz — Issue #64: string handling
Author: kelkington
Created: 2012-01-28 20:54:08+00:00
State: open

I have previously used these strings for labelling plots:

xlabel('\text{time [s]}')
ylabel('\omega_\textit{eq} \text{ [p.u.]}')

which have in the past been translated to

$\text{time [s]}$
$\omega_\textit{eq} \text{ [p.u.]}$

by matlab2tikz, and this is just what I want.

It seems however that there has been a change in the string handling. These strings are now converted to

xlabel={$\text{\textbackslash{}text}{\text{time [s]}}$}
ylabel={$\omega{}_\\text{textbackslash{}textit}{\text{eq}}\text{ \textbackslash{}text}{\text{ [p}.u.\text{]}}$}

I suppose that matlab2tikz now want s to sort out the formatting. However if I remove all formatting I get

xlabel={time [s]}
ylabel={$\omega{}_{\text{eq}}\text{ [p}.u.\text{]}$}

The xlabel is fine, but the ylabel is incorrect. I also don't see how I ever could have included the \textit formatting.

Is there some way to turn off this formatting, and go back to the way matlab2tikz used to handle strings? This may be a work in progress, but the old formatting was straightforward, and I liked it :)