Absolute positioning of graphics on the page
Is this possible without using layers? IOW, it there some kind of command that allows: \somecommand[some setups]{content} where the setups specify where the content should be positioned, and towards where it should extend? (e.g., positioned in the top right corner, extending to the bottom left) This can be achieved via layers, but is it possible without? -- Giuseppe "Oblomov" Bilotta
Hi Giuseppe, try: \setuppositioning[unit=cm,factor=0.5] \starpositioning \position(1,1){top left text} \position(40,1){top right text} \stoppositioning Of course, the unit can be almost all of well known TeX units (pt, mm, em, in, ...) Have a nice day, Martin -----Original Message----- From: ntg-context-bounces@ntg.nl [mailto:ntg-context-bounces@ntg.nl]On Behalf Of Giuseppe Bilotta Sent: Monday, September 06, 2004 7:30 PM To: ntg-context@ntg.nl Subject: [NTG-context] Absolute positioning of graphics on the page Is this possible without using layers? IOW, it there some kind of command that allows: \somecommand[some setups]{content} where the setups specify where the content should be positioned, and towards where it should extend? (e.g., positioned in the top right corner, extending to the bottom left) This can be achieved via layers, but is it possible without? -- Giuseppe "Oblomov" Bilotta _______________________________________________ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Tuesday, September 7, 2004 Martin Kolarik wrote:
Hi Giuseppe,
try:
\setuppositioning[unit=cm,factor=0.5]
\starpositioning \position(1,1){top left text} \position(40,1){top right text} \stoppositioning
Of course, the unit can be almost all of well known TeX units (pt, mm, em, in, ...)
This surely works ok for "top left". But how can I guarantee that "top right" has its *top right* corner in the position? I would have to calculate the coordinates manually (depending on page site, "top right text" dimensions etc). -- Giuseppe "Oblomov" Bilotta
Giuseppe Bilotta wrote
This surely works ok for "top left". But how can I guarantee that "top right" has its *top right* corner in the position? I would have to calculate the coordinates manually (depending on page site, "top right text" dimensions etc).
why not use layers? you can flush them whenever you want, \flushlayer \composedlayer \tightlayer also, peek into core-box.tex: collectors and such) 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 -----------------------------------------------------------------
Tuesday, September 7, 2004 Hans Hagen wrote:
Giuseppe Bilotta wrote
This surely works ok for "top left". But how can I guarantee that "top right" has its *top right* corner in the position? I would have to calculate the coordinates manually (depending on page site, "top right text" dimensions etc).
why not use layers?
Because I want something simple and immediate, and layers aren't. :) But if it's not possible, ok, I will. -- Giuseppe "Oblomov" Bilotta
This surely works ok for "top left". But how can I guarantee that "top right" has its *top right* corner in the position? I would have to calculate the coordinates manually (depending on page site, "top right text" dimensions etc).
Yes, AFAIK the mechanism does not support this now (and I do not know, if it sometimes will do -- it seems to me it is a relatively old part of ConTeXt and Hans himself recommends you the layers :-). Anyway, you would have to count positions and coordinates manually. But there is always a way using generic TeX here: \position(40,1){% \hbox to 0pt{% \hss \vbox to 0pt{ -- a material to typeset or display -- \vss } } Of course, this solution does not take into account all of ConTeXt dependent (and very convenient and pretty) features like grid fitting etc. It is a thing of your needs. Have a nice day, Martin
participants (3)
-
Giuseppe Bilotta
-
Hans Hagen
-
Martin Kolarik