[NTG-context] ConTeXt Garden Examples Maintenance

Thangalin thangalin at gmail.com
Sat May 17 07:43:10 CEST 2014


The ConText Garden wiki has numerous short example sprinkled
throughout its pages. I presume that they are hard-coded in the page.
if the example breaks (due to a ConTeXt bug or backwards-incompatible
enhancement), I imagine there is no notification.

What do you think about creating a repository of examples that are
included by embedding a website address instead of direct text? For

1. User visits wiki.
2. User edits a page (e.g., Command/setuphead).
3. User names and uploads a .tex document.
4. System generates unique hyperlink for .tex document.
5. System generates and includes embed code into wiki page, such as:

<context href="http://wiki.contextgarden.net/context/examples/file.tex" />
<context href="/context/examples/file.tex" />

Also, source="yes" and mode="mkiv" should be the default. Then, if the
person editing the page wants to include the output, the full example
might resemble:

  <context href="/context/examples/file.tex">
  This produces:
  <context output="yes" href="/context/examples/file.tex">

Having the complete examples separated allows the snippets to be
tested automatically. Broken .tex examples (unless explicitly flagged)
would result in notifications being sent to the page maintainer(s). A
broken example could be flagged as:

  <context notify="no" href="/context/examples/file.tex">

Another advantage is that all the examples could be downloaded and
possibly referenced in other media.

Kindest regards.

More information about the ntg-context mailing list