emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs as a word processor (ways to convert Word/RTF proprietary file


From: Jean Louis
Subject: Re: Emacs as a word processor (ways to convert Word/RTF proprietary files)
Date: Mon, 28 Dec 2020 10:26:49 +0300
User-agent: Mutt/2.0 (3d08634) (2020-11-07)

* Tomas Hlavaty <tom@logand.com> [2020-12-28 00:28]:
> So far I have similar limitations in emacs-pdf but I would like to
> improve that.

I will look into that software, I have these emails flagged as
important. 

> > Yes, I said that it would be good to have the formula that makes
> > it. The only reason to use Emacs ps-print-buffer-with-faces would be
> > to print those enriched-mode notes that I have.
> 
> When I tried enriched-mode I did not figure out how to use it.

You can open any file and M-x enriched-mode, and then you may use menu
Edit -> Text Properties to make background or foreground of letters,
bold, italic, etc.

When I mark it up as italic sadly I do not see italic on screen, that
may need some set up of fonts, I cannot know. Bold italic I also do
not see. And I use these keys below to quickly change those formats. 

(defvar hyperscope-enriched-mode-map
  (let ((map (make-sparse-keymap)))
    (set-keymap-parent map enriched-mode-map)
    (define-key map (kbd "s-b") 'facemenu-set-bold)
    (define-key map (kbd "s-d") 'facemenu-set-default)
    (define-key map (kbd "s-i") 'facemenu-set-italic)
    (define-key map (kbd "s-j") 'facemenu-set-bold-italic)
    (define-key map (kbd "s-u") 'facemenu-set-underline)
    (define-key map (kbd "s-r") 'facemenu-set-background)
    (define-key map (kbd "s-f") 'facemenu-set-foreground)
    map)
  "The Hyperscope enriched keymap")

You can also save the file and next time it is opened it will be
marked up with your formats, like bold, italic, foreground and
background colors.

> If I implemented pdf-buffer-with-faces what kind of formatting stuff
> would you find important?

What is necessary is what is in the Edit -> Text properties. Also note
that there can be some invisible Lisp in enriched mode, and I wish to
come to that, but if anything is invisible it should not be shown on
paper in my opinion.

Emacs has already good printing solution. And I get easily PDF
files. Now how would your solution be useful?

I am using below function, so I already get the PDF converted there
that remains in the directory and it also shows it in front of my
face.

#!/bin/bash
tmpdir=/home/data1/protected/tmp/muttprint/
mkdir -p $tmpdir
cd $tmpdir
file=$tmpdir/$(date +'%F-%T-%A')
#highlight --syntax=lisp --page-color -O pango | paps --markup 
--font="Monospace 11" > $file.ps
cat > $file.ps
#gv $file.ps
# paps --font="DejaVu Sans Mono 11" > $file.ps
ps2pdf14 $file.ps
exec zathura $file.pdf 2> /dev/null &

But printing with faces has some errors if one mixes colors with bold
letters, it will not come out same in the ps/pdf files. When I find
out more about errors I will report.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]