Dear list,

These are the following first four lines of a CSV file:

,,
"About \LuaTeX\ and
\ConTeXt","about.pdf","https://www.pragma-ade.com/general/manuals/about.pdf";
"l2r, r2l: A Few
Tips","bidi.pdf","https://www.pragma-ade.com/general/manuals/bidi.pdf";
"Flowcharts","charts-mkiv.pdf",

Faking a command such as \cA, \cB and \cC (for contents of columns A, B
or C) I would like to create a source document with an enumeration that
contains:

  \doiftext{\cB}
    {\item {\em\cA}\attachment[file=\cB]%
      \doiftext{\cC}{ (also available at \cC)}.}

I would like to do that with the "database" module.

So far I have adapted the itemize environment, but I don't get the
contents for items right:

  \usemodule[database]

  \starttext

  \def\ItemContents#1#2#3{\doiftext{#2}
    {\item {\em #1}\attachment[file=#2]%
      \doiftext{#3}{ (also available at #3)}.}}

  \defineseparatedlist
     [test]
     [separator={,}, % tab
      quotechar={"}, % tab
      before={\startitemize[n]},after={\stopitemize},
      first={\ItemContents},last={.},
      left={\{},right={\}}]

  \processdatabasefile[test][context-documents.csv]

  \stoptext

I get an error about an unexpected symbol near "\" in the line of
"\processdatabasefile".

Could anyone enlighten me about what I am missing here?

Many thanks for your help,

Pablo
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________

Reply via email to