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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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 -----------------------------------------------------------------
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 -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
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
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
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
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 * ************************
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
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 * ************************
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 -----------------------------------------------------------------
participants (6)
-
Adam Lindsay
-
h h extern
-
Hans Hagen
-
Patrick Gundlach
-
Paul Tremblay
-
Vit Zyka