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

texreg(), caption.above = TRUE - Setting \caption location in "center" enviroment #171

Open
ghost opened this issue Jan 16, 2021 · 1 comment

Comments

@ghost
Copy link

ghost commented Jan 16, 2021

Hello,

I've found an issue in texreg(.,caption.above = TRUE). If you set caption to be above the table, texreg() will generate a LaTeX similar to this:

\begin{table}[htb]
\caption{H1: Finales ...}
\begin{center}
...

And this code will lead to an LaTeX table output, which looks like following table:

Screenshot 2021-01-16 183705

As you can see there is a vertical space between caption and table, which doesn't look great and waste some space in the LaTeX document. An solution would be to set \caption{} after the center environment:

\begin{table}[htb]
\begin{center}
\caption{H1: Finales ...}
...

which would lead to the following table:

Screenshot 2021-01-16 183128

which is in my opinion the better solution.

Request: Is it possible to reprogram texreg() to set the \caption after center environment?

Remark: In R package xtable the \caption is set after \centering.

@leifeld
Copy link
Owner

leifeld commented Feb 19, 2021

I can see how it looks better that way in your example. But consider the following examples with the caption inside the center environment:

Screenshot_20210219_170109

Would you still say this looks better than with the vertical space that is created by the center environment?

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