[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [skribilo-users] Compiling a skribilo document within Guile
From: |
Ludovic Courtès |
Subject: |
Re: [skribilo-users] Compiling a skribilo document within Guile |
Date: |
Tue, 17 Jan 2017 21:05:32 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello!
Roger Mason <address@hidden> skribis:
> 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.
Cool, it should be a good fit for this!
> 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.
Nice! I’ve never even used ConTeXt so your work will be more than
welcome!
Ludo’.