* horoffset + itemize + positiongraphics = misaligned graphics
@ 2005-07-15 20:30 Stuart Jansen
2005-07-17 21:39 ` Hans Hagen
0 siblings, 1 reply; 3+ messages in thread
From: Stuart Jansen @ 2005-07-15 20:30 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 1339 bytes --]
I'm working on a rather complex document containing frequent use of
positional graphics. Unfortunately, I've discovered what I expect will
be a pretty nasty problem to fix. When I combine horoffset,
startitemize, & positiongraphics the graphics are placed in the wrong
spot. I've managed to cook up the simple test case below which
demonstrates the problem.
===============
\setuplayout[ horoffset=.5cm ]
\setuppagenumbering[alternative=doublesided]
\setupcolors[state=start]
\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
\setupbackgrounds[page][background=backgraphics]
\newcounter\CurrentCallout
\startMPpositiongraphic{mypos:line}
path p ; initialize_box(\MPpos{\MPvar{from}}) ;
p := lrxy..urxy..ulxy..cycle ;
p := center p shifted (-.5cm,0mm) -- center p ;
pickup pencircle scaled 2pt ;
drawarrow p withcolor red ;
anchor_box(\MPanchor{\MPvar{from}}) ;
\stopMPpositiongraphic
\def\myitem%
{\doglobal\increment\CurrentCallout\item
\hpos{myitem:b:\CurrentCallout}{\strut}
\startpositionoverlay{backgraphics}
\setMPpositiongraphic{myitem:b:\CurrentCallout}{mypos:line}
\stoppositionoverlay}
\starttext
\startitemize[n,serried]
\dorecurse{30}{\myitem\input tufte }
\stopitemize
\stoptext
===============
--
Stuart Jansen <sjansen@gurulabs.com>
Guru Labs, L.C.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: horoffset + itemize + positiongraphics = misaligned graphics
2005-07-15 20:30 horoffset + itemize + positiongraphics = misaligned graphics Stuart Jansen
@ 2005-07-17 21:39 ` Hans Hagen
2005-07-18 18:35 ` Stuart Jansen
0 siblings, 1 reply; 3+ messages in thread
From: Hans Hagen @ 2005-07-17 21:39 UTC (permalink / raw)
Stuart Jansen wrote:
>I'm working on a rather complex document containing frequent use of
>positional graphics. Unfortunately, I've discovered what I expect will
>be a pretty nasty problem to fix. When I combine horoffset,
>startitemize, & positiongraphics the graphics are placed in the wrong
>spot. I've managed to cook up the simple test case below which
>demonstrates the problem.
>
>===============
>\setuplayout[ horoffset=.5cm ]
>\setuppagenumbering[alternative=doublesided]
>\setupcolors[state=start]
>
>\defineoverlay [backgraphics] [\positionoverlay{backgraphics}]
>\setupbackgrounds[page][background=backgraphics]
>\newcounter\CurrentCallout
>\startMPpositiongraphic{mypos:line}
> path p ; initialize_box(\MPpos{\MPvar{from}}) ;
> p := lrxy..urxy..ulxy..cycle ;
> p := center p shifted (-.5cm,0mm) -- center p ;
> pickup pencircle scaled 2pt ;
> drawarrow p withcolor red ;
> anchor_box(\MPanchor{\MPvar{from}}) ;
>\stopMPpositiongraphic
>\def\myitem%
>{\doglobal\increment\CurrentCallout\item
> \hpos{myitem:b:\CurrentCallout}{\strut}
> \startpositionoverlay{backgraphics}
> \setMPpositiongraphic{myitem:b:\CurrentCallout}{mypos:line}
> \stoppositionoverlay}
>
>\starttext
>\startitemize[n,serried]
>\dorecurse{30}{\myitem\input tufte }
>\stopitemize
>\stoptext
>
>
where do you assign a value to "from"?
what effect do you want to achieve?
Hans
--
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: horoffset + itemize + positiongraphics = misaligned graphics
2005-07-17 21:39 ` Hans Hagen
@ 2005-07-18 18:35 ` Stuart Jansen
0 siblings, 0 replies; 3+ messages in thread
From: Stuart Jansen @ 2005-07-18 18:35 UTC (permalink / raw)
[-- Attachment #1.1: Type: text/plain, Size: 985 bytes --]
On Sun, 2005-07-17 at 23:39 +0200, Hans Hagen wrote:
> >I'm working on a rather complex document containing frequent use of
> >positional graphics. Unfortunately, I've discovered what I expect will
> >be a pretty nasty problem to fix. When I combine horoffset,
> >startitemize, & positiongraphics the graphics are placed in the wrong
> >spot. I've managed to cook up the simple test case below which
> >demonstrates the problem.
> where do you assign a value to "from"?
My impression from the metafun manual is that is it is set by
\setMPpositiongraphic . Replacing "from" with "self" produces the same
result. The use of "from" was a side effect of me trimming a more
complex document down to a simple, isolated example.
> what effect do you want to achieve?
I want to draw attention to certain lines/paragraphs. I can use several
work arounds, but I wanted to report the bug with a good test case.
--
Stuart Jansen <sjansen@gurulabs.com>
Guru Labs, L.C.
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
[-- Attachment #2: Type: text/plain, Size: 139 bytes --]
_______________________________________________
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-18 18:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-15 20:30 horoffset + itemize + positiongraphics = misaligned graphics Stuart Jansen
2005-07-17 21:39 ` Hans Hagen
2005-07-18 18:35 ` Stuart Jansen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).