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, statalist.org 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 <nshephard@gmail.com>
To   statalist@hsphsun2.harvard.edu
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 <dchandler@gmail.com> 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 http://s281191135.onlinehome.us/2008/20080427-stata.html).
>
> 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
http://gummi.midnightcoding.org/).  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
http://www.stata-press.com/books/wdaus.html on managing/organising
do-files useful too.

Neil

-- 
"... 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 - nshephard@gmail.com
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index