Skip to content

Feature request: Use link references in tables #352

Description

@dhicks

I've been struggling the last several days with a version of #336 : I have a table with one column that contains links attached to very short text, and it ends up ridiculously wide, like a third of the table width. The attachment table.md shows the first few rows of this table (generated with pandoc.table()).

With manually-generated markdown, one workaround is to use link references. The attachment table_ref.md shows how this works in practice. This allows the problem column to be much narrower, and the result has much nicer column widths when rendered to HTML by pandoc.

So one approach to addressing this problem in pander would be to automatically replace image and link targets with these link references. To ensure uniqueness, a hash function could be used to generate link labels from the targets, in much the same way services like bit.ly automatically generate shortlinks.

table.md
table_ref.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions