Hi, imposition in ConTeXt is great, but... 1. When I last used it (MkII), I had to invoke texexec with the --arrange option or something like this. Does it work in an easier way with MkIV? (I mean, I just do context filename and don't care about multiple runs etc.) 2. I'd like to prepare a cheat sheet of size, say, A6, so I want *the same page* to be repeated 4 times on an A4 sheet. Is there a "canonical" way to do it? (I mean, other than copying-and-pasting, or equivalently, defining a macro and repeating it 4 times?) TIA -- Marcin Borkowski
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Hi,
imposition in ConTeXt is great, but...
1. When I last used it (MkII), I had to invoke texexec with the --arrange option or something like this. Does it work in an easier way with MkIV? (I mean, I just do context filename and don't care about multiple runs etc.)
In MkIV you don't need to pass --arrange. In one of my projects, I have \setuppapersize[halfletter][letter,landscape] \setuparranging[2SIDE] (where halfletter is a user-defined page) and just calling context works.
2. I'd like to prepare a cheat sheet of size, say, A6, so I want *the same page* to be repeated 4 times on an A4 sheet. Is there a "canonical" way to do it? (I mean, other than copying-and-pasting, or equivalently, defining a macro and repeating it 4 times?)
You can write a macro that reads a pdf file and outputs each of its page four times. For example (untested): \getfiguredimensions[file]% \edef\NOfpages{\noffigurepages}% \dorecurse{\NOfpages} {\dorecurse{4} {\startTEXpage \externalfigure[file][page=\recurselevel]% \stopTEXpage}} and then do the arranging. Aditya
Dnia 2011-08-25, o godz. 18:59:32
Aditya Mahajan
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Hi,
imposition in ConTeXt is great, but...
1. When I last used it (MkII), I had to invoke texexec with the --arrange option or something like this. Does it work in an easier way with MkIV? (I mean, I just do context filename and don't care about multiple runs etc.)
In MkIV you don't need to pass --arrange. In one of my projects, I have
\setuppapersize[halfletter][letter,landscape] \setuparranging[2SIDE]
(where halfletter is a user-defined page) and just calling context works.
I thought so; yet another great feature of MkIV!
2. I'd like to prepare a cheat sheet of size, say, A6, so I want *the same page* to be repeated 4 times on an A4 sheet. Is there a "canonical" way to do it? (I mean, other than copying-and-pasting, or equivalently, defining a macro and repeating it 4 times?)
You can write a macro that reads a pdf file and outputs each of its page four times. For example (untested):
\getfiguredimensions[file]% \edef\NOfpages{\noffigurepages}% \dorecurse{\NOfpages} {\dorecurse{4} {\startTEXpage \externalfigure[file][page=\recurselevel]% \stopTEXpage}}
and then do the arranging.
Thanks - but this is exactly what I do *not* want to do. My first idea was to do something like \def\onepageworthofmaterial{<whatever>\page} \dorecurse{4}{\onepageworthofmaterial} which is similar, but simpler. I thought that maybe there's another, "ConTeXt way"... but if not, I'm fine with that.
Aditya
-- Marcin Borkowski
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
2. I'd like to prepare a cheat sheet of size, say, A6, so I want *the same page* to be repeated 4 times on an A4 sheet. Is there a "canonical" way to do it? (I mean, other than copying-and-pasting, or equivalently, defining a macro and repeating it 4 times?)
You can write a macro that reads a pdf file and outputs each of its page four times. For example (untested):
\getfiguredimensions[file]% \edef\NOfpages{\noffigurepages}% \dorecurse{\NOfpages} {\dorecurse{4} {\startTEXpage \externalfigure[file][page=\recurselevel]% \stopTEXpage}}
and then do the arranging.
Thanks - but this is exactly what I do *not* want to do. My first idea was to do something like
\def\onepageworthofmaterial{<whatever>\page} \dorecurse{4}{\onepageworthofmaterial}
which is similar, but simpler.
You will need to tweak the output routine for that. See the definition of \dofinaloutput and \dopagebody. But that can be tricky. Aditya Fools rush in where angels fear to tread.
Dnia 2011-08-25, o godz. 19:19:13
Aditya Mahajan
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Thanks - but this is exactly what I do *not* want to do. My first idea was to do something like
\def\onepageworthofmaterial{<whatever>\page} \dorecurse{4}{\onepageworthofmaterial}
which is similar, but simpler.
You will need to tweak the output routine for that. See the definition of \dofinaloutput and \dopagebody. But that can be tricky.
Why? I thought this should Just Work™?
Aditya
-- Marcin Borkowski
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Dnia 2011-08-25, o godz. 19:19:13 Aditya Mahajan
napisał(a): On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Thanks - but this is exactly what I do *not* want to do. My first idea was to do something like
\def\onepageworthofmaterial{<whatever>\page} \dorecurse{4}{\onepageworthofmaterial}
which is similar, but simpler.
You will need to tweak the output routine for that. See the definition of \dofinaloutput and \dopagebody. But that can be tricky.
Why? I thought this should Just Work™?
As long as you don't have any auto-generated numbers (\section, etc) or references. Typesetting them multiple times will increment the number each time. You can prevent that by enclosing the material in a \box. Then you need to handle floats and footnotes...multiple columns....and automatical select one page worth of material. So, either you end up effective writing your own output routine, or tweaking the existing one. Fortunately, Hans already had implemented this feature :) Aditya
Dnia 2011-08-26, pią o godzinie 03:00 -0400, Aditya Mahajan pisze:
On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Dnia 2011-08-25, o godz. 19:19:13 Aditya Mahajan
napisał(a): On Fri, 26 Aug 2011, Marcin Borkowski wrote:
Thanks - but this is exactly what I do *not* want to do. My first idea was to do something like
\def\onepageworthofmaterial{<whatever>\page} \dorecurse{4}{\onepageworthofmaterial}
which is similar, but simpler.
You will need to tweak the output routine for that. See the definition of \dofinaloutput and \dopagebody. But that can be tricky.
Why? I thought this should Just Work™?
As long as you don't have any auto-generated numbers (\section, etc) or references. Typesetting them multiple times will increment the number each time. You can prevent that by enclosing the material in a \box. Then you need to handle floats and footnotes...multiple columns....and automatical select one page worth of material. So, either you end up effective writing your own output routine, or tweaking the existing one.
Aaaah, now I get it! You're right, of course - but I was right, too, since I didn't want to include things like that (of course, I didn't mention it in my first post). Thanks for your explanation!
Fortunately, Hans already had implemented this feature :)
Aditya
Regards, -- Marcin Borkowski http://mbork.pl
On 26-8-2011 00:40, Marcin Borkowski wrote:
2. I'd like to prepare a cheat sheet of size, say, A6, so I want *the same page* to be repeated 4 times on an A4 sheet. Is there a "canonical" way to do it? (I mean, other than copying-and-pasting, or equivalently, defining a macro and repeating it 4 times?)
\setuppapersize[A7,landscape][A4] \setuplayout[nx=3,ny=4] \showframe \starttext \dorecurse{12}{test \page} \stoptext ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (3)
-
Aditya Mahajan
-
Hans Hagen
-
Marcin Borkowski