aya-dev icon indicating copy to clipboard operation
aya-dev copied to clipboard

Where are we, from literature mode?

Open ice1000 opened this issue 4 years ago • 19 comments
trafficstars

Let me start: a syntax design for a suitable markup language. Obviously we need our own markup language :thinking: and we need to compile it in our Doc backends.

ice1000 avatar Jun 03 '21 17:06 ice1000

What about just use LaTeX?

re-xyr avatar Jun 04 '21 05:06 re-xyr

We will have our own commands, can't reuse any existing ones

ice1000 avatar Jun 04 '21 09:06 ice1000

Like what commands?

re-xyr avatar Jun 04 '21 11:06 re-xyr

Like what commands?

aya-prover/aya-prover-proto#486

ice1000 avatar Jun 04 '21 16:06 ice1000

We can make it look like some LaTeX macro

re-xyr avatar Jun 04 '21 16:06 re-xyr

@re-xyr But it's no good, incompatible with other backends of Doc

ice1000 avatar Jun 04 '21 17:06 ice1000

I don't quite understand. Are we doing a literate -> Doc -> output translation?

re-xyr avatar Jun 05 '21 01:06 re-xyr

I don't quite understand. Are we doing a literate -> Doc -> output translation?

Yup

ice1000 avatar Jun 05 '21 06:06 ice1000

But if we use LaTeX syntax, what's incompatible with LaTeX-like -> Doc -> other format?

re-xyr avatar Jun 06 '21 00:06 re-xyr

Agda supports lagda.tex and lagda.md and lagda.rst etc. I think we just have to translate the parts in the code blocks to properly rendered code?

re-xyr avatar Jun 06 '21 00:06 re-xyr

But if we use LaTeX syntax, what's incompatible with LaTeX-like -> Doc -> other format?

Then we need to parse latex!

ice1000 avatar Jun 06 '21 09:06 ice1000

I mean, how does Agda support .lagda.tex?

re-xyr avatar Jun 06 '21 10:06 re-xyr

@re-xyr I think their approach is bad. We need to make our own backend generating latex.

ice1000 avatar Jun 06 '21 10:06 ice1000

@re-xyr Agda asks you to write latex

ice1000 avatar Jun 06 '21 10:06 ice1000

I mean, we'll want to insert our code into different kinds of documents (html, latex, etc). How do we do that? Or we don't?

re-xyr avatar Jun 06 '21 10:06 re-xyr

@re-xyr Imagine we use markdown, where aya code interpolated into some markup text. Then we codegen to latex by compiling aya to latex code blocks and markup text to latex typeset code, codegen to html by compiling aya to html and markup text to html. Users can put some latex in the markup text, they'll be preserved to the generated text, which will be recognized by latex compilers (and ofc won't work if generating html)

ice1000 avatar Jun 06 '21 10:06 ice1000

So basically we allow foreign (html, latex) syntax in our own markup syntax.

re-xyr avatar Jun 06 '21 10:06 re-xyr

@re-xyr It'll be treated as plain text

ice1000 avatar Jun 06 '21 10:06 ice1000

Agda supports lagda.tex and lagda.md and lagda.rst etc. I think we just have to translate the parts in the code blocks to properly rendered code?

This is actually a nice idea, but I wanna add some 私货 to the markup language itself

ice1000 avatar Jul 25 '21 03:07 ice1000

Fixed!

ice1000 avatar Dec 08 '22 05:12 ice1000