[Rd] Re: [R] /minus or /hyphen in PS output

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Mon 09 Aug 2004 - 20:58:04 EST

  1. You used the wrong list. Please see the posting guide.
  2. They used /minus because they wanted minus not hyphen. R uses Latin1 and not standard encoding, and /minus is in Latin1. I think the fonts you are using are not Latin1 fonts, as all the afms supplied with R support /minus.

If you look at the output with your patch, it uses hyphen for negative numbers, extremely poor typography (the sort of thing that you get from Word!).

3) // is invalid in C code, and your patch will not compile on some systems which R supports.

There is perhaps a way around fonts which are missing /minus, but we want /minus if available. Perhaps you would like to work on a more careful analysis and patch? One that does not break standard usage?

On Tue, 10 Aug 2004, M.Kondrin wrote:

> Dear R devolepers!
> Wouldn't you change src/main/devPS.c file (patch will follow). Problem
> is with minus sign in ps output. The original code forces the name
> /minus to the character number 45 (-). But /minus symbol is not defined
> in standard Adobe encoding and (even worse) is not defined in most type1
> fonts (where the name /hyphen is used instead), in this case you will
> have an empty space instead of -. Redefining encoding for this fonts
> does not help because encoding vector in ps output got "corrected" and
> /hyphen (or any other name I have selected for 45'th character) is
> replaced with /minus. I have tried this patch and it works for me.
> ------------------------------------------------
> 449,450c449
> < // if(c == 45) strcpy(dest, "/minus"); else
> < strcpy(dest, state->p0);
> ---
> > if(c == 45) strcpy(dest, "/minus"); else strcpy(dest, state->p0);
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

R-devel@stat.math.ethz.ch mailing list
Received on Mon Aug 09 21:14:28 2004

This archive was generated by hypermail 2.1.8 : Fri 18 Mar 2005 - 08:59:17 EST