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

[REQUEST] Add title_justify and caption_justify options for Table, to override default "center" #301

Closed
ptmcg opened this issue Sep 22, 2020 · 3 comments

Comments

@ptmcg
Copy link
Contributor

ptmcg commented Sep 22, 2020

How would you improve Rich?

I would like to output a table with the caption non-centered, as shown here:

                 Best 5 Star Trek:TOS Episodes                    
+---------------------------------------------------------------+
| Date       | Title                           | Rating | Votes |
|------------+---------------------------------+--------+-------|
| 1967-04-06 | The City on the Edge of Forever |    9.3 |  4393 |
| 1967-10-06 | Mirror, Mirror                  |    9.1 |  3434 |
| 1966-12-15 | Balance of Terror               |    8.9 |  3710 |
| 1967-12-29 | The Trouble with Tribbles       |    8.9 |  3337 |
| 1967-02-16 | Space Seed                      |    8.8 |  3647 |
+---------------------------------------------------------------+
                                               data from IMDB.com

What problem does it solved for you?

Sometimes captions should be less prominent than showing as centered under the table. Left or right alignment of the caption text can give it more of "footnote" look.

While supporting caption justification, may as well add title justification also.

@ptmcg
Copy link
Contributor Author

ptmcg commented Sep 22, 2020

@willmcgugan
Copy link
Collaborator

You can set the caption to a Text instance, i.e. caption=Text("data from IMDB.com", justify="right") which should have the same effect.

That said, it probably is worth adding those two parameters as you suggest. Just to make it obvious...

@willmcgugan
Copy link
Collaborator

Thanks for #302 !

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

2 participants