[...]
> This is tricky, the [latex-filter-style] section of latex-filter.conf is
> substituted when the included latex filter block is processed.
>
> The outdir does not change when switching to the included file, only the
> indir changes (which makes sense).
>
> The real problem is that the indir takes priority for data-uri generation:
>
> {eval:os.path.join(r"{indir={outdir}}",r"{imagesdir=}",r"{target}")}
>
> Whereas the outdir takes priority during filter execution:
>
> -o {outdir={indir}}/{imagesdir=}{imagesdir?/}{target}
>
> Both are reasonable defaults until we encounter a filtered output being
> data-uri encoded.
>
> In the example, once inside the include file we have:
>
> {indir}=/home/srackham/tmp/latex-block-bug/extra
> {outdir}=/home/srackham/tmp/latex-block-bug
>
> Which means the latex image is output to the outdir
> (/home/srackham/tmp/latex-block-bug) and the data-uri encoder looks in the
> indir (/home/srackham/tmp/latex-block-bug/extra).
>
> I think the answer would be to have the filter output to the indir if
> data-uri encoding is enabled. I've attached a patch which seems to work
> (it's not very DRY but I can't think of a simpler way).
>
>
> Cheers, Stuart
>

Hi Stuart,

Seems a reasonable solution that should be backward compatible in
cases that work now.

If the OP tests it and its ok it probably should be applied to music
and graphviz as well.

Cheers
Lex

>
>
>
>>
>> @Anibal,
>>
>> As you can see above, it may not be that simple to fix.
>>
>> One interim "solution" if you can't put everything in one directory,
>> is to pre-process the latex to png and include the processed result
>> with image:: macros.  The filter command latex2png can be run by
>> itself, see the filter documentation and latex2png --help for more
>> info.  If the latex was always in its own files (say with a .asclatex
>> extension) a script could easily process all those files and generate
>> the png.  At a later time the image:: macros could be replaced with
>> include:: to include the original.
>>
>> Cheers
>> Lex
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "asciidoc" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/asciidoc?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to