How to set font parameters in .pdf, publish via MATLAB and LATEX

When trying to publish a .pdf file for .m MATLAB code, the equations (written in latex) do not display properly (smooth) in the font, and the fonts look scattered.

I tried to fix the problem by reducing the font size of the editor, but that didn't work.

For example: MATLAB code:


%% (a) From the above graph there are no signs of convergence $ \ rho $

%%

% $ x ^ 2 + e ^ {\ pi i} $


then the .pdf file is poorly written, in which the equation fonts are not smooth enough.

Thanks for any suggestions.

+3
source share
1 answer

I had the same problem, while the rendering quality of the equation was inadequate.

This is my procedure to fix this in MATLAB R2013b.

1) MATLAB :

    edit publish

"publish.m". , . Linux .

2) 811. :

    temptext = text('Parent',tempaxes,'Position',[.5 .5], ...
    'HorizontalAlignment','center','FontSize',22, ...
    'Interpreter','latex');

"Fontsize" ; 30.

3) 747. :

    swapTexForImg(dom,equationNode,outputDir,fullFilename,equationText,newSize(2),newSize(1))

    swapTexForImg(dom,equationNode,outputDir,fullFilename,equationText,newSize(2)/scale,newSize(1)/scale)

- . , , ; 2.

4) . .

5) MATLAB :

rehash toolboxcache

:

clear functions

6) .

PDF. HTML, . HTMl .

+2

All Articles