Cody

Solution 316354

Submitted on 7 Sep 2013 by Alfonso Nieto-Castanon
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% texStr = '\beta'; txt = 'beta'; assert(isequal(tex2txt(texStr),txt))
2   Pass
%% texStr = ['\fontsize{16}black {\color{magenta}magenta '... '\color[rgb]{0 .5 .5}teal \color{red}red} black again']; txt = 'black magenta teal red black again'; assert(isequal(tex2txt(texStr),txt))
3   Pass
%% texStr = {'We need to work with cells, too' '(for {\bfmultiline} labels) and' 'return strings with newline characters.'}; txt = sprintf(['We need to work with cells, too\n' ... '(for multiline labels) and\n' ... 'return strings with newline characters.']); assert(isequal(tex2txt(texStr),txt))
4   Pass
%% texStr = '\slRemove {\bfall} \itof \rmthese.'; txt = 'Remove all of these.'; assert(isequal(tex2txt(texStr),txt))
5   Pass
%% txt = 'variable_i^2/pi'; texStr = texlabel(txt); assert(isequal(tex2txt(texStr),txt))