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

Table captions beneath the table (not above) #531

Closed
kaysgericht opened this issue Sep 1, 2016 · 9 comments
Closed

Table captions beneath the table (not above) #531

kaysgericht opened this issue Sep 1, 2016 · 9 comments
Assignees

Comments

@kaysgericht
Copy link

Is it possible to have the table captions (table 1 : xxx) positioned under the table and not above?

image

I crawled through the sources, but wasn't able to get the result i wished for

image

Thanks for all your great work on this project.

Regards

@mojavelinux mojavelinux added this to the v1.5.0.alpha.14 milestone Sep 1, 2016
@mojavelinux mojavelinux self-assigned this Sep 1, 2016
@mojavelinux
Copy link
Member

mojavelinux commented Sep 1, 2016

Not at the moment, though I agree it would be a nice feature. I think in general we should be able to use the theme to control the caption placement (above or below).

To proceed, we need to decide how we are going to declare this. Recall that the theme tries to be as faithful as possible to CSS, so perhaps we can use something like:

table:
  caption:
    side: bottom

(See https://developer.mozilla.org/en-US/docs/Web/CSS/caption-side for the property we're emulating).

This is related to #307.

@mojavelinux
Copy link
Member

Thanks for all your great work on this project.

Thanks for appreciating it!

@kaysgericht
Copy link
Author

Wow, that was fast :)

Thanks for the quick response!

@mojavelinux
Copy link
Member

The only downside is that we won't be able to guarantee that the caption stays on the same page as the table. That would require knowing ahead of time the height of the rendered table, which would require doing a dry run. I fear that would dramatically slow down conversion. Instead, to support this feature, we might want to see if prawn-table could give us a hook to decide whether or not to advance to the next page before rendering a row.

@mojavelinux
Copy link
Member

Of course, I realized that we don't keep the caption on the same page as the table now...so we're not losing any behavior yet ;)

mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 4, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 4, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 4, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 6, 2016
mojavelinux added a commit to mojavelinux/asciidoctor-pdf that referenced this issue Sep 6, 2016
fapdash pushed a commit to vogellacompany/asciidoctor-pdf that referenced this issue Dec 13, 2016
… of table caption (PR asciidoctor#537)

* allow theme to control position (i.e., side) of table caption
* use term "side" instead of "position" to refer to element side (e.g., top or bottom)
@siddjain
Copy link

@mojavelinux it looks like this is done? could you please provide an example how to use this feature?

@mojavelinux
Copy link
Member

My first comment shows an example. Here's a complete theme example:

extends: default
table:
  caption:
    side: bottom

@siddjain
Copy link

siddjain commented Feb 25, 2020 via email

@mojavelinux
Copy link
Member

mojavelinux commented Feb 25, 2020 via email

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

No branches or pull requests

3 participants