groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] <OK> Integrating Figures and text ?


From: Mike Bianchi
Subject: Re: [Groff] <OK> Integrating Figures and text ?
Date: Wed, 29 May 2013 11:51:55 -0400
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

John,

Look at  man grops ;  inparticular the reference to  PSPIC .

      The -mps macros (which are automatically loaded  when  grops  is
      run  by  the groff command) include a PSPIC macro which allows a
      picture to be easily imported.  This has the format

             .PSPIC [-L|-R|-I n] file [width [height]]

      file is the name of the file containing the illustration;  width
      and  height  give  the  desired width and height of the graphic.
      The width and  height  arguments  may  have  scaling  indicators
      attached;  the  default scaling indicator is i.  This macro will
      scale the graphic uniformly in the x and y directions so that it
      is  no  more  than  width wide and height high.  By default, the
      graphic will be horizontally centered.  The -L and -R cause  the
      graphic  to be left-aligned and right-aligned respectively.  The
      -I option causes the graphic to be indented by n.

I use it with the .DS/.DE display macros of the -mm  memorandum macros
to include encapsulated postscript (EPS) images in my documents.
E.g.
        .DS
        .PSPIC  fig/Chalkboard_mic_schematic.eps  5i
        .FG "Ideal Positions of Contact Microphones
        .DE


                                                                Mike

On Wed, May 29, 2013 at 08:33:20AM -0700, John W. Smay wrote:
> This is a problem I have had for years and hope maybe someone, or
> everyone but me, has a simple solution.  I write technical text and
> equations with groff, then save as .ps (PostScript) and translate to
> .pdf (Acrobat).   I parallel I generate figures, mostly complex line
> drawings or technical plots (not photographs or "art") that are
> illustrations to accompany the groff text.  The figures are made with
> other applications such as Canvas, fortran code, of c code. but all
> (most) can be in either .ps, .eps. or .pdf format.
>
> So in the end I have a file with groff generated code in .ps or
> .pdf, and a separate file with the illustration in the same format.
> The groff file is a page with text at the top, a blank portion for the
> illustration, and more text at the bottom.  The problem is to combine
> the two files into a single .ps or better .pdf that presents text and
> figure on the same page.   There must be a command sequence to be
> embedded in the groff source that will import the file with the
> illustration in a satisfactory fashion.
>
> I have tried more alternate approaches than I cam remember, e.g..
> importing both the groff .ps or .pdf and the illustration into Canvas
> or Word, editing onto a single page, then resaving the result, but
> every attempt is flawed in some way!  Bolds disappear, subscripts get
> misplaced or resized or countless other flaws.
>
> Thanks in advance, John
>
> John W. Smay
> email: address@hidden
> web site: http://home.earthlink.net/~jwsmay/prof.html

--
 Mike Bianchi
 Foveal Systems

 973 822-2085

 address@hidden
 http://www.AutoAuditorium.com
 http://www.FovealMounts.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]