Added a loop in name2tex so that the first argument can be a cell of string.
parent
02820b7151
commit
38cc6add5f
|
@ -28,8 +28,19 @@ if isempty(id)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if info
|
if iscell(name)
|
||||||
|
nn = length(name);
|
||||||
|
else
|
||||||
|
nn = 1;
|
||||||
|
end
|
||||||
|
|
||||||
|
for i=1:nn
|
||||||
|
if info
|
||||||
|
if iscell(name)
|
||||||
|
tex = name{i};
|
||||||
|
else
|
||||||
tex = name;
|
tex = name;
|
||||||
|
end
|
||||||
n = length(id);
|
n = length(id);
|
||||||
if id(1)==1
|
if id(1)==1
|
||||||
tex = ['\_', tex(2:end)];
|
tex = ['\_', tex(2:end)];
|
||||||
|
@ -59,8 +70,13 @@ if info
|
||||||
end
|
end
|
||||||
tex = [tex(1:(id-1)) '_{' tex((id+1):end) '}'];
|
tex = [tex(1:(id-1)) '_{' tex((id+1):end) '}'];
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
if iscell(name)
|
||||||
|
tex = strrep(name{i}, '_', '\_');
|
||||||
|
else
|
||||||
tex = strrep(name, '_', '\_');
|
tex = strrep(name, '_', '\_');
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
%@test:1
|
%@test:1
|
||||||
|
|
Loading…
Reference in New Issue