matlabfrag to pdf

Small script using matlabfrag to create a latex formatted pdf file.

You are now following this Submission

Based on plotpdftex

Calls matlabfrag to create the *.eps and *.tex Files. After that pdflatex is used to create the pdf File.

USAGE:
------------------------

mlf2pdf creates the PDF file of the current graphical figure (CGF)
named LaTeXfile.pdf

mlf2pdf(H) creates the PDF file from the graphical figure with
handle H, named LaTeXfile.pdf

mlf2pdf(H,FILENAME) creates the PDF file from the graphical figure
with handle H, named FILENAME.PDF (FILENAME is a character array of
the filename, with or without the extension .PDF)

mlf2pdf(H,FILENAME,PACKAGES) to adding
packages such as fonts, mathfont,...
ex: PACKAGES = 'amssymb, times'

It now supports Windows AND Unix Systems.

Cite As

Martin (2026). matlabfrag to pdf (https://au.mathworks.com/matlabcentral/fileexchange/28545-matlabfrag-to-pdf), MATLAB Central File Exchange. Retrieved .

Acknowledgements

Inspired by: PlotPdfTex, matlabfrag

Inspired: latexfigure

Categories

Find more on Printing and Saving in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.4.0.0

+ added UNIX Support
+ included an example

1.2.0.0

mlf2pdf ignored the figure handle. Should work now.

1.1.0.0

added acknowledgements

1.0.0.0