123 strip_code=
false, std::string title=
"");
125 const std::string& preamble_string,
126 bool for_embedding=
false,
bool strip_code=
false, std::string title=
"");
138 const std::string& preamble_string,
const std::string& image_file_base,
output: cell showing LaTeX text for errors
id_t id() const
Definition: DataCell.cc:476
DataCells are the basic building blocks for a document.
Definition: DataCell.hh:27
DataCell(CellType t=CellType::python, const std::string &str="", bool hidden=false)
Standard constructor, generates a new unique id for this DataCell.
Definition: DataCell.cc:32
id_t()
Definition: DataCell.cc:25
output: cell showing python stdout, verbatim
CellType cell_type
Definition: DataCell.hh:74
id_t serial_number
Definition: DataCell.hh:102
bool operator<(const id_t &other) const
Definition: DataCell.cc:18
void LaTeX_recurse(const DTree &doc, DTree::iterator it, std::ostringstream &str, const std::string &preamble_string, const std::string &image_file_base, int &image_num)
Definition: DataCell.cc:501
input : editor cell for code in latex
bool running
Indicator whether this cell is currently being evaluated by the server.
Definition: DataCell.hh:95
uint64_t id
Definition: DataCell.hh:55
Each cell is identified by a serial number 'id' which is used to keep track of it across network call...
Definition: DataCell.hh:51
output: cell showing a base64 encoded PNG image
std::string JSON_serialise(const DTree &)
Serialise a document into .cj format, which is a JSON version of the document tree.
Definition: DataCell.cc:273
std::string export_as_HTML(const DTree &doc, bool for_embedding=false, bool strip_code=false, std::string title="")
Export a document to a single self-contained HTML file containing inline CSS.
Definition: DataCell.cc:59
bool sensitive
Definition: DataCell.hh:89
void JSON_in_recurse(DTree &doc, DTree::iterator loc, const Json::Value &cells)
Definition: DataCell.cc:370
input : editor cell for code in python
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Algorithm.cc:1030
output: cell containing input form of preceding output cell
bool created_by_client
Definition: DataCell.hh:56
output: cell showing LaTeX text formatted using LaTeX
std::string latex_to_html(const std::string &)
Convert various LaTeX constructions to HTML-with-Mathjax, e.g.
Definition: DataCell.cc:77
output: cell showing other verbatim output
static std::mutex serial_mutex
Definition: DataCell.hh:101
void JSON_recurse(const DTree &, DTree::iterator, Json::Value &)
Definition: DataCell.cc:284
static uint64_t max_serial_number
Definition: DataCell.hh:103
tree< DataCell > DTree
Definition: DataCell.hh:107
CellType
Cells are labelled with the data type of its contents, which is stored in a textural representation b...
Definition: DataCell.hh:34
std::string export_as_LaTeX(const DTree &doc, const std::string &image_file_base)
Export a document to a single self-contained LaTeX file, with the exception of images which get saved...
Definition: DataCell.cc:481
bool hidden
Flag indicating whether this cell should be hidden from view.
Definition: DataCell.hh:88
void HTML_recurse(const DTree &doc, DTree::iterator it, std::ostringstream &str, const std::string &preamble_string, bool for_embedding=false, bool strip_code=false, std::string title="")
Definition: DataCell.cc:157
std::string export_as_python(const DTree &doc)
Export a document to a python-like file (converting text cells to comments and python cells to python...
Definition: DataCell.cc:609
void python_recurse(const DTree &doc, DTree::iterator it, std::ostringstream &str)
Definition: DataCell.cc:617
head node, only one per document
std::string textbuf
Textual representation of the cell content.
Definition: DataCell.hh:81
void JSON_deserialise(const std::string &, DTree &)
Load a document from .cj format, i.e. the inverse of the above.
Definition: DataCell.cc:350