I am using MATLAB's publishing feature to document my
MATLAB code. For many of my equations I have inserted TEX
strings so that when the documentation is created, the
equations are displayed symbolically.
I have noticed that when MATLAB publishes the results, it
automatically creates a ".png" file for each symbolic
equation that you specify in your comments. MATALAB seems
to assign a random name to each of these ".png" files it
creates for symbolic equations. Is there a way to control
what it names each of ".png" file that is created for a
symbolic math equation that is published by MATLAB?
Subject: Re: MATLAB Publishing of Symbolic Equations through TEX
We are using a tool to automatically convert MATLAB code
into real time C code. I am also using the publishing
feature of MATLAB to automatically create the algorithm
description document for the MATLAB code.
Since the auto-generated C code keeps MATLAB comments
intact, the MATLAB "publishing tags" are retained. I wrote
a MS-Word VBA macro to suck the auto-generated C code into
MS-Word. The VBA macro catches the "publishing tags" in
the auto-generated C code and insert the appropriate hyper-
text links, image, or formatting. The only hangup is when
the VBA maco encounters the tag for a symbolic equation,
it can not figure out which corresponding ".png" equation
file to insert into the word document.
The idea is to basically have a published version of the
MATLAB code and a published version of the auto-generated
C code that match (i.e. have the same symbolic math
equations and formatting).
If I can just get MS-word to recognize TEX strings that
would also work, but that is a MS-Word issue, not a MATLAB
issue.
"Matthew Simoneau" <matthew@mathworks.com> wrote in
message <fn3461$2l2$1@fred.mathworks.com>...
> Sorry, nope. Why does this matter to you?
Subject: Re: MATLAB Publishing of Symbolic Equations through TEX
The filename is generated by hashing the actual text of the
TeX. See toolbox/codetools/private/hasEquation.m for the
simple algorithm. You should be able to do this same
calculation in VBA.
(I'll also give you a heads up that the hash function we use
is changing in the next release to something more
complicated, so you'll have to look at this again in the
future.)
Subject: Re: MATLAB Publishing of Symbolic Equations through TEX
"Matthew Simoneau" <matthew@mathworks.com> wrote in message
<fn5kgl$c9$1@fred.mathworks.com>...
> OK, I'm with you. Thanks for the detail.
>
> The filename is generated by hashing the actual text of the
> TeX. See toolbox/codetools/private/hasEquation.m for the
> simple algorithm. You should be able to do this same
> calculation in VBA.
>
> (I'll also give you a heads up that the hash function we use
> is changing in the next release to something more
> complicated, so you'll have to look at this again in the
> future.)
>
Thanks for the info; however, I could not find a codetools
subdirectory under toolbox. I am using 2007b. Could it be in
a different location? I tried a search in all the MATLAB
directories and still did not find the file
Thanks, Brandeis
Subject: Re: MATLAB Publishing of Symbolic Equations through TEX
"Matthew Simoneau" <matthew@mathworks.com> wrote in message
<fn5kgl$c9$1@fred.mathworks.com>...
> OK, I'm with you. Thanks for the detail.
>
> The filename is generated by hashing the actual text of the
> TeX. See toolbox/codetools/private/hasEquation.m for the
> simple algorithm. You should be able to do this same
> calculation in VBA.
>
> (I'll also give you a heads up that the hash function we use
> is changing in the next release to something more
> complicated, so you'll have to look at this again in the
> future.)
>
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.