[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Solution to include scaled Stata output in LaTeX presentation (beamer)

From   "Ben Jann" <>
To   statalist <>
Subject   st: Solution to include scaled Stata output in LaTeX presentation (beamer)
Date   Sat, 23 Feb 2008 16:31:53 +0100

Hi, maybe the follwing is known to many of you, but I did not know and
I didn't find anything in the FAQ or the Statalist Archive. So I
thought it would be worthwhile to share this

When including Stata output in a LaTeX presentation (using -sjlog- and
-sjlatex-, type -findit sjlog-, -findit sjlatex-, and e.g. the
"beamer" class) it is often desirable to scale the output a bit so
that it fits the slide.* Setting the font does not help.

After fiddling around a little I found a solution that works quite
well: Use the "\scalebox" command from the "graphicx" package (which
is automatically loaded in beamer).



The minipage seems to be necessary (although there may also be other
ways to make \scalebox work with stlog).

To simplify, you can definde a command in the preample of the LaTeX
document as follows:

---begin of example file---








---end of example file---

Works perfect for me.


* The procedure to include Stata output in a LaTeX document is to save
the output using the -sjlog- command and then, in LaTeX, include the
output using the "stlog" environment. That is, in Stata type

  . sjlog using whatever, replace
  . ...
  . sjlog close, replace

and then in the preamble of the LaTeX file load the stata package


and in the body of the text type

*   For searches and help try:

© Copyright 1996–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index