publish
- : publish
(file)¶ - : publish
(file, format)¶ - : publish
(file, options)¶ - : publish
(file, name, value, …)¶ - :
outfile =publish(…)¶ Turn a script into a document that shows its code, its text and the output it produces.
The script is split into cells at lines that begin with
%%. The comment text that follows such a line is the text of the cell; a first line%% Titlegives the title. In the text, lines that begin with ‘* ’ are bullets,*bold*,_italic_and|mono|are emphasised,<http://address>is a link and<<image.png>>includes an image.format is
"html"(the default) or"latex". The options are given as a structure or as name and value pairs:formatthe output format.
outputDirthe folder for the output, by default html next to the script.
evalCoderun the code and show its output (default true).
showCodeshow the code (default true).
catchErrorcontinue after an error and show its message (default true).
codeToEvaluatecode to run instead of the script.
imageFormat, figureSnapMethod, useNewFigure, maxHeight, maxWidth, createThumbnail, stylesheetaccepted; figures are saved as PNG when they can be captured.
All files are written inside the output folder. When
showCodeis true, the source of the script is kept in the document, between the lines##### SOURCE BEGIN #####and##### SOURCE END #####, wheregrabcodefinds it. WhenshowCodeis false that copy is omitted together with the code lines. The result outfile is the full name of the document.