groff
[Top][All Lists]
Advanced

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

Re: [Groff] how to use .GETST in a figure caption?


From: Anton Shterenlikht
Subject: Re: [Groff] how to use .GETST in a figure caption?
Date: Wed, 22 Aug 2012 15:39:01 +0100 (BST)

        From address@hidden Wed Aug 22 12:47:07 2012

        > I  want to reference some figure in the caption of
        > another figure.

        Also, you can use the second argument to  .GETST  to
        save the reference into a string and use that in the
        caption.

Thanks, this works:

.DS CB
.PSPIC rep-cold-mises-mesh.ps 6.0
.ds caption "Mises stress in the 0.3 mm notch model\"
.as caption " at \*[cold]\"
.as caption " at \*[ep02]\"
.as caption " at the notch root.\"
.as caption " The fine grain material is at the top,\"
.as caption " and the coarse grain material is at the\"
.as caption " bottom. The discontinuity of stress at\"
.as caption " the boundary is cleary visible.\"
.FG "\*[caption]" "" 0 fig:cold-mises-mesh
.SETR fig:cold-mises-mesh
.DE

.DS CB
.PSPIC rep-cold-mises-nomesh.ps 6.0
.ds caption "Same as Fig.\"
.as caption " .GETST fig:cold-mises-mesh,\"
.as caption " but with mesh not shown for clarity.\"
.FG "\*[caption]" "" 0 fig:cold-mises-nomesh
.SETR fig:cold-mises-nomesh
.DE

Now the number of the first figure is included
in the caption of the second figure.

The only problem is that the strings cannot be used
before they are defined. So if a reference has to
be made from the beginning of the document to a
figure (or table) at the end, then GETST must be
moved to a place earlier than the first use of the
string.

Many thanks

Anton



reply via email to

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