Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

Re: st: RE: Copying Stata code with line numbers

From   Sergiy Radyakin <[email protected]>
To   [email protected]
Subject   Re: st: RE: Copying Stata code with line numbers
Date   Fri, 9 Mar 2012 14:52:09 -0500


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 <[email protected]> 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
> [email protected]
> 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:
> *
> *
> *

*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index