From 52e94f3ca9a983f5a113773c66d0c6bf339f79d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20R=C3=A4ss?= <61313342+luraess@users.noreply.github.com> Date: Fri, 29 Oct 2021 12:09:35 +0200 Subject: [PATCH] Update `noeval` doc. (#915) * Update page var for `noeval`. Add description. * Add `noeval` note. Add note and fix style. * Update new addition Remove multi-negation form. --- docs/code/index.md | 4 +++- docs/syntax/page-variables.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/code/index.md b/docs/code/index.md index d7994ff3a..f5266ff7a 100644 --- a/docs/code/index.md +++ b/docs/code/index.md @@ -20,7 +20,7 @@ As per Common Mark specifications, you have multiple ways of inserting code: This is some `inline code` or ``inline ` code with a tick``. ````` -NOTE: To use backslash (`\ `) at the end of inline code, you must include a trailing space to ensure the trailing tick is parsed correctly, eg `` `some code with \ ` ``. The trailing space will be trimmed in the rendered html. +**Note**: To use backslash (`\ `) at the end of inline code, you must include a trailing space to ensure the trailing tick is parsed correctly, eg `` `some code with \ ` ``. The trailing space will be trimmed in the rendered html. * **code blocks**: it is recommended to use triple backticks (\`\`\`) optionally followed by a language name for highlighting like so: @@ -53,6 +53,8 @@ In Franklin there are two approaches that help you for this: 1. For all languages, you can run the script separately and use Franklin to insert the code file and/or the output generated by the code. @@ +**Note**: Disabling code evaluation (e.g., when presenting incomplete code snippets in tutorials or courses that would error upon evaluation), can be specified with the local page variable `noeval = true` (default `false`). + ## Live evaluation (Julia) Julia code blocks can be evaluated on the fly and their output either displayed as code or re-interpreted as Markdown. diff --git a/docs/syntax/page-variables.md b/docs/syntax/page-variables.md index 01700e0b0..07c3e920f 100644 --- a/docs/syntax/page-variables.md +++ b/docs/syntax/page-variables.md @@ -310,6 +310,7 @@ For more informations on these, see the section on [inserting and evaluating cod @@lalign | Name | Type | Default value | Comment | ---- | ---- | ------------- | ------- +| `noeval` | `Bool` | `false` | if set to `true`, disable code block evaluation on the page | `reeval` | `Bool` | `false` | whether to reevaluate all code blocks on the page | `showall` | `Bool` | `false` | notebook mode if `true` where the output of the code block is shown below | `fd_eval` | `Bool` | `false` | internal variable to keep track of whether the scope is stale (in which case all subsequent blocks are re-evaluated)