-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add notes over multiple lines at the end of a table #4
Comments
See also this question on StackOverflow: http://stackoverflow.com/questions/30902906/wrapping-custom-notes-in-texreg-output |
Comment by user sdaza (Sebastian Daza) on R-Forge: Another possibility it is to add something like:
Instead of...
/cc @sdaza |
Adding my note to you over e-mail: I'm not familiar enough with LaTeX to know how we might do so automatically, but if we add an argument like
to:
The regex serves to split the string into substrings of length at most Would be great to see something like this in the official version! A more parsimonious version takes advantage of the existing
|
Thanks everybody! So we've got three different ways to do it:
Which solution is supposed to work best? I am inclined to say number 2. But I'd welcome other views. |
Related question on StackOverflow: http://stackoverflow.com/questions/32644498/multiple-lm-texreg-export-with-second-note-line Here, the user would like to have manual line breaks rather than automatic word wrapping. |
I think @sdaza's approach is bound to be most robust. Sounds like a clearly superior version of my initial idea using Perhaps just add an option to change .9 to the user's preference? |
If we use that solution, the best way is to subtract the cell margin on the left and right, rather than replacing the line width of 1.0 by 0.9: However, that stretches the whole table to line width, even if it is actually shorter. Here is an example:
And here is the PDF output: test2.pdf How would we deal with that? Just letting the user figure out a width that still works seems like a kind of hackish solution to me... /cc @sdaza |
right... I guess that means maybe trying to have texreg track the width of
the table.
here's another SO question with slightly different answers:
http://tex.stackexchange.com/q/99326/29219
…On Dec 4, 2016 5:40 AM, "Philip Leifeld" ***@***.***> wrote:
If we use that solution, the best way is to subtract the cell margin on
the left and right, rather than replacing the line width of 1.0 by 0.9:
p{\dimexpr\linewidth-2\tabcolsep} (see a related StackOverflow post here
<http://tex.stackexchange.com/questions/62710/tabular-with-p-type-columns-to-fill-page-width>
).
However, that stretches the whole table to line width, even if it is
actually shorter. Here is an example:
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\title{}
\author{}
\begin{document}
\maketitle
\begin{table}
\begin{center}
\begin{tabular}{l c c }
\hline
& Model 1 & Model 2 \\
\hline
(Intercept) & $5.03^{***}$ & \\
& $(0.22)$ & \\
groupTrt & $-0.37$ & $4.66^{***}$ \\
& $(0.31)$ & $(0.22)$ \\
groupCtl & & $5.03^{***}$ \\
& & $(0.22)$ \\
\hline
R$^2$ & 0.07 & 0.98 \\
Adj. R$^2$ & 0.02 & 0.98 \\
Num. obs. & 20 & 20 \\
RMSE & 0.70 & 0.70 \\
\hline
\multicolumn{3}{p{\dimexpr\linewidth-2\tabcolsep}}{\scriptsize{$^{***}p<0.001$, $^{**}p<0.01$, $^*p<0.05$}}
\end{tabular}
\caption{Statistical models}
\label{table:coefficients}
\end{center}
\end{table}
\end{document}
And here is the PDF output: test2.pdf
<https://github.com/leifeld/texreg/files/629404/test2.pdf>
How would we deal with that? Just letting the user figure out a width that
still works seems like a kind of hackish solution to me...
/cc @sdaza <https://github.com/sdaza>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#4 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AHQQdfIIvqrobn_r5Gz2E3GCntdiiIUrks5rEpiOgaJpZM4LCz1M>
.
|
I think I have solved the problem by adding support for the |
Comment from user an ri on R-Forge:
I find myself manually adding a custom footnote after the tabular environment. The built in function custom.note puts the note into a multicolumn environment, but my annotations are often long, and the table proportions get distorted if I put it into this environment. So I add a custom note below the tabular environment using "\footnotesize". I imagine many other people do so as well.
The text was updated successfully, but these errors were encountered: