GithubHelp home page GithubHelp logo

Comments (6)

gpoore avatar gpoore commented on June 4, 2024

It looks like pandoc-fignos needs images with (1) alt text and (2) an id starting with "fig:". I'm planning to add support for setting image attributes for rich output like plots that is included automatically. As soon as that is added, pandoc-fignos should function normally by running codebraid with --filter.

One of the main things I have to determine is the syntax to use for setting image attributes. I will probably add code block options like fig.caption, fig.id, fig.width, etc., possibly also with something like fig.pandoc_attr to allow things like {#id .class key=value} to be entered directly. I'm still thinking about how to handle the case of multiple images created by a single code block, since Pandoc's attribute syntax doesn't directly support data structures like lists or dicts. I'm thinking about something like fig.caption1, fig.caption2, and so forth for that case. Do you have any thoughts about that?

The syntax for figures will also need to support subfigures. At the moment, pandoc-fignos doesn't support subfigures (tomduck/pandoc-fignos#50), but I'm sure that it or another filter will support them in the future. In that case, I'm thinking about something like fig.caption along with fig.subcaption1, fig.subcaption2, etc.

from codebraid.

amichuda avatar amichuda commented on June 4, 2024

Thanks so much for the reply. I think you're on the right track with that. It actually reminds me a little of the pweave approach to setting figure captions. Is that what you're going for?

I'm planning to add support for setting image attributes for rich output like plots that is included automatically. As soon as that is added, pandoc-fignos should function normally by running codebraid with --filter.

What would that look like? Would fig.caption become the alt-text in pandoc-fignos? Or would your approach make pandoc-fignos redundant?

I'm thinking about something like fig.caption1, fig.caption2, and so forth for that case. Do you have any thoughts about that?

I'm not an expert in pandoc attribute syntax, and googling it has proven to be a kind of difficult. Is there a reference for documentation on how that's set up? I'm sure you know better than me, but what if all caption titles were put in some long comma-separated string that you would parse through? I don't think that's a very elegant solution, but that's the only one coming to mind to me.

from codebraid.

amichuda avatar amichuda commented on June 4, 2024

Hi! I wanted to see if you've had any new ideas or thoughts on this issue.

Again, thank you for the package, it's really helping me out with my thesis and writing up slides for a class I'm teaching!

from codebraid.

gpoore avatar gpoore commented on June 4, 2024

I haven't had any new thoughts. I think I'm going to try fig.caption when there is one figure, fig.caption1 and fig.caption2 and so on for multiple figures, and then fig.caption plus fig.subcaption1 etc. for creating one figure with subfigures. These would become alt-text for images, so this would make things compatible with pandoc-fignos. It might be worth adding built-in features like pandoc-fignos eventually, but I want to keep things as simple as possible for now. The main issue right now is a shortage of time for actually programming this.

In terms of a reference for Pandoc attribute syntax, https://pandoc.org/MANUAL.html and then searching for "attribute" is a good place to start. I've also looked at the Pandoc implementation several times to figure out exactly how attributes are defined.

from codebraid.

amichuda avatar amichuda commented on June 4, 2024

I know this is a stale issue, but any plans to add this feature to codebraid in the near future?

from codebraid.

gpoore avatar gpoore commented on June 4, 2024

Unfortunately I can't give any specific estimates on new features. I am currently trying to release new versions of all my major open-source projects to catch up for the last year or so. As soon as that is done, I'm hoping to be able to focus on resolving all existing Codebraid issues.

from codebraid.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.