Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.

# Re: st: Sjlatex and MikTex

 From "Roger B. Newson" To statalist@hsphsun2.harvard.edu Subject Re: st: Sjlatex and MikTex Date Fri, 04 Nov 2011 12:29:55 +0000

Speaking as a MiKTeX user, I think the problem may be that whatever folder you have installed SJ LaTeX into is not on any of the TeX input paths of your MiKTeX.
```
```
The various TeX input paths for MiKTeX are stored in aMicrosoft Windows environment variables, named -texinputs-, -bibinputs- and -bstinputs-. These environment variables need to be set before TeX, LaTeX or BiBTeX are called.
```
```
In my personal MiKTeX installation, I have a command file -settexinputs.bat-, which sets the various TeX input paths. The text of this file is as follows:
```
**** BEGINNNING OF texinputs.bat - CUT HERE
@echo off
```
rem Set TeX, BiBTeX and .bst input path to all subfolders in c:\texutil\input
```set texinputs=c:/texutil/input//
set bibinputs=%texinputs%
set bstinputs=%texinputs%
**** END OF texinputs.bat - CUT HERE

```
The file -texinputs.bat- is called by the various other personal command files that I use with MiKTeX. For instance, I have a personal front-end command file for the file -doit.bat-, distributed with SJ LaTeX. This front-end command file is named -doit_rbn.bat-, and it calls -settexinputs.bat- and then calls -doit.bat- and -ps2pdf- to produce a .pdf output file. Its text is as follows:
```
**** BEGINNNING OF doit_rbn.bat - CUT HERE
@echo off
rem Call the program doit.bat,
rem provided by The Stata Journal as part of the sjlatex package,
rem after setting the local TeX environment variables.
call c:\texutil\miktexsu\settexinputs
call c:\texutil\input\sjlatex\doit %1%
ps2pdf main.ps
echo you may now view main.pdf
**** END OF doit_rbn.bat - CUT HERE

```
I have a suite of MiKTeX command files, and call them from within TextPad, which is my chosen text editor for Windows. TextPad has a Tools menu, from which I routinely call TeX, Stata, R and other programs.
```
I hope this helps.

Best wishes

Roger

Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
London SW3 6LR
UNITED KINGDOM
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Email: r.newson@imperial.ac.uk
Web page: http://www.imperial.ac.uk/nhli/r.newson/
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

On 04/11/2011 09:28, Alberto R Osella wrote:
```
```Dear All,
I'm having some troubles when using sjlatex. I use Stata 12 on W7 and
I've done the following:

sjlatex install
All file have been installed and the I've used the following example:

. sjlog using desc_hsb2

. d

Contains data from http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta
obs: 200 highschool and beyond (200 cases)
vars: 11 17 Jun 2002 08:48
size: 8,800
------------------------------------------------------------------------------------------------------------------------------------------

storage display value
variable name type format label variable label
------------------------------------------------------------------------------------------------------------------------------------------

id float %9.0g
female float %9.0g fl
race float %12.0g rl
ses float %9.0g sl
schtyp float %9.0g scl type of school
prog float %9.0g sel type of program
write float %9.0g writing score
math float %9.0g math score
science float %9.0g science score
socst float %9.0g social studies score
------------------------------------------------------------------------------------------------------------------------------------------

Sorted by:

. sjlog close
(note: file
E:\Alberto\Papers\WorkingPapers\Nutriep\Paper_Steatosi\Database\desc_hsb2.smcl.bak

. sjlog type desc_hsb2.log.tex
{\smallskip}
. d
{\smallskip}
Contains data from http://www.ats.ucla.edu/stat/stata/notes/hsb2.dta
obs: 200 highschool and beyond (200 cases)
vars: 11 17 Jun 2002 08:48
size: 8,800
\HLI{79}
storage display value
variable name type format label variable label
\HLI{79}
id float \%9.0g
female float \%9.0g fl
race float \%12.0g rl
ses float \%9.0g sl
schtyp float \%9.0g scl type of school
prog float \%9.0g sel type of program
write float \%9.0g writing score
math float \%9.0g math score
science float \%9.0g science score
socst float \%9.0g social studies score
\HLI{79}
Sorted by:

I've copied and pasted the file in MikTex 2.9 but the typesseting stops
because MikTex don't find the file
Stata.sty. I know this is not a "Stata question" but may be someone coul
help me.
```*