Quantcast

Howto print the file containing CJK characters?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Howto print the file containing CJK characters?

Manifolds
I find the MacVim can't print the CJK character correctly after
pressing cmd+P.  I don't know which file should be modified to work
correctly.
Can MacVim  print the line number and change the font size ?

My OS is lion 10.7.4

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Howto print the file containing CJK characters?

Tony Mechelynck
On 23/05/12 05:01, Manifolds wrote:
> I find the MacVim can't print the CJK character correctly after
> pressing cmd+P.  I don't know which file should be modified to work
> correctly.
> Can MacVim  print the line number and change the font size ?
>
> My OS is lion 10.7.4
>


It is not obvious to make Vim talk with your printer in anything other
than Latin1; I haven't succeeded it.

What I do when I want to print a file containing arbitrary Unicode
codepoints is: load it in a browser and print from there.


Best regards,
Tony.
--
Living in Hollywood is like living in a bowl of granola.  What ain't
fruits and nuts is flakes.

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
BPJ
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Howto print the file containing CJK characters?

BPJ
In reply to this post by Manifolds
On 2012-05-23 05:01, Manifolds wrote:
> I find the MacVim can't print the CJK character correctly after
> pressing cmd+P.  I don't know which file should be modified to work
> correctly.
> Can MacVim  print the line number and change the font size ?
>
> My OS is lion 10.7.4
>

paps is your friend, more exactly paps|lpr

You can do

      paps file.txt | lpr

but I don't really like all the paps defaults so I've
written a wrapper around paps|lpr or paps|ps2pdf which
by default adds a wider left margin, always prints page
headers (to get page numbers), sets a smaller font size
and lets you set font name and font size independently
of each other. It also has an option to pipe paps output
to ps2pdf instead of lpr and create sensible PDF file
names while doing so, an option to pipe paps output to
yet something else, and options to pass raw paps options
or lpr/ps2pdf/whatever options.

Last but not least it has an option to prepend line
numbers to the input, which paps can't do by itself.

It's attached.  You can set your own defaults near the top,
and read help for the options with perl printme.pl --help


/bpj

--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

printme.pl (6K) Download Attachment
Loading...