Re: [NTG-context] Printing source code intelligently with ConTeXt (with overlay)
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 []|[] [][] [][] []\*12pftt*: dan[] []wordt[] []de[] []form[] []waarschijnli jk[] []aangeroepen[] []met[] []"shared[] []library[] []data" Overfull \hbox (61.03781pt too wide) in paragraph at lines 4--4 []|[] [][] [][] []\*12pftt*: 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 ___
Re: [NTG-context] Printing source code intelligently with ConTeXt (with overlay)
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 ___
[NTG-context] Printing source code intelligently with ConTeXt (with overlay)
On 4 Jun 2009, at 16:17, Wolfgang Schuster wrote: Can you ask your questions in english, your question could be relevant for other users too and it would be a shame if the don't understand it because you use dutch. Sorry, I forgot. 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. Yours, Gerben Overlay answer from Hans: \defineoverlay[myoverlay][\overlayfigure{myfile.pdf}] \setupbackgrounds[page][overlay=myoverlay] if it has to be on top: \setupbackgrounds[page][overlay={foreground,myoverlay}] ___ 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 ___