nota-lang / nota

A document language for the browser
https://nota-lang.org
MIT License
701 stars 13 forks source link

What is the point of this compared to HTML ? #15

Open X-Ryl669 opened 2 years ago

X-Ryl669 commented 2 years ago

What is the point of Nota compared to plain, standard, HTML ? Even more when it's completely replicating the HTML anchors and structure ?

I don't know if the goal is to be a bit higher level than markdown (than can be edited and read perfectly out of the browser) and like, but I find it too close to HTML, so that it's not possible to read it out of the browser (and even worse: without JS).

The good point I see is being able to specify variable, a bit like HTML's <cite> tag and perform simple computations (which aren't computed without JS).

ekzhang commented 2 years ago

Not the author, but I think new document typesetting languages offer a lot of flexibility to existing systems, while also giving you composability. For example you can define components in Nota, which you can't do in just plain HTML. The %(let item is helpful for defining repeated segments of text, and the syntax is generally much more amenable to prose typesetting.

If you don't have JavaScript, then you need a replacement language to specify interactive behaviors, right? And I'm not sure if there's any platform as ubiquitous or widely supported or performant as the web for that.

willcrichton commented 2 years ago

@ekzhang is correct, but just to add: Nota generates plain HTML. It uses HTML anchors and structure in the standard way. Nota does not replace HTML, but rather augment HTML. But HTML has a very limited set of components. Only with Javascript can you do things like toggle between natural language and math.

remram44 commented 2 years ago

Can it generate something other than HTML though? For example LaTeX? Or directly PDFs?

Otherwise the value-add compared to HTML or HTML-JSX seems low...

willcrichton commented 2 years ago

To be clear, "Nota" consists of three things:

  1. A syntax for writing React Javascript programs, i.e. a JSX alternative.
  2. A set of React components for structuring a document.
  3. A code editor that specifically supports Nota syntax and components.

Each of these provides a different kind of value. The syntax makes it easier to specify structured, interactive documents without the syntactic noise of HTML or JSX. The components enable authors to describe certain structures in their document (e.g. a definition and a reference to that definition), which in turn enable readers to get a better document-reading interface (e.g. clicking on a reference and seeing a tooltip containing the definition). And the editor makes it easier for authors to create these documents.