No BSD License  

Highlights from
renderTex2Emf

Be the first to rate this file! 1 Download (last 30 days) File Size: 2.72 KB File ID: #14194

renderTex2Emf

by Mathias Ortner

 

08 Mar 2007 (Updated 08 Mar 2007)

for converting latex strings to emf files

| Watch this File

File Information
Description

This function converts a Tex input to a windows vector emf vector file.
  
  texWarning=renderTex2Emf(equationText,fontSize,fileName)
 
  It is a slighty modified version of renderTex in publish.m
  It allows having nice equations in word documents.
  
  How to use it:
  
  equationText is the input string.
  
  fontSize optional font size in pts (default 12)
 
  fileName optional file where to save the file.
 
  texWarning output of the tex Parser
 
  renderTex2Emf('$$ \frac{2}{x} +\int_0^2 x^2 dx$$');
  generate a 12 pts equation and save it into the cilpboard.
  for instance, you can paste it into a Word document.
  
  renderTex2Emf('$$ \frac{2}{x} +\int_0^2 x^2 dx$$',22);
  same with a 22 pts eqution.
  
  renderTex2Emf('$$ \frac{2}{x} +\int_0^2 x^2 dx$$',22,'myEquation.emf');
  save it to the 'myEquation.emf' file instead of the clipboard.
  
  NOTE ON FONTS: in order to export Tex equations to printers, you need to
  install the ams fonts on your system :
  for PC systems : control panel -> fonts and 'file - >add'
  select the fonts located in
  <matlabroot>\sys\fonts\ttf\cm
  <matlabroot>\sys\fonts\type1\cm
  and once the fonts are included, reboot.

MATLAB release MATLAB 7.1.0 (R14SP3)
Other requirements Windows
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (2)
11 Apr 2007 M Ortner

The author speaking : you should be aware that the generated equation needs the font to be displayed. If you send the word document to someone that does not have the fonts, he will not be able to see the emf properly, since Word does not encapsulate the fonts associated with an emf file.

16 Feb 2010 Stuart Bowman

I really like this function, but the limitation to Matlab fonts is frustrating. I'd like to be able to be able to show these TeX equations to others without having to mess with sending fonts around. Does anyone know if there is another font that will work better & is generally installed on most computers?

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
graphics import Mathias Ortner 22 Oct 2008 09:03:01
graphics export Mathias Ortner 22 Oct 2008 09:03:01
latex emf tex vector image Mathias Ortner 22 Oct 2008 09:03:01

Contact us at files@mathworks.com