* Basic WYSIWYG printing in GNU Emacs
@ 2021-06-12 3:46 Anand Tamariya
2021-06-12 4:07 ` Jean Louis
0 siblings, 1 reply; 10+ messages in thread
From: Anand Tamariya @ 2021-06-12 3:46 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 443 bytes --]
Here's an attempt to do some basic WYSIWYG printing in GNU Emacs. Sharing
the results of my initial attempt. Use it as you see fit.
-
Run M-x ps-print-buffer-with-faces to send output to printer.
-
Run C-u M-x ps-print-buffer-with-faces to send output to file (PS
format).
*Code:* https://gitlab.com/atamariya/emacs/tree/dev
*Screenshot:*
https://lifeofpenguin.blogspot.com/2021/06/basic-wysiwyg-printing-in-gnu-emacs.html
[-- Attachment #2: Type: text/html, Size: 1268 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-12 3:46 Basic WYSIWYG printing in GNU Emacs Anand Tamariya
@ 2021-06-12 4:07 ` Jean Louis
2021-06-13 5:32 ` Anand Tamariya
0 siblings, 1 reply; 10+ messages in thread
From: Jean Louis @ 2021-06-12 4:07 UTC (permalink / raw)
To: Anand Tamariya; +Cc: emacs-devel
* Anand Tamariya <atamariya@gmail.com> [2021-06-12 06:47]:
> Here's an attempt to do some basic WYSIWYG printing in GNU Emacs. Sharing
> the results of my initial attempt. Use it as you see fit.
>
> -
>
> Run M-x ps-print-buffer-with-faces to send output to printer.
> -
>
> Run C-u M-x ps-print-buffer-with-faces to send output to file (PS
> format).
>
> *Code:* https://gitlab.com/atamariya/emacs/tree/dev
>
> *Screenshot:*
> https://lifeofpenguin.blogspot.com/2021/06/basic-wysiwyg-printing-in-gnu-emacs.html
Does it support characters like čšžđ for some Eastern European
languages?
The code seem to be full Emacs distribution, do you have isolated
code?
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-12 4:07 ` Jean Louis
@ 2021-06-13 5:32 ` Anand Tamariya
2021-06-13 8:01 ` Dov Grobgeld
0 siblings, 1 reply; 10+ messages in thread
From: Anand Tamariya @ 2021-06-13 5:32 UTC (permalink / raw)
To: Anand Tamariya, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 280 bytes --]
> Does it support characters like čšžđ for some Eastern European
> languages?
>
Right now it only supports ASCII.
The code seem to be full Emacs distribution, do you have isolated
> code?
>
The relevant files are:
etc/ps-prin1.ps
lisp/ps-mule.el
lisp/ps-print.el
[-- Attachment #2: Type: text/html, Size: 725 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 5:32 ` Anand Tamariya
@ 2021-06-13 8:01 ` Dov Grobgeld
2021-06-13 9:43 ` Jean Louis
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Dov Grobgeld @ 2021-06-13 8:01 UTC (permalink / raw)
To: Anand Tamariya; +Cc: emacs-devel
I think you would get much better international support if you combine
the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
See: https://github.com/dov/paps . paps support "Pango Markup" so if
you convert emacs faces to pango markup, you can multi face and color
output.
Thinking about it since emacs is gtk based these days, it has pango
and cairo as implicit dependencies, so if these libraries were exposed
through the emacs lisp api, it would be possible to write a
replacement for paps in emacs. :-)
Regards,
On Sun, Jun 13, 2021 at 8:33 AM Anand Tamariya <atamariya@gmail.com> wrote:
>
>
>> Does it support characters like čšžđ for some Eastern European
>> languages?
>
> Right now it only supports ASCII.
>
>> The code seem to be full Emacs distribution, do you have isolated
>> code?
>
> The relevant files are:
> etc/ps-prin1.ps
> lisp/ps-mule.el
> lisp/ps-print.el
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 8:01 ` Dov Grobgeld
@ 2021-06-13 9:43 ` Jean Louis
2021-06-13 10:30 ` Basil L. Contovounesios
2021-06-13 10:18 ` Jean Louis
2021-06-13 11:07 ` Jean Louis
2 siblings, 1 reply; 10+ messages in thread
From: Jean Louis @ 2021-06-13 9:43 UTC (permalink / raw)
To: Dov Grobgeld; +Cc: emacs-devel, Anand Tamariya
* Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
> I think you would get much better international support if you combine
> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
> See: https://github.com/dov/paps . paps support "Pango Markup" so if
> you convert emacs faces to pango markup, you can multi face and color
> output.
>
> Thinking about it since emacs is gtk based these days, it has pango
> and cairo as implicit dependencies, so if these libraries were exposed
> through the emacs lisp api, it would be possible to write a
> replacement for paps in emacs. :-)
Such good idea.
I would like proper printing in Emacs, I guess that I have to research
the function `ps-mule-begin-job' to see how it converts faces to PS
first, to convert it to pango markup.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 9:43 ` Jean Louis
@ 2021-06-13 10:30 ` Basil L. Contovounesios
2021-06-13 11:04 ` Jean Louis
0 siblings, 1 reply; 10+ messages in thread
From: Basil L. Contovounesios @ 2021-06-13 10:30 UTC (permalink / raw)
To: Dov Grobgeld; +Cc: emacs-devel, Anand Tamariya
Jean Louis <bugs@gnu.support> writes:
> * Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
>> I think you would get much better international support if you combine
>> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
>> See: https://github.com/dov/paps . paps support "Pango Markup" so if
>> you convert emacs faces to pango markup, you can multi face and color
>> output.
>>
>> Thinking about it since emacs is gtk based these days, it has pango
>> and cairo as implicit dependencies, so if these libraries were exposed
>> through the emacs lisp api, it would be possible to write a
>> replacement for paps in emacs. :-)
>
> Such good idea.
>
> I would like proper printing in Emacs, I guess that I have to research
> the function `ps-mule-begin-job' to see how it converts faces to PS
> first, to convert it to pango markup.
FWIW, when Emacs is built against an appropriately configured Cairo, the
function x-export-frames can export visible Emacs frames (not just the
buffer contents) to PDF, PS, PNG, or SVG.
--
Basil
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 10:30 ` Basil L. Contovounesios
@ 2021-06-13 11:04 ` Jean Louis
0 siblings, 0 replies; 10+ messages in thread
From: Jean Louis @ 2021-06-13 11:04 UTC (permalink / raw)
To: Basil L. Contovounesios; +Cc: Dov Grobgeld, Anand Tamariya, emacs-devel
* Basil L. Contovounesios <contovob@tcd.ie> [2021-06-13 13:31]:
> Jean Louis <bugs@gnu.support> writes:
>
> > * Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
> >> I think you would get much better international support if you combine
> >> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
> >> See: https://github.com/dov/paps . paps support "Pango Markup" so if
> >> you convert emacs faces to pango markup, you can multi face and color
> >> output.
> >>
> >> Thinking about it since emacs is gtk based these days, it has pango
> >> and cairo as implicit dependencies, so if these libraries were exposed
> >> through the emacs lisp api, it would be possible to write a
> >> replacement for paps in emacs. :-)
> >
> > Such good idea.
> >
> > I would like proper printing in Emacs, I guess that I have to research
> > the function `ps-mule-begin-job' to see how it converts faces to PS
> > first, to convert it to pango markup.
>
> FWIW, when Emacs is built against an appropriately configured Cairo, the
> function x-export-frames can export visible Emacs frames (not just the
> buffer contents) to PDF, PS, PNG, or SVG.
Nice function and useful for screenshots.
Just that it is not related to printing buffer text. It shows only the
frame as image.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 8:01 ` Dov Grobgeld
2021-06-13 9:43 ` Jean Louis
@ 2021-06-13 10:18 ` Jean Louis
2021-06-16 13:35 ` Filipp Gunbin
2021-06-13 11:07 ` Jean Louis
2 siblings, 1 reply; 10+ messages in thread
From: Jean Louis @ 2021-06-13 10:18 UTC (permalink / raw)
To: Dov Grobgeld; +Cc: emacs-devel, Anand Tamariya
* Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
> I think you would get much better international support if you combine
> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
> See: https://github.com/dov/paps . paps support "Pango Markup" so if
> you convert emacs faces to pango markup, you can multi face and color
> output.
>
> Thinking about it since emacs is gtk based these days, it has pango
> and cairo as implicit dependencies, so if these libraries were exposed
> through the emacs lisp api, it would be possible to write a
> replacement for paps in emacs. :-)
Package `htmlize' converts buffer properties to HTML, maybe that is
right package to start converting to pandoc markup.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 10:18 ` Jean Louis
@ 2021-06-16 13:35 ` Filipp Gunbin
0 siblings, 0 replies; 10+ messages in thread
From: Filipp Gunbin @ 2021-06-16 13:35 UTC (permalink / raw)
To: emacs-devel; +Cc: Dov Grobgeld, Anand Tamariya
On 13/06/2021 13:18 +0300, Jean Louis wrote:
> * Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
>> I think you would get much better international support if you combine
>> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
>> See: https://github.com/dov/paps . paps support "Pango Markup" so if
>> you convert emacs faces to pango markup, you can multi face and color
>> output.
>>
>> Thinking about it since emacs is gtk based these days, it has pango
>> and cairo as implicit dependencies, so if these libraries were exposed
>> through the emacs lisp api, it would be possible to write a
>> replacement for paps in emacs. :-)
>
> Package `htmlize' converts buffer properties to HTML, maybe that is
> right package to start converting to pandoc markup.
There's also htmlfontify.el in core.
Filipp
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Basic WYSIWYG printing in GNU Emacs
2021-06-13 8:01 ` Dov Grobgeld
2021-06-13 9:43 ` Jean Louis
2021-06-13 10:18 ` Jean Louis
@ 2021-06-13 11:07 ` Jean Louis
2 siblings, 0 replies; 10+ messages in thread
From: Jean Louis @ 2021-06-13 11:07 UTC (permalink / raw)
To: Dov Grobgeld; +Cc: emacs-devel, Anand Tamariya
* Dov Grobgeld <dov.grobgeld@gmail.com> [2021-06-13 11:02]:
> I think you would get much better international support if you combine
> the emacs printing with my utf8-to-ps (or pdf or svg) program paps.
> See: https://github.com/dov/paps . paps support "Pango Markup" so if
> you convert emacs faces to pango markup, you can multi face and color
> output.
>
> Thinking about it since emacs is gtk based these days, it has pango
> and cairo as implicit dependencies, so if these libraries were exposed
> through the emacs lisp api, it would be possible to write a
> replacement for paps in emacs. :-)
I have asked Hrvoje, author of htmlize.el package, maybe he can help
doing this.
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-06-16 13:35 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-06-12 3:46 Basic WYSIWYG printing in GNU Emacs Anand Tamariya
2021-06-12 4:07 ` Jean Louis
2021-06-13 5:32 ` Anand Tamariya
2021-06-13 8:01 ` Dov Grobgeld
2021-06-13 9:43 ` Jean Louis
2021-06-13 10:30 ` Basil L. Contovounesios
2021-06-13 11:04 ` Jean Louis
2021-06-13 10:18 ` Jean Louis
2021-06-16 13:35 ` Filipp Gunbin
2021-06-13 11:07 ` Jean Louis
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.