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: RE: Copying Stata code with line numbers


From   Sergiy Radyakin <serjradyakin@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: Copying Stata code with line numbers
Date   Fri, 9 Mar 2012 14:52:09 -0500

Hello,

Nick, the syntax highlighting would be lost in the process.

Charles, please, clarify whether the text of the program or the
decoration is of more importance. If you want to retain
coloring/highlighting, I guess you can only ask StataCorp to add this
feature since to the best of my knowledge there is none so far.
Alternatively you may want to play around and install something like
HTML-printer-driver (printer driver that prints to HTML files). There
were a multitude of those ~ 10 years ago, then open them in the word
processor. Not sure how successful would that be (xps produces a ton
of output from a 5 line test text). Then again you get a
platform-dependent solution and all that complexity.

Regardless of the line numbers, being able to copy WITH SYNTAX
HIGHLIGHTING (in RTF perhaps) is a very desirable feature, at least
from my point of view.

Best, Sergiy Radyakin





On Wed, Mar 7, 2012 at 7:12 AM, Nick Cox <n.j.cox@durham.ac.uk> wrote:
> You could write a short program using -file- to read in each line of the file and write it out again with numeric prefixes.
>
> The idea of fixed lines is one that word processors resist, as I understand it, so I don't think programs fit easily into word processors, even for adding commentary. Actually, I don't think much fits easily into word processors, but set that aside.
>
> Nick
> n.j.cox@durham.ac.uk
>
> Charles Vellutini
>
> Would anyone know how to copy the content of an do-file (from Stata's standard do-file editor) and paste it in a word processor *with the line numbers*?
>
> We use Stata 12.1 on a Windows system.
>
>
> *
> *   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index