How to use the panflute.MetaList function in panflute

To help you get started, we’ve selected a few panflute examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github chdemko / pandoc-latex-tip / tests / test_tip.py View on Github external
def metadata(cls):
        return {
            "pandoc-latex-tip": MetaList(
                MetaMap(
                    classes=MetaList(MetaString("tip"), MetaString("listing")),
                    icons=MetaList(
                        MetaMap(
                            name=MetaString("file-text"),
                            color=MetaString("darksalmon"),
                            link=MetaString("http://www.google.fr"),
                        ),
                        MetaString("comments"),
                    ),
                    size=MetaString("36"),
                    position=MetaString("right"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("warning")),
                    icons=MetaString("comments"),
                ),
                MetaMap(
github chdemko / pandoc-latex-tip / tests / test_tip.py View on Github external
),
                        MetaString("comments"),
                    ),
                    size=MetaString("36"),
                    position=MetaString("right"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("warning")),
                    icons=MetaString("comments"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("tip")), position=MetaString("left")
                ),
                MetaMap(
                    classes=MetaList(MetaString("v5.0")),
                    icons=MetaList(
                        MetaMap(
                            name=MetaString("balance-scale"),
                            version=MetaString("5.x"),
                            variant=MetaString("solid"),
                            color=MetaString("orange"),
                        )
github chdemko / pandoc-latex-tip / tests / test_tip.py View on Github external
def metadata(cls):
        return {
            "pandoc-latex-tip": MetaList(
                MetaMap(
                    classes=MetaList(MetaString("tip"), MetaString("listing")),
                    icons=MetaList(
                        MetaMap(
                            name=MetaString("file-text"),
                            color=MetaString("darksalmon"),
                            link=MetaString("http://www.google.fr"),
                        ),
                        MetaString("comments"),
                    ),
                    size=MetaString("36"),
                    position=MetaString("right"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("warning")),
                    icons=MetaString("comments"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("tip")), position=MetaString("left")
github chdemko / pandoc-latex-tip / tests / test_tip.py View on Github external
def metadata(cls):
        return {
            "pandoc-latex-tip": MetaList(
                MetaMap(
                    classes=MetaList(MetaString("tip"), MetaString("listing")),
                    icons=MetaList(
                        MetaMap(
                            name=MetaString("file-text"),
                            color=MetaString("darksalmon"),
                            link=MetaString("http://www.google.fr"),
                        ),
                        MetaString("comments"),
                    ),
                    size=MetaString("36"),
                    position=MetaString("right"),
                ),
                MetaMap(
                    classes=MetaList(MetaString("warning")),
                    icons=MetaString("comments"),
github chdemko / pandoc-latex-tip / pandoc_latex_tip.py View on Github external
def _finalize(doc):
    # Add header-includes if necessary
    if "header-includes" not in doc.metadata:
        doc.metadata["header-includes"] = MetaList()
    # Convert header-includes to MetaList if necessary
    elif not isinstance(doc.metadata["header-includes"], MetaList):
        doc.metadata["header-includes"] = MetaList(doc.metadata["header-includes"])

    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{needspace}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{graphicx,grffile}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{marginnote}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{etoolbox}", "tex"))
    )
github chdemko / pandoc-latex-color / pandoc_latex_color.py View on Github external
def finalize(doc):
    # Add header-includes if necessary
    if "header-includes" not in doc.metadata:
        doc.metadata["header-includes"] = MetaList()
    # Convert header-includes to MetaList if necessary
    elif not isinstance(doc.metadata["header-includes"], MetaList):
        doc.metadata["header-includes"] = MetaList(doc.metadata["header-includes"])

    # Add usefull LaTexPackage
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{xcolor}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{soulutf8,color}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\soulregister\\cite7", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\soulregister\\ref7", "tex"))
    )
    doc.metadata["header-includes"].append(
github chdemko / pandoc-latex-color / pandoc_latex_color.py View on Github external
def finalize(doc):
    # Add header-includes if necessary
    if "header-includes" not in doc.metadata:
        doc.metadata["header-includes"] = MetaList()
    # Convert header-includes to MetaList if necessary
    elif not isinstance(doc.metadata["header-includes"], MetaList):
        doc.metadata["header-includes"] = MetaList(doc.metadata["header-includes"])

    # Add usefull LaTexPackage
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{xcolor}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{soulutf8,color}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\soulregister\\cite7", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\soulregister\\ref7", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\soulregister\\pageref7", "tex"))
github chdemko / pandoc-latex-tip / pandoc_latex_tip.py View on Github external
def _finalize(doc):
    # Add header-includes if necessary
    if "header-includes" not in doc.metadata:
        doc.metadata["header-includes"] = MetaList()
    # Convert header-includes to MetaList if necessary
    elif not isinstance(doc.metadata["header-includes"], MetaList):
        doc.metadata["header-includes"] = MetaList(doc.metadata["header-includes"])

    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{needspace}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{graphicx,grffile}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{marginnote}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{etoolbox}", "tex"))
    )
    doc.metadata["header-includes"].append(
        MetaInlines(RawInline("\\usepackage{changepage}\n\\strictpagecheck", "tex"))