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 <[email protected]>
To   [email protected]
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 

Usage
----------

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>

Style-Options
  --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!

Examples
---------

Produces test.do.tex:

  * do2tex test.do

Translates only rows 1-5 of test.do and wrotes in test.do.tex. Without 
outfile test.do.tex.region is produced.

  * do2tex --lines 1:5 --outfile test.do.tex test.do

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

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











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

> -----Original Message-----
> From: [email protected]
> [mailto:[email protected]] On Behalf Of Antoine
> Terracol
> Sent: 02 August 2003 17:54
> To: [email protected]
> 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}

-- 
[email protected]


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



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