Bookmark and Share

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


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

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


From   Nick Cox <[email protected]>
To   [email protected]
Subject   Re: st: RE: Copying Stata code with line numbers
Date   Sat, 10 Mar 2012 01:00:23 +0000

Charles didn't mention preservation of syntax highlighting as a requirement.

As the problem posed is to copy into a word processor, I would be
curious to know which word processors support Stata syntax
highlighting.

Nick

On Fri, Mar 9, 2012 at 7:52 PM, Sergiy Radyakin <[email protected]> wrote:

> 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.

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.

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/


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