Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: St: Export an .ado file to TeX [OT]

From   Ulrich Kohler <>
Subject   st: Re: St: Export an .ado file to TeX [OT]
Date   Mon, 4 Aug 2003 09:11:04 +0200

The Latex-alltt environment (or the sjlog environment as defined in stata.sty) 
will interpret special characters like > < ~  & etc. as commands. 

I have made a perl-skript which translates Do-Files and Ado-Files to 
Latex-Code suitable for the sjlog environment. The Latex-Code should work 
with the alltt environment as well.

If the program is of interest for you please drop me a note and I will send it 
to you as an email attachment. 

Here is just another short discribtion 


Syntax:  do2tex [options] <do-file>

Translates Stata Do-Files to LaTeX Code. The LaTeX Code is designed to work
with the sjlog environment of the Stata Journal LaTeX documentclass.

General Options:
  --help:                  print usage
  --lines="range":         Restrict to range of lines (#1:#2)
  --outfile= "<file>":     Write result to <file>

  --index = "<TeX Code>":   Include line-numbers (Typeset in TeX Code)
  --name ="<Tex Code>":     Include filename above (Typeset in TeX Code)
  --omm [="<TeX Code>"]:    What you like instead of ommitted lines
  --bottom [="<TeX Code>"]: What you like at the bottom of the file
  --top [="<TeX Code>"]:    What you like above the translated file

Use quotation marks if an option contains blanks!



  * do2tex

Translates only rows 1-5 of and wrotes in Without 
outfile is produced.

  * do2tex --lines 1:5 --outfile

Translates rows 1-5 and 9:12 of Ommited parts are marked with 
the Stata class Tex-macro {oom}.

  * do2tex --lines "1:5 9:12" --omm "{oom}"

Julian Fennema wrote:
> Just the solution I needed. Thank you for the advice.

> -----Original Message-----
> From:
> [] On Behalf Of Antoine
> Terracol
> Sent: 02 August 2003 17:54
> To:
> Subject: st: Re: St: Export an .ado file to TeX [OT]
> Hello Julian,
> Why don't you use the -verbatim- environment in LaTeX, or maybe even
> better : the -alltt- package :
> \documentclass{article}
> \usepackage{alltt}
> begin{document}
> \begin{alltt}
> \input{C:/ado/personal/myprog.ado}
> \end{alltt}
> \end{document}


*   For searches and help try:

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