Centering text on the width of the page when using \startfiguretext
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
I am converting my CV to ConTeXt. Simplified I have the folowing in it: \startfiguretext[right]{none}{\externalfigure[graphics/pasfotoKlein]} \startalignment[center] E-mail: cecil@decebal.nl Woonplaats: Werkhoven Geboren: 15 april 1963 te Belleville Ontario (Can.) Nationaliteit: Nederlandse, tevens Canadese Geslacht: Man Burgerlijke staat: ongehuwd LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stopalignment \stopfiguretext This centers the text on the space leftover after placing my photo. But I would like the text to be centered on the width of the page, without taking into consideration the space the photo takes up. How would I do that? -- Cecil Westerhof
![](https://secure.gravatar.com/avatar/6af06dcf5f958fe4ec149408292d6acd.jpg?s=120&d=mm&r=g)
My first idea would be to place the photo in a layer in the background. Willi On 3 Aug 2011, at 09:52, Cecil Westerhof wrote:
I am converting my CV to ConTeXt. Simplified I have the folowing in it: \startfiguretext[right]{none}{\externalfigure[graphics/pasfotoKlein]} \startalignment[center] E-mail: cecil@decebal.nl
Woonplaats: Werkhoven
Geboren: 15 april 1963 te Belleville Ontario (Can.)
Nationaliteit: Nederlandse, tevens Canadese
Geslacht: Man
Burgerlijke staat: ongehuwd
LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stopalignment \stopfiguretext
This centers the text on the space leftover after placing my photo. But I would like the text to be centered on the width of the page, without taking into consideration the space the photo takes up. How would I do that?
-- Cecil Westerhof ___________________________________________________________________________________ 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
2011/8/3 Willi Egger
My first idea would be to place the photo in a layer in the background.
I tried the following: \definelayer[picture][ preset=righttop, ] \setlayer[picture]{\externalfigure[graphics/pasfotoKlein]} \setupbackgrounds[page][rightedge][background=picture] Whatever I do, the picture keeps in the top left corner of the page. I would like to have the right side of the picture aligned with the right margin. Is this possible? -- Cecil Westerhof
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 03.08.2011 um 18:42 schrieb Cecil Westerhof:
2011/8/3 Willi Egger
My first idea would be to place the photo in a layer in the background. I tried the following: \definelayer[picture][ preset=righttop, ]
\setlayer[picture]{\externalfigure[graphics/pasfotoKlein]}
\setupbackgrounds[page][rightedge][background=picture]
Whatever I do, the picture keeps in the top left corner of the page. I would like to have the right side of the picture aligned with the right margin. Is this possible?
\definelayer[picture][preset=righttop,width=\textwidth] \setlayer[picture]{\externalfigure[mill][width=4cm]} \setupbackgrounds[text][text][background=picture] \starttext \startlines[align=middle] E-mail: cecil@decebal.nl Woonplaats: Werkhoven Geboren: 15 april 1963 te Belleville Ontario (Can.) Nationaliteit: Nederlandse, tevens Canadese Geslacht: Man Burgerlijke staat: ongehuwd LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stoplines \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
2011/8/3 Wolfgang Schuster
My first idea would be to place the photo in a layer in the background.
I tried the following: \definelayer[picture][ preset=righttop, ]
\setlayer[picture]{\externalfigure[graphics/pasfotoKlein]}
\setupbackgrounds[page][rightedge][background=picture]
Whatever I do, the picture keeps in the top left corner of the page. I would like to have the right side of the picture aligned with the right margin. Is this possible?
\definelayer[picture][preset=righttop,width=\textwidth]
\setlayer[picture]{\externalfigure[mill][width=4cm]}
\setupbackgrounds[text][text][background=picture]
Almost there. ;-} The placement is okay, but now the picture is on every page instead of only the first one. -- Cecil Westerhof
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 03.08.2011 um 19:15 schrieb Cecil Westerhof:
2011/8/3 Wolfgang Schuster
My first idea would be to place the photo in a layer in the background. I tried the following: \definelayer[picture][ preset=righttop, ]
\setlayer[picture]{\externalfigure[graphics/pasfotoKlein]}
\setupbackgrounds[page][rightedge][background=picture]
Whatever I do, the picture keeps in the top left corner of the page. I would like to have the right side of the picture aligned with the right margin. Is this possible?
\definelayer[picture][preset=righttop,width=\textwidth]
\setlayer[picture]{\externalfigure[mill][width=4cm]}
\setupbackgrounds[text][text][background=picture]
Almost there. ;-}
The placement is okay, but now the picture is on every page instead of only the first one.
Add “\setupbackgrounds[state=repeat]”. Wolfgang
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
2011/8/3 Wolfgang Schuster
My first idea would be to place the photo in a layer in the background.
I tried the following: \definelayer[picture][ preset=righttop, ]
\setlayer[picture]{\externalfigure[graphics/pasfotoKlein]}
\setupbackgrounds[page][rightedge][background=picture]
Whatever I do, the picture keeps in the top left corner of the page. I would like to have the right side of the picture aligned with the right margin. Is this possible?
\definelayer[picture][preset=righttop,width=\textwidth]
\setlayer[picture]{\externalfigure[mill][width=4cm]}
\setupbackgrounds[text][text][background=picture]
Almost there. ;-}
The placement is okay, but now the picture is on every page instead of only the first one.
Add “\setupbackgrounds[state=repeat]”.
Works. I find repeat a bit strange. I woild expect something like once. But this works. I now have: \setupbackgrounds[text][text][background=picture] \setupbackgrounds[state=repeat] It has to be two separate statements? -- Cecil Westerhof
![](https://secure.gravatar.com/avatar/d6e7462bd4209f9c4cd08271985a50df.jpg?s=120&d=mm&r=g)
Hello,
\setupbackgrounds[text][text][background=picture] \setupbackgrounds[state=repeat]
It has to be two separate statements?
yes: ---- \definelayer[picture][preset=righttop,width=\textwidth] \setlayer[picture]{\externalfigure[mill][width=4cm]} \setupbackgrounds[text][text][background=picture] \setupbackgrounds[state=repeat] \starttext \input knuth \page \input knuth \stoptext ---- BTW: I find "state=repeat" to get the background once confusing, too. Wouldn't be good (at least) to define "once" (as suggested) or "norepeat" options to use the background once? (Both to work in the same manner as "repeat" does.) And to keep "repeat" for backward compatibility, but to treat it as deprecated? (Or maybe I don't understand fully why "state=repeat" causes one-shot background; could anyone explain?) Best regards, Lukas -- Ing. Lukáš Procházka [mailto:LPr@pontex.cz] Pontex s. r. o. [mailto:pontex@pontex.cz] [http://www.pontex.cz] Bezová 1658 147 14 Praha 4 Tel: +420 244 062 238 Fax: +420 244 461 038
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
2011/8/4 Procházka Lukáš Ing. - Pontex s. r. o.
\setupbackgrounds[text][text][background=picture]
\setupbackgrounds[state=repeat]
It has to be two separate statements?
yes:
----
\definelayer[picture][preset=**righttop,width=\textwidth]
\setlayer[picture]{\**externalfigure[mill][width=**4cm]}
\setupbackgrounds[text][text][**background=picture] \setupbackgrounds[state=**repeat]
\starttext \input knuth \page \input knuth \stoptext
One more point. It will now be placed on the top right of the first page. (Or the page where you do the \setupbackgrounds.) At the moment that is enough. But is it possible to have it place on the top right of the current paragraph? For example: \starttext \input knuth \input knuth \input knuth \stoptext And have the picture aligned with the second knuth (left or right)? -- Cecil Westerhof
![](https://secure.gravatar.com/avatar/93131e1e6e2204bd13501390d768dbdc.jpg?s=120&d=mm&r=g)
Am 03.08.2011 um 09:52 schrieb Cecil Westerhof:
I am converting my CV to ConTeXt. Simplified I have the folowing in it: \startfiguretext[right]{none}{\externalfigure[graphics/pasfotoKlein]} \startalignment[center] E-mail: cecil@decebal.nl
Woonplaats: Werkhoven
Geboren: 15 april 1963 te Belleville Ontario (Can.)
Nationaliteit: Nederlandse, tevens Canadese
Geslacht: Man
Burgerlijke staat: ongehuwd
LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stopalignment \stopfiguretext
\startlines[align=middle] E-mail: cecil@decebal.nl Woonplaats: Werkhoven Geboren: 15 april 1963 te Belleville Ontario (Can.) Nationaliteit: Nederlandse, tevens Canadese Geslacht: Man Burgerlijke staat: ongehuwd LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stoplines Wolfgang
![](https://secure.gravatar.com/avatar/3b89ade8854fe10b5e3f8c87c6fa82f5.jpg?s=120&d=mm&r=g)
2011/8/3 Wolfgang Schuster
Am 03.08.2011 um 09:52 schrieb Cecil Westerhof:
I am converting my CV to ConTeXt. Simplified I have the folowing in it: \startfiguretext[right]{none}{\externalfigure[graphics/pasfotoKlein]} \startalignment[center] E-mail: cecil@decebal.nl
Woonplaats: Werkhoven
Geboren: 15 april 1963 te Belleville Ontario (Can.)
Nationaliteit: Nederlandse, tevens Canadese
Geslacht: Man
Burgerlijke staat: ongehuwd
LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stopalignment \stopfiguretext
\startlines[align=middle] E-mail: cecil@decebal.nl Woonplaats: Werkhoven Geboren: 15 april 1963 te Belleville Ontario (Can.) Nationaliteit: Nederlandse, tevens Canadese Geslacht: Man Burgerlijke staat: ongehuwd LinkedIn profiel: http://www.linkedin.com/in/cecilwesterhof \stoplines
Has the same output as my code. -- Cecil Westerhof
participants (4)
-
Cecil Westerhof
-
Procházka Lukáš Ing. - Pontex s. r. o.
-
Willi Egger
-
Wolfgang Schuster