Closed NilsEnevoldsen closed 2 years ago
Hi Nils, great idea. My preference would probably be to add an extra option. In the meantime substitute({article} {standalone})
would do the trick.
. sysuse auto, clear
. reg price weight foreign mpg
. esttab using test.tex, replace label page substitute({article} {standalone})
Note that using the title()
option will probably lead to problems as \documentclass{standalone}
does not support floats, I believe.
Yes, substitute()
is a good workaround. Perhaps the 80/20 solution is to simply add that suggestion to the documentation under page
.
Good catch on title()
creating floats. But standalone
does now support floats with [preview]
, and it seems that [varwidth]
is also necessary to prevent extra whitespace. So \documentclass[preview,varwidth]{standalone}
works nicely with title()
from what I can tell.
I now added option standalone()
to esttab
. standalone()
implies page
. Example:
sysuse auto, clear
reg price weight foreign mpg
esttab using test.tex, replace label title("my table") standalone
By default, \documentclass[varwidth]{standalone}
is used (this seems to work well in most cases, it seems to me). If you want to change this to \documentclass[preview,varwidth]{standalone}
, type standalone(preview,varwidth)
.
Thanks!
By default,
\documentclass[varwidth]{standalone}
is used (this seems to work well in most cases, it seems to me).
Oh, so it does.
Sometimes I want to create a PDF of a table on its own, apart from any document.
esttab, tex page
is good for these cases, but I prefer to replace\documentclass{article}
with\documentclass{standalone}
. When a table is the entire document, I have no need for the page number nor for a largely arbitrary paper size, and if the table is wide I like not having to rotate or resize the paper or the table to make it fit. Standalone is great for these cases.In fact, I'm curious if there is a use case for
esttab, tex page
wherestandalone
is not preferable toarticle
. If not, and if backward compatibility were not a concern, it would make sense forpage
to always implystandalone
.Regardless I would like a
standalone
option. I don't know whether this would be in addition topage
, or as a substitute forpage
, or as a suboption forpage
, etc.