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

2578Re: Printing Chinese

Expand Messages
  • Tony Mechelynck
    Dec 23, 2008
      On 23/12/08 22:37, Agathoklis D. Hatzimanikas wrote:
      > 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.' -'
      > endfunction
      > 1. http://paps.sourceforge.net/
      > * configure, make, make install
      > Regards,
      > Ag.

      Hm, what is the expected result? And no, AFAICT, SuSE doesn't distribute
      paps (at least, searching the 11.1 repositories for it with settings
      "Name" "Summary" and "RPM Provides", "contains", and "not
      case-sensitive" yields no results). As for compiling from source, I'm
      doing it for Vim but that's an exception. Other packages I get
      pre-compiled from SuSE or, in the case of Firefox, Thunderbird,
      SeaMonkey and Sunbird, from Mozilla.

      The rare times that I need non-Latin glyphs (as in a paper recently, in
      French with one four-letter Hebrew word in it), printing with SeaMonkey
      is perfectly acceptable to me anyway, until or unless I can make Vim do
      it without help. It also takes care (as in this case) of RTL words in an
      LTR sentence, which Vim cannot show properly on the screen (and I don't
      know what would happen when printing).

      Best regards,
      "For three days after death hair and fingernails continue to grow but
      phone calls taper off."
      -- Johnny Carson

      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