[Tex/LaTex] Matlab to pdflatex with text properties

fontsgraphicsMATLABpdftexscaling

I know that this might be more a detail rather than a serious problem but I've already Googled it like crazy and I can't find the solution.

Is it possible to achieve a MATLAB plot in pdflatex with the correct text properties of the document (namely size and fonts)? I'm able to achieve a polished figure through the matlabfrag and ml2pdf scripts but when I scale the figure width the text gets scaled as well. I'd like something sort of Inkscape PDF+LaTeX option that outputs a .pdf_t file and a .tex file with the text.

Best Answer

Thank you very much for all the help. I managed to find a fitting solution to this problem. I'll post here the solution in case someone else finds it useful. Basically I turned the tedious 2 steps task matlab-inkscape-PdfLateX into one single task. This is accomplished thanks to the plot2svg matlab function and through the inkscape export feature that can be run from the terminal shell or a script. Then I can run the script from Matlab through the ! invoke shell. Below is the script I created

#
echo "File name?"
read fname
export LD_LIBRARY_PATH=/usr/lib64;
inkscape $fname.svg -z -D --export-pdf=$fname.pdf --export-latex
rm $fname.svg
#