* pdf or ps from emacs syntax highlighted source code
@ 2007-05-02 23:48 Bauke Jan Douma
2007-05-03 3:11 ` Eli Zaretskii
[not found] ` <mailman.153.1178162282.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: Bauke Jan Douma @ 2007-05-02 23:48 UTC (permalink / raw)
To: help-gnu-emacs
Does anyone know if and how I can create a pdf or postscript file from
source code I'm editing in emacs, which I have syntax highlighted in
emacs, and which syntax-highlighting (except for the background color,
which in my case is almost black) I would like to preserve in the
created pdf/ps file?
Or is their any other tool that might be able to do something like
this? The source code is C, but it would be nice to have it for php,
(bourne) shell, etc.
Thanks for any tips.
bjd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
[not found] <mailman.151.1178150118.32220.help-gnu-emacs@gnu.org>
@ 2007-05-03 0:31 ` Joost Kremers
2007-05-03 20:41 ` Bauke Jan Douma
0 siblings, 1 reply; 15+ messages in thread
From: Joost Kremers @ 2007-05-03 0:31 UTC (permalink / raw)
To: help-gnu-emacs
Bauke Jan Douma wrote:
> Does anyone know if and how I can create a pdf or postscript file from
> source code I'm editing in emacs, which I have syntax highlighted in
> emacs, and which syntax-highlighting (except for the background color,
> which in my case is almost black) I would like to preserve in the
> created pdf/ps file?
does ps-print-buffer-with-faces do what you want?
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-02 23:48 Bauke Jan Douma
@ 2007-05-03 3:11 ` Eli Zaretskii
2007-05-03 20:40 ` Bauke Jan Douma
[not found] ` <mailman.153.1178162282.32220.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 15+ messages in thread
From: Eli Zaretskii @ 2007-05-03 3:11 UTC (permalink / raw)
To: help-gnu-emacs
> Date: Thu, 03 May 2007 01:48:31 +0200
> From: Bauke Jan Douma <bjdouma@xs4all.nl>
>
> Does anyone know if and how I can create a pdf or postscript file from
> source code I'm editing in emacs, which I have syntax highlighted in
> emacs, and which syntax-highlighting (except for the background color,
> which in my case is almost black) I would like to preserve in the
> created pdf/ps file?
"M-x ps-print-buffer-with-faces" will produce PostScript, and will
write it to a file if you invoke it with an argument.
> Or is their any other tool that might be able to do something like
> this? The source code is C, but it would be nice to have it for php,
> (bourne) shell, etc.
ps-print-buffer-with-faces works for any buffer.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
[not found] ` <mailman.153.1178162282.32220.help-gnu-emacs@gnu.org>
@ 2007-05-03 10:13 ` Hadron
0 siblings, 0 replies; 15+ messages in thread
From: Hadron @ 2007-05-03 10:13 UTC (permalink / raw)
To: help-gnu-emacs
Eli Zaretskii <eliz@gnu.org> writes:
>> Date: Thu, 03 May 2007 01:48:31 +0200
>> From: Bauke Jan Douma <bjdouma@xs4all.nl>
>>
>> Does anyone know if and how I can create a pdf or postscript file from
>> source code I'm editing in emacs, which I have syntax highlighted in
>> emacs, and which syntax-highlighting (except for the background color,
>> which in my case is almost black) I would like to preserve in the
>> created pdf/ps file?
>
> "M-x ps-print-buffer-with-faces" will produce PostScript, and will
> write it to a file if you invoke it with an argument.
>
>> Or is their any other tool that might be able to do something like
>> this? The source code is C, but it would be nice to have it for php,
>> (bourne) shell, etc.
>
> ps-print-buffer-with-faces works for any buffer.
>
That is so, very, very, cool. Emacs never ceases to amaze me.
Can anyone suggest a good varied color "color-theme" for C code that is
then readable when it is printed onto white paper?
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-03 3:11 ` Eli Zaretskii
@ 2007-05-03 20:40 ` Bauke Jan Douma
2007-05-03 20:44 ` Drew Adams
0 siblings, 1 reply; 15+ messages in thread
From: Bauke Jan Douma @ 2007-05-03 20:40 UTC (permalink / raw)
To: Eli Zaretskii, help-gnu-emacs
Eli Zaretskii wrote on 03-05-07 05:11:
>> Date: Thu, 03 May 2007 01:48:31 +0200
>> From: Bauke Jan Douma <bjdouma@xs4all.nl>
>>
>> Does anyone know if and how I can create a pdf or postscript file from
>> source code I'm editing in emacs, which I have syntax highlighted in
>> emacs, and which syntax-highlighting (except for the background color,
>> which in my case is almost black) I would like to preserve in the
>> created pdf/ps file?
>
> "M-x ps-print-buffer-with-faces" will produce PostScript, and will
> write it to a file if you invoke it with an argument.
>
>> Or is their any other tool that might be able to do something like
>> this? The source code is C, but it would be nice to have it for php,
>> (bourne) shell, etc.
>
> ps-print-buffer-with-faces works for any buffer.
I see, thanks!
Actually -- as soon as I had posted the question here, I came
up with another preferable requisite: a html version of the
syntax highligted code.
Wouldn't necessarily have to be the same color-theme as emacs.
I suppose though that's off-topic here. Unless anybody has a
quick suggestion... I see google has some response on this,
I'll have to see if anything is workable.
Regards,
bj
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-03 0:31 ` pdf or ps from emacs syntax highlighted source code Joost Kremers
@ 2007-05-03 20:41 ` Bauke Jan Douma
2007-05-04 8:43 ` Kai Grossjohann
[not found] ` <mailman.219.1178268675.32220.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 15+ messages in thread
From: Bauke Jan Douma @ 2007-05-03 20:41 UTC (permalink / raw)
To: Joost Kremers; +Cc: help-gnu-emacs
Joost Kremers wrote on 03-05-07 02:31:
> Bauke Jan Douma wrote:
>> Does anyone know if and how I can create a pdf or postscript file from
>> source code I'm editing in emacs, which I have syntax highlighted in
>> emacs, and which syntax-highlighting (except for the background color,
>> which in my case is almost black) I would like to preserve in the
>> created pdf/ps file?
>
> does ps-print-buffer-with-faces do what you want?
Actually -- as soon as I had posted the question here, I came
up with another preferable requisite: a html version of the
syntax highligted code.
Wouldn't necessarily have to be the same color-theme as emacs.
I suppose though that's off-topic here. Unless anybody has a
quick suggestion... I see google has some response on this,
I'll have to see if anything is workable.
Regards,
bj
^ permalink raw reply [flat|nested] 15+ messages in thread
* RE: pdf or ps from emacs syntax highlighted source code
2007-05-03 20:40 ` Bauke Jan Douma
@ 2007-05-03 20:44 ` Drew Adams
0 siblings, 0 replies; 15+ messages in thread
From: Drew Adams @ 2007-05-03 20:44 UTC (permalink / raw)
To: bjdouma, Eli Zaretskii, help-gnu-emacs
> a html version of the syntax highligted code.
http://www.emacswiki.org/cgi-bin/wiki/SaveAsHtml
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-03 20:41 ` Bauke Jan Douma
@ 2007-05-04 8:43 ` Kai Grossjohann
2007-05-04 9:33 ` Peter Dyballa
[not found] ` <mailman.219.1178268675.32220.help-gnu-emacs@gnu.org>
1 sibling, 1 reply; 15+ messages in thread
From: Kai Grossjohann @ 2007-05-04 8:43 UTC (permalink / raw)
To: help-gnu-emacs
Bauke Jan Douma <bjdouma@xs4all.nl> writes:
> Actually -- as soon as I had posted the question here, I came
> up with another preferable requisite: a html version of the
> syntax highligted code.
See htmlize.el. Given a buffer, it creates an HTML file that looks
like the buffer, if I understand it correctly.
Kai
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-04 8:43 ` Kai Grossjohann
@ 2007-05-04 9:33 ` Peter Dyballa
0 siblings, 0 replies; 15+ messages in thread
From: Peter Dyballa @ 2007-05-04 9:33 UTC (permalink / raw)
To: Emacs Help [help-gnu-emacs]
Am 04.05.2007 um 10:43 schrieb Kai Grossjohann:
> Bauke Jan Douma <bjdouma@xs4all.nl> writes:
>
>> Actually -- as soon as I had posted the question here, I came
>> up with another preferable requisite: a html version of the
>> syntax highligted code.
>
> See htmlize.el. Given a buffer, it creates an HTML file that looks
> like the buffer, if I understand it correctly.
>
It does it very well. And htmlize'ing a buffer contents seems to be
in GNU Emacs the only way to print (non-basic) non-ASCII and non-ISO
8859-1 characters.
--
Mit friedvollen Grüßen
Pete
Behold the warranty ... the bold print giveth and the fine print
taketh away.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
[not found] ` <mailman.219.1178268675.32220.help-gnu-emacs@gnu.org>
@ 2007-05-04 12:17 ` Hadron
2007-05-04 13:00 ` Lennart Borgman (gmail)
0 siblings, 1 reply; 15+ messages in thread
From: Hadron @ 2007-05-04 12:17 UTC (permalink / raw)
To: help-gnu-emacs
Kai Grossjohann <kai@emptydomain.de> writes:
> Bauke Jan Douma <bjdouma@xs4all.nl> writes:
>
>> Actually -- as soon as I had posted the question here, I came
>> up with another preferable requisite: a html version of the
>> syntax highligted code.
>
> See htmlize.el. Given a buffer, it creates an HTML file that looks
> like the buffer, if I understand it correctly.
Damn. That's twice in one thread where Emacs has blown me away. Just
tried this and it works brilliantly with color-themes.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-04 12:17 ` Hadron
@ 2007-05-04 13:00 ` Lennart Borgman (gmail)
2007-05-04 23:19 ` Bauke Jan Douma
2007-05-05 1:33 ` Alexey Pustyntsev
0 siblings, 2 replies; 15+ messages in thread
From: Lennart Borgman (gmail) @ 2007-05-04 13:00 UTC (permalink / raw)
To: Hadron; +Cc: help-gnu-emacs
Hadron wrote:
> Kai Grossjohann <kai@emptydomain.de> writes:
>
>> Bauke Jan Douma <bjdouma@xs4all.nl> writes:
>>
>>> Actually -- as soon as I had posted the question here, I came
>>> up with another preferable requisite: a html version of the
>>> syntax highligted code.
>> See htmlize.el. Given a buffer, it creates an HTML file that looks
>> like the buffer, if I understand it correctly.
>
> Damn. That's twice in one thread where Emacs has blown me away. Just
> tried this and it works brilliantly with color-themes.
There is one problem with it though. It has happened to me several times
that I have tried to edit the html page, thinking that it is Emacs I see
on the screen.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-04 13:00 ` Lennart Borgman (gmail)
@ 2007-05-04 23:19 ` Bauke Jan Douma
2007-05-05 1:33 ` Alexey Pustyntsev
1 sibling, 0 replies; 15+ messages in thread
From: Bauke Jan Douma @ 2007-05-04 23:19 UTC (permalink / raw)
To: Lennart Borgman (gmail); +Cc: help-gnu-emacs, Hadron
Lennart Borgman (gmail) wrote on 04-05-07 15:00:
> Hadron wrote:
>> Kai Grossjohann <kai@emptydomain.de> writes:
>>
>>> Bauke Jan Douma <bjdouma@xs4all.nl> writes:
>>>
>>>> Actually -- as soon as I had posted the question here, I came
>>>> up with another preferable requisite: a html version of the
>>>> syntax highligted code.
>>> See htmlize.el. Given a buffer, it creates an HTML file that looks
>>> like the buffer, if I understand it correctly.
>>
>> Damn. That's twice in one thread where Emacs has blown me away. Just
>> tried this and it works brilliantly with color-themes.
>
Hey all you guys -- thanks for the tips. It's been great, I tried
htmlfontify and htmlize and both produce excellent output.
I couldn't have imagined this was so easy (though to my surprise
googling for this doesn't bring the emacs solution that readily).
Finding out new features like this on an application that's been under
your fingertips for years makes emacs and its extensionability (phew)
a gem.
> There is one problem with it though. It has happened to me several times
> that I have tried to edit the html page, thinking that it is Emacs I see
> on the screen.
Know what you mean ;-)
Thanks again y'all!
Bauke Jan Douma
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-04 13:00 ` Lennart Borgman (gmail)
2007-05-04 23:19 ` Bauke Jan Douma
@ 2007-05-05 1:33 ` Alexey Pustyntsev
2007-05-05 8:46 ` Peter Dyballa
1 sibling, 1 reply; 15+ messages in thread
From: Alexey Pustyntsev @ 2007-05-05 1:33 UTC (permalink / raw)
To: help-gnu-emacs
"Lennart Borgman (gmail)" <lennart.borgman@gmail.com> writes:
> Hadron wrote:
>> Kai Grossjohann <kai@emptydomain.de> writes:
>>
>>> Bauke Jan Douma <bjdouma@xs4all.nl> writes:
>>>
>>>> Actually -- as soon as I had posted the question here, I came
>>>> up with another preferable requisite: a html version of the
>>>> syntax highligted code.
>>> See htmlize.el. Given a buffer, it creates an HTML file that looks
>>> like the buffer, if I understand it correctly.
>>
>> Damn. That's twice in one thread where Emacs has blown me away. Just
>> tried this and it works brilliantly with color-themes.
>
>
> There is one problem with it though. It has happened to me several
> times that I have tried to edit the html page, thinking that it is
> Emacs I see on the screen.
>
Would you please briefly explain to me (or post a decent link where
it's been clarified) why printing the non-latin characters is said to
be impossible in Emacs without htmlizing the buffer?
BTW, htmlize.el produces RandoMly cApiTaliSed cyRilLic ChaRActerS.
That's really ugly.
--
Rgds
Alexey
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-05 1:33 ` Alexey Pustyntsev
@ 2007-05-05 8:46 ` Peter Dyballa
2007-05-06 2:42 ` Alexey Pustyntsev
0 siblings, 1 reply; 15+ messages in thread
From: Peter Dyballa @ 2007-05-05 8:46 UTC (permalink / raw)
To: Alexey Pustyntsev; +Cc: help-gnu-emacs
Am 05.05.2007 um 03:33 schrieb Alexey Pustyntsev:
> Would you please briefly explain to me (or post a decent link where
> it's been clarified) why printing the non-latin characters is said to
> be impossible in Emacs without htmlizing the buffer?
Citing myself from six weeks ago:
The problem with PostScript is that it usually only supports 8 bit
encodings. So you can't print Unicode. You can try to find a CID
keyed PostScript font and with some effort you can print CJK. No such
font is available for free or public domain. TrueType and OpenType
fonts have better Unicode support. Modern PostScript can use such
TrueType fonts, which are quite often free and acceptable quality.
But I have no idea how to create a mapping from an UTF-8 encoded text
to a Unicode encoded font in PostScript.
Another problem is that GNU Emacs' PS print facility does not support
non-Latin scripts. It actually only supports ISO 8859-1 and it
reports that characters outside this encoding exist in the region or
buffer you want to print.
--
Greetings
Pete
Time is an illusion. Lunchtime, doubly so.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: pdf or ps from emacs syntax highlighted source code
2007-05-05 8:46 ` Peter Dyballa
@ 2007-05-06 2:42 ` Alexey Pustyntsev
0 siblings, 0 replies; 15+ messages in thread
From: Alexey Pustyntsev @ 2007-05-06 2:42 UTC (permalink / raw)
To: help-gnu-emacs
Peter Dyballa <Peter_Dyballa@Web.DE> writes:
> Am 05.05.2007 um 03:33 schrieb Alexey Pustyntsev:
>
>> Would you please briefly explain to me (or post a decent link where
>> it's been clarified) why printing the non-latin characters is said to
>> be impossible in Emacs without htmlizing the buffer?
>
> Citing myself from six weeks ago:
>
> The problem with PostScript is that it usually only supports 8 bit
> encodings. So you can't print Unicode. You can try to find a CID
> keyed PostScript font and with some effort you can print CJK. No such
> font is available for free or public domain. TrueType and OpenType
> fonts have better Unicode support. Modern PostScript can use such
> TrueType fonts, which are quite often free and acceptable quality.
> But I have no idea how to create a mapping from an UTF-8 encoded text
> to a Unicode encoded font in PostScript.
>
> Another problem is that GNU Emacs' PS print facility does not support
> non-Latin scripts. It actually only supports ISO 8859-1 and it
> reports that characters outside this encoding exist in the region or
> buffer you want to print.
>
> --
> Greetings
>
> Pete
Thank you very much, Pete. I understand the problem now.
--
Rgds
Alexey
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2007-05-06 2:42 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.151.1178150118.32220.help-gnu-emacs@gnu.org>
2007-05-03 0:31 ` pdf or ps from emacs syntax highlighted source code Joost Kremers
2007-05-03 20:41 ` Bauke Jan Douma
2007-05-04 8:43 ` Kai Grossjohann
2007-05-04 9:33 ` Peter Dyballa
[not found] ` <mailman.219.1178268675.32220.help-gnu-emacs@gnu.org>
2007-05-04 12:17 ` Hadron
2007-05-04 13:00 ` Lennart Borgman (gmail)
2007-05-04 23:19 ` Bauke Jan Douma
2007-05-05 1:33 ` Alexey Pustyntsev
2007-05-05 8:46 ` Peter Dyballa
2007-05-06 2:42 ` Alexey Pustyntsev
2007-05-02 23:48 Bauke Jan Douma
2007-05-03 3:11 ` Eli Zaretskii
2007-05-03 20:40 ` Bauke Jan Douma
2007-05-03 20:44 ` Drew Adams
[not found] ` <mailman.153.1178162282.32220.help-gnu-emacs@gnu.org>
2007-05-03 10:13 ` Hadron
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.