From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51525 Path: news.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Solution. Only one problem left ($ in file name) Date: Sun, 28 Jun 2009 18:13:27 +0200 Message-ID: <24E1DF04-5C64-4675-87B5-F2C09D8B92C4@rna.nl> References: <1DD5CFD5-56B7-4055-807A-56B42E834A4A@rna.nl> <0121BEC5-3874-4B87-B56F-20342610A598@rna.nl> <93D323AB-7050-46A4-A2D0-DC0E7F84E997@gmail.com> <58FDC3F7-9C9A-4F7F-B58A-EE8D0E926E0D@rna.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset="us-ascii"; Format="flowed"; DelSp="yes" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1246205684 3646 80.91.229.12 (28 Jun 2009 16:14:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 28 Jun 2009 16:14:44 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Jun 28 18:14:37 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1MKx1Y-0007kB-M3 for gctc-ntg-context-518@m.gmane.org; Sun, 28 Jun 2009 18:14:36 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2DDBC1FB60; Sun, 28 Jun 2009 18:14:34 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 21923-03; Sun, 28 Jun 2009 18:13:49 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 3796B1FADC; Sun, 28 Jun 2009 18:13:49 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 2C8471FADC for ; Sun, 28 Jun 2009 18:13:47 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 19815-04 for ; Sun, 28 Jun 2009 18:13:37 +0200 (CEST) Original-Received: from filter4-til.mf.surf.net (filter4-til.mf.surf.net [194.171.167.220]) by ronja.ntg.nl (Postfix) with ESMTP id BEF811FA4C for ; Sun, 28 Jun 2009 18:13:37 +0200 (CEST) Original-Received: from smtp-1.concepts.nl (smtp-1.concepts.nl [213.197.30.124]) by filter4-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n5SGDaW3004134 for ; Sun, 28 Jun 2009 18:13:37 +0200 Original-Received: from d594e7d0.dsl.concepts.nl ([213.148.231.208] helo=certified.rna.nl) by smtp-1.concepts.nl with esmtp (Exim 4.69) (envelope-from ) id 1MKx0X-00027l-Bj for ntg-context@ntg.nl; Sun, 28 Jun 2009 18:13:33 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by certified.rna.nl (Postfix) with ESMTP id 912F3276B6D8 for ; Sun, 28 Jun 2009 18:13:28 +0200 (CEST) X-Virus-Scanned: amavisd-new at rna.nl Original-Received: from certified.rna.nl ([127.0.0.1]) by localhost (vanroodewierda.rna.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rV1bhPWcOyAD for ; Sun, 28 Jun 2009 18:13:27 +0200 (CEST) Original-Received: from luna.rna.nl (luna.rna.nl [192.168.2.88]) by certified.rna.nl (Postfix) with ESMTP id DFE46276B6C9 for ; Sun, 28 Jun 2009 18:13:27 +0200 (CEST) In-Reply-To: <58FDC3F7-9C9A-4F7F-B58A-EE8D0E926E0D@rna.nl> X-Mailer: Apple Mail (2.935.3) X-Concepts-MailScanner-Information: Please contact abuse@concepts.nl for more information X-Concepts-MailScanner-ID: 1MKx0X-00027l-Bj X-Concepts-MailScanner: Found to be clean X-Concepts-MailScanner-SpamCheck: X-Concepts-MailScanner-From: gerben.wierda@rna.nl X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=213.197.30.124; country=NL; region=06; city=Roosendaal; latitude=51.5333; longitude=4.4667; http://maps.google.com/maps?q=51.5333,4.4667&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 251582427 - ef25028096b1 - 20090628 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.220 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 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 X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:51525 Archived-At: The solution to my search (thanks Wolfgang for your help) is below. I have two overlays, one for the PDF and one for the rotated heading. I reset the heading's setups at every \typeSQLfile so the name gets changed. I just add both backgrounds (this is why I like ConTeXt, stuff like that (background=header becomes background={header,ifsqoverlay} just works. What is left now is that the \expanded, \detokenize and stuff is still not able to typefile files with $ in their name. For files with _ in their name, it works now. WIthout the expanded stuff in \expanded{\typeSQLfile{\detokenize{Library-procedures/hlx$requery.pls}}} the TeX job crashes because of the $ in the file name. WIth it it does not crash but I get [fileLibrary-procedures/hlx$requery.pls does not exist] WIth \typeSQLfile{Library-procedures/hlx\$requery.pls} it also does not crash, but I get [fileLibrary-procedures/hlx\$requery.pls does not exist] G Solution so far: \def\IfSQprojectname{Foo} \definetyping[SQL][option=color,numbering=line,bodyfont=9pt] \setuppapersize[A4,landscape][a4,landscape] \setuptyping[SQL][palet=colorpretty] \setuplayout [leftmargin=20mm, leftmargindistance=5mm, footer=0mm, header=0mm, rightmargin=0mm] \definelayer[header][width=\paperwidth,height=\paperheight] \defineoverlay[ifsqoverlay][\overlayfigure{IfSQ-overlay.pdf}] \setupbackgrounds[page] [setups={header:margin},background={header,ifsqoverlay}] \def\typeSQLfile#1{% \startsetups header:margin \setlayerframed [header] [hoffset=\dimexpr\backspace-\leftmarginwidth-\leftmargindistance \relax, voffset=\dimexpr\topspace+\headerheight+\headerdistance\relax] [frame=off, orientation=90, width=\leftmarginwidth, height=\textheight, align={top,middle}] {\detokenize{#1}\hfil\pagenumber\hfil \IfSQprojectname, \date} \stopsetups \pagebreak\expanded{\typefile[SQL]{\detokenize{#1}}}} \starttext \typeSQLfile{Library-procedures/aanroep_kgcpros20.pls} \typeSQLfile{Library-procedures/details.pls} \expanded{\typeSQLfile{\detokenize{Library-procedures/hlx$requery.pls}}} \stoptext On 26 Jun 2009, at 10:47, Gerben Wierda wrote: > On 26 Jun 2009, at 10:05, Wolfgang Schuster wrote: > >>> And while I'm at it, if I want a heading in the left margin as >>> well, but I want it 90 degrees rotated, how do I do that? >> >> \setuplayout >> [leftmargin=1cm, >> leftmargindistance=5mm] >> >> \startsetups header:margin >> >> \framed >> [frame=off, >> orientation=90, >> width=\leftmarginwidth, >> height=\textheight, >> align={middle,middle}] >> {My document\hfil\pagenumber\hfil My name} >> >> \stopsetups >> >> \defineoverlay[header:margin][\setups{header:margin}] >> >> \setupbackgrounds[text][leftmargin][background={header:margin}] >> >> \starttext >> >> ... >> >> \stoptext > > Thanks. Almost there. I now have: > > \definetyping[SQL][option=color,numbering=line,bodyfont=9pt] > \defineoverlay[ifsqoverlay][\overlayfigure{IfSQ-overlay.pdf}] > \setuppapersize[A4,landscape][a4,landscape] > \setupbackgrounds[page][background=ifsqoverlay] > \setuptyping[SQL][palet=colorpretty] > \def\typeSQLfile{\typefile[SQL]} > > \setuplayout > [leftmargin=1cm, > leftmargindistance=5mm, > footer=0mm, > header=0mm, > rightmargin=0mm] > > \startsetups header:margin > \framed > [frame=off, > orientation=90, > width=2\leftmarginwidth, > height=\textheight, > align={top,middle}] > {My document\hfil\pagenumber\hfil My name} > \stopsetups > > \defineoverlay[header:margin][\setups{header:margin}] > > \setupbackgrounds[text][leftmargin][background={header:margin}] > \starttext > \typeSQLfile{Library-procedures/details.pls} > %\typeSQLfile{Library-procedures/aanroep_kgcpros20.pls} > %\typeSQLfile{Library-procedures/details.pls} > %\typeSQLfile{Library-procedures/foo_print.pls} > %\typeSQLfile{Library-procedures/hlx$requery.pls} > %\typeSQLfile{Library-procedures/kgc$adm_meerling.pls} > %\typeSQLfile{Library-procedures/kgc$bereken.pls} > %\typeSQLfile{Library-procedures/kgc$datum.pls} > %\typeSQLfile{Library-procedures/kgc$item.pls} > %\typeSQLfile{Library-procedures/kgc$tab.pls} > %\typeSQLfile{Library-procedures/kgc$toon.pls} > %\typeSQLfile{Library-procedures/print_uitslagbrief.pls} > %\typeSQLfile{Library-procedures/qms$record.pls} > %\typeSQLfile{Library-procedures/voeruit_idef.pls} > %\typeSQLfile{Library-procedures/vul_onwy_list.pls} > %\typeSQLfile{Library-procedures/zoek_item.pls} > \stoptext > > I do now have a rotated 'header' on the left side. And thanks to the > larger width and the top aligment, the rotated 'heading' does not > conflict with the line numbers. > > But ... the page number is '1' on every page > > And the I'd like to change the definition of the \typeSQLfile > command such that it changes the document name in the rotated header > too. > > G > > ___________________________________________________________________________________ > 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 : https://foundry.supelec.fr/projects/contextrev/ > wiki : http://contextgarden.net > ___________________________________________________________________________________ > ___________________________________________________________________________________ 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 : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________