-
I have successfully installed sile - and can use it to typeset this little document for example:
Now I would prefer to use fennel instead of lua - cf.
assuming fennel is properly installed - but this is my question, really:
and then make it
this creates a ~/tmp/fennel/fennel.lua for me. Or could I use luarocks for fennel? - If I do
I get a fennel executable, not a fennel.lua file, however. I am fairly experienced in computing in general, but with regards to lua / luarocks only a beginner, Any help in this regard welcome. - Thanks - A' |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments 2 replies
-
To answer my own question: I got it working (at least with a separat main.fnl file, cf. below) - like so: (I am installing everything as a normal user rx (/home/rx), except sile's luarocks deps - those as root) clone & make fennel
(there should be a fennel.lua file then in ~/tmp/fennel) then configure/make/install sile - with fennel in mind: configure 1st time - just so that sile-dev-1.rockspec is created:
install lua deps (this step as root):
now do the real configure - and as for fennel: use LDFLAGS
make & inscall
then have a sample file foobar.sil
and next to it a file main.fnl: (each [i value (ipairs ["b" "b" "c"])]
;; (print index value)
(SILE.typesetter:typeset (.. i " x " i " = " (* i i)))
(SILE.typesetter:leaveHmode)
(SILE.call "smallskip")
) This ( I yet have to find out how to just use fennel - without a separate main.fnl - somehow like this ??:
Maybe fennel could become a first class sile citizen ? What always works, of course: use fennel as a converter:
to create a file.lua - and this could be sile-lua file but I was interested here really, how to integrate fennel in a (normal) .sil file. Thanks, A' |
Beta Was this translation helpful? Give feedback.
-
I'm not at home and have spotty access and time for a few weeks, but off the top of my head it should be possible to simplify this quite a bit. I would probably write a LuaRocks package as a 3rd party module for SILE that copies most of the current lua inputter code but adds the Fennel preprocessor step. Then post it to LuaRocks with a dependency on fennel. That done a simple "luarocks install fennel.sile" should get things going, and in a document you could then |
Beta Was this translation helpful? Give feedback.
-
Great! - And thanks for getting back to me about this. - I will have a look (and a stab) at writing |
Beta Was this translation helpful? Give feedback.
-
I agree with @alerque that this is best addressed as a 3rd-party package. The On the technical aspect, however, I don't think an inputter is even needed, neither the need for reserving a As for being busy, aren't we all? But bear with me, the above suggestion is then at most 15-20mn of coding for an experienced senior developer :) |
Beta Was this translation helpful? Give feedback.
-
Many thanks for this fennel/sile solution of yours - looks great to me! |
Beta Was this translation helpful? Give feedback.
Here you go for a working Proof of Concepts, with bells and whistles (complete folder tree with package, example and even README)
fennel.sile.zip
Uncompress it somewhere, move to that folder, and enjoy.
N.B. requires SILE 0.14.10 -- see in-code comment if you need to try with an earlier 0.14.x...
(EDIT: Just checked that comment is all what is needed for at least 0.14.9)