latex2image(latexst​r,outputfile)

版本 1.0.0.0 (3.8 KB) 作者: Sean de Wolski
Convert Latex String to an Image
263.0 次下载
更新时间 2015/9/29

查看许可证

latex2image - Convert a latex equation into an image.

Usage:
I = latex2image(latexstr);
I = latex2image(latexstr,outputfile);

Inputs:
latexstr: Latex string to convert
Character row vector
Example: 'e^{\pi i} + 1 = 0'

outputfile: Output image file where the latex image should be stored
Character row vector
Example: 'test.png'
'C:\Documents\MATLAB\html\test.png'

Outputs:
I: Image of latex as a matrix.

Examples:

%% Example 1: Convert latex to image and get image result
I = latex2image('e^{\pi i} + 1 = 0');
imshow(I)

%% Example 2: Convert latex to a new file
latex2image('\int_0^x\!\int_y dF(u,v) + 3','testLatex2Image.png')
imshow('testLatex2Image.png')

See Also: publish, latex

引用格式

Sean de Wolski (2024). latex2image(latexstr,outputfile) (https://www.mathworks.com/matlabcentral/fileexchange/53234-latex2image-latexstr-outputfile), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2015b
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Display Image 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.0.0.0