From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/62587 Path: news.gmane.org!not-for-mail From: =?iso-8859-2?B?UHJvY2jhemthIEx1a+G5IEluZy4gLSBQb250ZXggcy4gci4gby4=?= Newsgroups: gmane.comp.tex.context Subject: Re: Temporary landscape Date: Wed, 13 Oct 2010 17:12:08 +0200 Message-ID: References: <4CB5B91C.6000409@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-2"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1286982751 16186 80.91.229.12 (13 Oct 2010 15:12:31 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 13 Oct 2010 15:12:31 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Wed Oct 13 17:12:29 2010 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P630B-0005Zq-Kv for gctc-ntg-context-518@m.gmane.org; Wed, 13 Oct 2010 17:12:24 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 4EE78CA714; Wed, 13 Oct 2010 17:12:22 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id flcbcpoQd880; Wed, 13 Oct 2010 17:12:19 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 05608CA6DF; Wed, 13 Oct 2010 17:12:19 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id A6022CA6DF for ; Wed, 13 Oct 2010 17:12:17 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id pZvpfzxr2hV6 for ; Wed, 13 Oct 2010 17:12:15 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by balder.ntg.nl (Postfix) with ESMTP id 6D6DACA620 for ; Wed, 13 Oct 2010 17:12:15 +0200 (CEST) Original-Received: from mail.pontex.cz (mail.pontex.cz [89.233.168.98]) by filter3-nij.mf.surf.net (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id o9DFCDQn022340 for ; Wed, 13 Oct 2010 17:12:14 +0200 Original-Received: from localhost ([127.0.0.1]) by mail.pontex.cz (Kerio MailServer 6.6.2) for ntg-context@ntg.nl; Wed, 13 Oct 2010 17:12:10 +0200 In-Reply-To: User-Agent: Opera Mail/10.10 (Win32) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=89.233.168.98; country=CZ; region=52; city=Prague; latitude=50.0833; longitude=14.4667; http://maps.google.com/maps?q=50.0833,14.4667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 0dDifcdU2 - d4a0f52c910d - 20101013 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.12 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:62587 Archived-At: Thank you both for the suggestions. My final code looks like this: --- \def\PushPaperSize{\edef\PopPaperSize{\setuppapersize[\papersize][\printpap= ersize]}} \definehead[subjectLand][subject] \setuphead[subjectLand][before=3D{\PushPaperSize\page},style=3Dbold] \setuptyping[Dim][bodyfont=3Dsmall,style=3D{\ttx\setupinterlinespace}] \starttext \def\T#1#2{ \subjectLand{#1} \setuppapersize[A4,landscape][A4,landscape] \typefile[Dim]{../../Statics/Dim/Res/#2.txt} \typefile[Dim]{../../Statics/Dim/Res/#2.txt} % Just to test (=3D> more= than one page) \typefile[Dim]{../../Statics/Dim/Res/#2.txt} % Just to test (=3D> more= than one page) \page \PopPaperSize } \T{A}{ULS-MMax-iDL} \T{B}{ULS-MMax-iDL} \T{C}{ULS-MMax-iDL} \T{D}{ULS-MMax-iDL} AAA \stoptext --- I'd have one more question about page layout - let's have the following cod= e: --- \showframe \starttext AAA \page \setuppapersize[A4,landscape][A4,landscape] BBB \page \setuppapersize[A4,landscape][A4,landscape] \setuplayout[topspace=3D3in] % How to change text height to keep the bot= tom print range? CCC \stoptext --- In this example, I changed the topsize by 2in, i.e. 3in (new value) - 1in (= default =3D previous value). And I want to shorten the textheight by the sa= me difference, i.e. by 2in (i.e. to keep the bottom range of print space). I know that I can set textheight directly - but I don't want to do so, I wa= nt this value to be computed from the change of the topsize. Is it possible= somehow? Moreover, would it be possible by Lua code? Something like this (pseudo)cod= e: --- \startluacode local ts, th =3D context.topspace, context.textheight local dif =3D 72 -- 72bp =3D 1in -- Or to call a conversion routine, e.g. in2bp(1), if it = exists? ts =3D ts + dif th =3D th - dif context(string.format("\\setuplayout[topspace=3D%i,textheight=3D%i]", ts= , th)) -- or: context.setuplayout{topspace=3Dts, textheight=3Dth} \stopluacode --- Best regards, Lukas On Wed, 13 Oct 2010 16:03:33 +0200, Aditya Mahajan wrot= e: > On Wed, 13 Oct 2010, Hans Hagen wrote: > >> On 13-10-2010 3:22, Proch=E1zka Luk=E1=B9 Ing. - Pontex s. r. o. wrote: >>> Hello, >>> >>> I need to typeset contents of a wide file. This works: >>> >>> --- >>> \starttext >>> >>> \setuppapersize[A4,landscape][A4,landscape] >>> \typefile[Dim]{Cha-MMax-iDL.txt} >>> >>> \page >>> >>> % RESTORE ORIGINAL PAGE SETTINGS >>> >>> AAA >>> >>> \stoptext >> >> You can wikify this: >> >> \setuplayout >> [location=3Dmiddle] >> >> \showframe >> >> \def\PushPaperSize >> {\edef\PopPaperSize{\setuppapersize[\papersize][\printpapersize]}} >> >> \starttext >> \setuppapersize[A4][A3] >> test \page >> \PushPaperSize >> \setuppapersize[A4,landscape][A3,landscape] >> test \page >> \PopPaperSize >> test \page >> \stoptext > > From my to be completed TUGboat article: > > \section {Changing paper size within a document} > > To get one page (containing a table or a figure) in landscape > mode, you can use \type{\adaptpapersize}. For example, > > \starttyping > \definepapersize[main] [A4] [A4] > \definepapersize[extra][A4,landscape] > [A4,landscape] > > \setuppapersize[main] > \starttext > Page 1. Potrait \page > Page 2. Potrait \page > \adaptpapersize[extra] > Page 3. Landscape \page > Page 4. Potrait \page > \stoptext > \stoptyping > > If you have a full page figure that you want to include in a landscape > paper, you can combine \type{\adaptpapersize} with \CONTEXT's postponing > mechanism. > > \starttyping > \startpostponing > \adaptpapersize[extra] > \placefigure > [here] > [fig:reference] > {The caption of the figure} > {\extrenalgraphics[full-page-figure]} > \page > \stoppostponing > \stoptyping > > The \type{postponing} environment postpones the figure until the next > page. When the new page starts, \type{\adaptpapersize} changes to > landscape mode. The \type{\page} is the end is to make sure even if some > place is remaining on the page, we do not get any text there. > > To get more than one page in landscape, you can reuse > \type{\setuppapersize}. > For example, > > \starttyping > \definepapersize[main] [A4] [A4] > \definepapersize[extra][A4,landscape] > [A4,landscape] > > \setuppapersize[main] > \starttext > Page 1. Potrait \page > Page 2. Potrait \page > \setuppapersize[extra] > Page 3. Landscape \page > Page 4. Landscape \page > \setuppapersize[main] > Page 5. Potrait \page > Page 6. Potrait \page > \stoptext > \stoptyping > > > Aditya ___________________________________________________________________________= ________ If your question is of interest to others as well, please add an entry to t= he Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-cont= ext webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________= ________