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

Feature request: Use link references in tables #352

Open
dhicks opened this issue Aug 17, 2021 · 0 comments
Open

Feature request: Use link references in tables #352

dhicks opened this issue Aug 17, 2021 · 0 comments

Comments

@dhicks
Copy link

dhicks commented Aug 17, 2021

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

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