[NTG-context] scancsv.lua

2010-09-26 Thread Daniel Grycman
Hi all,

I use the sancsv.lua libray by Jaroslav Hajtmar for the typesetting of a
study guide at the German Department at Ruhr-University. By reading the
data of csv-eile Textmate canceled with the following messages. The
csv-file has utf-8 encoding.

MTXrun | run 1: luatex
--fmt=/Users/grycman/Library/texlive/2010/texmf-var/luatex-cache/context/e
9159e878e989105b2ef2d27fad97515/formats/cont-en
--lua=/Users/grycman/Library/texlive/2010/texmf-var/luatex-cache/context/e
9159e878e989105b2ef2d27fad97515/formats/cont-en.lui --backend=pdf
/Users/grycman/Dropbox/Uni/kvvtest.tex
This is LuaTeX, Version beta-0.60.2-2010071217 (TeX Live 2010) (rev 3736)
\write18 enabled.
(/Users/grycman/Dropbox/Uni/kvvtest.tex
publications: loading formatting style from bxml-apa
(/usr/local/texlive/2010/texmf-dist/tex/context/base/bxml-apa.mkiv)

ConTeXt  ver: 2010.05.24 13:05 MKIV  fmt: 2010.9.20  int: english/english

system  : cont-new loaded
(/usr/local/texlive/2010/texmf-dist/tex/context/base/cont-new.tex
systems : beware: some patches loaded from cont-new.tex
(/usr/local/texlive/2010/texmf-dist/tex/context/base/cont-new.mkiv))
system  : cont-fil loaded
(/usr/local/texlive/2010/texmf-dist/tex/context/base/cont-fil.tex
loading : ConTeXt File Synonyms
)
system  : cont-sys loaded
(/usr/local/texlive/2010/texmf-config/tex/context/user/cont-sys.tex
(/usr/local/texlive/2010/texmf-dist/tex/context/base/type-def.mkiv)
(/usr/local/texlive/2010/texmf-dist/tex/context/base/type-lua.mkiv)
(/usr/local/texlive/2010/texmf-dist/tex/context/base/type-siz.mkiv)
(/usr/local/texlive/2010/texmf-dist/tex/context/base/type-otf.mkiv))
system  : kvvtest.top loaded
(kvvtest.top)
fonts   : preloading latin modern fonts
{/usr/local/texlive/2010/texmf-dist/fonts/map/dvips/lm/lm-math.map}{/usr/lo
cal/texlive/2010/texmf-dist/fonts/map/dvips/lm/lm-rm.map}{/usr/local/texliv
e/2010/texmf-dist/fonts/map/pdftex/context/mkiv-base.map}
bodyfont: 12pt rm is loaded
language: language en is active
system  : module simplefonts loaded
(/usr/local/texlive/2010/texmf-dist/tex/context/third/simplefonts/t-simplef
onts.tex
loading : ConTeXt User Module / Simplefonts
)
system  : module r loaded
(/usr/local/texlive/2010/texmf-dist/tex/context/base/m-r.tex)
system  : module tikz loaded
(/usr/local/texlive/2010/texmf-dist/tex/context/pgf/frontendlayer/t-tikz.te
x (/usr/local/texlive/2010/texmf-dist/tex/context/pgf/basiclayer/t-pgf.tex
(/usr/local/texlive/2010/texmf-dist/tex/context/pgf/basiclayer/t-pgfcor.tex
(/usr/local/texlive/2010/texmf-dist/tex/context/pgf/systemlayer/t-pgfsys.t
ex
(/usr/local/texlive/2010/texmf-dist/tex/context/pgf/utilities/t-pgfrcs.tex
(/usr/local/texlive/2010/texmf-dist/tex/context/pgf/utilities/t-pgfmod.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfutil-comm
on.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfutil-conte
xt.def)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.t
ex))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code
.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.
tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdft
ex.def
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-comm
on-pdf.def)) (kvvtest.pgf))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftp
ath.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/systemlayer/pgfsysproto
col.code.tex))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code
.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.t
ex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.t
ex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathparser.code
.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathoperations.
code.tex
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathtrig.code.t
ex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathrnd.code.te
x))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/math/pgfmathbase.code.t
ex)))
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoint
s.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathc
onstruct.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathu
sage.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescope
s.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraph
icstate.code.tex)
(/usr/local/texlive/2010/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretrans
formations.code.tex)

Re: [NTG-context] scancsv.lua

2010-09-26 Thread Jaroslav Hajtmar

Hello Daniel.

Malfunction your code was caused by two things:

1. CSV file contains TeX problematic characters (eg underscore_ which is 
used only in math mode) - should therefore be set catcodes.

Correction is for example here:

\def\lineaction{
\catcode`\_=12
\catcode`\%=12
\catcode`\=12
\catcod...@=12
% etc...
\expanded{
\bTD\ssxx\Name, \Vorname, \Titel, \Bezeichnung \eTD
\bTD\ssxx\Mail \eTD
\bTD\ssxx\Raum \eTD
\bTD\ssxx\Telefon \eTD}
}



2. A simple parser that I wrote not process general CSV files (it not 
allow some items were in quotation marks and not others. That is, if you 
use within the field delimiter, must be ALL ITEMS quoted!) I modified 
the lines 16 and 198 your CSV table, which contained a single delimiter 
in quotes (instead of a semicolon delimiter, I used a comma)


I change 16. line from:

Bialluch;Kathrin;;Lehrbeauftragte;kathrinbiall...@web.de; 
kathrin.biall...@stimme-dortmund.de;;


to line:

Bialluch;Kathrin;;Lehrbeauftragte;kathrinbiall...@web.de, 
kathrin.biall...@stimme-dortmund.de;;


and on 198 line I made the same correction ... (library interpreting 
more columns ...)


3. I modified the code so that the tables, the tables are split at page 
breaks.

eg:
\def\bfilehook{\setupTABLE[split=yes]\bTABLE}


Will now compile properly. I hope that everything will be OK ...
To Your address I am sending corrected files (as attachment) ..., to 
conference I am sending only plain text...

Rejoice in my library, I hope they will serve well ...

Jarda Hajtmar




Re: [NTG-context] scancsv.lua.eml

Předmět:
Re: [NTG-context] scancsv.lua
Od:
Daniel Grycman daniel.gryc...@rub.de
Datum:
26 Sep 2010 22:46:19 +0200

Komu:
hajt...@gyza.cz


Dne 26.9.2010 22:46, Daniel Grycman napsal(a):


Re: [NTG-context] scancsv.lua.eml

Předmět:
Re: [NTG-context] scancsv.lua
Od:
Daniel Grycman daniel.gryc...@rub.de
Datum:
26 Sep 2010 22:46:19 +0200

Komu:
hajt...@gyza.cz


Hello Jaroslav,

the files attached. The csv lines (181-183) are commented in the source.

Daniel

On 26.09.10 22:38, Jaroslav Hajtmarhajt...@gyza.cz  wrote:

   

Hello Daniel.
Send me your source code (or minimal example which has an error) and CSV
file too (or minimal example ...if it possible)...
I try to find out where the problem is

Jaroslav





Dne 26.9.2010 22:31, Daniel Grycman napsal(a):
 

  Hi all,

  I use the sancsv.lua libray by Jaroslav Hajtmar for the typesetting of a
  study guide at the German Department at Ruhr-University. By reading the
  data of csv-eile Textmate canceled with the following messages. The
  csv-file has utf-8 encoding.

  MTXrun | run 1: luatex
  


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] scancsv.lua

2010-09-26 Thread Daniel Grycman
Hello Jaroslav,

everything works fine :-).

Daniel

On 27.09.10 00:18, Jaroslav Hajtmar hajt...@gyza.cz wrote:

Hello Daniel.

Malfunction your code was caused by two things:

1. CSV file contains TeX problematic characters (eg underscore_ which is
used only in math mode) - should therefore be set catcodes.
Correction is for example here:

\def\lineaction{
\catcode`\_=12
\catcode`\%=12
\catcode`\=12
\catcod...@=12
% etc...
\expanded{
\bTD\ssxx\Name, \Vorname, \Titel, \Bezeichnung \eTD
\bTD\ssxx\Mail \eTD
\bTD\ssxx\Raum \eTD
\bTD\ssxx\Telefon \eTD}
}



2. A simple parser that I wrote not process general CSV files (it not
allow some items were in quotation marks and not others. That is, if you
use within the field delimiter, must be ALL ITEMS quoted!) I modified
the lines 16 and 198 your CSV table, which contained a single delimiter
in quotes (instead of a semicolon delimiter, I used a comma)

I change 16. line from:

Bialluch;Kathrin;;Lehrbeauftragte;kathrinbiall...@web.de;
kathrin.biall...@stimme-dortmund.de;;

to line:

Bialluch;Kathrin;;Lehrbeauftragte;kathrinbiall...@web.de,
kathrin.biall...@stimme-dortmund.de;;

and on 198 line I made the same correction ... (library interpreting
more columns ...)

3. I modified the code so that the tables, the tables are split at page
breaks.
eg:
\def\bfilehook{\setupTABLE[split=yes]\bTABLE}


Will now compile properly. I hope that everything will be OK ...
To Your address I am sending corrected files (as attachment) ..., to
conference I am sending only plain text...
Rejoice in my library, I hope they will serve well ...

Jarda Hajtmar




Re: [NTG-context] scancsv.lua.eml

Předmět:
Re: [NTG-context] scancsv.lua
Od:
Daniel Grycman daniel.gryc...@rub.de
Datum:
26 Sep 2010 22:46:19 +0200

Komu:
hajt...@gyza.cz


Dne 26.9.2010 22:46, Daniel Grycman napsal(a):

 Re: [NTG-context] scancsv.lua.eml

 Předmět:
 Re: [NTG-context] scancsv.lua
 Od:
 Daniel Grycman daniel.gryc...@rub.de
 Datum:
 26 Sep 2010 22:46:19 +0200

 Komu:
 hajt...@gyza.cz


 Hello Jaroslav,

 the files attached. The csv lines (181-183) are commented in the source.

 Daniel

 On 26.09.10 22:38, Jaroslav Hajtmarhajt...@gyza.cz  wrote:


 Hello Daniel.
 Send me your source code (or minimal example which has an error) and
CSV
 file too (or minimal example ...if it possible)...
 I try to find out where the problem is
 
 Jaroslav
 
 
 
 
 
 Dne 26.9.2010 22:31, Daniel Grycman napsal(a):
  
   Hi all,
 
   I use the sancsv.lua libray by Jaroslav Hajtmar for the
typesetting of a
   study guide at the German Department at Ruhr-University. By
reading the
   data of csv-eile Textmate canceled with the following messages.
The
   csv-file has utf-8 encoding.
 
   MTXrun | run 1: luatex
   

__
_
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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___