On Tue, Oct 23, 2007 at 10:32:28PM +0200, Bernd Zeimetz wrote:
> after reading through the dvi specs and several pages of information
> about the dvi special commands I came to the conclusion that 'sh 1' and
> 'ip' must be the result of groff not converting .SH and .IP correctly.
> Reassigning the package therefore.

You are mistaken; from the file attached to the bug report, 'sh 1' and
'ip' appear in the rendering of a pic table. They have nothing to do
with the .SH and .IP man macros.

The pieces of code in question in groff are these, from
src/devices/grodvi/dvi.cc:

void draw_dvi_printer::fill_next(const environment *env)
{
  unsigned int g;
  if (env->fill->is_default())
    g = 0;
  else {
    // currently, only BW support
    env->fill->get_gray(&g);
  }
  char buf[256];
  sprintf(buf, "sh %.3g", 1 - double(g)/color::MAX_COLOR_VAL);
  do_special(buf);
}

... and:

  case 'p':
    {
      if (np & 1) {
        error("even number of arguments required for polygon");
        break;
      }
      if (np == 0) {
        error("no arguments for polygon");
        break;
      }
      moveto(env->hpos, env->vpos);
      if (fill_flag)
        fill_next(env);
      else
        set_line_thickness(env);
      do_special("pa 0 0");
      int h = 0, v = 0;
      for (int i = 0; i < np; i += 2) {
        h += p[i];
        v += p[i+1];
        sprintf(buf, "pa %d %d", milliinches(h), milliinches(v));
        do_special(buf);
      }
      do_special("pa 0 0");
      do_special(fill_flag ? "ip" : "fp");
      break;
    }

Do you still think that this is a groff bug? If so, bearing in mind that
I don't know a whole lot about DVI, I'd like to know more about why.

-- 
Colin Watson                                       [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to