Skip to content

Python filter and code block woes #10476

Answered by madsmh
madsmh asked this question in Q&A
Dec 19, 2024 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

HI again,

import pandocfilters

def tikzjax(key, value, format, _):
    if key == 'CodeBlock':
        [fmt, code] = value
        if fmt[1} == ['tikz']:
            ## .....

if __name__ == "__main__":
    pandocfilters.toJSONFilter(tikzjax)

worked.

Best, Mads

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
2 replies
@madsmh
Comment options

@jgm
Comment options

jgm Dec 20, 2024
Maintainer

Comment options

You must be logged in to vote
0 replies
Answer selected by madsmh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants