I cannot find a solution to print a figure with embedded Greek letters using the print function (or the File Exchange function export_fig() of Yair Altman).
While this functionality was available in earlier matlab releases (e.g. R2016a), the following code does not produce the desired result with version R2018a:
figure()
rng = 0:0.01:2;
plot(rng, sin(rng.*pi()))
text(1, 0.6, 'sin of {\alpha}')
print('simple_test_p', '-dpdf')
% export_fig('simple_test_e','-pdf', '-transparent')
While the text before '{\alpha}' is embedded in the resulting pdf file, alpha itself appears to be an image rather than an embedded font (see image).
I tried several different fonts to exclude the possibility of a missing default font (besides double-checking the font folder). Moreover, I used both latex and tex interpreters. Nevertheless, none of these procedures worked.
If this problem cannot be solved with Matlab, is there any other way to get a pdf file with embedded Greek letters and mathematical formulas?
I very much appreciate your help. Thank you in advance.
