Code Monkey home page Code Monkey logo

Comments (7)

jgm avatar jgm commented on July 16, 2024

Currently the caption is just added in a text box after the image. No special style is applied. I imagine Word does something else, perhaps attaching a style, but I'm not really familiar with pptx format so this would take a while to debug.

from pandoc.

yonisidi avatar yonisidi commented on July 16, 2024

Do you mean here?

from pandoc.

jgm avatar jgm commented on July 16, 2024

That's a relevant data structure but that's not where the XML is being written.

The thing to figure out first would be what pandoc should be including in the XML in order to have these styled correctly. (I understand how styles work in docx, but I know nothing about pptx.) If we figure that out, I think changing the code should be relatively straightforward.

from pandoc.

yonisidi avatar yonisidi commented on July 16, 2024

So the original xml looks like this (after converting to zip and unarchiving the output pptx):

<p:txBody>
  <a:bodyPr/>
  <a:lstStyle/>
  <a:p>
    <a:pPr lvl="0" indent="0" marL="0" algn="ctr">
      <a:buNone/>
    </a:pPr>
    <a:r>
      <a:rPr/>
      <a:t>Image Caption</a:t>
    </a:r>
  </a:p>
</p:txBody>

Based on this SO answer it looks like it gives a roadmap on what is expected in openxml:

example solution

<p:txBody>
  <a:bodyPr/>
  <a:lstStyle/>
  <a:p>
    <a:pPr xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" lvl="0" indent="0" marL="0" algn="ctr">
      <a:buFont typeface="Arial" charset="0" pitchFamily="34" panose="020B0604020202020204"/>
    </a:pPr>
    <a:r>
      <a:rPr/>
      <a:t>Image Caption</a:t>
      <a:rPr lang="en-US" dirty="0" sz="900"/>
    </a:r>
  </a:p>
</p:txBody>

from pandoc.

jgm avatar jgm commented on July 16, 2024

This is just specifying a particular typeface and size directly. I thought the idea was to make this sensitive to some kind of global style?

from pandoc.

yonicd avatar yonicd commented on July 16, 2024

Yes, you are correct. That is the intent.

from pandoc.

jgm avatar jgm commented on July 16, 2024

That's the part I don't know how to do.

from pandoc.

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.