Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
Thanks for your reply Pablo. I didn't see it till just now because for some reason it ended up in my junk folder, along with a number of other ConTeXt messages. You will probably have seen my reply to the list with the three solutions, now we have four! Yep, I know that A4 is the default page size and I always start with that but sometimes I play about with page sizes when typesetting and so can just change when coding. In the document I'm working on, some pages will only contain images and/or combination of images so I went down the Layers route since this also allows me to absolutely position these images on the page. Thanks again for your help! Best Wishes Keith McKay On 16/03/2023 17:58, Pablo Rodriguez via ntg-context wrote: On 3/16/23 17:59, Keith McKay via ntg-context wrote: Hi, I would like to position a combination of images where the centre of the combination coincides with the centre of the text area of a page. Hi Keith, I think the following sample might achieve what you want: \showframe \setupexternalfigures[location={default}] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \definelayer[test3] %[x=.5\paperwidth, y=.5\paperheight] [x=.5\textwidth, y=.5\textheight] %\setupbackgrounds[page] \setupbackgrounds[text] [background=test3] \starttext \setlayer[test3][location={middle}] \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm] {\externalfigure[cow][width=15mm]}{} \rotate[rotation=90]{\externalfigure[cow][width=15mm]}{} {\externalfigure[cow][width=15mm]}{} \stopcombination}} \null \stoptext BTW, A4 portrait is the default page size. \setupbackgrounds is the standard way to place layers. Page and text centering would require different positions (I have commented out the option for page centering). I hope it helps (since I’m not sure I’m getting your point here), Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___ ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
Hi, I've experimented this morning with the solutions suggested by Wolfgang and Alan in reply to my post. The solution is really quite simple as suggested by Wolfgang i.e. \centerbox{..}. I have applied this to the code and I now have three different solutions to my initial problem. The Joy of ConTeXt! Thanks again Wolfgang and Alan. Best Wishes Keith McKay Here is the code showing the three solutions which others may find useful. \setuppapersize[A4,portrait]%[A4,portrait] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \setuppagenumbering[state=start,alternative=doublesided,location=margin] \useMPlibrary [dum] \starttext %%% Me %%% \showframe [text] [text] \definelayer[test3] \setlayer[test3][] \centerbox{ {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination} } \flushlayer[test3] \page %%% Wolfgang %%% \centerbox {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] \bTR \bTD \externalfigure[dummy] \eTD \bTD \rotate[rotation=90]{\externalfigure[dummy]} \eTD \bTD \externalfigure[dummy] \eTD \eTR \eTABLE} \page %%% Alan %%% \centerbox{ \startparagraph [align=middle] \startframed [frame=off,offset=\zeropoint] \startcombination [nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination \stopframed \stopparagraph } \stoptext On 16/03/2023 19:50, Keith McKay wrote: Thanks Wolfgang and Alan! I will experiment with them tomorrow. Best Wishes Keith McKay ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
Thanks Wolfgang and Alan! I will experiment with them tomorrow. Best Wishes Keith McKay On Thu, 16 Mar 2023, 18:07 Alan Braslau, wrote: > On Thu, 16 Mar 2023 18:27:53 +0100 > Wolfgang Schuster via ntg-context wrote: > > > Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59: > > > > > > Hi, > > > > > > I would like to position a combination of images where the centre > > > of the combination coincides with the centre of the text area of a > > > page. In the example below I have made the combination into a layer > > > thinking that this would be the easiest way to position it where I > > > wanted. However to position in the centre of the page I would need > > > to know the size of the combination and use this to calculate the x > > > and y values for positioning of the layer. I have looked at the > > > Wiki page on image size of combinations but still cant figure out > > > how to do it. Any suggestions on how to go about this or is their a > > > better way? > > > > > > Wiki Page reference: > > > https://wiki.contextgarden.net/Combinations#Image_Width > > > > > > Thanks > > > > > > Keith McKay > > > > > > %%% example %%% > > > > > > \setuppapersize[A4,portrait]%[A4,portrait] > > > > > > \setuplayout > > > > > > [backspace=2.5cm, > > > > > > topspace=1cm, > > > > > > height=28cm, > > > > > > width=17cm, > > > > > > header=0cm, > > > > > > footer=0.75cm, > > > > > > ] > > > > > > \useMPlibrary [dum] > > > > > > \starttext > > > > > > \definelayer[test3] > > > > > > \setlayer[test3][x=2cm,y=15cm] > > > > > > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] > > > > > > {\externalfigure[dummy]}{} > > > > > > \rotate[rotation=90]{\externalfigure[dummy]}{} > > > > > > {\externalfigure[dummy][]}{} > > > > > > \stopcombination} > > > > > > \flushlayer[test3] > > > > > > \stoptext > > > > > > > \useMPlibrary [dum] > > > > \showframe [text] [text] > > > > \setuplayout [tight] > > > > \starttext > > > > \centerbox > > {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] > > \bTR > > \bTD > > \externalfigure[dummy] > > \eTD > > \bTD > > \rotate[rotation=90]{\externalfigure[dummy]} > > \eTD > > \bTD > > \externalfigure[dummy] > > \eTD > > \eTR > > \eTABLE} > > > > \stoptext > > > > Wolfgang > > Or you could put the combination in a frame: > > \startparagraph [align=middle] > \startframed [frame=off,offset=\zeropoint] > \startcombination [nx=3,ny=1] > {first} {} > {second}{} > {third} {} > \stopcombination > \stopframed > \stopparagraph > > Alan > ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
On Thu, 16 Mar 2023 18:27:53 +0100 Wolfgang Schuster via ntg-context wrote: > Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59: > > > > Hi, > > > > I would like to position a combination of images where the centre > > of the combination coincides with the centre of the text area of a > > page. In the example below I have made the combination into a layer > > thinking that this would be the easiest way to position it where I > > wanted. However to position in the centre of the page I would need > > to know the size of the combination and use this to calculate the x > > and y values for positioning of the layer. I have looked at the > > Wiki page on image size of combinations but still cant figure out > > how to do it. Any suggestions on how to go about this or is their a > > better way? > > > > Wiki Page reference: > > https://wiki.contextgarden.net/Combinations#Image_Width > > > > Thanks > > > > Keith McKay > > > > %%% example %%% > > > > \setuppapersize[A4,portrait]%[A4,portrait] > > > > \setuplayout > > > > [backspace=2.5cm, > > > > topspace=1cm, > > > > height=28cm, > > > > width=17cm, > > > > header=0cm, > > > > footer=0.75cm, > > > > ] > > > > \useMPlibrary [dum] > > > > \starttext > > > > \definelayer[test3] > > > > \setlayer[test3][x=2cm,y=15cm] > > > > {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] > > > > {\externalfigure[dummy]}{} > > > > \rotate[rotation=90]{\externalfigure[dummy]}{} > > > > {\externalfigure[dummy][]}{} > > > > \stopcombination} > > > > \flushlayer[test3] > > > > \stoptext > > > > \useMPlibrary [dum] > > \showframe [text] [text] > > \setuplayout [tight] > > \starttext > > \centerbox > {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] > \bTR > \bTD > \externalfigure[dummy] > \eTD > \bTD > \rotate[rotation=90]{\externalfigure[dummy]} > \eTD > \bTD > \externalfigure[dummy] > \eTD > \eTR > \eTABLE} > > \stoptext > > Wolfgang Or you could put the combination in a frame: \startparagraph [align=middle] \startframed [frame=off,offset=\zeropoint] \startcombination [nx=3,ny=1] {first} {} {second}{} {third} {} \stopcombination \stopframed \stopparagraph Alan ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
On 3/16/23 17:59, Keith McKay via ntg-context wrote: > Hi, > > I would like to position a combination of images where the centre of the > combination coincides with the centre of the text area of a page. Hi Keith, I think the following sample might achieve what you want: \showframe \setupexternalfigures[location={default}] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \definelayer[test3] %[x=.5\paperwidth, y=.5\paperheight] [x=.5\textwidth, y=.5\textheight] %\setupbackgrounds[page] \setupbackgrounds[text] [background=test3] \starttext \setlayer[test3][location={middle}] \framed[offset=overlay]{{\startcombination[nx=3,ny=1,distance=15mm] {\externalfigure[cow][width=15mm]}{} \rotate[rotation=90]{\externalfigure[cow][width=15mm]}{} {\externalfigure[cow][width=15mm]}{} \stopcombination}} \null \stoptext BTW, A4 portrait is the default page size. \setupbackgrounds is the standard way to place layers. Page and text centering would require different positions (I have commented out the option for page centering). I hope it helps (since I’m not sure I’m getting your point here), Pablo ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Absolute positioning of \startcombination... \stopcombination
Keith McKay via ntg-context schrieb am 16.03.2023 um 17:59: Hi, I would like to position a combination of images where the centre of the combination coincides with the centre of the text area of a page. In the example below I have made the combination into a layer thinking that this would be the easiest way to position it where I wanted. However to position in the centre of the page I would need to know the size of the combination and use this to calculate the x and y values for positioning of the layer. I have looked at the Wiki page on image size of combinations but still cant figure out how to do it. Any suggestions on how to go about this or is their a better way? Wiki Page reference: https://wiki.contextgarden.net/Combinations#Image_Width Thanks Keith McKay %%% example %%% \setuppapersize[A4,portrait]%[A4,portrait] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \useMPlibrary [dum] \starttext \definelayer[test3] \setlayer[test3][x=2cm,y=15cm] {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination} \flushlayer[test3] \stoptext \useMPlibrary [dum] \showframe [text] [text] \setuplayout [tight] \starttext \centerbox {\bTABLE[frame=off,offset=7.5mm,align={middle,lohi}] \bTR \bTD \externalfigure[dummy] \eTD \bTD \rotate[rotation=90]{\externalfigure[dummy]} \eTD \bTD \externalfigure[dummy] \eTD \eTR \eTABLE} \stoptext Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] Absolute positioning of \startcombination... \stopcombination
Hi, I would like to position a combination of images where the centre of the combination coincides with the centre of the text area of a page. In the example below I have made the combination into a layer thinking that this would be the easiest way to position it where I wanted. However to position in the centre of the page I would need to know the size of the combination and use this to calculate the x and y values for positioning of the layer. I have looked at the Wiki page on image size of combinations but still cant figure out how to do it. Any suggestions on how to go about this or is their a better way? Wiki Page reference: https://wiki.contextgarden.net/Combinations#Image_Width Thanks Keith McKay %%% example %%% \setuppapersize[A4,portrait]%[A4,portrait] \setuplayout [backspace=2.5cm, topspace=1cm, height=28cm, width=17cm, header=0cm, footer=0.75cm, ] \useMPlibrary [dum] \starttext \definelayer[test3] \setlayer[test3][x=2cm,y=15cm] {\startcombination[nx=3,ny=1,distance=15mm,after=,location=middle] {\externalfigure[dummy]}{} \rotate[rotation=90]{\externalfigure[dummy]}{} {\externalfigure[dummy][]}{} \stopcombination} \flushlayer[test3] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] absolute positioning?
Hello Wolfgang, >> What is the current most contextish way for absolute positioning of >> text (still using MK II)? > layers are still the tool of your choice Actually the examples on the wiki were very helpful. Thanks to all, Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] absolute positioning?
Hi Wolfgang, > seems like you have nearly finished your thesis Well, concerning time: yes. concerning progress: no. > and yes, layers are still the tool of your choice, especially the > framed alternative \setlayerframed. You can pass font changes to the > framed part with the setups command or set special backgrounds to > the frame. OK, I'll give it a try and post an example on the wiki. Thanks! Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] absolute positioning?
Patrick Gundlach wrote: > Hello! > > What is the current most contextish way for absolute positioning of > text (still using MK II)? I have to create a title page for a document > where several frameless boxes of text have to be placed on the page. > Is this still the layer mechanism? I mean, ConTeXt evolves so quickly, > being absent for one real year means being absent for about 10 > ConTeXt-years. grep for layers (context layers, not pdf ones) 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 - ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] absolute positioning?
> BTW: LuaTeX on the wiki is broken Fixed. Thanks for the heads up! >could be related to a outdated > luatex because the error mesage is > Error in lua file loading: /opt/context/current/bin/luatools.lua:1402: > attempt to call field 'gettimeofday' (a nil value) Yes, that was it. The LuaTeX version used up to 5 minutes ago was SVN trunk revision 836, as written on the page. I've upgraded to beta-0.20.1 Arthur ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] absolute positioning?
On Sat, 08 Dec 2007 17:22:50 +0100 Patrick Gundlach <[EMAIL PROTECTED]> wrote: > Hello! > > What is the current most contextish way for absolute positioning of > text (still using MK II)? I have to create a title page for a document > where several frameless boxes of text have to be placed on the page. > Is this still the layer mechanism? I mean, ConTeXt evolves so quickly, > being absent for one real year means being absent for about 10 > ConTeXt-years. > > Patrick Hi Patrick, seems like you have nearly finished your thesis and yes, layers are still the tool of your choice, especially the framed alternative \setlayerframed. You can pass font changes to the framed part with the setups command or set special backgrounds to the frame. Although I never used them you could take a look at collcetors, anchors (use layers intern) ornaments, a few of them are documented in the details manual but I don't what the difference is between them. BTW: LuaTeX on the wiki is broken, could be related to a outdated luatex because the error mesage is Error in lua file loading: /opt/context/current/bin/luatools.lua:1402: attempt to call field 'gettimeofday' (a nil value) Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
[NTG-context] absolute positioning?
Hello! What is the current most contextish way for absolute positioning of text (still using MK II)? I have to create a title page for a document where several frameless boxes of text have to be placed on the page. Is this still the layer mechanism? I mean, ConTeXt evolves so quickly, being absent for one real year means being absent for about 10 ConTeXt-years. Patrick -- ConTeXt wiki and more: http://contextgarden.net ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] absolute positioning of figures
andrea valle wrote: > Example: > > \definelayer[layer2a][width=.15\paperwidth] > > \setlayer [layer2a] > [x=.15\paperwidth, y=.5\paperheight] > {\externalfigure[layTest][width=.75\paperwidth]} > extend your example with \clip[width=.15\paperwidth,height=,hoffset=0pt,voffset=0pt]{\externalfigure..} and you can see the difference.. (no picture in the smaller layer). As I already mentioned, the size is (only?) significant, if you change the default positioning (reference point). For example, you want to place something with an offset of 2cm to the right bottom corner of the layer. Therefore you need the exact width and height of the layer. All default positioning (relative to top left corner of the layer) doesn't care about the size, as there is no difference (no calculation is needed). I hope I have made myself clear. Greetings, Peter > > I was expecting to have the layTest figure cut after its width exceeds > the layer's width. It seems that this is unrelevant, i.e. > > If I have instead of this: > > \definelayer[layer2a][width=.15\paperwidth] > > this: > \definelayer[layer2a][width=.75\paperwidth] > > It's the same. > > So, I cannot understand what width means for layers, as changing it has > no consequences (in my example). > > Best > > -a- > > > > > > > On 13 Oct 2006, at 18:31, Hans Hagen wrote: >> \definelayer[blabla][width=20cm,height30cm] >> >> etc etc >> >> -- >> >> - >> 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 >> - >> >> ___ >> ntg-context mailing list >> ntg-context@ntg.nl >> http://www.ntg.nl/mailman/listinfo/ntg-context >> >> > Andrea Valle > DAMS - Facoltà di Scienze della Formazione > Università degli Studi di Torino > http://www.semiotiche.it/andrea > [EMAIL PROTECTED] > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
Example: \definelayer[layer2a][width=.15\paperwidth] \setlayer [layer2a] [x=.15\paperwidth, y=.5\paperheight] {\externalfigure[layTest][width=.75\paperwidth]} I was expecting to have the layTest figure cut after its width exceeds the layer's width. It seems that this is unrelevant, i.e. If I have instead of this: \definelayer[layer2a][width=.15\paperwidth] this: \definelayer[layer2a][width=.75\paperwidth] It's the same. So, I cannot understand what width means for layers, as changing it has no consequences (in my example). Best -a- On 13 Oct 2006, at 18:31, Hans Hagen wrote: >> > > \definelayer[blabla][width=20cm,height30cm] > > etc etc > > -- > > - > 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 > - > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
andrea valle wrote: > Hi Peter, > > >> Using different layers, you can change the order of appearance >> (background={1,2,3}|{1,3,2},..) for the layer content. >> Using only one layer, all layer content is placed stack like; the >> printing order is then fixed by the appearance order in the document >> (last overprints prior). >> >> > > Ah, thanks, I see the point. > > In the posted example, I was mumbling about the reference Hans did > about overlays+layers. > As far as I saw, I think that the only solution to absolute positioning > is \setupbackgrounds. > As wiki says, \placelayer offsets to \text dimensions. > > Am I right? > \definelayer[blabla][width=20cm,height30cm] etc etc -- - 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
Hi Peter, > Using different layers, you can change the order of appearance > (background={1,2,3}|{1,3,2},..) for the layer content. > Using only one layer, all layer content is placed stack like; the > printing order is then fixed by the appearance order in the document > (last overprints prior). > Ah, thanks, I see the point. In the posted example, I was mumbling about the reference Hans did about overlays+layers. As far as I saw, I think that the only solution to absolute positioning is \setupbackgrounds. As wiki says, \placelayer offsets to \text dimensions. Am I right? Best -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
Hi Andrea, andrea valle wrote: > >> On 13 Oct 2006, at 00:00, Hans Hagen wrote: >>> indeed, layers put in overlays (there can be many layers on top of >>> each >>> others >>> >> > > > Now, I tried with overlays and layers. That's fine. In any case, in a > second approach I simply used \setlayer to fill repeatedly the same > layer. The result seems to be the same. > What's the difference? Is it safe to use the second approach? > Using different layers, you can change the order of appearance (background={1,2,3}|{1,3,2},..) for the layer content. Using only one layer, all layer content is placed stack like; the printing order is then fixed by the appearance order in the document (last overprints prior). > Then: changing layer dimension in \definelayer, I cannot see any > differences in the output. > Can anyone explain what it should happen? I think the size is significant, if you use relative positioning (preset=bottomright and alike). Greetings, Peter > Thanks > > Best > > -a- > > Two examples follow: > > \setupcolors[state=start] > > > % first approach > > \definelayer[layer1][] > \definelayer[layer2][] > \definelayer[layer3][] > > \setlayer [layer1] > [x=.5\paperwidth, y=.5\paperheight] > {\externalfigure[layTest][]} > > > > \setlayer [layer2] > [x=.35\paperwidth, y=.45\paperheight] > {\externalfigure[layTest][]} > > > \setlayer [layer3] > [x=.5\paperwidth, y=.5\paperheight] > {\color[darkred]{ \bf This is a text}} > > > \defineoverlay[overlay1][{\placelayer[layer1]}] > \defineoverlay[overlay2][{\placelayer[layer2]}] > \defineoverlay[overlay3][{\placelayer[layer3]}] > > % end of first > > > % second approach > \definelayer[layer1b][] % just one > > \setlayer [layer1b] > [x=.5\paperwidth, y=.5\paperheight] > {\externalfigure[layTest][]} > > > > \setlayer [layer1b] > [x=.35\paperwidth, y=.45\paperheight] > {\externalfigure[layTest][]} > > > \setlayer [layer1b] > [x=.5\paperwidth, y=.5\paperheight] > {\color[darkred]{ \bf This is a text}} > > > % end > > > \starttext > > % using first > \framed [height=\textheight,width=\textwidth,background={overlay1, > overlay2, overlay3},align=right, frame=off] > { > % write if you need to > } > > > % using second > > \framed > [height=\textheight,width=\textwidth,background=layer1b,align=right, > frame=off] > { > % write if you need to > } > > > \stoptext > > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > > ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
> On 13 Oct 2006, at 00:00, Hans Hagen wrote: >>> > >> indeed, layers put in overlays (there can be many layers on top of >> each >> others >> > > Now, I tried with overlays and layers. That's fine. In any case, in a second approach I simply used \setlayer to fill repeatedly the same layer. The result seems to be the same. What's the difference? Is it safe to use the second approach? Then: changing layer dimension in \definelayer, I cannot see any differences in the output. Can anyone explain what it should happen? Thanks Best -a- Two examples follow: \setupcolors[state=start] % first approach \definelayer[layer1][] \definelayer[layer2][] \definelayer[layer3][] \setlayer [layer1] [x=.5\paperwidth, y=.5\paperheight] {\externalfigure[layTest][]} \setlayer [layer2] [x=.35\paperwidth, y=.45\paperheight] {\externalfigure[layTest][]} \setlayer [layer3] [x=.5\paperwidth, y=.5\paperheight] {\color[darkred]{ \bf This is a text}} \defineoverlay[overlay1][{\placelayer[layer1]}] \defineoverlay[overlay2][{\placelayer[layer2]}] \defineoverlay[overlay3][{\placelayer[layer3]}] % end of first % second approach \definelayer[layer1b][] % just one \setlayer [layer1b] [x=.5\paperwidth, y=.5\paperheight] {\externalfigure[layTest][]} \setlayer [layer1b] [x=.35\paperwidth, y=.45\paperheight] {\externalfigure[layTest][]} \setlayer [layer1b] [x=.5\paperwidth, y=.5\paperheight] {\color[darkred]{ \bf This is a text}} % end \starttext % using first \framed [height=\textheight,width=\textwidth,background={overlay1, overlay2, overlay3},align=right, frame=off] { % write if you need to } % using second \framed [height=\textheight,width=\textwidth,background=layer1b,align=right, frame=off] { % write if you need to } \stoptext ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
(Thanks Hans) On 13 Oct 2006, at 00:00, Hans Hagen wrote: >> > indeed, layers put in overlays (there can be many layers on top of each > others > Uhm, I don't think I understood. In wiki layers are, in some way, opposite to overlay. How do I put a layer in an overlay? Could you post an essential snippet? > if you want to do even dirtier tricks, you can use streams and have > multiple subpages make up a page (see m-streams) (I'll take a look) Thanks -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] absolute positioning of figures
andrea valle wrote: > Hi to all, > > In case of presentations sometimes one has to combine many figures in > the page, maybe overlapping for some parts. Something very easy in > powerpoint. > What's the best technique? > Taking a look at the wiki and ot "It's in the details" manual it seems > that layers, which can be placed according to absolute positions, are > the ConTeXt solution to the problem. > Is it so? > indeed, layers put in overlays (there can be many layers on top of each others if you want to do even dirtier tricks, you can use streams and have multiple subpages make up a page (see m-streams) > I was in fact considering to create a simple python GUI app to allow a > visual control on position of figures on a page, outputting ConTeXt > code to be copied and pasted. > - 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 - ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] absolute positioning of figures
Hi to all, In case of presentations sometimes one has to combine many figures in the page, maybe overlapping for some parts. Something very easy in powerpoint. What's the best technique? Taking a look at the wiki and ot "It's in the details" manual it seems that layers, which can be placed according to absolute positions, are the ConTeXt solution to the problem. Is it so? I was in fact considering to create a simple python GUI app to allow a visual control on position of figures on a page, outputting ConTeXt code to be copied and pasted. Thanks -a- Andrea Valle DAMS - Facoltà di Scienze della Formazione Università degli Studi di Torino http://www.semiotiche.it/andrea [EMAIL PROTECTED] ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Absolute positioning of grafics in ConTeXt
Johannes Fichtinger wrote: > Hi all, > > I'm quite new to ConTeXt, but I've been working with LaTeX for several years > now. Now I faced a problem which I'm not able to solve in LaTeX which > probably can be solved in ConTeXt: > > I need a possibility to set grafics in a book on exact, absolute positions. > Now I found the way for background images, like in the attached example. > But obviously, normal text is written above the background image. I need > now a possibility like this but for foreground grafics. > > So, how can I set the position of grafics absolutely in ConTeXt? > > Thanks, > Johannes. > > My example: > > -- > \enableregime [il1] > \mainlanguage [de] > \setuplayout[grid=yes,marking=on,horoffset=2cm,veroffset=2cm] > \definepapersize[jo][width=14cm,height=18cm] > \setuppapersize [jo][a4] > > \useexternalfigure[wr][dpm][type=png, width=5cm, height=4cm] > \definelayer[wr-layer] > \defineoverlay[wr-overlay][\composedlayer{wr-layer}] > \setupbackgrounds[page][background={wr-overlay}] \setupbackgrounds[page][background={foreground,wr-overlay}] Cheers, Vit > \starttext > > \setlayer[wr-layer][x=-0.1cm,y=-0.1cm]{\externalfigure[wr]} > Blablabla > > \stoptext > -- > ___ > ntg-context mailing list > ntg-context@ntg.nl > http://www.ntg.nl/mailman/listinfo/ntg-context > -- === Ing. Vít Zýka, Ph.D. TYPOkvítek database publishing databazove publikovani data maintaining and typesetting in typographic quality priprava dat a jejich sazba v typograficke kvalite tel.: (+420) 777 198 189 www: http://typokvitek.com === ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Absolute positioning of grafics in ConTeXt
Hi all, I'm quite new to ConTeXt, but I've been working with LaTeX for several years now. Now I faced a problem which I'm not able to solve in LaTeX which probably can be solved in ConTeXt: I need a possibility to set grafics in a book on exact, absolute positions. Now I found the way for background images, like in the attached example. But obviously, normal text is written above the background image. I need now a possibility like this but for foreground grafics. So, how can I set the position of grafics absolutely in ConTeXt? Thanks, Johannes. My example: -- \enableregime [il1] \mainlanguage [de] \setuplayout [grid=yes,marking=on,horoffset=2cm,veroffset=2cm] \definepapersize [jo][width=14cm,height=18cm] \setuppapersize [jo][a4] \useexternalfigure[wr][dpm][type=png, width=5cm, height=4cm] \definelayer[wr-layer] \defineoverlay[wr-overlay][\composedlayer{wr-layer}] \setupbackgrounds[page][background={wr-overlay}] \starttext \setlayer[wr-layer][x=-0.1cm,y=-0.1cm]{\externalfigure[wr]} Blablabla \stoptext -- ___ ntg-context mailing list ntg-context@ntg.nl http://www.ntg.nl/mailman/listinfo/ntg-context
Re[2]: [NTG-context] Absolute positioning of graphics on the page
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 ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] Absolute positioning of graphics on the page
> 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 ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Absolute positioning of graphics on the page
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 - ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re[2]: [NTG-context] Absolute positioning of graphics on the page
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 ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
RE: [NTG-context] Absolute positioning of graphics on the page
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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Giuseppe Bilotta Sent: Monday, September 06, 2004 7:30 PM To: [EMAIL PROTECTED] 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 [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[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 [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Absolute positioning
At 18:19 01/12/2003, you wrote: Hello, I didn't find a way to put text at specific locations on the page. It must be something obvious! :-) I try to design a screen document where every notes are, say, typeset on the lower half of the page and appear only when clicking on their number in the text (with layers I think). Thnaks in advance, Gilles. PS for Hans: I didn't forget the note problem we've discussed in Mâcon. I'll build a test file. % interface=en \setuppapersize[S6][S6] \startJSpreamble {Notes} used now var lastNote = "" ; function Show_Note ( Name ) { if (Name != lastNote) { Hide_Note () ; var v = this.getField(Name) ; if (v) { console.println("Show Note: " + Name) ; v.display = display.visible ; v.readonly = false ; this.dirty = false ; lastNote = Name } } } function Hide_Note ( ) { if (lastNote != "") { var v = this.getField(lastNote) ; if (v) { console.println("Hide Note: " + lastNote) ; v.display = display.hidden ; v.readonly = true ; this.dirty = false } } lastNote = "" } \stopJSpreamble \newcounter\AnotherNote \def\SomeNote#1#2% {\hbox {\doglobal\increment\AnotherNote \definesymbol[note:\AnotherNote:on][\WhatANote{#2}]% \setupfield[notes][offset=overlay,frame=off,option={readonly,hidden}] % this confuses acrobat, probably some interference bug, I spent too much time on that % \setupfield[notes][offset=overlay,frame=off,option={readonly,hidden},clickin=JS(Hide_Note)] \definefield[note:\AnotherNote][check][notes][note:\AnotherNote:on][note:\AnotherNote:on]% \doifreferencefoundelse{note:\AnotherNote} {\setlayer[notes][page=\currentrealreference]{\fitfield[note:\AnotherNote]}} {\setlayer[notes]{\fitfield[note:\AnotherNote]}}% \pagereference[note:\AnotherNote]\goto{#1}[JS(Show_Note{note:\AnotherNote})]}} \setupinteraction [state=start, openpageaction=JS(Hide_Note), closepageaction=JS(Hide_Note)] \definereference[CloseNote][JS(Hide_Note)] \setupfootertexts[{\goto{Close Note}[CloseNote]}][] \setupcolors [state=start] \definecolor [notebackgroundcolor] [s=.85] \defineframedtext [WhatANote] [background=color, backgroundcolor=notebackgroundcolor, width=.4\textwidth, height=fit, align=normal] \definelayer [notes] [width=\paperwidth, height=\paperheight, preset=rightbottom, offset=1cm] \setupbackgrounds [page] [background=notes] \starttext \startbuffer \input ward \SomeNote{[[ward]]} {\input ward \relax} \input ward \blank \input knuth \SomeNote{[[knuth]]} {\input knuth \relax} \input knuth \blank \input tufte \SomeNote{[[tufte]]} {\input tufte \relax} \input tufte \blank \input bryson \SomeNote{[[bryson]]}{\input bryson\relax} \input bryson \blank \stopbuffer \dorecurse{10}{\getbuffer} \stoptext ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
Re: [NTG-context] Absolute positioning
Hi Francesca, I'll be looking at your data tonight. Will send an email tomorrow. __martin On 1 Dec 2003, at 17:19, Gilles Pérez-Lambert wrote: Hello, I didn't find a way to put text at specific locations on the page. It must be something obvious! :-) I try to design a screen document where every notes are, say, typeset on the lower half of the page and appear only when clicking on their number in the text (with layers I think). Thnaks in advance, ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context
[NTG-context] Absolute positioning
Hello, I didn't find a way to put text at specific locations on the page. It must be something obvious! :-) I try to design a screen document where every notes are, say, typeset on the lower half of the page and appear only when clicking on their number in the text (with layers I think). Thnaks in advance, Gilles. PS for Hans: I didn't forget the note problem we've discussed in Mâcon. I'll build a test file. ___ ntg-context mailing list [EMAIL PROTECTED] http://www.ntg.nl/mailman/listinfo/ntg-context