Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format captions with PlantUML #81

Open
fuhrmanator opened this issue Jan 21, 2020 · 2 comments
Open

Format captions with PlantUML #81

fuhrmanator opened this issue Jan 21, 2020 · 2 comments

Comments

@fuhrmanator
Copy link

Using the examples/plantuml.py I would like to use markdown formatting in the caption, e.g.,

```{.plantuml caption="This is *not* the UML your grandmother told you about." #label }

But the *not* is not processed as markdown (to get italics). Is there a way to do this with the filter API?

@fuhrmanator
Copy link
Author

I worked around this (it's actually not just a problem with PlantUML) by modifying the filters to generate a file, which is then used in the markdown right after with ![here's my markdown caption](file_generated_by_filter.ext){#label}

I also posted a question on stackoverflow.

@fuhrmanator
Copy link
Author

I created a solution to this by

  1. running pandoc (again) on the caption text to convert it from markdown to the current format.
  2. returning the caption as a RawInline element.

However, I'm not happy with the first step, as it seems broken to invoke pandoc externally when we're already in a filter.

@jgm would you know of a way to perform the markdown-to-X conversion without using another pandoc external command? Does the pandocfilters API need to be extended to do this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant