|
"Steven Lord" <slord@mathworks.com> wrote in message <gcl95d$1bd$1@fred.mathworks.com>...
>
> "Andres " <rantore@werb.deNoRs> wrote in message
> news:gcl429$pco$1@fred.mathworks.com...
> > Hi,
> >
> > is there any kind of switch to hide a specific command in a published
> > m-file? [..]
> There may be a more sophisticated way to do this, but one easy way is to
> write a short script file and call that script file instead of DISP:
> [..]
Thanks for your idea, Steve. I'd then have to write a script or function for any kind of code I want to hide, but it would definitely make the published file look a bit better.
Maybe the only 'more sophisticated' method would be to post-process the html-file, i.e.
- add a keyword comment to each line of code to hide, like '% *hide*'
- write a function publishAndHide.m that publishes the m-file, looks for the keyword in the source part of the published file (after '##### SOURCE BEGIN #####'), and finally removes the corresponding lines in the html-part ...
Humph, i'll think about if it's worth the effort.
Does anybody know if the part of html-code containing one line of matlab-code could possibly span over more than a single line (wrapping,...?)? If not, finding the html-code to delete should be quite easy by directly searching the html lines (but there might be other pitfalls).
Any further thoughts about this are appreciated.
(Btw, just now I found a similar thread
http://www.mathworks.com/matlabcentral/newsreader/view_thread/174366#449320 )
Regards
Andres
|