Improve quality of Latex equations published to .html with publish()
조회 수: 4 (최근 30일)
이전 댓글 표시
Suppose you have this in a blank .m file:
%% % I was writing something $x^2+e^{\pi i}$
Now, hit the publish button and you will see that the equation comes out blurred. I would like to improve the rendering of the latex expression (not to mention that it is not properly aligned with the text).
Here's a snapshot
I tried to play a bit with the publish() function (see lines 160, 702 and 795) but to no avail and honestly I cannot start rewriting the function for a report that I wanted to finish by today (I guess I will revert to beamer again...until TMW provides readable Latex embedding)
댓글 수: 6
Mark K
2015년 3월 24일
You can improve the resolution of the rendered LaTex images according to: <http://stackoverflow.com/questions/21948601/how-to-set-the-font-settings-in-pdf-publish-via-matlab-and-latex>
Andrew Roscoe
2016년 6월 9일
Unfortunately the method used to modify 'FontSize' from 22 to a bigger number in "publish.m" seems to have stopped working, somewhere between R2015a and R2016a. Now I can't make the equations any bigger.. They are too small for students to read on the page.
답변 (1개)
Amro
2014년 2월 3일
the reason it comes out blurred is that publish will first render the text at double-size, capture the image (indirectly calls the undocumented function: hardcopy(figHandle,'-dzbuffer','-r0')), then downsample the result to half the size (a cheap way of doing anti-aliasing). Other post-processing is performed to remove whitespace around the captured text...
The text object is initially created with a FontSize=22 (so the output image has text equivalent to font size 11).
See edit publish>getRenderingFigure for the details.
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Import and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!