Statalist


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

Re: st: New -texdoc- package available from SSC


From   Richard Ochmann <[email protected]>
To   [email protected]
Subject   Re: st: New -texdoc- package available from SSC
Date   Tue, 24 Mar 2009 09:46:33 +0100

...

I get an error there:

***
ssc install texdoc
set trace on
texdoc init example, replace
***

returns:


---- begin texdoc ---
- version 9.2
- gettoken subcmd 0 : 0, parse(", ")
- local length = length(`"`subcmd'"')
= local length = length(`"init"')
- if `"`subcmd'"'==substr("init",1,max(`length',1)) {
= if `"init"'==substr("init",1,max(4,1)) {
- texdoc_init`macval(0)'
= texdoc_init example, replace
  -------------- begin texdoc.texdoc_init ---
  - syntax anything(id="document name" equalok everything) [, Replace 
Prefix(str asis) ]
  - capt which sjlatex
  - if _rc {
    di as err "-sjlatex- package is required. To install the package, 
type"
    di _n `"    {stata "net install sjlatex, 
from(http://www.stata-journal.com/production)"}"'
    di ""
    exit 499
    }
  - mata: texdoc_init(st_local("anything"), st_local("prefix"))
  - mata: mm_outsheet(st_global("TeXdoc_docname"), J(0, 0, ""), 
"`replace'")
  = mata: mm_outsheet(st_global("TeXdoc_docname"), J(0, 0, ""), "replace")
           mm_outsheet():  3499  mm_strexpand() not found
                 <istmt>:     -  function returned error
  --------------- end texdoc.texdoc_init ---
  }
---- end texdoc ---
r(3499);


Am I missing something?

Stata 10.1, WinXP

best, rich


[email protected] schrieb am 23.03.2009 23:49:14:

> Thanks to Kit Baum, a new package called -texdoc- is available from
> SSC. To install the package, type
> 
>  . ssc install texdoc
> 
> Stata version 9.2 and -sjlatex- from
> http://www.stata-journal.com/production is required.
> 
> -texdoc- provides tools to create a LaTeX document from within Stata
> in a weaving fashion. I wrote -texdoc- for teaching, but it might also
> be useful for other purposes, e.g., when writing a Stata Journal
> article.
> 
> The procedure is to first initialize a document using -texdoc init-,
> then write the contents of the file, line by line, by repeated calls
> to -tex- or include Stata output using -texdoc stlog-, and finally
> finish up typing -texdoc close-. Example:
> 
> <--->
> texdoc init example, replace
> tex \documentclass{article}
> tex \usepackage{stata}
> tex \begin{document}
> tex
> tex The auto data:
> 
> texdoc stlog
> sysuse auto
> describe
> texdoc stlog close
> 
> tex
> tex A regression model:
> 
> texdoc stlog
> regress price weight mpg foreign
> texdoc stlog close
> 
> tex
> tex \end{document}
> texdoc close
> <--->
> 
> The code above will produce a main file called example.tex and several
> log files that are called by example.tex. example.tex looks as
> follows:
> 
> <--->
> \documentclass{article}
> \usepackage{stata}
> \begin{document}
> 
> The auto data:
> \begin{stlog}
> \input{example_1.log.tex}
> \end{stlog}
> 
> A regression model:
> \begin{stlog}
> \input{example_2.log.tex}
> \end{stlog}
> 
> \end{document}
> <--->
> 
> You can now compile example.tex using your favorite LaTeX compiler to
> produce the desired document.
> 
> If you use an editor that features syntax highlighting it might be a
> good idea to set up a shortcut to quickly toggle between LaTeX and
> Stata highlighting. Furthermore, some editors can be configured in a
> way such that "tex " is automatically inserted at the beginning of a
> new line when LaTeX highlighting is on.
> 
> ben
> *
> *   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/

*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index