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

line spacing inside tables #36

Open
johannes-titz opened this issue Nov 16, 2021 · 1 comment
Open

line spacing inside tables #36

johannes-titz opened this issue Nov 16, 2021 · 1 comment

Comments

@johannes-titz
Copy link

Could you add an option for line spacing inside tables? For long tables, double spacing often leads to the table not fitting on one page.

As far as I understand, inside tables the spacing does not have to be double: https://apastyle.apa.org/style-grammar-guidelines/paper-format/line-spacing

Or is there a quick workaround?

@jpcirrus
Copy link

Until an option is added, the following preamble code works to make all tables single spaced, whilst preserving the document spacing of captions and table notes:

% single line spacing of all table "floats"
\usepackage{setspace}
% Revert single line spacing of floats (setspace)
\makeatletter
\let\@xfloat=\latex@xfloat
\makeatother
\AddToHook{begindocument/end}{\NewCommandCopy{\bls}{\baselinestretch}}
\AddToHook{env/table/begin}{\singlespacing}
\AddToHook{env/longtable/begin}{\singlespacing}
\AddToHook{env/sidewaystable/begin}{\singlespacing}
\AddToHook{env/threeparttable/begin}{\singlespacing}
\captionsetup{font={stretch=\bls}}
\AddToHook{env/tablenotes/begin}{\setstretch{\bls}}

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

2 participants