Bookmark and Share

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, is already up and running.

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

Re: st: Text editor that has automatic table of contents?

From   Neil Shephard <>
Subject   Re: st: Text editor that has automatic table of contents?
Date   Mon, 1 Mar 2010 20:16:13 +0000

On Mon, Mar 1, 2010 at 5:41 PM, Dana Chandler <> wrote:
> Hello fellow statalisters -
> I just recently started using Notepad++ and am very happy with the
> editor (especially after figuring out how to run do-lines from within
> the program
> However, one thing that would be really great to have from a text
> editor is an automatically generated Table of Contents. For example, I
> frequently write my do-files in indented sections (e.g., prepare data,
> clean data, analysis 1, etc.). Some LaTeX editors make use of the
> section/subsection declarations to create a Table of Contents that you
> can see and point-click to while editting.
> Are there any text editors that utilize indentation to show the first
> level or two of heirarchy so that I could have a sense of the whole
> do-file?

I'm not aware of anything that does this, and to be honest I suspect
it may well be unique to LaTeX anyway.  Editors that show the
formatted output of LaTeX are in essence compiling it on the fly to
display it (the only one I have experience of is Gummi for Linux, see  Often you have to compile LaTeX
source a couple of times to get all the referencing correct too.
Do-files are never compiled in this way, they're simply read
line-by-line by Stata.

>  Also - even if you don't know of any text editors, are there
> any tips that people who write their do-files in sections have to
> offer for keeping track of the structure of very lengthy do-files?

Stata NetCourse 101 and the subsequent 151 are good courses and
provide good advice on organising you work-flow with Stata.

The basic approach though is to avoid writing really long do-files.
Simply write a small do-file for each specific task and have a
"master" do-file that calls each in turn.

You might also find some of the advice in on managing/organising
do-files useful too.


"... no scientific worker has a fixed level of significance at which
from year to year, and in all circumstances, he rejects hypotheses; he
rather gives his mind to each particular case in the light of his
evidence and his ideas." - Sir Ronald A. Fisher (1956)

Email -
Website -
Photos -
*   For searches and help try:

© Copyright 1996–2016 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index