groff
[Top][All Lists]
Advanced

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

Re: [Groff] Help with crop marks code


From: hohe72
Subject: Re: [Groff] Help with crop marks code
Date: Sat, 30 Nov 2013 08:12:09 +0100

Hi, a simple drawing might be:

\\h'|-\\n(.ou+0.3c'\\v'|09.2c'\\D'l 0.6c 0'\
\\h'|\\n(.lu+\\n(.ou-1c'\\D'l 0.6c 0'

This is drawing two lines:
\D'l <relative_x><unit> <relative_y><unit>'
at the end, and temporary moves, where to start drawing:
\v'|<abs_vert_pos><unit>'\h'<abs_hor_pos><unit>'

Units are necessary due to default interpretations by groff, "|" makes
positions absolute and positions will be reverted, after line break,
performed by the typesetter. Groff is line oriented. Vertical position
have an offset. Guessing the offset is the distance to the baseline,
where drawning allways starts.

In drawing a box (polygon), I usually end where started:
\D'p  \n[DIM-wid]u           0u   \
                0u  \n[DIM-ht]u   \
     -\n[DIM-wid]u           0u   \
                0u -\n[DIM-ht]u'

This is he same as to use \Z'' dropping the last two values in \D''.

Found the colors?

--hh


Walter Alejandro Iglesias <address@hidden> wrote (Thu, 28 Nov 2013
16:08:15 +0100):
> On Thu, Nov 28, 2013 at 02:46:52PM +0100, Steffen Daode Nurpmeso
> wrote:
> > The foldmark painter itself.
> > All it effectively does is to move absolutely and paint two
> > horizontal lines at precalculated positions; using different
> > absolute .sp in combination with several \D''s should do what you
> > desire?
> 
> I should have said it before, my knowledge with Groff is limited to
> some simple macros I've wrote based on what I read in the gnu.org
> manuals.
> 
> I will read carefully and try what you sent me.  But at a first sight
> what is new for me are the \D or \Z calls (used too by Ted H. in the
> link I posted). Now I realize that those \D, \Z calls are some Groff
> basic drawing feature, and are documented here:
> 
> https://www.gnu.org/software/groff/manual/html_node/Drawing-Requests.html
> 
> Now I have where to start :).
> 
> 
> Many thanks Steffen for your help.
> 
> 
>       Walter
> 
> 
> 




reply via email to

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