Overview: Motivation

Nyarna is a markup language and mostly designed towards use-cases similar to those of Latex. It has been shown that efficiency of LaTeX users lacks behind that of Microsoft Word users. Nyarna attempts to alleviate some of LaTeX' problems, like the steep learning curve and cryptic errors, to allow for more efficient document authoring while still providing access to a features set similar to that of LaTeX.

There are quite some existing tools that also provide markup for authoring documents. The popular ones are unable to provide the feature set of LaTeX for several reason, the most important one usually being the inability to extend the additional functionality within the provided syntax. For example, DocBook provides an XML schema to write documents in – you can use everything defined by this schema, but if something is not covered by that schema, you're out of luck. Another feature that is usually missing is the ability to implement and use macros – and if it exists, you typically must implement it via the API of the processor, outside the markup language (as is the case in both Asciidoctor and reStructuredText).

Another set of markup languages is available for more rigid data structures: JSON, TOML and YAML would be the most popular ones. These usually define a tree or graph that contains scalar values, lists, and dictionaries. The shortcomings are mostly the same here, with Dhall being an exception in that it actually provides functions and types.

In sum, few markup languages exist that provide the full flexibility and extendability of LaTeX. Nyarna has been designed to be such a language, while also looking at other existing languages and taking inspiration from them.

What sets Nyarna's design apart from LaTeX is that it understands structure. Commands are not simple macro invocations that procedurally generate the output during processing. Instead, they work much more like a typical programming language: Commands call functions, construct compound objects or retrieve variable values. It has a static type system that can describe typical LaTeX input structures. This gives you structural validation that you would need external tools for in languages like XML or JSON. And to reach the level of extensibility LaTeX provides, Nyarna offers functionality to extend existing schemas right in the language.