Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Inserting Stata output in Beamer presentation


From   Eric Booth <[email protected]>
To   "<[email protected]>" <[email protected]>
Subject   Re: st: Inserting Stata output in Beamer presentation
Date   Wed, 27 Apr 2011 19:45:33 +0000

<>

On Apr 27, 2011, at 12:27 PM, Martial Foucault wrote:
> Do you suggest me that I should insert the [shrink] option in the Tex Field
> object where the table is placed ?


You'd put the [shrink] option in for the \frame environment.  I'm not sure what a "Tex Field" is.
See the code I posted for you previously, but the relevant snippet of code is:

\begin{frame}[shrink]{Slide Title Goes Here}

for your slides/frame environment (line 23 in my .tex example).

2. James Fiedler made a key point about the text size for the table and how Beamer scales text.  
While adding the [shrink] option to the {frame} might be enough, specifying the text size in the table environment can be done in addition to or instead of using [shrink].  In fact, my example used both strategies, since the example -tabout- table (mytabouttable.tex) I gave uses the command " \footnotesize " to shrink the table text.    So, you could change your line:

> \begin{table}[htbp]\centering

to be:

> \begin{table}[htbp]\centering \scriptsize

or substitute \small, \footnotesize, etc

3. Finally, your table appears to have a lot of data -- keep Maarten's advice in mind.  In your example, you've got at least 9 columns plus you truncate the real number of rows with [...], so it's probably a good idea to break these up across slides or by omitting certain IVs and inserting a note (again, as Maarten describes).

- Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
[email protected]


On Apr 27, 2011, at 12:27 PM, Martial Foucault wrote:

> Dear Eric,
> 
> Thanks for your message. Your pdf output is exaclty what I am trying to
> produce with estimation results. 
> I have inserted the above tex code in my beamer presentation file. I can
> typeset without problem but I cannot fix the scale problem.  
> 
> Do you suggest me that I should insert the [shrink] option in the Tex Field
> object where the table is placed ?
> 
> Thanks a lot.
> Martial
> 
> 
> --------------------------------------------------
> \begin{landscape}
> \begin{table}[htbp]\centering
> \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}
> \caption{OLS estimates\label{tab1}}
> \begin{tabular}{l*{8}{c}}
> \hline\hline
> 
> &\multicolumn{1}{l}{1998}&\multicolumn{1}{c}{}&\multicolumn{1}{l}{2003}&\mul
> ticolumn{1}{c}{}&\multicolumn{1}{l}{2007}&\multicolumn{1}{c}{}&\multicolumn{
> 1}{l}{2008}&\multicolumn{1}{c}{}\\
> 
> &\multicolumn{1}{l}{(linear)}&\multicolumn{1}{l}{(ln)}&\multicolumn{1}{l}{(l
> inear)}&\multicolumn{1}{l}{(ln)}&\multicolumn{1}{l}{(linear)}&\multicolumn{1
> }{l}{(ln)}&\multicolumn{1}{l}{(linear)}&\multicolumn{1}{l}{(ln)}\\
> \hline
> Spending            &         .19         &        1.56\sym{**} &
> .614\sym{***}&        5.23\sym{***}&        .297\sym{***}&
> 2.81\sym{*}  &        .299\sym{***}&        5.54\sym{***} \\
>                  &      (.106)         &        (.52)        &     (.0536)
> &      (.772)         &     (.0562)         &        (1.35)       &
> (.0513)         &        (1.29)        \\
> [1em]
> Chal. Spending      &      -.0237         &        -2.25        &
> -.187\sym{***}&       -2.94\sym{***}&      -.0235\sym{*}  &        -3.79
> &      -.0592\sym{***}&          -2.81\sym{**} \\
>                  &     (.0312)         &         (1.4)       &     (.0269)
> &       (.793)        &    (.00914)         &       (1.95)        &
> (.0131)         &          (.972)         \\
> [...]
> 
> \hline\hline
> \multicolumn{9}{l}{\footnotesize Standard errors in parentheses}\\
> \multicolumn{9}{l}{\footnotesize \sym{*} \(p<0.05\), \sym{**} \(p<0.01\),
> \sym{***} \(p<0.001\)}\\
> \end{tabular}
> \end{table}
> \end{landscape}
> 
> 
> -----Message d'origine-----
> De : [email protected]
> [mailto:[email protected]] De la part de Eric Booth
> Envoyé : mercredi 27 avril 2011 12:30
> À : <[email protected]>
> Objet : Re: st: Inserting Stata output in Beamer presentation
> 
> <>
> 
> By "it doesn't work" do you mean it doesn't typeset (if so, what is the
> error?)?  What code did you try that failed to work?  If my comment below
> don't work, we probably need more detail to understand what's going on here.
> 
> Below is a beamer .tex file example that includes a large tabout (BTW,
> tabout is from SSC) table (created from Ian Watson's help file examples)
> inserted into a Beamer presentation.  
> You may want to make sure you've got all the right packages referenced
> (tabularx, booktabs, etc) and also you might try using the [shrink] option
> for your frame and the [compress] option for your document (see below).
> 
> 
> Here is a link to the .tex file in my Dropbox:
> http://dl.dropbox.com/u/428249/example_template_with_tabout.pdf
> Here is a link to the tabout file I included for the table:
> http://dl.dropbox.com/u/428249/mytabouttable.tex
> Here is the resulting PDF:
> http://dl.dropbox.com/u/428249/example_template_with_tabout.pdf
> 
> 
> The .tex code is:
> 
> %%%%%%%%%%%%%%begin example
> \documentclass[10pt, compress, red]{beamer} \usepackage{ pgf , epstopdf,
> graphicx, url, hyperref, amsmath, tabularx, booktabs} \usetheme{Berlin}
> \AtBeginSection{  \begin{frame}[shrink]  \frametitle{Contents}
> \tableofcontents[currentsection]  \end{frame}  } \title{A  \LaTeX Template}
> \author{author here }
> 
> \begin{document}
> \frame{\titlepage}
> \begin{frame}[shrink]{Table of Contents}
>    \frametitle{Contents}
> \tableofcontents[currentsection]
> \end{frame}
> 
> 
> \section{Placeholder: My Title Goes Here} \begin{frame}[shrink]{Placeholder
> Title Goes Here}
> 	\input{mytabouttable}
> \end{frame}		
> 
> 
> \end{document}
> %%%%%%%%%%%%%%end example
> 
> 
> - Eric
> 
> __
> Eric A. Booth
> Public Policy Research Institute
> Texas A&M University
> [email protected]
> Office: +979.845.6754
> 
> 
> On Apr 27, 2011, at 11:12 AM, Martial Foucault wrote:
> 
>> Dear all,
>> 
>> I face some serious troubles to insert estimations tables into a Beamer
> presentation. Stata tables have been saved using tabout with .tex extension.
>> Now I try to display such results into a Beamer presentation. But it
> doesn't work ! In fact, the table doesn't fit at all with the scale of the
> document.
>> 
>> Is there a relevant procedure to save Stata results before inserting them
> into a Beamer presentation ? (Using tabout is fine for a Latex (standard)
> document).
>> 
>> Thanks a lot.
>> Best,
>> 
>> Martial Foucault
>> Professeur Agrégé / Associate Prof.
>> Département de science politique / Political Science Dept Université 
>> de Montréal CP 6128, Succ. centre-ville Montréal H3C3J7 - CANADA
>> 
>> 


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index