* bug in multiple layouts? @ 2013-10-18 15:37 Pablo Rodriguez 2013-10-18 18:30 ` Wolfgang Schuster 0 siblings, 1 reply; 3+ messages in thread From: Pablo Rodriguez @ 2013-10-18 15:37 UTC (permalink / raw) To: mailing list for ConTeXt users Dear list, I have a sample with multiple layouts: \showframe \setuppagenumbering[alternative=doublesided, location=] \setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayout[shorter][backspace=80mm, cutspace=20mm, topspace=110mm, bottomspace=30mm] \setuplayout[shorter] \setuplayout[reset] \definelayout[1][shorter] \definelayout[2-last][reset] \starttext \dorecurse{20}{\input knuth\par} \stoptext I found two issues: the first lines on the second page have the margin from previous page, and from the third page text doesn’t reach the page bottom. Am I missing something or have I found a bug? Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bug in multiple layouts? 2013-10-18 15:37 bug in multiple layouts? Pablo Rodriguez @ 2013-10-18 18:30 ` Wolfgang Schuster 2013-10-18 22:24 ` Pablo Rodriguez 0 siblings, 1 reply; 3+ messages in thread From: Wolfgang Schuster @ 2013-10-18 18:30 UTC (permalink / raw) To: mailing list for ConTeXt users Am 18.10.2013 um 17:37 schrieb Pablo Rodriguez <oinos@gmx.es>: > Dear list, > > I have a sample with multiple layouts: > > \showframe > \setuppagenumbering[alternative=doublesided, location=] > \setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, > height=fit] > \definelayout[shorter][backspace=80mm, cutspace=20mm, topspace=110mm, > bottomspace=30mm] > \setuplayout[shorter] > \setuplayout[reset] > \definelayout[1][shorter] > \definelayout[2-last][reset] > \starttext > \dorecurse{20}{\input knuth\par} > \stoptext > > I found two issues: the first lines on the second page have the margin > from previous page, and from the third page text doesn’t reach the page > bottom. > > Am I missing something or have I found a bug? 1. reset is a keyword for \setuplayout (single argument version) and not a name for a predefined layout 2. You can’t define layouts for page ranges (e.g. 2-last), only page numbers (e.g. 2,5, or -3), names (e.g. mylayout) and keywords (e.g. first, last, odd and even) are possible. 3. The width of a paragraph is fixed and tex doesn’t changed the width of the part which is moved to the next page (there are a fix tricks to work around this limitation but they work only when you have a text only document). 4. TeX has its limitations and you have to live with them, with LuaTeX there are ways to get rid of a few of them but it takes time to write the necessary code 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: bug in multiple layouts? 2013-10-18 18:30 ` Wolfgang Schuster @ 2013-10-18 22:24 ` Pablo Rodriguez 0 siblings, 0 replies; 3+ messages in thread From: Pablo Rodriguez @ 2013-10-18 22:24 UTC (permalink / raw) To: mailing list for ConTeXt users On 10/18/2013 08:30 PM, Wolfgang Schuster wrote: >> [...] >> I found two issues: the first lines on the second page have the margin >> from previous page, and from the third page text doesn’t reach the page >> bottom. >> >> Am I missing something or have I found a bug? > > 1. reset is a keyword for \setuplayout (single argument version) and > not a name for a predefined layout > > 2. You can’t define layouts for page ranges (e.g. 2-last), only page > numbers (e.g. 2,5, or -3), names (e.g. mylayout) and keywords (e.g. > first, last, odd and even) are possible. Many thanks for your reply, Wolfgang. I want to have a different top and bottom space only for the first page. From I what I understand, here is a new sample (that doesn’t work): \showframe \setuppagenumbering[alternative=doublesided, location=] \setuplayout[margin=20mm, width=fit, topspace=45mm, bottomspace=25mm, height=fit] \definelayout[first][topspace=110mm, bottomspace=30mm] \starttext \dorecurse{20}{\input knuth\par} \stoptext I define a the standard layout, a layout for the first page, but I don’t know why the text doesn’t fill the full text area in pages other than the first. > 3. The width of a paragraph is fixed and tex doesn’t changed the > width of the part which is moved to the next page (there are a fix tricks to > work around this limitation but they work only when you have a text > only document). > > 4. TeX has its limitations and you have to live with them, with > LuaTeX there are ways to get rid of a few of them but it takes time > to write the necessary code As a workaround: is it possible that the text flow avoids layers as if it were floats? What I mean is that in the following sample the text flow avoids the rectangle: \definelayer[avoidasfloat][x=0mm, y=0mm, hoffset=8mm, voffset=101mm, location={right,bottom}, state=start] \setlayer[avoidasfloat]{\startMPcode draw (0mm,0mm)--(55mm,0mm) ; draw (0mm,0mm)--(0mm,-86mm) ; draw (0mm,-86mm)--(55mm,-86mm) ; draw (55mm,-86mm)--(55mm,0mm) ; \stopMPcode } \setupbackgrounds[page][background={avoidasfloat}] \starttext \dorecurse{4}{\input knuth\par} \stoptext How could this be done? Many thanks for your help, Pablo -- http://www.ousia.tk ___________________________________________________________________________________ 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 ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-10-18 22:24 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-10-18 15:37 bug in multiple layouts? Pablo Rodriguez 2013-10-18 18:30 ` Wolfgang Schuster 2013-10-18 22:24 ` Pablo Rodriguez
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).