Skip to content

ICML writer: Image frame sizing can only be set with explicit values #7263

Open
@Shrinks99

Description

@Shrinks99

Problem

When converting a file from Markdown → ICML I can't seem to change the size of images in InDesign with graphics frame styles. Setting a value of {width=10cm} within my markdown file produces the expected result in InDesign, however, no graphics frame style is explicitly created to accomplish this unlike how Pandoc handles text styles (which works very nicely!) Instead, Pandoc seems to take the image's hard-coded width and height values and apply it as an override to the default graphics frame style.

When no explicit width value is set Pandoc's fallback is to look at each image's resolution and set width & height values accordingly. This is also set to be applied as an override to the default graphics frame style.

Because these overrides are set with absolute values I cannot modify the graphics frame style to handle images sizing dynamically within InDesign, the only option appears to be to add fixed image frame sizes to each image within Markdown or break the link to my markdown file and handle the layout manually.

Examples

When set to a fixed width size in Markdown that width is carried over and images behave as expected.

When no width value is set Pandoc falls back on the file's dimensions, this can result in overset images. Note the override styling of the default [Basic Graphics Frame]+ in both screenshots which cannot be removed, as such both of these images cannot be effectively styled within InDesign.

ICML Images Issues.zip

All files needed to reproduce the examples above should be included in this zip. Create a fresh 8.5x11" document and place the generated ICML within a text frame.

Proposed Solution

Instead of relying on the absolute sizing fallback for encoding image sizes in ICML, a generalized graphics frame style could be created with some sensible defaults in the same way that paragraph styles are currently handled in the ICML writer? This way image sizing could be dynamic instead of set with fixed default values that cannot be changed without unlinking and manually fixing the sizing issues.

Caveats & other notes

  • I've really tried to make this work but maybe I've just missed something important and I'm doing this wrong. 😬
  • I've also tried to have a solid read through the issues and found no explicit examples of this problem, ICML Writer: Image object does not fit to frame #6936 is potentially related?
  • Implementing this solution could break some people's existing documents if folks like the existing auto-fixed-sizes and have not set explicit ones?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions