From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/51082 Path: news.gmane.org!not-for-mail From: Gerben Wierda Newsgroups: gmane.comp.tex.context Subject: Re: Printing source code intelligently with ConTeXt (with overlay) Date: Sat, 6 Jun 2009 16:16:06 +0200 Message-ID: References: <4A200B99.90307@wxs.nl> <4B4A0B08-82F7-4F80-9A7E-43314831947E@gmail.com> <7746F014-C28F-447E-A679-E195F05858E1@gmail.com> 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 1244297837 11066 80.91.229.12 (6 Jun 2009 14:17:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 6 Jun 2009 14:17:17 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sat Jun 06 16:17:12 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 1MCwhs-0000GX-MX for gctc-ntg-context-518@m.gmane.org; Sat, 06 Jun 2009 16:17:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id E657B1FBC5; Sat, 6 Jun 2009 16:17:11 +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 09560-03; Sat, 6 Jun 2009 16:16:28 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 525071FB77; Sat, 6 Jun 2009 16:16:28 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 6B7611FB77 for ; Sat, 6 Jun 2009 16:16:26 +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 02300-07 for ; Sat, 6 Jun 2009 16:16:18 +0200 (CEST) Original-Received: from filter3-nij.mf.surf.net (filter3-nij.mf.surf.net [195.169.124.154]) by ronja.ntg.nl (Postfix) with ESMTP id F294A1FB6D for ; Sat, 6 Jun 2009 16:16:17 +0200 (CEST) Original-Received: from smtp-4.concepts.nl (smtp-4.concepts.nl [213.197.30.111]) by filter3-nij.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n56EGE13024535 for ; Sat, 6 Jun 2009 16:16:15 +0200 Original-Received: from d594e7d0.dsl.concepts.nl ([213.148.231.208] helo=certified.rna.nl) by smtp-4.concepts.nl with esmtp (Exim 4.69) (envelope-from ) id 1MCwgu-0000gx-GO for ntg-context@ntg.nl; Sat, 06 Jun 2009 16:16:12 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by certified.rna.nl (Postfix) with ESMTP id 981F92622ECB for ; Sat, 6 Jun 2009 16:16:07 +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 9x1jTd1zpzVA for ; Sat, 6 Jun 2009 16:16:06 +0200 (CEST) Original-Received: from hermione-a.rna.nl (hermione-a.rna.nl [192.168.2.87]) by certified.rna.nl (Postfix) with ESMTP id C4DF42622EB9 for ; Sat, 6 Jun 2009 16:16:06 +0200 (CEST) In-Reply-To: <7746F014-C28F-447E-A679-E195F05858E1@gmail.com> X-Priority: 3 (Normal) X-Mailer: Apple Mail (2.935.3) X-Concepts-MailScanner-Information: Please contact abuse@concepts.nl for more information X-Concepts-MailScanner-ID: 1MCwgu-0000gx-GO 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.111; 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: 238529840 - 25836bccae02 - 20090606 X-Scanned-By: CanIt (www . roaringpenguin . com) on 195.169.124.154 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:51082 Archived-At: The overlay if a prelimiary of IfSQ code inspection (http:// www.ifsq.org). Source code is printed with the overlay and then a visual inspection process is performed using the overlay to keep track of results. I tried the following with a test TeX file (no landscape or line numbers yet): > \defineoverlay[ifsqoverlay][\overlayfigure{IfSQ-overlay.pdf}] > \starttext > \setupbackgrounds[page][overlay=ifsqoverlay] > \typefile[SQL][]{details.pls} > \stoptext And the start of file details.pls is: > PACKAGE BODY DETAILS IS > /* Let op: wanneer er foutmeldingen ontstaan als > "Invalid cursor" en > "Missing mandotory parameter (ORA-01009) > dan wordt de form waarschijnlijk aangeroepen met "shared library > data" > Kijk eerst bij de aanroep en zorg dat de aanroep met > "no_share_library_data" > is > */ > -- mantis 1055: g_aantal_items toegevoegd en in update_details > p_aanroeper toege > voegd. > > -- lokaal: > -- globale variabelen, eenmalig gezet bij initialisatie > g_debug boolean := false; -- aanzetten om debuggen te vergemakkelijken > g_max_lengte NUMBER := 2.5; > g_max_hoogte NUMBER := 1.5; > g_begin_pos_x NUMBER := 5; > g_begin_pos_y NUMBER := 2.844; > g_alleen_tonen VARCHAR2(1) := 'N'; > g_aantal_structuren NUMBER := -9; -- -9 en 9 zijn "schakel-waarden" > g_multi BOOLEAN := TRUE; But that ends in tears: > (/usr/local/texlive/2008/texmf-dist/tex/context/base/pdfr-def.tex) > systems : begin file testsql at line 2 > (/usr/local/texlive/2008/texmf-dist/tex/context/base/verb-sql.tex > loading : Context Support Macros / Pretty SQL Verbatim > (/usr/local/texlive/2008/texmf-dist/tex/context/base/verb-pl.tex > loading : Context Support Macros / Pretty PERL Verbatim > )) > Overfull \hbox (23.9878pt too wide) in paragraph at lines 4--4 > []|[] [][] [][] []\*12pttttftt*: dan[] []wordt[] []de[] []form[] > []waarschijnli > jk[] []aangeroepen[] []met[] []"shared[] []library[] []data" > > Overfull \hbox (61.03781pt too wide) in paragraph at lines 4--4 > []|[] [][] [][] []\*12pttttftt*: Kijk[] []eerst[] []bij[] []de[] > []aanroep[] [] > en[] []zorg[] []dat[] []de[] []aanroep[] []met[] > []"no_share_library_data"[] > ! Undefined control sequence. > \doSQLtypefourfour ...ntfalse \prettyverbatimfont > \fi \else > \endPLtypesix \b... > */ > \relax \flushrestofverbatimline > \processverbatimline #1->#1 > > \dodoverbatimline ...ax \flushrestofverbatimline } > \endverbatimline > \global \... > > \presetnormalverbatimline ...\doflushverbatimline > \fi \global \let > \savedver... > > \readline ...line \else \presetnormalverbatimline > \fi \fi \fi \fi > \handlever... > ... > l.4 \typefile[SQL][]{details.pls} > > ? x The overlay I am using is: http://www.ifsq.org/resources/level-2/overlay.pdf If prettyprinting does not work I would be happy with verbatim print with line numbers and correct indentation. Gerben On 6 Jun 2009, at 15:58, Wolfgang Schuster wrote: > > Am 06.06.2009 um 15:52 schrieb Gerben Wierda: > >> Here is the question. I have source code which i want to print >> using an overlay in PDF, linenumbers, fixed width font, correct >> indentation of tabs and in landscape mode. I could create some of >> this with the pr program, but preferably I would like some sort of >> ConTeXt setup which I could automate. > > What do you want to do with the overlay? > > Wolfgang > > ___________________________________________________________________________________ > 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 ___________________________________________________________________________________