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...
<argument> */
\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
___________________________________________________________________________________