Stata 德士多元';行不通

Stata 德士多元';行不通,stata,Stata,我想在Stata中编写类似swave-a的文本,并尝试使用texdoc包来完成 我已经更新了我的所有软件包,但它似乎没有完全工作 例如: * texdoc Init texdoc init $texdoc/myexample.tex, replace tex \documentclass{article} tex \usepackage{stata} tex \begin{document} tex \section{First Things First} tex So when i wr

我想在Stata中编写类似swave-a的文本,并尝试使用
texdoc
包来完成

我已经更新了我的所有软件包,但它似乎没有完全工作

例如:

* texdoc Init
texdoc init $texdoc/myexample.tex, replace

tex \documentclass{article}
tex \usepackage{stata}
tex \begin{document}

tex \section{First Things First}

tex So when i write it like this, it works like a charm \\

/*tex 
\section{Second things never}
But when i write it like this, nothing happens
tex*/

tex You wouldnt think this is possible

texdoc stlog
local w=99
dis "because 1+1=`w'" 
texdoc stlog close  

tex \end{document}

texdoc close
在“texdoc do filename”之后,tex文档如下所示:

\documentclass{article}
\usepackage{stata}
\begin{document}
\section{First Things First}
So when i write it like this, it works like a charm \\
You wouldnt think this IS possible

\begin{stlog}
    \input{myexample_1.log.tex}
    \end{stlog}

\end{document}
为什么当我把代码放在“tex”命令之后时它编译正确,而如果我把它放在/tex和tex/之间,为什么它编译不正确


我扫描了ado文件,没有发现任何错误…

我似乎无法重现该问题。需要明确的是,在编写tex do文件(您的第一段代码)之后,您将其保存在某个地方,然后执行
texdoc do filename
生成.tex文件,对吗?我相信在Stata do文件中执行tex块代码不会像您所希望的那样。它需要使用
texdoc do filename
执行,而不是使用
do filename
,这是直接从do-file执行的结果。当然,我
texdoc do
指定的
*.texdoc
。有趣的是,如果我只是键入
do*.texdoc
,文档的处理过程是一样的。我的包裹怎么了?你能在我的例子中处理“正确”的latex代码吗?它现在可以工作了。。。我用来定义目录的全局变量似乎有点问题……很有趣。很高兴找到你的答案。