I've authored a new page on laying out pages in ConText. This page will be just one in a number of pages on using ConTeXt with XML. The new page can be found at http://www.geocities.com/paulhtremblay/context_xml/page2.html I would appreciate any feedback. I hope the page will be useful in helping others overcome some of the difficulty I had in trying to understand layout in ConTeXt. I believe it is very thorough. I hope it is clear (it contains many illustrations) and accurate. I put this page up on yahoo because it had so many graphics, and because trying to cut and paste the entire page to the wiki would have been too difficult. The yahoo location is just temporary. Probably I will create a sourceforge project to host the page. Thanks Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************
On Sat, 26 Mar 2005 12:43:33 -0500, Paul Tremblay
I've authored a new page on laying out pages in ConText. This page will be just one in a number of pages on using ConTeXt with XML.
The new page can be found at
http://www.geocities.com/paulhtremblay/context_xml/page2.html
Very useful ! Thank you, Q.
Paul Tremblay wrote:
The new page can be found at
http://www.geocities.com/paulhtremblay/context_xml/page2.html
Paul, pictures are very intuitive. Great!
I would appreciate any feedback. I hope the page will be useful in
Just as addition. If you want page number in the same (center) position in the footer, add \smash command to your example \setupfootertexts[Romanticism \hfill \pagenumber \hfill Civil Disobedience][] [][...] so \setupfootertexts[\smash{Romanticism }\hfill \pagenumber \hfill \smash{Civil Disobedience}][] [][...] vit
Just as addition. If you want page number in the same (center) position in the footer, add \smash command to your example \setupfootertexts[Romanticism \hfill \pagenumber \hfill Civil Disobedience][] [][...] so \setupfootertexts[\smash{Romanticism }\hfill \pagenumber \hfill \smash{Civil Disobedience}][] [][...]
Thanks for the feedback. What does \smash do? If I don't use \smash, my footer text appears to be in the same position, in the center. Thanks Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************
Paul Tremblay wrote:
Just as addition. If you want page number in the same (center) position in the footer, add \smash command to your example \setupfootertexts[Romanticism \hfill \pagenumber \hfill Civil Disobedience][] [][...] so \setupfootertexts[\smash{Romanticism }\hfill \pagenumber \hfill \smash{Civil Disobedience}][] [][...]
Thanks for the feedback. What does \smash do? If I don't use \smash, my footer text appears to be in the same position, in the center.
Ohh, my error. Correct code: \setupfootertexts[\rlap{Romanticism}\hfill \pagenumber \hfill \llap{Civil Disobedience}][] [][...] Consider \setupfootertexts[\rlap{A}\hfill\pagenumber\hfill\llap{B}][][][] If width(A)!=width(B) then \pagenumber is not in the center. \fill's add the equal space between A-\pagenumber and \pagenumber-B. If width(A-different-page)!=width(A) then (generaly) \pagenumber change position page-to-page. \rlap makes hbox of zero width with right overlapping, \llap with left. \smash do not change width but makes zero height and depth. That is not what we need. vit
On Sat, Mar 26, 2005 at 11:20:58PM +0100, Vit Zyka wrote:
Ohh, my error. Correct code:
\setupfootertexts[\rlap{Romanticism}\hfill \pagenumber \hfill \llap{Civil Disobedience}][] [][...]
Consider \setupfootertexts[\rlap{A}\hfill\pagenumber\hfill\llap{B}][][][] If width(A)!=width(B) then \pagenumber is not in the center. \fill's add the equal space between A-\pagenumber and \pagenumber-B. If width(A-different-page)!=width(A) then (generaly) \pagenumber change position page-to-page.
\rlap makes hbox of zero width with right overlapping, \llap with left.
Thanks! Now this makes sense. I changed the page accordingly. Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************
Paul Tremblay said this at Sat, 26 Mar 2005 12:43:33 -0500:
http://www.geocities.com/paulhtremblay/context_xml/page2.html
I would appreciate any feedback. I hope the page will be useful in helping others overcome some of the difficulty I had in trying to understand layout in ConTeXt. I believe it is very thorough. I hope it is clear (it contains many illustrations) and accurate.
Hi Paul, Your prose is fairly clear, but the style tends to be a bit too prescriptive for my tastes. I think a lot of it would be alleviated by you setting up the context a bit more ("this is what I found works for me, coming from the FO page model"). Still, you set out statements like this without telling the whole story:
Always set your width to fit.
Furthermore, I think our models of ConTeXt page layout are somewhat different. You say this in the article:
Do not make the mistake in thinking that the cutspace property is the equivelent of the backspace property. The cutspace property is the sum of some rather complicated calculations.
Looking at page-lay, it seems like your perceived "complications" would go away to some extent by telling people to use "width=middle", for example. It's clear and thorough. I have some concerns about its accuracy, however. -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Your prose is fairly clear, but the style tends to be a bit too prescriptive for my tastes. I think a lot of it would be alleviated by you setting up the context a bit more ("this is what I found works for me, coming from the FO page model"). Still, you set out statements like this without telling the whole story:
I think that the first page makes my intentions clear. My audience is XML authors (though I think others will find the illustratons useful). I undertand that there are many ways of doing things in ConTeXt and I don't mean that ConTeXt authors should follow the advice. I think XML authors will want one clear way of doing things rather than confusing alternatives.
Looking at page-lay, it seems like your perceived "complications" would go away to some extent by telling people to use "width=middle", for example.
Fixed. The page now reflects the correct changes. Thanks for yoru feedback. I wish I had understood the width=middle earlier. I had to completely re-do my graphics once when I couldn't get cutspace to work, and then I had to change it again. Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************
Paul Tremblay said this at Sun, 27 Mar 2005 01:55:58 -0500:
Your prose is fairly clear, but the style tends to be a bit too prescriptive for my tastes. I think a lot of it would be alleviated by you setting up the context a bit more ("this is what I found works for me, coming from the FO page model"). Still, you set out statements like this without telling the whole story:
I think that the first page makes my intentions clear. My audience is XML authors (though I think others will find the illustratons useful). I undertand that there are many ways of doing things in ConTeXt and I don't mean that ConTeXt authors should follow the advice. I think XML authors will want one clear way of doing things rather than confusing alternatives.
I completely sympathise with that approach to teaching. Hearing "there's more than one way to do it" at the start of a learning curve can be frustrating. I guess my gripe was with how web pages work, combined with your prescriptive tone: I only looked at that page2.html, because that's the one you linked to. Deep linking happens all the time, and Google only multiplies the problem. People seeing only that page2 lose all context, and as a result, many people who have nothing to do with XML will see your page and think "oh, that's the only way to do it." That, combined with some of your perceived limitations of the platform, helps paint a more limited view of ConTeXt's capabilities.
Thanks for yoru feedback. I wish I had understood the width=middle earlier.
Well, no problem. I feel like I'm still learning the intricacies of Layout, but I do intend on documenting some hacks sometime... A pair of "Tips": * If you set cutspace/bottomspace to 0pt, ConTeXt automatically makes it equal to backspace/topspace Now that you have cutspace sorted, horoffset and veroffset don't seem as necessary. (Especially as they don't seem to work with odd/even layouts, at least as I've observed.) There's something a bit too absolute and limiting about your statements:
Unfortunately, the text width must be the same on all pages. If you change the width from one page to the next, the text will not necessarily line up.
Taken out of context, this sounds very dire for ConTeXt. Might I suggest a qualifier "must be the same on all pages *that are part of the same text flow*." -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
On Sun, Mar 27, 2005 at 10:38:54AM +0000, Adam Lindsay wrote:
I guess my gripe was with how web pages work, combined with your prescriptive tone: I only looked at that page2.html, because that's the one you linked to. Deep linking happens all the time, and Google only multiplies the problem. People seeing only that page2 lose all context, and as a result, many people who have nothing to do with XML will see your page and think "oh, that's the only way to do it."
I agree with your point. Also, I realize I am a novice and not an expert who has worked with ConTeXt for 10 years. The problem is keeping the prose as concise as possible. Having to continually say at each description "One possible way to solve this problem that I found works for me is to..." would make things verbose. One soluton is to put a type of disclaimer at the top of each page: "This primary audience for this page is XML authors who want to use ConTeXt to format an XML document."
Thanks for yoru feedback. I wish I had understood the width=middle earlier.
Well, no problem. I feel like I'm still learning the intricacies of Layout, but I do intend on documenting some hacks sometime...
A pair of "Tips": * If you set cutspace/bottomspace to 0pt, ConTeXt automatically makes it equal to backspace/topspace
Ah! Good tip.
Now that you have cutspace sorted, horoffset and veroffset don't seem as necessary. (Especially as they don't seem to work with odd/even layouts, at least as I've observed.)
Yes, I thought of that last night. I kept that section in because it was still accurate, but I really should get rid of it.
There's something a bit too absolute and limiting about your statements:
Unfortunately, the text width must be the same on all pages. If you change the width from one page to the next, the text will not necessarily line up.
Taken out of context, this sounds very dire for ConTeXt. Might I suggest a qualifier "must be the same on all pages *that are part of the same text flow*."
Yes, I completely agree. I thought of this as well. I'll change this. Thanks again. I think your input has made my document stronger, and I hope my document will help my ConTeXt easier to understand, even in a small way. Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************
Paul Tremblay said this at Sun, 27 Mar 2005 12:28:49 -0500:
One soluton is to put a type of disclaimer at the top of each page: "This primary audience for this page is XML authors who want to use ConTeXt to format an XML document."
That would make me happier. Adding some words like "one way of many" and "simplification for the sake of instruction" would be even better.
Thanks again. I think your input has made my document stronger, and I hope my document will help my ConTeXt easier to understand, even in a small way.
I might sound harsh at times, but I *do* appreciate what you're trying to do. Layout stuff is under-represented in the documentation, especially the newer stuff. adam -- =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Adam T. Lindsay, Computing Dept. atl@comp.lancs.ac.uk Lancaster University, InfoLab21 +44(0)1524/510.514 Lancaster, LA1 4WA, UK Fax:+44(0)1524/510.492 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
BTW I added links to your pages to the XML and Layout pages of the wiki. Grüßlis vom Hraban! --- http://www.fiee.net/texnique/ http://contextgarden.net
Adam Lindsay wrote:
A pair of "Tips": * If you set cutspace/bottomspace to 0pt, ConTeXt automatically makes it equal to backspace/topspace
Is it a correct way fulfilling the ConTeXt spirit? I do not think so. If I set something to 0pt, I want it to be 0pt. If it is not set, it is default, and it might be equal to backspace/topspace. And there should be additional possibility 'cutspace=backspace' for explicit settings of equality. No? vit
Hi Paul, First of all I find your pages a good starting point. Still I believe that Adam's suggestions are correct. Within the ConTeXt environment most of the time more than one approach is possible. Humble but neither put the option width=fit nor to say layout=middle is the way to go when layouting a page on a given format of paper e.g. A4. Then you would rather calculate the position where the print should come an adjust the parameters accordingly. Willi By the way it is \starttext ... \stoptext Adam Lindsay wrote:
Paul Tremblay said this at Sat, 26 Mar 2005 12:43:33 -0500:
http://www.geocities.com/paulhtremblay/context_xml/page2.html
I would appreciate any feedback. I hope the page will be useful in helping others overcome some of the difficulty I had in trying to understand layout in ConTeXt. I believe it is very thorough. I hope it is clear (it contains many illustrations) and accurate.
Hi Paul,
Your prose is fairly clear, but the style tends to be a bit too prescriptive for my tastes. I think a lot of it would be alleviated by you setting up the context a bit more ("this is what I found works for me, coming from the FO page model"). Still, you set out statements like this without telling the whole story:
Always set your width to fit.
Furthermore, I think our models of ConTeXt page layout are somewhat different. You say this in the article:
Do not make the mistake in thinking that the cutspace property is the equivelent of the backspace property. The cutspace property is the sum of some rather complicated calculations.
Looking at page-lay, it seems like your perceived "complications" would go away to some extent by telling people to use "width=middle", for example.
It's clear and thorough. I have some concerns about its accuracy, however.
At 12:43 -0500 26/03/05, Paul Tremblay wrote:
I've authored a new page on laying out pages in ConText. This page will be just one in a number of pages on using ConTeXt with XML.
The new page can be found at
http://www.geocities.com/paulhtremblay/context_xml/page2.html
Many thanks for your insight: your explanations are very clear and useful! Best regards: OK
Paul Tremblay wrote:
I've authored a new page on laying out pages in ConText. This page will be just one in a number of pages on using ConTeXt with XML.
The new page can be found at
http://www.geocities.com/paulhtremblay/context_xml/page2.html
I would appreciate any feedback. I hope the page will be useful in helping others overcome some of the difficulty I had in trying to understand layout in ConTeXt. I believe it is very thorough. I hope it is clear (it contains many illustrations) and accurate.
I put this page up on yahoo because it had so many graphics, and because trying to cut and paste the entire page to the wiki would have been too difficult. The yahoo location is just temporary. Probably I will create a sourceforge project to host the page.
<cmd name="definelayout"> <opt> backspace = 40mm, cutspace=38mm, width=middle </opt> </cmd> no space before/after the = backspace=4mm, : works backspace= 4cm, : works in this case because used dimen assignment backspace =4cm : does not work the var name is now 'backspace ' only spaces precedign a keyword are catched 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 -----------------------------------------------------------------
participants (8)
-
Adam Lindsay
-
h h extern
-
Henning Hraban Ramm
-
Otared Kavian
-
Paul Tremblay
-
Vit Zyka
-
VnPenguin
-
Willi Egger