summaryrefslogtreecommitdiff
path: root/asciidoc/resources/filters/latex/latex-filter.conf
blob: e9b749f9ca263363f0daa0b9f94f56b992a82428 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#
# AsciiDoc latex filter configuration file.
#
# Documented in latex-filter.txt in AsciiDoc distribution
# ./examples/website/ directory.
#

[latex-filter-style]
# When the filter output image is data-uri encoded write it to the indir
# (instead of the outdir) so that encoder can find it.
ifndef::data-uri[]
latex-style=template="latex-block",subs=(),posattrs=("style","target","dpi"),filter='latex2img.py -m{verbose? -v}{dpi? -D {dpi}}{imgfmt? -f {imgfmt}} -o "{outdir={indir}}/{imagesdir=}{imagesdir?/}{target}" -'
endif::data-uri[]
ifdef::data-uri[]
latex-style=template="latex-block",subs=(),posattrs=("style","target","dpi"),filter='latex2img.py -m{verbose? -v}{dpi? -D {dpi}}{imgfmt? -f {imgfmt}} -o "{indir={outdir}}/{imagesdir=}{imagesdir?/}{target}" -'
endif::data-uri[]

[blockdef-open]
template::[latex-filter-style]

[blockdef-listing]
template::[latex-filter-style]

[paradef-default]
template::[latex-filter-style]

[latex-block]
template::[latex-filter-image-blockmacro]

[latex-filter-image-blockmacro]
# Synthesize missing target attribute for filter generated file names.
# The tag split | ensures missing target file names are auto-generated
# before the filter is executed, the remainder (the [image-blockmacro])
# is excuted after the filter to ensure data URI encoding comes after
# the image is created.
# This template replaces the filter-image-blockmacro template so that
# we can generate SVG images from LaTeX code.
{target%}{counter2:target-number}
{imgfmt%}{set2:imgfmt:{latex-imgfmt=png}}
{target%}{set2:target:{docname}__{target-number}.{imgfmt}}
|
template::[image-blockmacro]