groff
[Top][All Lists]
Advanced

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

Re: Usage of .PSPIC inside tbl


From: Ingo Schwarze
Subject: Re: Usage of .PSPIC inside tbl
Date: Thu, 26 Nov 2020 13:16:48 +0100
User-agent: Mutt/1.12.2 (2019-09-21)

Hi Oliver,

Oliver Corff wrote on Thu, Nov 26, 2020 at 11:44:02AM +0100:

> Here is another, and I'm afraid to confess, newbie question:
> 
> I try to use .PSPIC inside a table.
> 
> Saying
> 
> .PSPIC mypic.ps
> 
> in a file compiled with the ms macros works perfectly as expected, but
> putting the same command in a table cell like
> 
> .TS
> tab(@);
> l c l.
> A cell @.PSPIC mypic.ps @Another cell

Macros need to be at the beginning of logical input lines.

> .TE
> 
> only shows ".PSPIC mypic.ps" as center cell, not the desired image.

That is expected because ".PSPIC" is not a macro but plain text
in your example.

> I am quite sure there is a logical flaw in my setup akin to using eqn
> inside tables which requires a certain processing order in the pipeline.

The following minimal example works for me:

   $ cat tmp.roff                                                 
  initial text
  .TS
  allbox tab(@);
  l lw(2i) l.
  1@2@3
  4@T{
  .PSPIC -L build/gnu.eps
  T}@6
  7@8@9
  .TE
  final text

   $ groff -t tmp.roff > tmp.ps
   $ gv tmp.ps

   $ man 7 tbl
  In place of any data cell, a text block can be used.  It starts with T{
  at the end of a physical input line.  Input line breaks inside the text
  block neither end the text block nor its data cell.  It only ends if T}
  occurs at the beginning of a physical input line and is followed by an
  end-of-cell indicator. 
  [...]

   $ man 1 tbl
  A text block can be used to enter data as a single entry which would be
  too long as a simple string between tabs.  It is started with 'T{' and
  closed with 'T}'.  The former must end a line, and the latter must
  start a line, probably followed by other data columns (separated with
  tabs or the character given with the tab global option).
  [...]

Yours,
  Ingo



reply via email to

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