Starting out
Nytril is a programming language with C#-style syntax. How much
programming does a writer need to know? What does the first week
look like for someone who has only written Markdown?
Just like Markdown, all content and formatting in Nytril are described in plain UTF8 text. The
most obvious difference from Markdown is that literal text strings are in quotes. Variables,
functions and operators are undecorated, and spaces and line breaks are insignificant.
Markup languages, such as Markdown, LaTeX, Typst and HTML, default to text and then
require an 'escape sequence' for formatting, logic and everything else.
It is fair to say that a plain Markdown document seems simple compared with Nytril code
containing the same text. However, once writers start inserting fields and formatting, adding
external data, queries, images, and graphics, the Markdown approach loses all of its simplicity
and charm. It is in the realm of complex data-driven documents that Nytril ends up with the
simplest source expression.
Remarkably, there are no 'Write' or 'Print' statements in Nytril. If you want to put a string or
the value of a variable into your document, just type the name, and its value flows into the
body. If you want to add π to an angle, or convert temperature to Celsius, you don't need to
escape to call python or JavaScript. You simply put the formula right in line with your text, and
the computed value appears in your document.
Importantly, if you hold down the Ctrl-Key in the IDE and click anywhere in the document,
Nytril will take you to the place in the source code that caused that content to be there. This
feature allows a writer to 'click around' in an existing document to figure out where things are
and how they work.
Reusing common content in Nytril is easy, define it in one place, and use the variable name in
as many places as necessary. This not only works for text, but for numbers, functions,
formulas, charts, paragraphs and even entire documents.
Content Creators can start using Nytril with no programming experience. The coding power is
always there, but it is not always required. Starting out in a realistic project, writers would
likely bootstrap with an example template, and modify it. Nytril has hundreds of example
scripts and open-source templates to choose from, with more being created all the time.