Statalist The Stata Listserver


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Printing colo(u)r syntax highlighting in Emacs (was: Copying syntax highlighting in Textpad to Word)


From   "Neil Shephard" <[email protected]>
To   [email protected]
Subject   st: Printing colo(u)r syntax highlighting in Emacs (was: Copying syntax highlighting in Textpad to Word)
Date   Thu, 9 Nov 2006 11:02:52 +0800

The recent talk of printing in colo(u)r syntax-highlighted code
prompted me to look up how to do it in my editor of choice (despite
rarely printing code out!!!).

Under *NIX systems, assuming you have syntax highlighting for whatever
you are using (for Stata this could come from Emacs Speaks Statistics
(http://ess.r-project.org/) or Bill Rising's ado-mode
(http://www.louisville.edu/~wrrisi01/Stata/ado-mode_install.html)) it
can be achieved by using the ps-print-buffer-with-faces command.  Thus
you go to the buffer you want to print and...

M-x ps-print-buffer-with-faces

and it'll come off your colo(u)r printer with all the higlighting.

I can't comment on how to do this under Windows or Mac systems as I
don't have access to either, but I did find the following description
(albeit a rather convoluted route involving exporting to postscript
then converting to pdf) of how to achieve this using Emacs under a
Windows environment at...

http://www.leedberg.com/2005/11/how-to-printing-in-emacs-under-windows.html

Neil
--
"An intellectual is a person who has discovered something more
interesting than sex." - Aldous Huxley

Email - [email protected] / [email protected]
Website - http://slack.ser.man.ac.uk/
Photos - http://www.flickr.com/photos/slackline/
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index