Loading ...
Sorry, an error occurred while loading the content.

2575Re: Printing Chinese

Expand Messages
  • Agathoklis D. Hatzimanikas
    Dec 23, 2008
    • 0 Attachment
      On Tue, Dec 23, at 10:18 Tony Mechelynck wrote:
      > I suppose if you don't try to set all those options, but just use
      > ":hardcopy", you don't get the expected results?
      > Personally I'm on Linux (i.e., on the other side of the fence) but I
      > haven't found out how to print Unicode from Vim. When I need "special"
      > characters which aren't in the Latin1 range, I save the file to disk and
      > print it using my browser.

      Hi Tony,

      Would you mind to test the following function, and see if you get the
      expected result? You will need paps[1], which should be available from
      your favorite distribution, if not, it's just a simple (CMMI)* package
      that requires pango (possible you will need the dev package for pango).

      function! system#print(...) range
      let font = (exists("a:1") && !empty(a:1)) ? "Monospace ".a:1 : "Monospace 14"
      let printer = split(readfile('/etc/printcap')[-1], "|")[0]
      execute a:firstline.','.a:lastline.'write ++enc=utf-8 !paps --font='.font.
      \ '|ps2pdf -sPAPERSIZE=a4 -dOptimize=true -
      \ | lp -d '.printer.' -'

      1. http://paps.sourceforge.net/
      * configure, make, make install


      You received this message from the "vim_multibyte" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Show all 7 messages in this topic