4747; ; cd clerk-demo
4848; ; ```
4949
50- ; ; Then open `dev/user.clj` from the project in your favorite editor start a REPL into the project, see
50+ ; ; Then open `dev/user.clj` from the project in your favorite editor and start a REPL into the project. For editor-specific instructions see:
5151; ; * [Emacs & Cider](https://docs.cider.mx/cider/basics/up_and_running.html#launch-an-nrepl-server-from-emacs)
5252; ; * [Calva](https://calva.io/jack-in-guide/)
5353; ; * [Cursive](https://cursive-ide.com/userguide/repl.html)
6969; ; ;; start Clerk's built-in webserver on the default port 7777, opening the browser when done
7070; ; (clerk/serve! {:browse? true})
7171
72- ; ; ;; either call `clerk/show!` explicitly to show a given notebook.
72+ ; ; ;; either call `clerk/show!` explicitly to show a given notebook, or use the File Watcher described below .
7373; ; (clerk/show! "notebooks/rule_30.clj")
7474; ; ```
7575
7676; ; You can then access Clerk at <http://localhost:7777>.
7777
7878; ; ### ⏱ File Watcher
7979
80- ; ; You can load, evaluate, and present a file with the clerk/show! function, but in most cases it's easier to start a file watcher with something like:
80+ ; ; You can load, evaluate, and present a file with the ` clerk/show!` function, but in most cases it's easier to start a file watcher with something like:
8181
8282; ; ```clojure
8383; ; (clerk/serve! {:watch-paths ["notebooks" "src"]})
183183
184184; ; Clerk provides a built-in data table viewer that supports the three
185185; ; most common tabular data shapes out of the box: a sequence of maps,
186- ; ; where each map's keys are column names; a seq of seq , which is just
187- ; ; a grid of values with an optional header; a map of seqs, in with
186+ ; ; where each map's keys are column names; a seq of seqs , which is just
187+ ; ; a grid of values with an optional header; a map of seqs, in which
188188; ; keys are column names and rows are the values for that column.
189189
190190(clerk/table [[1 2 ]
246246; ; You can provide a map of [embed options](https://github.com/vega/vega-embed#embed) to the vega viewer via the `:embed/opts` key.
247247; ;
248248; ; Clerk handles conversion from EDN to JSON for you.
249- ; ; The official Vega-Lite examples are in JSON, but a Clojure/EDN version available:
249+ ; ; The official Vega-Lite examples are in JSON, but a Clojure/EDN version is available:
250250; ; [Carsten Behring's Vega gallery in EDN](https://github.clerk.garden/behrica/vl-galery/).
251251
252252; ; ### 🎼 Code
303303
304304; ; ### 🔠 Grid Layouts
305305
306- ; ; Layouts can be composed via `row`s and `col`s
306+ ; ; Layouts can be composed via `row`s and `col`s.
307307; ;
308308; ; Passing `:width`, `:height` or any other style attributes to
309309; ; `::clerk/opts` will assign them on the row or col that contains
404404
405405; ; **Metadata Notation**
406406
407- ; ; In the examples above, we've used convience helper functions like
407+ ; ; In the examples above, we've used convenience helper functions like
408408; ; `clerk/html` or `clerk/plotly` to wrap values in a viewer. If you
409409; ; call this on the REPL, you'll notice a given value gets wrapped in
410410; ; a map under the `:nextjournal/value` key with the viewer being in
@@ -443,7 +443,7 @@ v/default-viewers
443443
444444(assoc (frequencies (mapcat keys v/default-viewers)) :total (count v/default-viewers))
445445
446- ; ; We have a total of 41 viewers in the defaults. Let's start with a
446+ ; ; We have a total of 43 viewers in the defaults. Let's start with a
447447; ; simple example and explain the different extensions points in the
448448; ; viewer api.
449449
@@ -471,7 +471,7 @@ v/default-viewers
471471^{::clerk/viewer show-raw-value}
472472(v/present 1 )
473473
474- ; ; This data structure is is sent over Clerk's websocket to the
474+ ; ; This data structure is sent over Clerk's websocket to the
475475; ; browser, where it will be displayed using the `:render-fn` found in
476476; ; the `:nextjournal/viewer` key.
477477
@@ -503,7 +503,7 @@ v/default-viewers
503503
504504; ; #### ⚙️ Transform
505505
506- ; ; When writing your own viewer, the first extention point you should reach for is `:tranform-fn`.
506+ ; ; When writing your own viewer, the first extension point you should reach for is `:tranform-fn`.
507507
508508#_ " exercise: wrap this in `v/present` and call it at the REPL"
509509(v/with-viewer {:transform-fn #(clerk/html [:pre (pr-str %)])}
@@ -588,8 +588,8 @@ v/table-viewer
588588; ; representations and let the user switch between them in the
589589; ; browser.
590590
591- ; ; We start with a simple function that takes a such an expression and
592- ; ; turns it into a map with two representation , one TeX and the
591+ ; ; We start with a simple function that takes such an expression and
592+ ; ; turns it into a map with two representations , one TeX and the
593593; ; original form.
594594
595595(defn transform-literal [expr]
@@ -600,7 +600,7 @@ v/table-viewer
600600; ; also calls `clerk/mark-preserve-keys`. This tells Clerk to leave
601601; ; the keys of the map as-is.
602602
603- ; ; In our `:render-fn`, which is called in the browser we will recieve
603+ ; ; In our `:render-fn`, which is called in the browser, we will receive
604604; ; this map. Note that this is a quoted form, not a function. Clerk
605605; ; will send this form to the browser for evaluation. There it will
606606; ; create a `reagent/atom` that holds the selection state. Lastly,
@@ -703,10 +703,10 @@ v/table-viewer
703703
704704; ; #### 👷 Loading Libraries
705705
706- ; ; This is a custom viewer for
706+ ; ; Here is a custom viewer for
707707; ; [Mermaid](https://mermaid-js.github.io/mermaid), a markdown-like
708708; ; syntax for creating diagrams from text. Note that this library
709- ; ; isn't bundles with Clerk but we use a component based on
709+ ; ; isn't bundled with Clerk but we use a component based on
710710; ; [d3-require](https://github.com/d3/d3-require) to load it at
711711; ; runtime.
712712
@@ -742,7 +742,7 @@ v/table-viewer
742742
743743; ; ### 🙈 Visibility
744744
745- ; ; By default, Clerk will always show code and
745+ ; ; By default, Clerk will show all code and
746746; ; results for a notebook.
747747
748748; ; You can use a map of the following shape to set the visibility of
860860; ; function. You can pass it a set of notebooks via the `:paths`
861861; ; option (also supporting glob patterns).
862862
863- ; ; When Clerk is building multuple notebooks, it will automatically
863+ ; ; When Clerk is building multiple notebooks, it will automatically
864864; ; generate an index page that will be the first to show up when
865865; ; opening the build. You can override this index page via the
866866; ; `:index` option.
0 commit comments