Using latex packages in MATLAB markup publish

2019-06-24 13:03发布

问题:

I'm on Mac OSX 10.10.5 and MATLAB 2015b, and have now spent hours trying to follow various googled instructions for how to import LaTeX packages and use them in within MATLAB's markup 'functionality'. The most concise instructions I've found are contained here:

How do you use the LaTeX blackboard font in MATLAB?

http://mathforum.org/kb/message.jspa?messageID=7574110

However, nothing has so far worked. I've tried:

  1. copying .cls files to /Applications/MATLAB_R2015b.app/sys/tex/latex/base/ (and /Applications/MATLAB_R2015b.app/sys/tex/)
  2. editing my /Applications/MATLAB_R2015b.app/sys/tex/mwarticle.cls to \usepackage, \RequirePackage, or \include as described here
  3. editing my /Applications/MATLAB_R2015b.app/toolbox/matlab/graphics/tex.m file to \usepackage or \RequirePackage as described here
  4. appending texpath in .../tex.m with downloaded package zips or those with in my Tex distribution e.g. /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath, .../source/latex/amsmath, and .../doc/latex/amsmath (both using the fullfile function and plain strings)

This is trivial with free software R and R Studio with R markdown documents. I'm very surprised this is so difficult for proprietry software, especially given that it has been noted as far back as five years ago