skribilo-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [skribilo-users] Compiling a skribilo document within Guile


From: Roger Mason
Subject: Re: [skribilo-users] Compiling a skribilo document within Guile
Date: Tue, 17 Jan 2017 10:35:48 -0330
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix)

Hi Ludo',

address@hidden (Ludovic Courtès) writes:

> I think the problem is that ‘d’ here is a string, namely:
>
>   "(document #:title …)"
>
> whereas ‘evaluate-document’ expects an <ast> object.
>
> Instead, you should be doing something like:
>
>   (let* ((code (call-with-input-file infile read))
>          (ast  (primitive-eval code)))
>     (with-output-to-file …
>       (lambda ()
>         (evaluate-document ast e))))
>
> See ‘evaluate-ast-from-port’ in (skribilo evaluator) for an example.

Yes, that was it!  I now have a means to begin a document in the outline
syntax and convert it to the Guile syntax in order to insert objects
that 'outline' can't handle.  I'm hoping to use this method to build
documents that obtain data (via Guile) from external sources to
construct tables and data plots.

Many thanks,
Roger

P.S. I have patched Skribilo to provide a working ConTeXt output file
with a basic 'setup.tex'.  I want to do some code cleanup and more
extensive testing before submitting a patch.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]