Generate reports from Octave script files in several output formats.
The generated reports consider Publishing Markup in comments, which is explained in detail in the GNU Octave manual. Assume the following example, using some Publishing Markup, to be the content of a script file named ‘example.m’:
%% Headline title % % Some *bold*, _italic_, or |monospaced|Text with % a <http://www.octave.org link to *GNU Octave*>. %% # "Real" Octave commands to be evaluated sombrero () ## Octave comment style supported as well # # * Bulleted list item 1 # * Bulleted list item 2 # # # Numbered list item 1 # # Numbered list item 2
To publish this script file, type publish ("example.m")
.
With only filename given, a HTML report is generated in a subdirectory ‘html’ relative to the current working directory. The Octave commands are evaluated in a separate context and any figures created while executing the script file are included in the report. All formatting syntax of filename is treated according to the specified output format and included in the report.
Using publish (filename, output_format)
is
equivalent to the function call using a structure
options.format = output_format; publish (filename, options)
which is described below. The same holds for using option-value-pairs
options.option1 = value1; publish (filename, options)
The structure options can have the following field names. If a field name is not specified, the default value is considered:
‘html’ (default), ‘doc’, ‘latex’, ‘ppt’, ‘xml’, or ‘pdf’.
The output formats ‘doc’, ‘ppt’, and ‘xml’ are currently not supported. To generate a ‘doc’ report, open a generated ‘html’ report with your office suite.
‘[]’ (default), integer value ≥ 0
‘true’ (default) or ‘false’
‘true’ (default) or ‘false’
‘true’ (default) or ‘false’
‘Inf’ (default) or integer value > 0
‘true’ (default) or ‘false’
The returned output_file is a string with the path and file name of the generated report.
See also: grabcode.
Package: octave