Pretty print SQL broken? Or am I doing something wrong?
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
verb-sql.tex seems not to work correctly. Is it broken or am I doing something wrong? I call it as this: \definetyping[SQL][option=color,numbering=line,bodyfont=9pt] \defineoverlay[ifsqoverlay][\overlayfigure{IfSQ-overlay.pdf}] \setupcolors[state=start] \setuplayout[leftmargin=10mm,rightmargin=0mm,footer=0mm,header=5mm] \setuppapersize[A4,landscape][a4,landscape] \setupbackgrounds[page][background=ifsqoverlay] \setuptyping[SQL][palet=colorpretty] \starttext \typefile[SQL][]{test2.txt} \stoptext I get rather strange coloration. I would expect comments to be colored differently, but only start and end character are. When I run PL/SQL through the formatter, variable names as bar_foo get only the _ colored, etc.
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
On 8 Jun 2009, at 09:59, Berend de Boer wrote:
"Gerben" == Gerben Wierda
writes: Gerben> verb-sql.tex seems not to work correctly. Is it broken or Gerben> am I doing something wrong?
What if you use lowercase?
For 'SQL' I assume I should use 'sql'. When I do that, exactly the same happens. Yours, Gerben
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
Nobody has a solution for my problem with non-working colouration of code? G On 9 Jun 2009, at 00:12, Gerben Wierda wrote:
On 8 Jun 2009, at 09:59, Berend de Boer wrote:
> "Gerben" == Gerben Wierda
writes: Gerben> verb-sql.tex seems not to work correctly. Is it broken or Gerben> am I doing something wrong?
What if you use lowercase?
For 'SQL' I assume I should use 'sql'. When I do that, exactly the same happens.
Yours,
Gerben
___________________________________________________________________________________ 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 ___________________________________________________________________________________
![](https://secure.gravatar.com/avatar/49e63acb01f2ca80efce7eed08310ce8.jpg?s=120&d=mm&r=g)
Gerben Wierda wrote:
Nobody has a solution for my problem with non-working colouration of code?
the sql filter in mkii was not written by me ... (in mkiv we hav eno sql filter yet) Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
![](https://secure.gravatar.com/avatar/c83fb4134167a11422c23048fb8a85e3.jpg?s=120&d=mm&r=g)
On 11 Jun 2009, at 15:05, Hans Hagen wrote:
Gerben Wierda wrote:
Nobody has a solution for my problem with non-working colouration of code?
the sql filter in mkii was not written by me ...
So, who did? Or is there documentation on how this works so I can look at it myself? G
![](https://secure.gravatar.com/avatar/2a812c9d06e0a83559f2a4f49dd99568.jpg?s=120&d=mm&r=g)
"Gerben" == Gerben Wierda
writes:
Gerben> For 'SQL' I assume I should use 'sql'. When I do that, Gerben> exactly the same happens. I mean "select" instead of "SELECT". -- Groetjes, Berend.
![](https://secure.gravatar.com/avatar/2a812c9d06e0a83559f2a4f49dd99568.jpg?s=120&d=mm&r=g)
"Gerben" == Gerben Wierda
writes:
"Gerben" == Gerben Wierda
writes: >> Gerben> For 'SQL' I assume I should use 'sql'. When I do that, Gerben> exactly the same happens. >> >> I mean "select" instead of "SELECT".
Hi Gerben, Just following up publicly on the files you sent me, this works for me: \setuptyping[SQL][palet=colorpretty] \def\typeSQLfile{\typefile[SQL]} \starttext \typeSQLfile{test2.txt} \stoptext So changes: 1. Don't define the typing, it's already. 2. use SQL, not sql. 3. Your SQL keywords must be lowercase not UPPERcase, else they won't get highlighted. 4. comments inside your SQL file trip up the parser, don't know why, but just leave them out. -- Groetjes, Berend.
participants (3)
-
Berend de Boer
-
Gerben Wierda
-
Hans Hagen