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

[WIP] Close #6740: LaTeX: Support tables without column rules #7417

Closed

Conversation

tk0miya
Copy link
Member

@tk0miya tk0miya commented Apr 5, 2020

@tk0miya tk0miya added type:enhancement enhance or introduce a new feature builder:latex labels Apr 5, 2020
@tk0miya tk0miya added this to the 4.0.0 milestone Apr 5, 2020
* LaTeX: Allow to override papersize and pointsize from LaTeX themes
* LaTeX: Add :confval:`latex_theme_options` to override theme options
* #6740: LaTeX: Support tables without column rules via a theme option:
``show_table_column_rules``
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still thinking about what is the best wording for a vertical line of the table. column rule? vertical rule (vrule)? vertical line (vline)? column separator (colsep)?

Copy link
Member Author

@tk0miya tk0miya Apr 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: The reference of booktab package calls it as "rule":

In British typesetting, a ‘line’ is always called a ‘rule’. Perhaps confusingly (for
historic reasons in fact), the ‘thickness’ of rule is often referred to as is its ‘width’
(whereas just about everyone else would call this ‘depth’ or ‘height’, if they were
thinking of a horizontal rule). A ‘thick black line’ is called a ‘heavy rule’. I have
used this terminology in most of the new commands below. If nothing else it
avoids confusion with \hline.
https://www.ctan.org/pkg/booktabs

def __init__(self, name: str) -> None:
self.name = name
self.docclass = name
self.wrapperclass = name
self.papersize = 'letterpaper'
self.pointsize = '10pt'
self.show_table_column_rules = True
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now I use a boolean to show/hide column rules. But it might be better to choose a character for column separator instead.

table_column_rules = |
table_column_rules = ||
table_column_rules = :
# see https://tex.stackexchange.com/questions/122301/how-to-add-vertical-and-horizontal-dashed-lines-in-array-and-tabular-enviroments

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, we can use :stub-columns: option to make the table having vertical headings. So special column rule; header separator would be needed for such case...

sphinx/writers/latex.py Show resolved Hide resolved
@tk0miya tk0miya force-pushed the 6740_latex_nocolumnborder_table branch 2 times, most recently from 35dd6bf to 09518d9 Compare April 5, 2020 12:16
@tk0miya tk0miya force-pushed the 6740_latex_nocolumnborder_table branch from 09518d9 to 05a5f30 Compare May 3, 2020 02:58
@tk0miya tk0miya modified the milestones: 4.0.0, 4.1.0 Mar 8, 2021
@tk0miya tk0miya closed this May 9, 2021
@tk0miya tk0miya deleted the branch sphinx-doc:3.x May 9, 2021 03:24
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:latex type:enhancement enhance or introduce a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant