Path: news.mathworks.com!not-for-mail
From: "Matthew Simoneau" <matthew@mathworks.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Publish without code output
Date: Mon, 14 Apr 2008 14:51:45 +0000 (UTC)
Organization: The MathWorks Inc
Lines: 39
Message-ID: <ftvr21$m9r$1@fred.mathworks.com>
References: <ftnrjh$aq0$1@fred.mathworks.com>
Reply-To: "Matthew Simoneau" <matthew@mathworks.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1208184705 22843 172.30.248.38 (14 Apr 2008 14:51:45 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 14 Apr 2008 14:51:45 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 25640
Xref: news.mathworks.com comp.soft-sys.matlab:462862



"Fran?ois Bouffard"
<remove.fbouffard.this@and.gmail.this.com> wrote in message
<ftnrjh$aq0$1@fred.mathworks.com>...
> The preferences options for publishing (in the version of
> Matlab I'm using, which admitedly is not the latest) enable
> us to decide if we want to a) evaluate code, b) use new
> figures, and c) display the code in the output. I want to
> produce a report in which the code is evaluated (to generate
> figures), so a) has to be checked. Since the code is quite
> lengthy, I don't want it displayed in the HTML file, so c)
> has to be unchecked.
> 
> However even if the code itself is not displayed in the HTML
> file, the code output is listed. This is a problem since I'm
> using third-party functions that spew out dozens of
> uninteresting messages. Thus I'd like the code output not
> shown in the report. Is there an easy way to do this?
> 
> Since there is no "Display code output" checkbox in the
> preferences or an equivalent option to the publish function,
> I guess I should either use an appropriate XSL stylesheet,
> or parse the HTML and remove the "codeoutput"-class pre
> tags. Has anyone produced such an XSL stylesheet?
> 
> Thanks for any hint,
> 
> Fran?ois

In newer versions of MATLAB, there's an option for this
called maxOutputLines.

On older versions, you're solution of modifying the
stylesheet is a good one.

>> edit private/mxdom2simplehtml.xsl

Find where "mcodeoutput" is in your version and delete it. 
Then re-save this file to a new location.  When you publish,
specify you want to use this custom stylesheet.