ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* processdatabasefile styling of table cells
@ 2022-04-06 11:18 juh+ntg-context--- via ntg-context
  2022-04-06 21:31 ` Bruce Horrocks via ntg-context
  0 siblings, 1 reply; 2+ messages in thread
From: juh+ntg-context--- via ntg-context @ 2022-04-06 11:18 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: juh+ntg-context


Hi all,

I include tables via csv files like this

\processdatabasefile[test][test.csv]

I was able to style the tables with this:

\setupTABLE [ split=yes, header=repeat, option=stretch,
loffset=.5ex,roffset=.5ex]

\setupTABLE [row] [odd]
[background=color,backgroundcolor=hs-hellblau,]

\setupTABLE [start] [spaceinbetween=25pt]

\defineseparatedlist
    [preislistecsv]
    [separator={;}, % tab
     before=\bTABLE,after=\eTABLE,
     first=\bTR,last=\eTR,
     left=\bTD,right=\eTD]

Is it possible to align decimal numbers in cells to the right?


The data differs a lot. Sometimes only the last column contains decimal 
numbers, sometimes the last two columns.

juh
___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: processdatabasefile styling of table cells
  2022-04-06 11:18 processdatabasefile styling of table cells juh+ntg-context--- via ntg-context
@ 2022-04-06 21:31 ` Bruce Horrocks via ntg-context
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Horrocks via ntg-context @ 2022-04-06 21:31 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Bruce Horrocks



> On 6 Apr 2022, at 12:18, juh+ntg-context--- via ntg-context <ntg-context@ntg.nl> wrote:
> 
> 
> Hi all,
> 
> I include tables via csv files like this
> 
> \processdatabasefile[test][test.csv]
> 
> I was able to style the tables with this:
> 
> \setupTABLE [ split=yes, header=repeat, option=stretch,
> loffset=.5ex,roffset=.5ex]
> 
> \setupTABLE [row] [odd]
> [background=color,backgroundcolor=hs-hellblau,]
> 
> \setupTABLE [start] [spaceinbetween=25pt]
> 
> \defineseparatedlist
>   [preislistecsv]
>   [separator={;}, % tab
>    before=\bTABLE,after=\eTABLE,
>    first=\bTR,last=\eTR,
>    left=\bTD,right=\eTD]
> 
> Is it possible to align decimal numbers in cells to the right?

This previous announcement from Hans might help.
<https://www.mail-archive.com/ntg-context@ntg.nl/msg99681.html>

> The data differs a lot. Sometimes only the last column contains decimal numbers, sometimes the last two columns.
Not sure what will happen here - try it and see. Whenever my table layouts go wildly wrong, Context usually manages to display something rather than fail with an error code. :-)

—
Bruce Horrocks
Hampshire, UK

___________________________________________________________________________________
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-06 21:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 11:18 processdatabasefile styling of table cells juh+ntg-context--- via ntg-context
2022-04-06 21:31 ` Bruce Horrocks via ntg-context

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).