* Layout stuff @ 2005-02-11 16:07 Adam Lindsay 2005-02-11 16:50 ` Hans Hagen 0 siblings, 1 reply; 10+ messages in thread From: Adam Lindsay @ 2005-02-11 16:07 UTC (permalink / raw) Hi all. I've been trying to get layouts working, and wanted to verify some things (as I haven't really worked much in that space before). Is there any way to "inherit" a layout's parameters, such as: \definelayout [preset-1-1] [mypresettomodify] \setuplayout [mypresettomodify][width=65\averagecharwidth] (I finally figured out how to do what I want another way, but the question is still interesting to me.) Is the only way to activate a doublesided page layout though the page numbering mechanism? Thanks, 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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Layout stuff 2005-02-11 16:07 Layout stuff Adam Lindsay @ 2005-02-11 16:50 ` Hans Hagen 2005-02-11 17:52 ` Adam Lindsay 0 siblings, 1 reply; 10+ messages in thread From: Hans Hagen @ 2005-02-11 16:50 UTC (permalink / raw) Adam Lindsay wrote: > Hi all. > > I've been trying to get layouts working, and wanted to verify some things > (as I haven't really worked much in that space before). > > Is there any way to "inherit" a layout's parameters, such as: > \definelayout [preset-1-1] [mypresettomodify] > \setuplayout [mypresettomodify][width=65\averagecharwidth] no, but you can set up left and right page layouts etc \setuplayout[odd|even|pagenumber|yourownid] > (I finally figured out how to do what I want another way, but the > question is still interesting to me.) > > Is the only way to activate a doublesided page layout though the page > numbering mechanism? indeed 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 ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Layout stuff 2005-02-11 16:50 ` Hans Hagen @ 2005-02-11 17:52 ` Adam Lindsay 2005-03-19 17:45 ` Patrick Gundlach 0 siblings, 1 reply; 10+ messages in thread From: Adam Lindsay @ 2005-02-11 17:52 UTC (permalink / raw) Hans Hagen said this at Fri, 11 Feb 2005 17:50:09 +0100: >no, but you can set up left and right page layouts etc > >\setuplayout[odd|even|pagenumber|yourownid] Yeah, I just stumbled across the even/odd thing earlier this week. Oddly, it didn't seem to respect the offset parameter, which would have been the most useful for the problem at hand. >> Is the only way to activate a doublesided page layout though the page >> numbering mechanism? > >indeed Ah. Thanks for verifying it. I saw this line in page-lay, and wondered/hoped: \setuplayout[ \c!location=, % \v!singlesided, but empty is signal ] 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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Layout stuff 2005-02-11 17:52 ` Adam Lindsay @ 2005-03-19 17:45 ` Patrick Gundlach 2005-03-19 19:13 ` Vit Zyka 0 siblings, 1 reply; 10+ messages in thread From: Patrick Gundlach @ 2005-03-19 17:45 UTC (permalink / raw) Hello out there, I don't quite understand how to use the even/odd keywords in setuplayout: \setuppagenumbering[alternative=doublesided] \setuplayout[odd][width=5cm] \setuplayout[even][width=10cm] \starttext \dorecurse{20}{\input knuth \endgraf \input tufte \endgraf} \stoptext has the same width on all pages. Patrick -- ConTeXt wiki: http://contextgarden.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Layout stuff 2005-03-19 17:45 ` Patrick Gundlach @ 2005-03-19 19:13 ` Vit Zyka 2005-03-19 19:19 ` Patrick Gundlach 0 siblings, 1 reply; 10+ messages in thread From: Vit Zyka @ 2005-03-19 19:13 UTC (permalink / raw) Patrick Gundlach wrote: > Hello out there, > > I don't quite understand how to use the even/odd keywords in > setuplayout: > > \setuppagenumbering[alternative=doublesided] > \setuplayout[odd][width=5cm] > \setuplayout[even][width=10cm] > \starttext > \dorecurse{20}{\input knuth \endgraf \input tufte \endgraf} > \stoptext I would wonder if it can be possible since changing paragraph width from page to page is *very* complicated task in TeX. vit ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Layout stuff 2005-03-19 19:13 ` Vit Zyka @ 2005-03-19 19:19 ` Patrick Gundlach 2005-03-19 21:45 ` Paul Tremblay 0 siblings, 1 reply; 10+ messages in thread From: Patrick Gundlach @ 2005-03-19 19:19 UTC (permalink / raw) Hello Vit, > Patrick Gundlach wrote: >> Hello out there, >> I don't quite understand how to use the even/odd keywords in >> setuplayout: >> \setuppagenumbering[alternative=doublesided] >> \setuplayout[odd][width=5cm] >> \setuplayout[even][width=10cm] >> \starttext >> \dorecurse{20}{\input knuth \endgraf \input tufte \endgraf} >> \stoptext > > I would wonder if it can be possible since changing paragraph width > from page to page is *very* complicated task in TeX. You are right, but we all know Hans, he does some things that are *very* complicated in TeX. And I see that part of my question has been answered before. It is a matter if \definelayout[odd], \definelayout[even] and alike. I was confused because Hans mentioned in this thread: \setuplayout[odd|even|pagenumber|yourownid] Which I can't get to work here. Patrick -- ConTeXt wiki: http://contextgarden.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Layout stuff 2005-03-19 19:19 ` Patrick Gundlach @ 2005-03-19 21:45 ` Paul Tremblay 2005-03-19 21:49 ` Patrick Gundlach 0 siblings, 1 reply; 10+ messages in thread From: Paul Tremblay @ 2005-03-19 21:45 UTC (permalink / raw) Hi Patrick, > > > > I would wonder if it can be possible since changing paragraph width > > from page to page is *very* complicated task in TeX. > > You are right, but we all know Hans, he does some things that are > *very* complicated in TeX. > > And I see that part of my question has been answered before. It is a > matter if \definelayout[odd], \definelayout[even] and alike. I was > confused because Hans mentioned in this thread: > > \setuplayout[odd|even|pagenumber|yourownid] > > Which I can't get to work here. > This should work. I have been been testing a lot of different possiblities with layout, and am writing a complete new doc to illustrate just these problems. If this code doesn't work, let me know; it means I have forgotten a line here or there. However, it is also true that you can't get TeX to change widths of paragraphs from one page to the next. (That is, as far as I know.) I posted this problem about a week ago, and no one has responded, leaving me to believe you can't to it in ConTeXt (or TeX). I posted the problem in the wiki section in the bugs page. Paul \definelayout[even][ leftmargin=30mm, rightmargin=25mm, cutspace=50mm, backspace=40mm, height=fit, width=fit, ] \definelayout[odd][ leftmargin=25mm, rightmargin=30mm, cutspace=50mm, backspace=40mm, height=fit, width=fit, ] \setuplayout -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Layout stuff 2005-03-19 21:45 ` Paul Tremblay @ 2005-03-19 21:49 ` Patrick Gundlach 2005-03-19 22:43 ` Paul Tremblay 0 siblings, 1 reply; 10+ messages in thread From: Patrick Gundlach @ 2005-03-19 21:49 UTC (permalink / raw) Hello Paul, >> And I see that part of my question has been answered before. It is a >> matter if \definelayout[odd], \definelayout[even] and alike. I was >> confused because Hans mentioned in this thread: >> >> \setuplayout[odd|even|pagenumber|yourownid] >> >> Which I can't get to work here. > This should work. I have been been testing a lot of different \definelayout \neq \setuplayout? (I got it to work with your \definelayout example, but not with Hans' \setuplayout command) > However, it is also true that you can't get TeX to change widths of > paragraphs from one page to the next. There is, of course, \parshape. And I know that Hans does a lot of paragraph trickery (see for example coloumns). Thanks, Patrick -- ConTeXt wiki: http://contextgarden.net ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Layout stuff 2005-03-19 21:49 ` Patrick Gundlach @ 2005-03-19 22:43 ` Paul Tremblay 2005-03-21 0:30 ` h h extern 0 siblings, 1 reply; 10+ messages in thread From: Paul Tremblay @ 2005-03-19 22:43 UTC (permalink / raw) > > There is, of course, \parshape. And I know that Hans does a lot of > paragraph trickery (see for example coloumns). > If you can get pages with different widths to work, please let me know! Like I said, I posted the problematic code in the wiki. It would be great to get this to work. Paul -- ************************ *Paul Tremblay * *phthenry@iglou.com * ************************ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Re: Layout stuff 2005-03-19 22:43 ` Paul Tremblay @ 2005-03-21 0:30 ` h h extern 0 siblings, 0 replies; 10+ messages in thread From: h h extern @ 2005-03-21 0:30 UTC (permalink / raw) Paul Tremblay wrote: >>There is, of course, \parshape. And I know that Hans does a lot of >>paragraph trickery (see for example coloumns). >> > > If you can get pages with different widths to work, please let me know! > Like I said, I posted the problematic code in the wiki. It would be > great to get this to work. for controlled situations it's doable by setting the parshape so, for novels you can use: \startsetups [grid] [*default] \nopenalties \stopsetups \setuppagenumbering [alternative=doublesided] \setuplayout [grid=yes] \definelayout [odd] [width=10cm, lines=40] \definelayout [even] [width=8cm, lines=40] \setuplayout [odd] \setuptolerance [verytolerant] \showframe \def\SetLineWidths {\scratchtoks \emptytoks \ifdim\pagegoal=\maxdimen \scratchdimen\textheight \ifodd\realpageno \noflines\namedlayoutparameter{odd}{lines}% \else \noflines\namedlayoutparameter{even}{lines}% \fi \else \scratchdimen\dimexpr\pagegoal-\pagetotal\relax \advance\scratchdimen-\topskipgap \getnoflines\scratchdimen \fi \ifdim\scratchdimen<\lineheight \page \else \scratchcounter\noflines\relax \ifodd\realpageno \doSetLineWidths{odd}{even}% \else \doSetLineWidths{even}{odd}% \fi \parshape \scratchcounter \the\scratchtoks \relax \ignorespaces \fi} \def\doSetLineWidths#1#2% {\dorecurse\noflines {\appendetoks 0cm \namedlayoutparameter{#1}{width} \to\scratchtoks}% \dorecurse{2} {\advance\scratchcounter\namedlayoutparameter{#2}{lines}\relax \dorecurse{\namedlayoutparameter{#2}{lines}} {\appendetoks 0cm \namedlayoutparameter{#2}{width} \to\scratchtoks}% \advance\scratchcounter\namedlayoutparameter{#1}{lines}\relax \dorecurse{\namedlayoutparameter{#1}{lines}} {\appendetoks 0cm \namedlayoutparameter{#1}{width} \to\scratchtoks}}} \dontcomplain \EveryPar{\SetLineWidths} \starttext \dorecurse{25}{\dorecurse{4}{\input tufte }\par} \stoptext no guarantees, no kernel stuff either, maybe some fun module 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 ----------------------------------------------------------------- ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-03-21 0:30 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2005-02-11 16:07 Layout stuff Adam Lindsay 2005-02-11 16:50 ` Hans Hagen 2005-02-11 17:52 ` Adam Lindsay 2005-03-19 17:45 ` Patrick Gundlach 2005-03-19 19:13 ` Vit Zyka 2005-03-19 19:19 ` Patrick Gundlach 2005-03-19 21:45 ` Paul Tremblay 2005-03-19 21:49 ` Patrick Gundlach 2005-03-19 22:43 ` Paul Tremblay 2005-03-21 0:30 ` h h extern
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).