latte
latte copied to clipboard
The current default delimiters are terrible
The default delimiters used by the Go templating engine are {{
and }}
, but they clash with LaTeX.
LaTTe is currenlty using #!
and !#
but these are terrible in almost every way.
It'd be great to get some input on better delimiters.
In a custom previous project of mine I used |@
and @|
as delimiters and they worked well and didn't clash at all with LaTeX. I'm having trouble getting any delimiter other than the default to work though, for some reason. Have tried {{
}}
, |@
@|
, !-
-!
and replacement simply fails.
The defaults also clash with LaTeX when editing, constantly get You can't use 'macro parameter character #' in internal vertical mode.
as an error when compiling, Makes updating template files harder as I can't work on them with the template characters inserted.
In a custom previous project of mine I used |@ and @| as delimiters and they worked well and didn't clash at all with LaTeX.
I like it, seems like a good default.
I'm having trouble getting any delimiter other than the default to work though, for some reason. Have tried {{ }}, |@ @|, !- -! and replacement simply fails.
Hmm... I just tried this and it worked just fine for me. Are there any error messages in the logs? Here's the curl command I just ran to test this:
curl -X POST -H "Content-Type: application/json" \
-d '{"template":"XGRvY3VtZW50Y2xhc3N7YXJ0aWNsZX0KXHRpdGxle0xhVFRlIFNhbXBsZSBEb2N1bWVudH0KXGJlZ2lue2RvY3VtZW50fQpcbWFrZXRpdGxlClRoZSBQeXRoYWdvcmVhbiBUaGVvcmVtOiAKJCB8QC5hQHwgXiAyICsgfEAuYkB8IF4gMiA9IHxALmNAfCBeIDIgJApcZW5ke2RvY3VtZW50fQo=", "details": { "a": "3", "b": "4", "c": "5" }, "delimiters": {"left": "|@", "right": "@|"}}' \
--output pythagorean.pdf "http://localhost:27182/generate"
The defaults also clash with LaTeX when editing, constantly get You can't use 'macro parameter character #' in internal vertical mode. as an error when compiling, Makes updating template files harder as I can't work on them with the template characters inserted.
Yeah, the current defaults are terrible.
Oh turns out I just didn't spell delimiter correctly, sorry about that. Thank you!
Oh turns out I just didn't spell delimiter correctly, sorry about that. Thank you!
No problem, I kept questioning my spelling of it while coding this lol.
Thanks for checking out LaTTe!