Re: [NTG-context] xtable - what might prevent splitting?
jbf via ntg-context schrieb am 28.03.2023 um 10:27: I cannot understand why my xtable setup does not split to the next page. As far as I can see I have it set up correctly... though obviously not! What might be wrong? Below is a sample. In the real case the number of rows would demand a second page. \setupxtable[width=4cm,option={stretch,width}] \setupxtable[split=yes] \starttext \placetable[here]{} \startxtable \startxrow \startxcell cell one \stopxcell \startxcell cell two \stopxcell \startxcell cell three\stopxcell \stopxrow ... and so on and so forth for twenty or so rows, but certainly enough to require a second page \stopxtable \stoptext You have to pass the "split" keyword to the float command, e.g. \startplacetable [location={here,split}] \startxtable ... \stopxtable \stopplacetable Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
[NTG-context] xtable - what might prevent splitting?
I cannot understand why my xtable setup does not split to the next page. As far as I can see I have it set up correctly... though obviously not! What might be wrong? Below is a sample. In the real case the number of rows would demand a second page. \setupxtable[width=4cm,option={stretch,width}] \setupxtable[split=yes] \starttext \placetable[here]{} \startxtable \startxrow \startxcell cell one \stopxcell \startxcell cell two \stopxcell \startxcell cell three\stopxcell \stopxrow ... and so on and so forth for twenty or so rows, but certainly enough to require a second page \stopxtable \stoptext Julian ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context webpage : https://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : https://contextgarden.net ___
Re: [NTG-context] Auto width and height on table cells
On 6/30/2022 9:22 AM, Angel M Alganza via ntg-context wrote: Hi Henning, On Thu, Jun 30, 2022 at 09:02:28AM +0200, Henning Hraban Ramm via ntg-context wrote: They’re also tedious, because you can’t setup rows/columns in advance (like \setupTABLE) – or did that change? I'm afraid you're right. You're joking right? SInce when can one not set up something in some context subsystem? Why would I make a table mechanism with no presets? \starttext \setupxtable[suffix][align=middle,foregroundcolor=red] \setupxtable[blabla][foregroundstyle=slanted] \setupxtable[crap] [foregroundcolor=blue] \setupxtable[bold] [crap][foregroundstyle=bold] \startxtable[frame=off] \startxtablehead \startxrow[bold] \startxcell[suffix] a 0 \stopxcell \startxcell[blabla] a 1 \stopxcell \startxcell a 2 \stopxcell \stopxrow \stopxtablehead \startxtablebody \startxrow \startxcell[suffix][ny=2] a 1 \stopxcell \startxcell b 1 \stopxcell \startxcell c 1 \stopxcell \stopxrow \startxrow \startxcell b 2 \stopxcell \startxcell c 2 \stopxcell \stopxrow \startxrow \startxcell[suffix] a 3 \stopxcell \startxcell b 3 \stopxcell \startxcell c 3 \stopxcell \stopxrow \startxrow \startxcell[suffix] a 4 \stopxcell \startxcell b 4 \stopxcell \startxcell c 4 \stopxcell \stopxrow \startxrow \startxcell[suffix] a 5 \stopxcell \startxcell b 5 \stopxcell \startxcell c 5 \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext It's just more symbolic than in natural tables (which is better performance wise). I'm pretty sure it's mentioned in some manual. Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Every odd row with a background color with extreme tables?
Thanks, this has been very helpful. On Fri, Jul 23, 2021 at 1:02 PM Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> wrote: > T. Kurt Bond schrieb am 23.07.2021 um 17:55: > > With natural tables I can define a color, tell the table to have to > > use color backgrounds and turn the frame off and get every odd row in > > all my tables will have that color for the background. > > > > == Example > > > \definecolor[grayback][r=.8,g=.8,b=.8] > > \setupTABLE[background=color,frame=off] > > \setupTABLE[row][odd][backgroundcolor=grayback] > > == End of Example > = > > > > Can I get this same effect with extreme tables? > > > > My first try with extreme tables looked like this: > > > > == Example > ======== > > \definecolor[tablebackground][r=.8,g=.8,b=.8] > > \setupxtable[background=color,frame=off] > > \setupxtable[row][odd][backgroundcolor=tablebackground] > > == End of Example > = > > > > That didn't seem to have any effect. > > > > Is there a way to have every odd row of every table in my document > > have color background? > > \startuseMPgraphic{xtablerow} > fill OverlayBox withcolor "gray"; > \stopuseMPgraphic > > \defineoverlay >[xtablerow] >[\ifodd\currentxtablerow > \useMPgraphic{xtablerow}% > \fi] > > \starttext > > \startxtable[frame=off,background=xtablerow] > \dorecurse{20} >{\startxrow > \startxcell Column 1 \stopxcell > \startxcell Column 2 \stopxcell > \stopxrow} > \stopxtable > > \stoptext > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___ > -- T. Kurt Bond, tkurtb...@gmail.com, https://tkurtbond.github.io ___ 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 ___
Re: [NTG-context] Every odd row with a background color with extreme tables?
T. Kurt Bond schrieb am 23.07.2021 um 17:55: With natural tables I can define a color, tell the table to have to use color backgrounds and turn the frame off and get every odd row in all my tables will have that color for the background. == Example \definecolor[grayback][r=.8,g=.8,b=.8] \setupTABLE[background=color,frame=off] \setupTABLE[row][odd][backgroundcolor=grayback] == End of Example = Can I get this same effect with extreme tables? My first try with extreme tables looked like this: == Example \definecolor[tablebackground][r=.8,g=.8,b=.8] \setupxtable[background=color,frame=off] \setupxtable[row][odd][backgroundcolor=tablebackground] == End of Example = That didn't seem to have any effect. Is there a way to have every odd row of every table in my document have color background? \startuseMPgraphic{xtablerow} fill OverlayBox withcolor "gray"; \stopuseMPgraphic \defineoverlay [xtablerow] [\ifodd\currentxtablerow \useMPgraphic{xtablerow}% \fi] \starttext \startxtable[frame=off,background=xtablerow] \dorecurse{20} {\startxrow \startxcell Column 1 \stopxcell \startxcell Column 2 \stopxcell \stopxrow} \stopxtable \stoptext 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Every odd row with a background color with extreme tables?
> Am 23.07.2021 um 17:55 schrieb T. Kurt Bond : > > With natural tables I can define a color, tell the table to have to > use color backgrounds and turn the frame off and get every odd row in > all my tables will have that color for the background. > > Can I get this same effect with extreme tables? > > My first try with extreme tables looked like this: > > == Example > > \definecolor[tablebackground][r=.8,g=.8,b=.8] > \setupxtable[background=color,frame=off] > \setupxtable[row][odd][backgroundcolor=tablebackground] > == End of Example > = > > That didn't seem to have any effect. \setupxtables has only a limited set of parameters: https://wiki.contextgarden.net/Command/setupxtable > Is there a way to have every odd row of every table in my document > have color background? As far as I can see, only via “styles” that you can setup with \definextable: https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf Hraban ___ 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 ___
[NTG-context] Every odd row with a background color with extreme tables?
With natural tables I can define a color, tell the table to have to use color backgrounds and turn the frame off and get every odd row in all my tables will have that color for the background. == Example \definecolor[grayback][r=.8,g=.8,b=.8] \setupTABLE[background=color,frame=off] \setupTABLE[row][odd][backgroundcolor=grayback] == End of Example = Can I get this same effect with extreme tables? My first try with extreme tables looked like this: == Example \definecolor[tablebackground][r=.8,g=.8,b=.8] \setupxtable[background=color,frame=off] \setupxtable[row][odd][backgroundcolor=tablebackground] == End of Example = That didn't seem to have any effect. Is there a way to have every odd row of every table in my document have color background? -- T. Kurt Bond, tkurtb...@gmail.com, tkurtbond.github.io and tkb.tx0.org ___ 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 ___
Re: [NTG-context] xtable in def or setups
Hi Adam, no, I hadn't tried that - even tough I had skimmed over that part way back, it now escaped me. \long\def\iconblock[#1]#2{% \ignorespaces *\startembeddedxtable[icbtable]* \startxrow \startxcell[width=17mm] \externalfigure[img/#1.svg][height=15mm,width=15mm] \stopxcell \startxcell #2 \stopxcell \stopxrow *\stopembeddedxtable* \removeunwantedspaces } that did the job. Thanks a lot Adam! Cheers, W Am 18.05.21 um 20:17 schrieb Adam Reviczky: Hi Werner, Did you try startembeddedxtable ? See Section 5 in the manual (https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf <https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf>). Adam On Tue, May 18, 2021 at 6:38 PM Werner Hennrich mailto:w...@gmx.at>> wrote: Hello everyone, I'm trying to create an xtable from within a \def (or within a \setups) but always run into "runaway error: end of file encountered" whenever the xtable-commands are in there. \definextable[icbtable] \setupxtable[icbtable] [frame=off, top=\vskip7mm] \long\def\iconblock[#1]#2{% \ignorespaces \startxtable[icbtable] \startxrow \startxcell[width=17mm] \externalfigure[img/#1.svg][height=15mm,width=15mm] \stopxcell \startxcell #2 \stopxcell \stopxrow \stopxtable \removeunwantedspaces } Is this simply not possible or am I doing something wrong there? system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt: 2021.5.18 int: english/english Thank you, Werner __ ___ 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 ___
Re: [NTG-context] xtable in def or setups
Hi Werner, Did you try startembeddedxtable ? See Section 5 in the manual ( https://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf). Adam On Tue, May 18, 2021 at 6:38 PM Werner Hennrich wrote: > Hello everyone, > > I'm trying to create an xtable from within a \def (or within a \setups) > but always run into "runaway error: end of file encountered" > whenever the xtable-commands are in there. > > \definextable[icbtable] > \setupxtable[icbtable] > [frame=off, > top=\vskip7mm] > \long\def\iconblock[#1]#2{% > \ignorespaces > \startxtable[icbtable] > \startxrow > \startxcell[width=17mm] > \externalfigure[img/#1.svg][height=15mm,width=15mm] > \stopxcell > \startxcell #2 \stopxcell > \stopxrow > \stopxtable > \removeunwantedspaces > } > > Is this simply not possible or am I doing something wrong there? > > system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt: 2021.5.18 > int: english/english > > Thank you, > Werner > > ___ > 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 > > ___ > ___ 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 ___
[NTG-context] xtable in def or setups
Hello everyone, I'm trying to create an xtable from within a \def (or within a \setups) but always run into "runaway error: end of file encountered" whenever the xtable-commands are in there. \definextable[icbtable] \setupxtable[icbtable] [frame=off, top=\vskip7mm] \long\def\iconblock[#1]#2{% \ignorespaces \startxtable[icbtable] \startxrow \startxcell[width=17mm] \externalfigure[img/#1.svg][height=15mm,width=15mm] \stopxcell \startxcell #2 \stopxcell \stopxrow \stopxtable \removeunwantedspaces } Is this simply not possible or am I doing something wrong there? system > ConTeXt ver: 2021.05.15 22:45 LMTX fmt: 2021.5.18 int: english/english Thank you, Werner ___ 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 ___
[NTG-context] new page before xtable with repeated headers
Hello everyone, I'm having an xtable spanning several pages and need to have its headers repeated. For this I've set "split=repeat", but unfortunately this causes the table to start with a new new page leaving the rest of the preceding page empty. Having "split=yes" makes the tabe continue on the previous page as a need it to, but then the header isn't repeated any longer. I realize that there has been a very similar question already in https://www.mail-archive.com/ntg-context@ntg.nl/msg93775.html, but my problem happens isolated in a very clean situation w/o any header, floats or the like - and I don't see yet how I can get this working in my situation. Any help is highly appreciated, here is a MWE of my problem: \definextable[mytable] \setupxtable[mytable] [ option=max, split=repeat, %split=yes, header=repeat, width=\textwidth ] \definextable[mytable:header] \setupxtable[mytable:header] [ foregroundstyle=\bf, foregroundcolor=darkred, ] % == \startdocument \dorecurse{2} { \input tufte \vskip7mm } \startxtable[mytable] \startxtablehead \startxrow[mytable:header] \startxcell Some Header \stopxcell \startxcell More Header \stopxcell \stopxrow \stopxtablehead \startxtablebody \dorecurse{10} { \startxrow \startxcell {\bf (\recurselevel) some tale:} \startitemize \item a quick \item brown fox \item jumps over \item the lazy dog \stopitemize \stopxcell \startxcell {\bf and a fact:} \startitemize \item the vodka \item is good \item but the meat \item is rotten \stopitemize \stopxcell \stopxrow } \stopxtablebody \stopxtable \stopdocument Thank you very much i.a., Werner ___ 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 ___
Re: [NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?
Hi Andrés, You could probably put the notes inside a \start...\stopxtablefoot Sylvain On Tue, 10 Nov 2020 at 21:49, Andres Conrado Montoya < andresconr...@gmail.com> wrote: > MWE (sorry for the long table, I hadn't anything else at hand): > > > \definehighlight[emph][style={\em}] > \definehighlight[strong][style={\bf}] > > \setupfloat[table][default={here}] > > \definereferenceformat[figura][text={Figura~}] > \definereferenceformat[tabla][text={Tabla~}] > > \setupcaptions[style={\sans\small}, > width=max, > prefix=no, > align={flushleft,nothyphenated}, > way=bytext] > \setupcaption[table][location=top] > > \setupthinrules[width=15em] % width of horizontal rules > > \setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans] > \setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold] > \setupxtable[body][bottomframe=on] > \setupxtable[foot][bottomframe=on] > > \define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop} > > \define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop} > > \starttext > \reference[tbl:t03]{}% > \startplacetable[title={Composición química y valor energético de recursos > forrajeros de corte en el área de influencia del Subproyecto Carne Bovina > (trópico de altura).}] > \startxtable[option=tight,bodyfont=7pt] > \startxtablehead[head] > \startxrow > \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)} > \stopxcell > \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras > de corte} \stopxcell > \startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)} > \stopxcell > \startxcell[align=middle,width=.05\textwidth] \strong{MS > (\letterpercent{})} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf > (\letterpercent{} MS)} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf > (\letterpercent{} MS)} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf > (\letterpercent{} MS)} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx > (Mcal/kg MS)}} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx > (Mcal/kg MS)}} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx > (Mcal/kg MS)}} \stopxcell > \startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx > (Mcal/kg MS)}} \stopxcell > \stopxrow > \stopxtablehead > \startxtablebody[body] > \startxrow > \startxcell[align=right,ny=2] 1800-1860 \stopxcell > \startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x > \emph{P. thyphoides}) \stopxcell > \startxcell[align=middle] 90 \stopxcell > \startxcell[align=middle] 29,0 \stopxcell > \startxcell[align=middle] 10,6 \stopxcell > \startxcell[align=middle] 64,1 \stopxcell > \startxcell[align=middle] 30,8 \stopxcell > \startxcell[align=middle] 1,92 \stopxcell > \startxcell[align=middle] 1,08 \stopxcell > \startxcell[align=middle] 0,52 \stopxcell > \startxcell[align=middle] 1,19 \stopxcell > \stopxrow > \startxrow > \startxcell[align=middle] 210 \stopxcell > \startxcell[align=middle] 27,8 \stopxcell > \startxcell[align=middle] 6,2 \stopxcell > \startxcell[align=middle] 69,1 \stopxcell > \startxcell[align=middle] 33,6 \stopxcell > \startxcell[align=middle] 1,78 \stopxcell > \startxcell[align=middle] 0,94 \stopxcell > \startxcell[align=middle] 0,40 \stopxcell > \startxcell[align=middle] 1,09 \stopxcell > \stopxrow > \startxrow > \startxcell[align=right,ny=3] 1800-2186 \stopxcell > \startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P. > purpureum} x \emph{P. typhoides}) \stopxcell > \startxcell[align=middle] 91 \stopxcell > \startxcell[align=middle] 22,3 \stopxcell > \startxcell[align=middle] 8,7 \stopxcell > \startxcell[align=middle] 65,4 \stopxcell > \startxcell[align=middle] 32,1 \stopxcell > \startxcell[align=middle] 1,86 \stopxcell > \startxcell[align=middle] 1,02 \stopxcell > \startxcell[align=middle] 0,46 \stopxcell > \startxcell[align=middle] 1,14 \stopxcell > \stopxrow > \startxrow > \startxcell[align=middle] 150 \stopxcell > \startxcell[align=middle] 23,6 \stopxcell > \startxcell[align=middle] 7,2 \stopxcell > \startxcell[align=middle] 66,9 \stopxcell > \startxcell[align=middle] 32,8 \stopxcell > \startxcell[align=middle] 1,81 \stopxcell > \startxcell[align=middle] 0,98 \stopxcell > \startxcell[align=middle] 0,42 \stopxcell > \startxcell[align=middle] 1,11 \stopxcell > \stopxrow > \startxrow > \startxcell[align=middle] 182 \stopxcell > \startxcell[align=middle] 27,0 \stop
[NTG-context] How can I make the notes under this table inherit the width of the table, and not the \textwidth?
MWE (sorry for the long table, I hadn't anything else at hand): \definehighlight[emph][style={\em}] \definehighlight[strong][style={\bf}] \setupfloat[table][default={here}] \definereferenceformat[figura][text={Figura~}] \definereferenceformat[tabla][text={Tabla~}] \setupcaptions[style={\sans\small}, width=max, prefix=no, align={flushleft,nothyphenated}, way=bytext] \setupcaption[table][location=top] \setupthinrules[width=15em] % width of horizontal rules \setupxtable[frame=off,option=stretch,bodyfont=small,foregroundstyle=sans] \setupxtable[head][topframe=on,bottomframe=on,foregroundstyle=sansbold] \setupxtable[body][bottomframe=on] \setupxtable[foot][bottomframe=on] \define[1]\fuentent{\start\switchtobodyfont[sans,small]#1\par\stop} \define[1]\fuente{\start\switchtobodyfont[sans,small]\emph{Fuente:}~#1\par\stop} \starttext \reference[tbl:t03]{}% \startplacetable[title={Composición química y valor energético de recursos forrajeros de corte en el área de influencia del Subproyecto Carne Bovina (trópico de altura).}] \startxtable[option=tight,bodyfont=7pt] \startxtablehead[head] \startxrow \startxcell[align=right,width=.1\textwidth] \strong{Altura\crlf (msnm)} \stopxcell \startxcell[align=right,width=.28\textwidth] \strong{Gramíneas forrajeras de corte} \stopxcell \startxcell[align=middle,width=.06\textwidth] \strong{Edad (días)} \stopxcell \startxcell[align=middle,width=.05\textwidth] \strong{MS (\letterpercent{})} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{PC\crlf (\letterpercent{} MS)} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{FDN\crlf (\letterpercent{} MS)} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{FDA\crlf (\letterpercent{} MS)} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{EM\crlf {\bfxx (Mcal/kg MS)}} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{ENm\crlf {\bfxx (Mcal/kg MS)}} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{ENg\crlf {\bfxx (Mcal/kg MS)}} \stopxcell \startxcell[align=middle,width=.1\textwidth] \strong{ENl\crlf {\bfxx (Mcal/kg MS)}} \stopxcell \stopxrow \stopxtablehead \startxtablebody[body] \startxrow \startxcell[align=right,ny=2] 1800-1860 \stopxcell \startxcell[align=right,ny=2] \strong{Cuba 22}\crlf (\emph{P. glaucum} x \emph{P. thyphoides}) \stopxcell \startxcell[align=middle] 90 \stopxcell \startxcell[align=middle] 29,0 \stopxcell \startxcell[align=middle] 10,6 \stopxcell \startxcell[align=middle] 64,1 \stopxcell \startxcell[align=middle] 30,8 \stopxcell \startxcell[align=middle] 1,92 \stopxcell \startxcell[align=middle] 1,08 \stopxcell \startxcell[align=middle] 0,52 \stopxcell \startxcell[align=middle] 1,19 \stopxcell \stopxrow \startxrow \startxcell[align=middle] 210 \stopxcell \startxcell[align=middle] 27,8 \stopxcell \startxcell[align=middle] 6,2 \stopxcell \startxcell[align=middle] 69,1 \stopxcell \startxcell[align=middle] 33,6 \stopxcell \startxcell[align=middle] 1,78 \stopxcell \startxcell[align=middle] 0,94 \stopxcell \startxcell[align=middle] 0,40 \stopxcell \startxcell[align=middle] 1,09 \stopxcell \stopxrow \startxrow \startxcell[align=right,ny=3] 1800-2186 \stopxcell \startxcell[align=right,ny=3] \strong{King Grass} \crlf (\emph{P. purpureum} x \emph{P. typhoides}) \stopxcell \startxcell[align=middle] 91 \stopxcell \startxcell[align=middle] 22,3 \stopxcell \startxcell[align=middle] 8,7 \stopxcell \startxcell[align=middle] 65,4 \stopxcell \startxcell[align=middle] 32,1 \stopxcell \startxcell[align=middle] 1,86 \stopxcell \startxcell[align=middle] 1,02 \stopxcell \startxcell[align=middle] 0,46 \stopxcell \startxcell[align=middle] 1,14 \stopxcell \stopxrow \startxrow \startxcell[align=middle] 150 \stopxcell \startxcell[align=middle] 23,6 \stopxcell \startxcell[align=middle] 7,2 \stopxcell \startxcell[align=middle] 66,9 \stopxcell \startxcell[align=middle] 32,8 \stopxcell \startxcell[align=middle] 1,81 \stopxcell \startxcell[align=middle] 0,98 \stopxcell \startxcell[align=middle] 0,42 \stopxcell \startxcell[align=middle] 1,11 \stopxcell \stopxrow \startxrow \startxcell[align=middle] 182 \stopxcell \startxcell[align=middle] 27,0 \stopxcell \startxcell[align=middle] 6,7 \stopxcell \startxcell[align=middle] 68,8 \stopxcell \startxcell[align=middle] 35,6 \stopxcell \startxcell[align=middle] 1,77 \stopxcell \startxcell[align=middle] 0,93 \stopxcell \startxcell[align=middle] 0,38 \stopxcell \startxcell[align=middle] 1,08 \stopxcell \stopxrow \startxrow \startxcell[align=right,ny=3] 1800-1850 \stopxcell \startxcell[align=right,ny=3] \strong{King Grass morado} \crlf (\emph{Pennisetum purpureum}) \stopxcell \startxcell[align=middle] 98 \stopxcell \startxcell[align=middle] 20,8 \stopxcell \startxcell[align=middle] 13,1 \stopxcell \startxcell[align=middle] 62,3 \stopxcell \startxcell[align=middle] 30,8 \stopxcell \startxcell[align=middle] 1,99 \stopxcell \startxcell[align=middle
[NTG-context] How to get the last item from an XML node
Hi struggling again: Shouldn't the code below give me the last element under ? Right now \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} gives me nothing... (Use case is that I want to have a frame above the table and one bar below. So I think I should wrap the last line in the \startxtablefoot ...\stopxtablefoot, i.e., I need one command for the last element, and one for the rest (Or is there a better way?). What would be the everything but the last? What am I missing? Thanks again, Denis == \setupxtable[frame=off,split=yes] \setupxtable[head][topframe=on,bottomframe=on] \setupxtable[body][] \setupxtable[foot][bottomframe=on] \startbuffer[test] 5 A 7 B 2 C \stopbuffer \startxmlsetups xml:test \xmlsetsetup{#1}{*}{-} \xmlsetsetup{#1}{article}{xml:*} \xmlsetsetup{#1}{table}{xml:table} \stopxmlsetups \xmlregistersetup{xml:test} \startxmlsetups xml:article \starttext \xmlflush{#1} \stoptext \stopxmlsetups \startxmlsetups xml:table \startembeddedxtable \xmlfilter{#1}{/tbody/command(xml:table:tbody)} \stopembeddedxtable \stopxmlsetups \startxmlsetups xml:table:tbody \xmlfilter{#1}{/tr/last()/command(xml:table:tbody:tr)} \stopxmlsetups \startxmlsetups xml:table:tbody:tr \startxrow \xmlfilter{#1}{/td/command(xml:table:tbody:tr:td)} \stopxrow \stopxmlsetups \startxmlsetups xml:table:tbody:tr:td \startxcell \xmlflush{#1} \stopxcell \stopxmlsetups \xmlprocessbuffer{test}{test}{} == ___ 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 ___
Re: [NTG-context] weird issue with xtable
Pablo Rodriguez schrieb am 13.08.2020 um 16:18: On 8/13/20 3:11 PM, Wolfgang Schuster wrote: [...] With the options "split=no" and "split=repeat" ConTeXt puts the table in a \vbox but with "split=yes" this doesn't happen. To check is this is the problem he can put the table in a float environment and disable the caption and counter. \startplacetable[location={force,none}] \startembeddedxtable ... \stopembeddedxtable \stopplacetable Many thanks for your reply, Wolfgang. These are my defaults for tables in the document: \setupxtable [frame=off, option=stretch, split=repeat, header=repeat] The following avoids the reported break, but it doesn’t split the table: \startxmlsetups xml:table:split \blank \startplacetable[location={force,none}] \startembeddedxtable[split=yes] \xmlflush{#1} \stopembeddedxtable \stopplacetable \blank \stopxmlsetups If I add "split" to \startplacetable, I get the same \prevdepth error in the second run. What am I doing wrong here? (To avoid an error, I get other errors.) There are not enough information to help you. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 3:11 PM, Wolfgang Schuster wrote: > [...] > With the options "split=no" and "split=repeat" ConTeXt puts the table in > a \vbox but with "split=yes" this doesn't happen. > > To check is this is the problem he can put the table in a float > environment and disable the caption and counter. > > \startplacetable[location={force,none}] > \startembeddedxtable > ... > \stopembeddedxtable > \stopplacetable Many thanks for your reply, Wolfgang. These are my defaults for tables in the document: \setupxtable [frame=off, option=stretch, split=repeat, header=repeat] The following avoids the reported break, but it doesn’t split the table: \startxmlsetups xml:table:split \blank \startplacetable[location={force,none}] \startembeddedxtable[split=yes] \xmlflush{#1} \stopembeddedxtable \stopplacetable \blank \stopxmlsetups If I add "split" to \startplacetable, I get the same \prevdepth error in the second run. What am I doing wrong here? (To avoid an error, I get other errors.) Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 2:33 PM, Taco Hoekwater wrote: > [...] > I forgot to answer this. Simple explanation: > > * 'restricted horizontal mode' is inside an \hbox{} or something similar like > a header/footer, > where line breaks are forbidden > * ‘horizontal mode’ is inside a paragraph, where line breaks are possible > > But the ‘restricted’ part is not relevant to your problem, \prevdepth > is forbidden in horizontal mode regardless of restrictions; it is > only allowed in vertical mode. Manny thanks for your explanation, Taco. > Somehow your table ends up being typeset in a horizontal context, > based on the error message (at least, if we assume that the error > message was triggered by a table). I think it is easy to trigger the error: \setupxtable[split=yes] \starttext \ifvmode yes\else no\fi \startxtable[align={middle,lohi},columndistance=0em] \startxrow \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \stopxrow \stopxtable \stoptext > But why that is? I do not have any other good ideas. And > unfortunately lots of different things in ConTeXt can trigger an > implicit horizontal context.> > For debugging, you could try adding this to the preamble (or grouped > around each xtable, for slightly less damage to the vertical > spacing):> > \let\prevdepth\relax > \newdimen\prevdepth > > that should at least remove the error report. The vertical spacing > in the pdf output will be wrong (!!!), but perhaps the output can > provide a clue about what triggered the problem. No idea of what is going wrong here. My setups are even simplistic: \setupxtable [frame=off, option=stretch, split=repeat, header=repeat] \setupxtable [split-table] [split=yes] \startxmlsetups xml:table:split \blank \startembeddedxtable[split-table] \xmlflush{#1} \stopembeddedxtable \blank \stopxmlsetups But it seems that this cannot be fixed without investing much time. I’m afraid I don’t have this time now. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] weird issue with xtable
On 8/13/20 1:16 PM, Taco Hoekwater wrote: >> On 13 Aug 2020, at 13:07, Pablo Rodriguez wrote: >> [...] >> I get the following error message (that breaks compilation) when I add >> \setupxtable[split=yes]: >> >> You can't use '\prevdepth' in restricted horizontal mode >> [...] >> My questions are: what is the restricted horizontal mode (as different >> from the horizontal mode)? Why might it be triggered with >> \startxtable[split=yes] in the huge source, but not in the single file? > > At a wild guess, as I had a similar problem in my XML: try using > \startembeddedxtable > instead of \startxtable. In my case, what happened was that a row of the > xtable > ended up in the header/footer, generating the same error message you got. > > Not sure if it is actually the same problem, but switching is worth a shot. > The \startxtable does not like to be wrapped into other environments, > so \startembeddedxtable is much better for that. Many thanks for your reply, Taco. Sorry for not realizing that I was missing it: I already use \startembeddedxtable to deal with XML. The first time I tried to add table support to my environment for XML, I cound’t make \startxtable work. I wonder what triggers the error with a huge file. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] weird issue with xtable
> On 13 Aug 2020, at 13:07, Pablo Rodriguez wrote: > > Dear list, > > in order to avoid a problem already reported > (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added > to an indiviual table \startxtable[split=yes] (being the default in the > document \setupxtable[split=repeat, header=repeat]). > > But I’m experiencing a weird issue with that approach. > > I get the following error message (that breaks compilation) when I add > \setupxtable[split=yes]: > > You can't use '\prevdepth' in restricted horizontal mode > > The single document (actually, an XML file) compiles just fine, but when > combined together to generate a PDF document over 1000 pages, I get the > error above. > > My questions are: what is the restricted horizontal mode (as different > from the horizontal mode)? Why might it be triggered with > \startxtable[split=yes] in the huge source, but not in the single file? At a wild guess, as I had a similar problem in my XML: try using \startembeddedxtable instead of \startxtable. In my case, what happened was that a row of the xtable ended up in the header/footer, generating the same error message you got. Not sure if it is actually the same problem, but switching is worth a shot. The \startxtable does not like to be wrapped into other environments, so \startembeddedxtable is much better for that. Best wishes, Taco ___ 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 ___
[NTG-context] weird issue with xtable
Dear list, in order to avoid a problem already reported (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html), I added to an indiviual table \startxtable[split=yes] (being the default in the document \setupxtable[split=repeat, header=repeat]). But I’m experiencing a weird issue with that approach. I get the following error message (that breaks compilation) when I add \setupxtable[split=yes]: You can't use '\prevdepth' in restricted horizontal mode The single document (actually, an XML file) compiles just fine, but when combined together to generate a PDF document over 1000 pages, I get the error above. My questions are: what is the restricted horizontal mode (as different from the horizontal mode)? Why might it be triggered with \startxtable[split=yes] in the huge source, but not in the single file? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] Hyphentation/Linebreak after x characters
Hi Rik, thank you as well, this works also nicely. I’ve created a wiki page meanwhile for wrapping text containing both solutions and the post on SHA keys. https://www.contextgarden.net/Wrapping Cheers Benjamin > On 24 Apr 2020, at 00:45, Rik Kabel wrote: > > > > On 4/23/2020 17:50, Wolfgang Schuster wrote: >> Benjamin Buchmuller schrieb am 23.04.2020 um 23:16: >>> Hi Rik, >>> >>> Thanks for the fast reply! Your example works indeed nicely. However, >>> within this solution my problem has shifted now (fully) towards breaking >>> after the same number of characters, which seems to work for your sample >>> string, but not for the sequences that I need to place. >>> >>> What I would like to achieve is something like: >>> >>> 5’-GATTGCTTACTCCTGGTTGG >>> TCTTACATTCTGTCGCCTC >>> CTACTAGAGCCGGCATATT >>> CTAGAAGGGCCGCCTTCATGTGG >>> etc. >>> >>> (There might be hyphens or not, this is not so much important to me.) >>> >>> But what I get is currently: >>> >>> 5'-GATTGCTTACTCCTG- >>> GTTGGTCTTACATTCT- >>> GTCGCCTCCTACTA- >>> GAGCCGGCATATTCTA- >>> GAAGGGCCGCCTTCATGTGGC- >>> etc. >>> >>> Which looks ragged with \tt. Certainly, this is because ConTeXt applies the >>> default hyphenation pattern. But I guess, there might be no “no language” >>> pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem >>> to make no difference towards the result. >> >> Hans posted a solution for a similar problem a few years ago [1] >> which can be adapted to your problem. >> >> \startluacode >> >> local shared = { >> start = 1, >> length = 1, >> before = nil, >> after = nil, >> left = false, >> right = false, >> } >> >> local all = table.setmetatableindex({ }, function(t,k) >> return shared >> end) >> >> languages.hyphenators.traditional.installmethod("dna", >> function(dictionary,word,n) >> return all >> end >> ) >> \stopluacode >> >> \definehyphenationfeatures >> [dna] >> [characters=all, >>alternative=dna] >> >> \starttext >> >> \startframedtext[width=6cm,style=mono] >> \sethyphenationfeatures[dna] >> \setuphyphenation[method=traditional] >> GATTGCTTACTCCTGGTTGG% >> TCTTACATTCTGTCGCCTC% >> CTACTAGAGCCGGCATATT% >> CTAGAAGGGCCGCCTTCATGTGG% >> \stopframedtext >> >> \stoptext >> >> [1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html >> >> Wolfgang >> > And without lua, just two lines of ConTeXt with a bit of TeX: > > \define[1]\DNA{\handletokens #1\with\DNAspacer} > \define[1]\DNAspacer{#1\hskip 2.3pt plus .1pt} > \define[2]\mycommandc{ > \startxrow > \startxcell o#1 \stopxcell > \startxcell {\tt\WORD{\DNA{5'-#2}}}\stopxcell > \stopxrow > } > \starttext > \setupxtable[width=5cm] > \startxtable > \mycommandc{C}{gattgcttactcctggttggtcttacattctgtcgcctcctactagagccggcatattctagaagggccgccttcatgtggcctagggcaccatcgcgtacgagggcaatgagtttaccgctgcgaagtctctacgtcacggccaaccacagtcctgctcccaacgaaatttagacgctgtcgtgaaacctgaattcgaggataagccgcgtcatgaagagtctactg} > \stopxtable > \stoptext > > Modify the skip as you see fit. > > -- > Rik > ___ 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 ___
Re: [NTG-context] Hyphentation/Linebreak after x characters
On 4/23/2020 17:50, Wolfgang Schuster wrote: Benjamin Buchmuller schrieb am 23.04.2020 um 23:16: Hi Rik, Thanks for the fast reply! Your example works indeed nicely. However, within this solution my problem has shifted now (fully) towards breaking after the same number of characters, which seems to work for your sample string, but not for the sequences that I need to place. What I would like to achieve is something like: 5’-GATTGCTTACTCCTGGTTGG TCTTACATTCTGTCGCCTC CTACTAGAGCCGGCATATT CTAGAAGGGCCGCCTTCATGTGG etc. (There might be hyphens or not, this is not so much important to me.) But what I get is currently: 5'-GATTGCTTACTCCTG- GTTGGTCTTACATTCT- GTCGCCTCCTACTA- GAGCCGGCATATTCTA- GAAGGGCCGCCTTCATGTGGC- etc. Which looks ragged with \tt. Certainly, this is because ConTeXt applies the default hyphenation pattern. But I guess, there might be no “no language” pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to make no difference towards the result. Hans posted a solution for a similar problem a few years ago [1] which can be adapted to your problem. \startluacode local shared = { start = 1, length = 1, before = nil, after = nil, left = false, right = false, } local all = table.setmetatableindex({ }, function(t,k) return shared end) languages.hyphenators.traditional.installmethod("dna", function(dictionary,word,n) return all end ) \stopluacode \definehyphenationfeatures [dna] [characters=all, alternative=dna] \starttext \startframedtext[width=6cm,style=mono] \sethyphenationfeatures[dna] \setuphyphenation[method=traditional] GATTGCTTACTCCTGGTTGG% TCTTACATTCTGTCGCCTC% CTACTAGAGCCGGCATATT% CTAGAAGGGCCGCCTTCATGTGG% \stopframedtext \stoptext [1] https://mailman.ntg.nl/pipermail/ntg-context/2017/089106.html Wolfgang And without lua, just two lines of ConTeXt with a bit of TeX: \define[1]\DNA{\handletokens #1\with\DNAspacer} \define[1]\DNAspacer{#1\hskip 2.3pt plus .1pt} \define[2]\mycommandc{ \startxrow \startxcell o#1 \stopxcell \startxcell {\tt\WORD{\DNA{5'-#2}}}\stopxcell \stopxrow } \starttext \setupxtable[width=5cm] \startxtable \mycommandc{C}{gattgcttactcctggttggtcttacattctgtcgcctcctactagagccggcatattctagaagggccgccttcatgtggcctagggcaccatcgcgtacgagggcaatgagtttaccgctgcgaagtctctacgtcacggccaaccacagtcctgctcccaacgaaatttagacgctgtcgtgaaacctgaattcgaggataagccgcgtcatgaagagtctactg} \stopxtable \stoptext Modify the skip as you see fit. -- Rik ___ 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 ___
Re: [NTG-context] Hyphentation/Linebreak after x characters
Hi Rik, Thanks for the fast reply! Your example works indeed nicely. However, within this solution my problem has shifted now (fully) towards breaking after the same number of characters, which seems to work for your sample string, but not for the sequences that I need to place. What I would like to achieve is something like: 5’-GATTGCTTACTCCTGGTTGG TCTTACATTCTGTCGCCTC CTACTAGAGCCGGCATATT CTAGAAGGGCCGCCTTCATGTGG etc. (There might be hyphens or not, this is not so much important to me.) But what I get is currently: 5'-GATTGCTTACTCCTG- GTTGGTCTTACATTCT- GTCGCCTCCTACTA- GAGCCGGCATATTCTA- GAAGGGCCGCCTTCATGTGGC- etc. Which looks ragged with \tt. Certainly, this is because ConTeXt applies the default hyphenation pattern. But I guess, there might be no “no language” pattern or is there? Also, I agree, it’s a bit odd that nright/nleft seem to make no difference towards the result. This is the MWE based on your solution: \define[2]\mycommandc{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD{5'-#2} \stopxcell \stopxrow } \definebreakpoint[mybreaks][][nright=100,nleft=100,type=1] \setbreakpoints[mybreaks] \starttext \setupxtable[width=5cm] \startxtable \mycommandc{C}{GATTGCTTACTCCTGGTTGGTCTTACATTCTGTCGCCTCCTACTAGAGCCGGCATATTCTAGAAGGGCCGCCTTCATGTGGCCTAGGGCACCATCGCGTACGAGGGCAATGAGTTTACCGCTGCGAAGTCTCTACGTCACGGCCAACCACAGTCCTGCTCCCAACGAAATTTAGACGCTGTCGTGAAACCTGAATTCGAGGATAAGCCGCGTCATGAAGAGTCTACTG} \stopxtable \stoptext > On 23 Apr 2020, at 22:02, ntg-context-requ...@ntg.nl wrote: > > Send ntg-context mailing list submissions to > ntg-context@ntg.nl > > To subscribe or unsubscribe via the World Wide Web, visit > https://mailman.ntg.nl/mailman/listinfo/ntg-context > or, via email, send a message with subject or body 'help' to > ntg-context-requ...@ntg.nl > > You can reach the person managing the list at > ntg-context-ow...@ntg.nl > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of ntg-context digest..." > Today's Topics: > > 1. Re: Hyphentation/Linebreak after x characters inside \WORD? > (Rik Kabel) > > From: Rik Kabel > Subject: Re: [NTG-context] Hyphentation/Linebreak after x characters inside > \WORD? > Date: 23 April 2020 at 21:46:59 CEST > To: ntg-context@ntg.nl, benjamin.buchmul...@gmail.com > > > > > On 4/23/2020 15:01, Benjamin Buchmuller wrote: >> Sorry, I have just realized that the problem might not be \WORD{} actually, >> so this one hyphenates: >> >> \define[2]\mycommand{ >> \startxrow >> \startxcell o#1 \stopxcell >> \startxcell \tt\WORD #2 \stopxcell >> \stopxrow >> } >> >> Whereas these ones don’t: >> >> >> \define[2]\mycommand{ >> \startxrow >> \startxcell o#1 \stopxcell >> \startxcell \tt\WORD #2-3' \stopxcell >> \stopxrow >> } >> >> \define[2]\mycommand{ >> \startxrow >> \startxcell o#1 \stopxcell >> \startxcell 5'-\tt\WORD #2 \stopxcell >> \stopxrow >> } >> >> Assuming that this has to do with the presence of “-“ which will be the >> preferred breakpoint. So, I guess the questions boils down to how to define >> the second argument of >> >> \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1] >> >> in this case or how to “deactivate” the default \setbreakpoints[compound]? >> >> >> >>> On 23 Apr 2020, at 20:46, Benjamin Buchmuller >>> >>> wrote: >>> >>> Hi again, >>> >>> I am reading a CSV file into ConTeXt which contains long DNA sequences (>> >>> 40 characters) to place in xtables. So far, this works fine. However, I >>> need to uppercase the entries and need to \tt them. When I do this inside >>> \WORD however, they don’t hyphenate any more. >>> >>> I’m using: >>> >>> \defineseparatedlist >>> [mylist] >>> [ >>> separator={,}, quotechar={"}, >>> command=\mycommand >>> ] >>> >>> \define[2]\mycommand{ >>> \startxrow >>> \startxcell o#1 \stopxcell >>> \startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell >>> \stopxrow >>> } >>> >>> Since I don’t have access to each entry, I cant place hyphenation marks >>> directly. Is there a way to tell ConTeXt to hyphenate after say, 12 >>> characters? >>> >>> Thanks for your help. >>> >>> >>&
Re: [NTG-context] Hyphentation/Linebreak after x characters inside \WORD?
On 4/23/2020 15:01, Benjamin Buchmuller wrote: Sorry, I have just realized that the problem might not be \WORD{} actually, so this one hyphenates: \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2 \stopxcell \stopxrow } Whereas these ones don’t: \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2-3' \stopxcell \stopxrow } \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell 5'-\tt\WORD #2 \stopxcell \stopxrow } Assuming that this has to do with the presence of “-“ which will be the preferred breakpoint. So, I guess the questions boils down to how to define the second argument of \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1] in this case or how to “deactivate” the default \setbreakpoints[compound]? On 23 Apr 2020, at 20:46, Benjamin Buchmuller wrote: Hi again, I am reading a CSV file into ConTeXt which contains long DNA sequences (>> 40 characters) to place in xtables. So far, this works fine. However, I need to uppercase the entries and need to \tt them. When I do this inside \WORD however, they don’t hyphenate any more. I’m using: \defineseparatedlist [mylist] [ separator={,}, quotechar={"}, command=\mycommand ] \define[2]\mycommand{ \startxrow \startxcell o#1 \stopxcell \startxcell 5’-{\tt\WORD{#2}}-3' \stopxcell \stopxrow } Since I don’t have access to each entry, I cant place hyphenation marks directly. Is there a way to tell ConTeXt to hyphenate after say, 12 characters? Thanks for your help. Benjamin The following works for me: \define[2]\mycommanda{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2 \stopxcell \stopxrow } \define[2]\mycommandb{ \startxrow \startxcell o#1 \stopxcell \startxcell \tt\WORD #2-3' \stopxcell \stopxrow } \define[2]\mycommandc{ \startxrow \startxcell o#1 \stopxcell \startxcell 5'-\tt\WORD #2 \stopxcell \stopxrow } \definebreakpoint[mybreaks][][nright=12,nleft=12,type=1] \setbreakpoints[mybreaks] \starttext \setupxtable[width=5cm] \startxtablex \mycommanda{A}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \mycommandb{B}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \mycommandc{C}{lsfkgjfkgshgkhigewhgajkdkfkalhfdklahfkhaakfakfh} \stopxtable \stoptext Producing: Indeed, it produces the same when nleft and nright are both set to 1 or 12 or 100, but not when setbreakpoints is removed. If you are trying to do something else, please provide an MWE. ___ 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 ___
Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode
Hi Wolfgang, Thank you very much ; as usual your explanations are always clear and your approach to the problem intelligent and original. I would however like to know the way in which we can use the command \frameletter except for the rounded corners with outlinetext. For example, this doesn't work. \startMPcode draw outlinetext.f ("\frameletter{A}") (withcolor darkred withpen pencircle scaled 1/10) rotated 5 xsized 2cm ; \stopMPcode Fabrice Le lun. 20 avr. 2020 à 10:36, Wolfgang Schuster < wolfgang.schuster.li...@gmail.com> a écrit : > Rudolf Bahr schrieb am 20.04.2020 um 10:23: > > On Mon, Apr 20, 2020 at 09:21:41AM +0200, Wolfgang Schuster wrote: > >> Fabrice Couvreur schrieb am 19.04.2020 um 22:55: > >>> Hi, > >>> I try to reproduce the figure as faithfully as possible. I tried for > the > >>> rounded corners to put the key corner = round, but it does not work. > >> > >> 1. To create a new framed-instance you need \defineframe, \setupframed > isn't > >> enough to set the values. > >> > >> I guess you assumed this works similar to xtables but this > mechanism sets > >> a few values to assure \setupxtable is enough in certain cases but even > here > >> you need \definextable in certain cases. > >> > >> When you create a new instance you have to use the name of the new > >> instance as command name, e.g. \frameletter or use the \placeframed > command > >> which takes the name as argument, e.g. \placeframed[frameletter]. > >> > >> 2. You can't pass the name of a framed-instance to \framed (backwards > >> compatibility, performance ...), this is only possible with > \startframed. > >> > >> 3. ConTeXt uses different mechanism to draw rectangular (unless you > draw a > >> closed frame) and rounded frame and the mechanism for rounded frames > doesn't > >> work with outlinetext. > >> > >> 4. To achieve the desired result you can now a) use MetaPost to draw the > >> complete card (letter plus frame) or b) use only TeX to put the letter > in a > >> frame and rotate it. > >> > >> begin tex example > >> \usecolors[svg] > >> > >> \defineframed > >>[frameletter] > >>[width=1.25em, > >> height=1.75em, > >> foregroundstyle=\ssbfc, > >> corner=round, > >> radius=0.1\bodyfontsize, > >> rulethickness=1pt] > >> > >> \starttext > >> > >> \startTEXpage[offset=\linewidth] > >> \dontleavehmode > >> \rotate [rotation=5] {\color[darkred] {\frameletter{A}}} > >> \rotate [rotation=-5]{\color[green] {\frameletter{L}}} > >> \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}} > >> \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}} > >> \stopTEXpage > >> > >> \stoptext > >> end tex example > >> > >> Wolfgang > > > > Nice Example and good explanation, Wolfgang. But why did you use the > command > > "dontleavehmode"? It doesn't seem to be necessary in this example. > > I wrote the example without TeXpage where I needed \doneleavehmode to > keep all cards on the same line. At the end I just added TeXpage to > create a cropped image with with a small border and forgot to remove it. > > 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://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode
Rudolf Bahr schrieb am 20.04.2020 um 10:23: On Mon, Apr 20, 2020 at 09:21:41AM +0200, Wolfgang Schuster wrote: Fabrice Couvreur schrieb am 19.04.2020 um 22:55: Hi, I try to reproduce the figure as faithfully as possible. I tried for the rounded corners to put the key corner = round, but it does not work. 1. To create a new framed-instance you need \defineframe, \setupframed isn't enough to set the values. I guess you assumed this works similar to xtables but this mechanism sets a few values to assure \setupxtable is enough in certain cases but even here you need \definextable in certain cases. When you create a new instance you have to use the name of the new instance as command name, e.g. \frameletter or use the \placeframed command which takes the name as argument, e.g. \placeframed[frameletter]. 2. You can't pass the name of a framed-instance to \framed (backwards compatibility, performance ...), this is only possible with \startframed. 3. ConTeXt uses different mechanism to draw rectangular (unless you draw a closed frame) and rounded frame and the mechanism for rounded frames doesn't work with outlinetext. 4. To achieve the desired result you can now a) use MetaPost to draw the complete card (letter plus frame) or b) use only TeX to put the letter in a frame and rotate it. begin tex example \usecolors[svg] \defineframed [frameletter] [width=1.25em, height=1.75em, foregroundstyle=\ssbfc, corner=round, radius=0.1\bodyfontsize, rulethickness=1pt] \starttext \startTEXpage[offset=\linewidth] \dontleavehmode \rotate [rotation=5] {\color[darkred] {\frameletter{A}}} \rotate [rotation=-5]{\color[green] {\frameletter{L}}} \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}} \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}} \stopTEXpage \stoptext end tex example Wolfgang Nice Example and good explanation, Wolfgang. But why did you use the command "dontleavehmode"? It doesn't seem to be necessary in this example. I wrote the example without TeXpage where I needed \doneleavehmode to keep all cards on the same line. At the end I just added TeXpage to create a cropped image with with a small border and forgot to remove it. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode
On Mon, Apr 20, 2020 at 09:21:41AM +0200, Wolfgang Schuster wrote: > Fabrice Couvreur schrieb am 19.04.2020 um 22:55: > > Hi, > > I try to reproduce the figure as faithfully as possible. I tried for the > > rounded corners to put the key corner = round, but it does not work. > > 1. To create a new framed-instance you need \defineframe, \setupframed isn't > enough to set the values. > >I guess you assumed this works similar to xtables but this mechanism sets > a few values to assure \setupxtable is enough in certain cases but even here > you need \definextable in certain cases. > >When you create a new instance you have to use the name of the new > instance as command name, e.g. \frameletter or use the \placeframed command > which takes the name as argument, e.g. \placeframed[frameletter]. > > 2. You can't pass the name of a framed-instance to \framed (backwards > compatibility, performance ...), this is only possible with \startframed. > > 3. ConTeXt uses different mechanism to draw rectangular (unless you draw a > closed frame) and rounded frame and the mechanism for rounded frames doesn't > work with outlinetext. > > 4. To achieve the desired result you can now a) use MetaPost to draw the > complete card (letter plus frame) or b) use only TeX to put the letter in a > frame and rotate it. > > begin tex example > \usecolors[svg] > > \defineframed > [frameletter] > [width=1.25em, >height=1.75em, >foregroundstyle=\ssbfc, >corner=round, >radius=0.1\bodyfontsize, >rulethickness=1pt] > > \starttext > > \startTEXpage[offset=\linewidth] > \dontleavehmode > \rotate [rotation=5] {\color[darkred] {\frameletter{A}}} > \rotate [rotation=-5]{\color[green] {\frameletter{L}}} > \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}} > \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}} > \stopTEXpage > > \stoptext > end tex example > > Wolfgang Nice Example and good explanation, Wolfgang. But why did you use the command "dontleavehmode"? It doesn't seem to be necessary in this example. Rudolf ___ 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 ___
Re: [NTG-context] Passing the parameters of a frame in an environment \startMPcode ... \stopMPcode
Fabrice Couvreur schrieb am 19.04.2020 um 22:55: Hi, I try to reproduce the figure as faithfully as possible. I tried for the rounded corners to put the key corner = round, but it does not work. 1. To create a new framed-instance you need \defineframe, \setupframed isn't enough to set the values. I guess you assumed this works similar to xtables but this mechanism sets a few values to assure \setupxtable is enough in certain cases but even here you need \definextable in certain cases. When you create a new instance you have to use the name of the new instance as command name, e.g. \frameletter or use the \placeframed command which takes the name as argument, e.g. \placeframed[frameletter]. 2. You can't pass the name of a framed-instance to \framed (backwards compatibility, performance ...), this is only possible with \startframed. 3. ConTeXt uses different mechanism to draw rectangular (unless you draw a closed frame) and rounded frame and the mechanism for rounded frames doesn't work with outlinetext. 4. To achieve the desired result you can now a) use MetaPost to draw the complete card (letter plus frame) or b) use only TeX to put the letter in a frame and rotate it. begin tex example \usecolors[svg] \defineframed [frameletter] [width=1.25em, height=1.75em, foregroundstyle=\ssbfc, corner=round, radius=0.1\bodyfontsize, rulethickness=1pt] \starttext \startTEXpage[offset=\linewidth] \dontleavehmode \rotate [rotation=5] {\color[darkred] {\frameletter{A}}} \rotate [rotation=-5]{\color[green] {\frameletter{L}}} \rotate [rotation=5] {\color[mediumblue]{\frameletter{E}}} \rotate [rotation=-5]{\color[darkviolet]{\frameletter{A}}} \stopTEXpage \stoptext end tex example 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] splitted xtable with repeating headers and placetable
Geert Dobbels schrieb am 05.04.2020 um 00:30: Wolfgang, Below is what I think is the bare minimum to explain this question (sorry for not doing it right from the beginning...) Keep it up. As I said, with the code as it is below, the header is not repeated after the first page, but the table is in the right place. Replacing "split=yes" by "split=repeat" makes the header repeat correctly but puts the beginning of the table on the next page, leaving the first page nearly completely blank. I already reported the problem on the dev-list. The reason is that ConTeXt creates one big table and splits it afterwards in smaller parts which fit on each page but when you use "split=repeat" the part for the first page is too large to fit. In both cases, the "header=repeat" setting has no influence at all on the behaviour and can be omitted without changing the results. As I read in some other posts, sometimes putting the table in a float can help, so I tried this (by removing the 3 "%" in the code below), but there seems to be a conflict with the figure in the page header, and it stops with an error message. Don't use floats in the header or footer, they serve no purpose and you can include images without it. Below is a solution with nested frames but you can also use a table to create the header layout. However, replacing the figure in the page header by a normal text suddenly solves the problem: putting "split" in the setupfloat and "header=repeat" in the setupxtable gives me a table with repeated headers that starts exactly where I want it to start. Apparently in this case, the "headers=repeat" is necessary. Unfortunately, I need a company logo up in the page header, which is what causes the error for which I have no explanation. Here is a working version of your example but you have to a space between the header and the page body (see headerdistance setting) or reduce the height of the outer most frame (it uses at the moment the height and width of the header area). \setuppapersize[A4,landscape] \setuplayout [location=middle, width=27.5cm, height=18cm, backspace=1cm, header=4cm, headerdistance=5mm] \startsetups[header] \startframed[width=max,height=max,frame=off,offset=overlay] \startframed[height=1cm,width=max,frame=off] \userpagenumber \stopframed \par \startframed[height=3cm,width=max,offset=overlay] \startframed[width=0.25\hsize,height=max] \externalfigure[dummy][height=1.9cm] \stopframed \startframed[width=0.50\hsize,height=max,] % frame=off,topframe=on,bottomframe=on some text in the middle block \stopframed \startframed[width=0.25\hsize,height=max] some text in the right block \stopframed \stopframed \stopframed \stopsetups \setupheadertexts[\directsetup{header}] \startbuffer[tablerow] \startxrow \startxcell first \stopxcell \startxcell second \stopxcell \stopxrow \stopbuffer \startbuffer[table] \startxtable \startxtablehead[head] \getbuffer[tablerow] \stopxtablehead \startxtablebody \dorecurse{40}{\getbuffer[tablerow]} \stopxtablebody \stopxtable \stopbuffer \setupxtable [option=stretch, split=repeat, header=repeat, align=middle] \setupxtable [head] [background=color, backgroundcolor=gray] \starttext \title{Table without float environment} \samplefile{ward} \getbuffer[table] \title{Table with float environment} \samplefile{ward} \startplacetable[location={none,split}] \getbuffer[table] \stopplacetable \stoptext 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] splitted xtable with repeating headers and placetable
Wolfgang, Below is what I think is the bare minimum to explain this question (sorry for not doing it right from the beginning...) As I said, with the code as it is below, the header is not repeated after the first page, but the table is in the right place. Replacing "split=yes" by "split=repeat" makes the header repeat correctly but puts the beginning of the table on the next page, leaving the first page nearly completely blank. In both cases, the "header=repeat" setting has no influence at all on the behaviour and can be omitted without changing the results. As I read in some other posts, sometimes putting the table in a float can help, so I tried this (by removing the 3 "%" in the code below), but there seems to be a conflict with the figure in the page header, and it stops with an error message. However, replacing the figure in the page header by a normal text suddenly solves the problem: putting "split" in the setupfloat and "header=repeat" in the setupxtable gives me a table with repeated headers that starts exactly where I want it to start. Apparently in this case, the "headers=repeat" is necessary. Unfortunately, I need a company logo up in the page header, which is what causes the error for which I have no explanation. btw: I am using context standalone version: 2020.01.30 14:13 = \setuppapersize[A4, landscape] \setuplayout[location=middle, width=27.5cm, height=18cm, backspace=1cm,header=4cm] \setupcaptions[location=none] \setupbackgrounds[header][text][background={Logos}, state=repeat] \defineoverlay [Logos][{ \framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none]{ \framed[width=0.280\textwidth,height=3cm,align=right,] {\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} } \framed[width=0.430\textwidth,height=3cm,align=middle] {sometext in the middle} \framed[width=0.270\textwidth, height=3cm, align=middle]{sometext on the right} } }] %\setupfloat[table][default={force,split}] \setupxtable[ option=stretch,split=repeat,header=repeat,align=middle] \setupxtable[head][background=color,backgroundcolor=gray,foregroundcolor=red] \starttext Some lines of text. This text must come just before the table, but only on the first page of the table \def\onerow{ \startxrow \startxcell first \stopxcell \startxcell second \stopxcell \startxcell third \stopxcell \startxcell fourth \stopxcell \startxcell fifth \stopxcell \startxcell sixth \stopxcell \stopxrow} %\startplacetable \startxtable \startxtablehead[head] \onerow \stopxtablehead \startxtablebody \dorecurse{40}{\onerow} \stopxtablebody \stopxtable %\stopplacetable \stoptext ___ 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 ___
Re: [NTG-context] splitted xtable with repeating headers and placetable
Geert Dobbels schrieb am 04.04.2020 um 16:46: Hello, Code below shows some behaviour I cannot explain (csv file attached): - If I run the code below as is, I get what I want, except that the header line of the table does not repeat at the top of each page. - Changing "split=yes" to "split=repeat" in the setupxtable gives me repeating headers, but the table starts at the second page, leaving the first page with only the text line and all the rest as blank spaces. - Placing the table in a float by activating the 3 commented lines gives me an error ("extra } or forgotten endgroup") pointing to the external figure in my page header overlay. Replacing the \placefigure. in the page header by ordinary text makes the error go away, but is no solution, since I need the company logo picture there, and even then with no error, the headers do not repeat. - With the table in a float, I manage to get repeating headers when I change to "split=yes" and "headers=repeat" in the \setupxtable, but I still get the abovementioned error as soon as I want to put my figure back in the page header.. Any suggestions ? Can you make your example simpler and reduce it to the bare minimum (replace your csv file which dummy content) which is required to show the error. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] splitted xtable with repeating headers and placetable
On 4/4/20 4:46 PM, Geert Dobbels wrote: > Hello, > > Code below shows some behaviour I cannot explain (csv file attached): > > - If I run the code below as is, I get what I want, except that the > header line of the table does not repeat at the top of each page. Hi Geert, this is the standard and intended behavior (documented on page 10 from xtables-mkiv.pdf). > - Changing "split=yes" to "split=repeat" in the setupxtable gives me > repeating headers, but the table starts at the second page, leaving the > first page with only the text line and all the rest as blank spaces. This is a known bug, already reported at the devel mailing list (https://mailman.ntg.nl/pipermail/dev-context/2020/003694.html). > - Placing the table in a float by activating the 3 commented lines gives > me an error ("extra } or forgotten endgroup") pointing to the external > figure in my page header overlay. Replacing the \placefigure. in > the page header by ordinary text makes the error go away, but is no > solution, since I need the company logo picture there, and even then > with no error, the headers do not repeat. Well, these are different issues. > - With the table in a float, I manage to get repeating headers when I > change to "split=yes" and "headers=repeat" in the \setupxtable, but I > still get the abovementioned error as soon as I want to put my figure > back in the page header.. My guess: an alternative approach would be to use layers (and adapting the topspace to the layer on the top of the page). Pablo -- http://www.ousia.tk ___ 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 ___
[NTG-context] splitted xtable with repeating headers and placetable
Hello, Code below shows some behaviour I cannot explain (csv file attached): - If I run the code below as is, I get what I want, except that the header line of the table does not repeat at the top of each page. - Changing "split=yes" to "split=repeat" in the setupxtable gives me repeating headers, but the table starts at the second page, leaving the first page with only the text line and all the rest as blank spaces. - Placing the table in a float by activating the 3 commented lines gives me an error ("extra } or forgotten endgroup") pointing to the external figure in my page header overlay. Replacing the \placefigure. in the page header by ordinary text makes the error go away, but is no solution, since I need the company logo picture there, and even then with no error, the headers do not repeat. - With the table in a float, I manage to get repeating headers when I change to "split=yes" and "headers=repeat" in the \setupxtable, but I still get the abovementioned error as soon as I want to put my figure back in the page header.. Any suggestions ? Geert \usemodule[handlecsv] \opencsvfile{systaprov2.csv} \setuppapersize[A4, landscape] \setuplayout[location=middle, width=27.5cm, height=18cm, backspace=1cm,header=4cm] \setuppagenumbering[state=stop] \setupcaptions[location=none] \setupbackgrounds[header][text][background={Logos}, state=repeat] \setupnumbering [location=] \setupframed[offset=none] \defineoverlay [Logos][{ \framed[width=\textwidth, height=3cm, align=right, strut=no, offset=none, frame=on, frameoffset=0.1cm, corner=round, radius=0.15cm, framecolor=darkgray, background=color, backgroundcolor=gray, framecorner=round, frameradius=0.15cm, rulethickness=0.05cm]{ \framed[width=0.280\textwidth, height=3cm, align=right, frame=off] {\placefigure[force][]{none}{\externalfigure[somepic.png][height=1.9cm]} } \framed[width=0.430\textwidth, height=3cm, align=middle, frame=off] {\crlf\tfa \crlf \bf Technical Report} \framed[width=0.370\textwidth, height=3cm, align=middle, frame=off] {\tfx \crlf Annex T.2.3. \crlf \tfx Date of issue: \crlf \currentdate \crlf page \pagenumber of \lastpage} } }] %\setupfloat[table][default={force,split}] \setupxtable[offset=0cm, frame=off, bottomframe=on, framecolor=gray, option=stretch, split=yes, header=repeat, align=middle] \setupxtable[head][background=color, backgroundcolor=gray, topframe=on, bottomframe=on, framecolor=black, foregroundcolor=blue] \setupxtable[left][align=right] \starttext Some lines of text. This text must come just before the table, but only on the first page of the table \startbuffer[loop] \startxrow \startxcell[left] \cA \stopxcell \startxcell[left] \cB \stopxcell \startxcell[left] \cC \stopxcell \startxcell[left] \cD \stopxcell \startxcell \cE \stopxcell \startxcell[left] \cF \stopxcell \startxcell \cG \stopxcell \startxcell \cH \stopxcell \doifdefined{cI}{\startxcell \cI \stopxcell} \doifdefined{cJ}{\startxcell \cJ \stopxcell} \doifdefined{cK}{\startxcell [left] \cK \stopxcell} \stopxrow \stopbuffer %\startplacetable[] \startxtable \startxtablehead[head] \doloopif{\lineno}{<}{2}{\getbuffer[loop]} \stopxtablehead \startxtablebody \doloopif{\lineno}{>}{1}{\getbuffer[loop]} \stopxtablebody \stopxtable %\stopplacetable \stoptext Nº;Subject;Dirno;Tano; Date;Corr;VAVE; Stage; Remark ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-65-89-45; -; 2018/1832; all; N/A; ab;asdfa a fasddf qgt qhq tr hq qhqhr ;EFERT;21-54-322-32-;12/12/20;ERTF; all;1;b sg;afae a t hyj wy thjqh jqtj ;7GSD;25-
Re: [NTG-context] xtable headers and handlecsv loop
Wolfgang, Thanks for this. It works, however, the page where the table starts has three lines of text before the table starts. After inserting "split=repeat", the table jumps to the next page, leaving the rest of the page with the three lines of text completely blank. This did not happen without the "split=repeat". Geert On 03/04/2020 12:18, Wolfgang Schuster wrote: > Geert Dobbels schrieb am 03.04.2020 um 11:57: >> Hello, >> >> The sample below has 2 problems I cannot find the solution for: >> >> I am reading a table from a CSV file and want to typeset it via \xtable. >> >> The xtable as defined below works, it splits over several pages, but >> the header does not repeat. I have seen examples in the mailing list >> where people put the "\startxtable.\stopxtable" within a >> \placefigure, but as soon as I try this, I get an error message: >> "missing } or endgroup", although I doublechecked the "}" and I see >> no error. >> >> The other issue I have: Since xtable requires me to read the header >> line separately in order to put it between \startxtablehead and >> \stopxtablehead, I access the csv buffer twice: the first time, I >> only read the first line, and the second time, I read starting from >> the second line. My problem here is that I do not know beforehand the >> number of lines in the csv file. So in my second \doloopfromto I give >> the second argument a number high enough to be sure it reads all the >> lines. It works fine, but I would like to know if there is a way to >> read the number of lines in the csv file to use the exact number of >> lines, instead of guessing. >> >> \usemodule[handlecsv] >> >> \opencsvfile{systaprov2.csv} >> >> \starttext >> >> >> \startbuffer[loop] >> \startxrow >> \startxcell[left] \cA \stopxcell >> \startxcell[left] \cB \stopxcell >> \startxcell[left] \cC \stopxcell >> \startxcell[left] \cD \stopxcell >> \startxcell \cE \stopxcell >> \startxcell[left] \cF \stopxcell >> \startxcell \cG \stopxcell >> \startxcell \cH \stopxcell >> \doifdefined{cI}{\startxcell \cI \stopxcell} >> \doifdefined{cJ}{\startxcell \cJ \stopxcell} >> \doifdefined{cK}{\startxcell [left] \cK \stopxcell} >> \stopxrow >> \stopbuffer >> >> \setupxtable[offset=0cm, >> frame=off, >> bottomframe=on, >> framecolor=gray, >> option=stretch, >> align=middle] >> >> \setupxtable[head][background=color, >> backgroundcolor=gray, >> topframe=on, >> bottomframe=on, >> framecolor=black, >> foregroundcolor=blue] >> >> \setupxtable[left][align=right] >> >> \startxtable[header=repeat] > > Add "split=repeat" to \startxtable. > >> \startxtablehead[head] >> \doloopfromto{1}{1}{\getbuffer[loop]} >> \stopxtablehead >> \startxtablebody >> \doloopfromto{2}{500}{\getbuffer[loop]} >> \stopxtablebody >> >> \stopxtable >> >> \stoptext > > Wolfgang -- -- *_IHTS Approvals S.L._* Geert Dobbels ge...@ihts.eu <mailto:ge...@ihts.eu> Zubiegi 11, E-01139 Bitoriano (Spain) 0034 945 462633 ihts.eu ___ 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 ___
Re: [NTG-context] xtable headers and handlecsv loop
Geert Dobbels schrieb am 03.04.2020 um 11:57: Hello, The sample below has 2 problems I cannot find the solution for: I am reading a table from a CSV file and want to typeset it via \xtable. The xtable as defined below works, it splits over several pages, but the header does not repeat. I have seen examples in the mailing list where people put the "\startxtable.\stopxtable" within a \placefigure, but as soon as I try this, I get an error message: "missing } or endgroup", although I doublechecked the "}" and I see no error. The other issue I have: Since xtable requires me to read the header line separately in order to put it between \startxtablehead and \stopxtablehead, I access the csv buffer twice: the first time, I only read the first line, and the second time, I read starting from the second line. My problem here is that I do not know beforehand the number of lines in the csv file. So in my second \doloopfromto I give the second argument a number high enough to be sure it reads all the lines. It works fine, but I would like to know if there is a way to read the number of lines in the csv file to use the exact number of lines, instead of guessing. \usemodule[handlecsv] \opencsvfile{systaprov2.csv} \starttext \startbuffer[loop] \startxrow \startxcell[left] \cA \stopxcell \startxcell[left] \cB \stopxcell \startxcell[left] \cC \stopxcell \startxcell[left] \cD \stopxcell \startxcell \cE \stopxcell \startxcell[left] \cF \stopxcell \startxcell \cG \stopxcell \startxcell \cH \stopxcell \doifdefined{cI}{\startxcell \cI \stopxcell} \doifdefined{cJ}{\startxcell \cJ \stopxcell} \doifdefined{cK}{\startxcell [left] \cK \stopxcell} \stopxrow \stopbuffer \setupxtable[offset=0cm, frame=off, bottomframe=on, framecolor=gray, option=stretch, align=middle] \setupxtable[head][background=color, backgroundcolor=gray, topframe=on, bottomframe=on, framecolor=black, foregroundcolor=blue] \setupxtable[left][align=right] \startxtable[header=repeat] Add "split=repeat" to \startxtable. \startxtablehead[head] \doloopfromto{1}{1}{\getbuffer[loop]} \stopxtablehead \startxtablebody \doloopfromto{2}{500}{\getbuffer[loop]} \stopxtablebody \stopxtable \stoptext 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] xtable headers and handlecsv loop
Hello, The sample below has 2 problems I cannot find the solution for: I am reading a table from a CSV file and want to typeset it via \xtable. The xtable as defined below works, it splits over several pages, but the header does not repeat. I have seen examples in the mailing list where people put the "\startxtable.\stopxtable" within a \placefigure, but as soon as I try this, I get an error message: "missing } or endgroup", although I doublechecked the "}" and I see no error. The other issue I have: Since xtable requires me to read the header line separately in order to put it between \startxtablehead and \stopxtablehead, I access the csv buffer twice: the first time, I only read the first line, and the second time, I read starting from the second line. My problem here is that I do not know beforehand the number of lines in the csv file. So in my second \doloopfromto I give the second argument a number high enough to be sure it reads all the lines. It works fine, but I would like to know if there is a way to read the number of lines in the csv file to use the exact number of lines, instead of guessing. \usemodule[handlecsv] \opencsvfile{systaprov2.csv} \starttext \startbuffer[loop] \startxrow \startxcell[left] \cA \stopxcell \startxcell[left] \cB \stopxcell \startxcell[left] \cC \stopxcell \startxcell[left] \cD \stopxcell \startxcell \cE \stopxcell \startxcell[left] \cF \stopxcell \startxcell \cG \stopxcell \startxcell \cH \stopxcell \doifdefined{cI}{\startxcell \cI \stopxcell} \doifdefined{cJ}{\startxcell \cJ \stopxcell} \doifdefined{cK}{\startxcell [left] \cK \stopxcell} \stopxrow \stopbuffer \setupxtable[offset=0cm, frame=off, bottomframe=on, framecolor=gray, option=stretch, align=middle] \setupxtable[head][background=color, backgroundcolor=gray, topframe=on, bottomframe=on, framecolor=black, foregroundcolor=blue] \setupxtable[left][align=right] \startxtable[header=repeat] \startxtablehead[head] \doloopfromto{1}{1}{\getbuffer[loop]} \stopxtablehead \startxtablebody \doloopfromto{2}{500}{\getbuffer[loop]} \stopxtablebody \stopxtable \stoptext ___ 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 ___
[NTG-context] Changing default rule thickness (globally)
Hi! I would like to change the rule thickness that is used by default in ConTeXt. However, from the command documentation (http://www.pragma-ade.nl/general/qrcs/setup-en.pdf), I see that I would need to basically change this for \basegrid[rulethickness=...] \setupbar[rulethickness=...] \setupchemical[rulethickness=...] \setupeffect[rulethickness=...] \setupfillinlines[rulethickness=...] \setupfillinrules[rulethickness=...] \setupframed[rulethickness=...] \setuplinefillers[rulethickness=...] \setupmarginrules[rulethickness=...] \setupmixedcolumns[rulethickness=...] \setupnote[rulethickness=...] \setupparagraphs[rulethickness=...] \setupsidebar[rulethickness=...] \setuptables[rulethickness=...] \setuptabulation[rulethickness=...] \setuptextbackground[rulethickness=...] \setuptextrules[rulethickness=...] \setupthinrules[rulethickness=...] \setupxtable[rulethickness=...] (And for \setupbackgrounds for [top header text footer bottom].) I’m sure there is a more elegant way to do this. But how? Cheers Benjamin ___ 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 ___
Re: [NTG-context] issue splitting tables and horizontal mode
Pablo Rodriguez schrieb am 20.10.2019 um 12:36: On 10/20/19 11:49 AM, Wolfgang Schuster wrote: Pablo Rodriguez schrieb am 18.10.2019 um 16:23: [...] When splitting extreme tables, I cannot use \dontleavehmode. 1. What is the purpose of \dontleavehmode in your example? Sorry, Wolfgang, I forgot to mention. \dontleavehmode is required to center the table when \startmakeup[standard][align=center]. You can use the float environment and disable the counter. \starttext \startplacefigure [location={none,split}] \startxtable \dorecurse{100} {\startxrow \startxcell xxx \stopxcell \startxcell xxx \stopxcell \stopxrow} \stopxtable \stopplacefigure \stoptext Another option is framedtext which can be centered. \starttext \startframedtext [location=middle,width=fit,frame=off] \startxtable \startxrow \startxcell xxx \stopxcell \startxcell xxx \stopxcell \stopxrow \stopxtable \stopframedtext \stoptext 2. Why do you try to split a table in a makup environment (which will never work)? \setupxtable[split=yes] is a general setup for the whole document. I mean, I don’t want a table in the document to be stuck between pages. Only sometimes I have makeups with tables. And this was my first issue with the conflicting general setup. When you short table keeping them together can be better or do you want short tables with five rows to be split across pages. 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] issue splitting tables and horizontal mode
On 10/20/19 11:49 AM, Wolfgang Schuster wrote: > Pablo Rodriguez schrieb am 18.10.2019 um 16:23: >> [...] >> When splitting extreme tables, I cannot use \dontleavehmode. > 1. What is the purpose of \dontleavehmode in your example? Sorry, Wolfgang, I forgot to mention. \dontleavehmode is required to center the table when \startmakeup[standard][align=center]. > 2. Why do you try to split a table in a makup environment (which will > never work)? \setupxtable[split=yes] is a general setup for the whole document. I mean, I don’t want a table in the document to be stuck between pages. Only sometimes I have makeups with tables. And this was my first issue with the conflicting general setup. As written in my previous message, there was no clash some time (well, five years ) ago. >> Since this worked before, am I missing something or is this a bug? > It isn't a bug but a side effect of the way how split=yes works. > > The normal splitters uses a simple placement method where each table row > is placed below each other. To prevent unwanted white space between the > lines \nointerlineskip is used but the command works only a vertical > mode. With \dontleavehmode like in your example you force horizontal > mode for the table which results in the error message. Many thanks for your explanation. Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] issue splitting tables and horizontal mode
Pablo Rodriguez schrieb am 18.10.2019 um 16:23: Dear list, I have another issue related to extreme tables. \setupxtable[split=yes] \starttext \startmakeup[standard] \dontleavehmode \startxtable[align={middle,lohi},columndistance=0em] \startxrow \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \stopxrow \stopxtable \stopmakeup \stoptext When splitting extreme tables, I cannot use \dontleavehmode. 1. What is the purpose of \dontleavehmode in your example? 2. Why do you try to split a table in a makup environment (which will never work)? Since this worked before, am I missing something or is this a bug? It isn't a bug but a side effect of the way how split=yes works. The normal splitters uses a simple placement method where each table row is placed below each other. To prevent unwanted white space between the lines \nointerlineskip is used but the command works only a vertical mode. With \dontleavehmode like in your example you force horizontal mode for the table which results in the error message. You can reproduce the error with the following minimal example: \starttext \dontleavehmode \vbox{} \nointerlineskip \vbox{} \stoptext The reason why this doens't happen when splitting is disabled or when the header or footer lines are repeated is that ConTeXt puts the collected lines for each table in a \vbox. When you flush the lines in the \vbox the are placed in vertical modes and your \dontleavehmode is only applied to the outer \vbox while the lines itself are placed in vertical mode. \starttext \dontleavehmode \vbox {\vbox{} \nointerlineskip \vbox{}} \stoptext 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
[NTG-context] issue splitting tables and horizontal mode
Dear list, I have another issue related to extreme tables. \setupxtable[split=yes] \starttext \startmakeup[standard] \dontleavehmode \startxtable[align={middle,lohi},columndistance=0em] \startxrow \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \startxcell \dontleavehmode \externalfigure[cow.pdf] [scale=500] \stopxcell \stopxrow \stopxtable \stopmakeup \stoptext When splitting extreme tables, I cannot use \dontleavehmode. Since this worked before, am I missing something or is this a bug? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] Size of the font (Metapost + xtable)
Fabrice Couvreur schrieb am 23.09.2019 um 16:12: Hello, I can not change the font size of my figures in the table. \startxcell[foregroundstyle={\switchtobodyfont[...]}] or \setupxtable[smallbodyfont][foregroundstyle={\switchtobodyfont[...]}] \startxcell[smallbodyfont] 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns
On 2/20/2019 9:06 AM, Procházka Lukáš Ing. wrote: Hello, On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster wrote: Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27: Hello, it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module: \usemodule[ntb-to-xtb] \restoreTABLEfromxtable \starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE \bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup xtables don’t support row/column settings like natural table and the mapping doesn’t change this. Wolfgang as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables? all is popssible but it won't happen ... different approach ... you can use named setups here From what I read in the manual, setting width of a column for xtable is provided by \startxcell[width=...] at the place of the first cell-in-that-column usage. Moreover, when xtable is built in two passes, in the first pass it might take a column (width) specification(s), if provided, and keep on reading xcell specification(s), considering xcell width, if provided. it already does ... even more than two passes I guess to be handy to implement both \setupTABLE[c][...] and \setupxtable[c][...] in a similar way, especially when there is a simple mechanism which allows TABLE/xtable switching (ntb-to-xtb module). it would also be pretty inefficient Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] Mapping TABLE to xtable (module "ntb-to-xtb") doesn't recognize "c" option for columns
Hello, On Tue, 19 Feb 2019 21:35:41 +0100, Wolfgang Schuster wrote: Procházka Lukáš Ing. schrieb am 19.02.19 um 21:27: Hello, it seems that xtable setup doesn't recognize the "c" option, which is recognized successfully by TABLE setup; tested on mapping provided by "ntb-to-xtb" module: \usemodule[ntb-to-xtb] \restoreTABLEfromxtable \starttext \bTABLE \setupTABLE[c][1][width=1in] % Set 1st column width - OK with TABLE \bTR \bTD A \eTD \eTR \eTABLE \bgroup \mapTABLEtoxtable \bTABLE \setupTABLE[c][1][width=1in] % <- This line causes error - not recognized by xtable setup xtables don’t support row/column settings like natural table and the mapping doesn’t change this. Wolfgang as column setup for TABLEs by "\setupTABLE[c][1][width=1in]" is handy and is used frequently, would it be possible to provide identical mechanism for xtables? From what I read in the manual, setting width of a column for xtable is provided by \startxcell[width=...] at the place of the first cell-in-that-column usage. Moreover, when xtable is built in two passes, in the first pass it might take a column (width) specification(s), if provided, and keep on reading xcell specification(s), considering xcell width, if provided. I guess to be handy to implement both \setupTABLE[c][...] and \setupxtable[c][...] in a similar way, especially when there is a simple mechanism which allows TABLE/xtable switching (ntb-to-xtb module). Best regards, Lukas -- Ing. Lukáš Procházka | mailto:l...@pontex.cz Pontex s. r. o. | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: nrpt3sn | IČO: 40763439 Bezová 1658 147 14 Praha 4 Mob.: +420 702 033 396 ___ 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 ___
Re: [NTG-context] Color a column (xtable, lua)
Hi Henry, Thank you for your proposition. I tested both : the first work but not the second. Fabrice lua error > lua error on line 13 in file /home/viserion/Ntg_7.tex: ...ext/tex/texmf-context/tex/context/base/mkiv/tabl-xtb.lua:1269: attempt to index a nil value (upvalue 'data') 3 4 \startuseMPgraphic{tablebackground}{i,j} 5 if (\MPvar{i} = 1) or (\MPvar{j} = 1): 6 fill OverlayBox withcolor \MPcolor{fondpaille} ; 7 fi; 8 \stopuseMPgraphic 9 10 \defineoverlay 11 [tablebackground] 12 13 >> [\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}] 14 15 \setupxtable[background=tablebackground] 16 17 \starttext 18 \startluacode 19 local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } 20 local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } 21 context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) 22 23 context.startxrow() ? Le dim. 27 janv. 2019 à 00:34, Henri Menke a écrit : > On 1/27/19 12:26 PM, Henri Menke wrote: > > On 1/27/19 12:08 PM, Fabrice Couvreur wrote: > >> Hi, > >> How to color the first column as I did for the first line ? > > > > Stolen from Wolfgang's answer on TeX.SX. > > https://tex.stackexchange.com/a/464771 > > > > You could also evaluate the conditional purely in MetaPost. I don't > know if that would be faster, but it's a bit more readable to me. > > > \startuseMPgraphic{tablebackground}{i,j} > if (\MPvar{i} = 1) or (\MPvar{j} = 1): > fill OverlayBox withcolor \MPcolor{fondpaille} ; > fi; > \stopuseMPgraphic > > \defineoverlay > [tablebackground] > > > [\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}] > > \setupxtable[background=tablebackground] > > > > > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > > > > \startuseMPgraphic {tablebackground} > > fill OverlayBox withcolor \MPcolor{fondpaille} ; > > \stopuseMPgraphic > > > > \defineoverlay > > [tablebackground] > > [\ifnum\currentxtablerow=1 > >\useMPgraphic{tablebackground}% > >\else\ifnum\currentxtablecolumn=1 > >\useMPgraphic{tablebackground}% > >\fi\fi] > > > > \setupxtable[background=tablebackground] > > > > \starttext > > \startluacode > > local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } > > local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } > > context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) > > > > context.startxrow() > > context.startxcell({"background=color,backgroundcolor=white,frame=off"}) > > context("") > > context.stopxcell() > > for _, letter in ipairs(letters_1) do > > context.startxcell() > > context(letter) context.stopxcell() > > end > > context.stopxrow() > > > > context.startxrow() > > for _, letter in ipairs(letters_2) do > > context.startxcell() context(letter) context.stopxcell() > > end > > context.stopxrow() > > > > for i=2,10 do > > context.startxrow() > > context.startxcell() context(converters.convert("A",i)) > > context.stopxcell() > > context.stopxrow() > > end > > > > context.stopxtable() > > \stopluacode > > \stoptext > > > > > >> Thank you > >> Fabrice > >> > >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > >> \starttext > >> \startluacode > >> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } > >> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } > >> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) > >> context.startxrow() > >> context.startxcell({"background=color,backgroundcolor=white,frame=off"}) > >> context("") context.stopxcell() > >> for _, letter in ipairs(letters_1) do > >> context.startxcell({"background=col
Re: [NTG-context] Color a column (xtable, lua)
On 1/27/19 12:26 PM, Henri Menke wrote: > On 1/27/19 12:08 PM, Fabrice Couvreur wrote: >> Hi, >> How to color the first column as I did for the first line ? > > Stolen from Wolfgang's answer on TeX.SX. > https://tex.stackexchange.com/a/464771 > You could also evaluate the conditional purely in MetaPost. I don't know if that would be faster, but it's a bit more readable to me. \startuseMPgraphic{tablebackground}{i,j} if (\MPvar{i} = 1) or (\MPvar{j} = 1): fill OverlayBox withcolor \MPcolor{fondpaille} ; fi; \stopuseMPgraphic \defineoverlay [tablebackground] [\useMPgraphic{tablebackground}{i=\currentxtablerow,j=\currentxtablecolumn}] \setupxtable[background=tablebackground] > > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > > \startuseMPgraphic {tablebackground} > fill OverlayBox withcolor \MPcolor{fondpaille} ; > \stopuseMPgraphic > > \defineoverlay > [tablebackground] > [\ifnum\currentxtablerow=1 >\useMPgraphic{tablebackground}% >\else\ifnum\currentxtablecolumn=1 >\useMPgraphic{tablebackground}% >\fi\fi] > > \setupxtable[background=tablebackground] > > \starttext > \startluacode > local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } > local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } > context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) > > context.startxrow() > context.startxcell({"background=color,backgroundcolor=white,frame=off"}) > context("") > context.stopxcell() > for _, letter in ipairs(letters_1) do > context.startxcell() > context(letter) context.stopxcell() > end > context.stopxrow() > > context.startxrow() > for _, letter in ipairs(letters_2) do > context.startxcell() context(letter) context.stopxcell() > end > context.stopxrow() > > for i=2,10 do > context.startxrow() > context.startxcell() context(converters.convert("A",i)) > context.stopxcell() > context.stopxrow() > end > > context.stopxtable() > \stopluacode > \stoptext > > >> Thank you >> Fabrice >> >> \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] >> \starttext >> \startluacode >> local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } >> local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } >> context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) >> context.startxrow() >> context.startxcell({"background=color,backgroundcolor=white,frame=off"}) >> context("") context.stopxcell() >> for _, letter in ipairs(letters_1) do >> context.startxcell({"background=color,backgroundcolor=fondpaille"}) >> context(letter) context.stopxcell() >> end >> context.stopxrow() >> context.startxrow() >> for _, letter in ipairs(letters_2) do >> context.startxcell() context(letter) context.stopxcell() >> end >> context.stopxrow() >> for i=2,10 do >> context.startxrow() >> context.startxcell() context(converters.convert("A",i)) >> context.stopxcell() >> context.stopxrow() >> end >> context.stopxtable() >> \stopluacode >> \stoptext >> >> >> ___ >> 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 >> ___ >> > ___ 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 ___
Re: [NTG-context] Color a column (xtable, lua)
On 1/27/19 12:08 PM, Fabrice Couvreur wrote: > Hi, > How to color the first column as I did for the first line ? Stolen from Wolfgang's answer on TeX.SX. https://tex.stackexchange.com/a/464771 \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] \startuseMPgraphic {tablebackground} fill OverlayBox withcolor \MPcolor{fondpaille} ; \stopuseMPgraphic \defineoverlay [tablebackground] [\ifnum\currentxtablerow=1 \useMPgraphic{tablebackground}% \else\ifnum\currentxtablecolumn=1 \useMPgraphic{tablebackground}% \fi\fi] \setupxtable[background=tablebackground] \starttext \startluacode local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) context.startxrow() context.startxcell({"background=color,backgroundcolor=white,frame=off"}) context("") context.stopxcell() for _, letter in ipairs(letters_1) do context.startxcell() context(letter) context.stopxcell() end context.stopxrow() context.startxrow() for _, letter in ipairs(letters_2) do context.startxcell() context(letter) context.stopxcell() end context.stopxrow() for i=2,10 do context.startxrow() context.startxcell() context(converters.convert("A",i)) context.stopxcell() context.stopxrow() end context.stopxtable() \stopluacode \stoptext > Thank you > Fabrice > > \definecolor[fondpaille][c=0,m=0,y=0.2,k=0] > \starttext > \startluacode > local letters_1 = { "A", "B", "C", "D", "E", "F", "G", "H", "I", "J" } > local letters_2 = { "A", "0", "1", "1", "0", "", "", "", "", "" } > context.startxtable({"align={middle,lohi}, width=1.25cm,offset=0.8ex"}) > context.startxrow() > context.startxcell({"background=color,backgroundcolor=white,frame=off"}) > context("") context.stopxcell() > for _, letter in ipairs(letters_1) do > context.startxcell({"background=color,backgroundcolor=fondpaille"}) > context(letter) context.stopxcell() > end > context.stopxrow() > context.startxrow() > for _, letter in ipairs(letters_2) do > context.startxcell() context(letter) context.stopxcell() > end > context.stopxrow() > for i=2,10 do > context.startxrow() > context.startxcell() context(converters.convert("A",i)) > context.stopxcell() > context.stopxrow() > end > context.stopxtable() > \stopluacode > \stoptext > > > ___ > 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 > ___ > ___ 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 ___
Re: [NTG-context] xtables: horizontal splitting
Sat, Oct 13, 2018 ve 08:08:42PM +0200 Wolfgang Schuster napsal(a): # The information is correct and linetables support horizontal splitting. OK, thank you. Tomáš # Wolfgang # # # Tomas Hala schrieb am 13.10.18 um 19:29: # >Hi Hraban, # >thank you for this information, I changed it on the wiki. # > # >The same information is mentioned at linestables -- is it correct, # >or to be changed on the wiki? # > # >Best wishes, # > # >Tomáš # > # >Fri, Oct 12, 2018 ve 09:36:44PM +0200 Henning Hraban Ramm napsal(a): # ># The information on the wiki is wrong; horizontal splitting is just planned (my misunderstanding when I wrote that up; need to fix that...) # ># # ># Greetlings, Hraban # ># --- # ># https://www.fiee.net # ># http://wiki.contextgarden.net # ># https://www.dreiviertelhaus.de # ># GPG Key ID 1C9B22FD # ># # ># Am 2018-10-12 um 17:20 schrieb Tomas Hala : # ># # ># > Hi all, # ># > # ># > at https://wiki.contextgarden.net/Tables_Overview is mentioned that # ># > the xtables can be splitted even horizontally (which will just suit # ># > me very well). # ># > # ># > The command \setupxtable[myxtable][split=yes] will do it only # ># > vertically. I would like to ask what is the correct option for # ># > the horizonal splitting; neither xtables manual, nor i-context.pdf # ># > say anything. # ># > # ># > Best wishes, # ># > # ># > Tomáš # ># > # ># > ___ # ># > 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 # ># > ___ # >___ # >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 # >___ # # ___ # 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 # ___ Tomáš Hála Mendelova univerzita, Provozně ekonomická fakulta, ústav informatiky Zemědělská 1, CZ-613 00 Brno, tel. +420 545 13 22 28 http://akela.mendelu.cz/~thala ___ 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 ___
Re: [NTG-context] xtables: horizontal splitting
The information is correct and linetables support horizontal splitting. Wolfgang Tomas Hala schrieb am 13.10.18 um 19:29: Hi Hraban, thank you for this information, I changed it on the wiki. The same information is mentioned at linestables -- is it correct, or to be changed on the wiki? Best wishes, Tomáš Fri, Oct 12, 2018 ve 09:36:44PM +0200 Henning Hraban Ramm napsal(a): # The information on the wiki is wrong; horizontal splitting is just planned (my misunderstanding when I wrote that up; need to fix that...) # # Greetlings, Hraban # --- # https://www.fiee.net # http://wiki.contextgarden.net # https://www.dreiviertelhaus.de # GPG Key ID 1C9B22FD # # Am 2018-10-12 um 17:20 schrieb Tomas Hala : # # > Hi all, # > # > at https://wiki.contextgarden.net/Tables_Overview is mentioned that # > the xtables can be splitted even horizontally (which will just suit # > me very well). # > # > The command \setupxtable[myxtable][split=yes] will do it only # > vertically. I would like to ask what is the correct option for # > the horizonal splitting; neither xtables manual, nor i-context.pdf # > say anything. # > # > Best wishes, # > # > Tomáš # > # > ___ # > 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 # > ___ ___ 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 ___ ___ 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 ___
Re: [NTG-context] xtables: horizontal splitting
Hi Hraban, thank you for this information, I changed it on the wiki. The same information is mentioned at linestables -- is it correct, or to be changed on the wiki? Best wishes, Tomáš Fri, Oct 12, 2018 ve 09:36:44PM +0200 Henning Hraban Ramm napsal(a): # The information on the wiki is wrong; horizontal splitting is just planned (my misunderstanding when I wrote that up; need to fix that...) # # Greetlings, Hraban # --- # https://www.fiee.net # http://wiki.contextgarden.net # https://www.dreiviertelhaus.de # GPG Key ID 1C9B22FD # # Am 2018-10-12 um 17:20 schrieb Tomas Hala : # # > Hi all, # > # > at https://wiki.contextgarden.net/Tables_Overview is mentioned that # > the xtables can be splitted even horizontally (which will just suit # > me very well). # > # > The command \setupxtable[myxtable][split=yes] will do it only # > vertically. I would like to ask what is the correct option for # > the horizonal splitting; neither xtables manual, nor i-context.pdf # > say anything. # > # > Best wishes, # > # > Tomáš # > # > ___ # > 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 # > ___ ___ 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 ___
Re: [NTG-context] xtables: horizontal splitting
The information on the wiki is wrong; horizontal splitting is just planned (my misunderstanding when I wrote that up; need to fix that...) Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD Am 2018-10-12 um 17:20 schrieb Tomas Hala : > Hi all, > > at https://wiki.contextgarden.net/Tables_Overview is mentioned that > the xtables can be splitted even horizontally (which will just suit > me very well). > > The command \setupxtable[myxtable][split=yes] will do it only > vertically. I would like to ask what is the correct option for > the horizonal splitting; neither xtables manual, nor i-context.pdf > say anything. > > Best wishes, > > Tomáš > > ___ > 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 > ___ ___ 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 ___
[NTG-context] xtables: horizontal splitting
Hi all, at https://wiki.contextgarden.net/Tables_Overview is mentioned that the xtables can be splitted even horizontally (which will just suit me very well). The command \setupxtable[myxtable][split=yes] will do it only vertically. I would like to ask what is the correct option for the horizonal splitting; neither xtables manual, nor i-context.pdf say anything. Best wishes, Tomáš ___ 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 ___
Re: [NTG-context] xtables multipage horizontally
The wiki says I should ask again one week later if I did not get an answer. Could someone please help me with my problem. Thanks. On 8/26/18 6:03 PM, be ba wrote > the wiki says for xtables and multipage "yes, even horizontally". How > can I do that? > > Doing this: > > \setupxtable[split=yes] > > is not enough since this only gives vertically splitting. Both > http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf and > http://wiki.contextgarden.net/xtables do not talk about this. > ___ 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 ___
Re: [NTG-context] protrusion with opening exclamation and question marks
On 8/29/2018 10:12 PM, Pablo Rodriguez wrote: Hi Hans, I have the following sample: \definefontfeature[default][default] [protrusion=quality] \setupxtable[frame=off, option=stretch] \startbuffer[standard] ¿Cómo? ¡No! \stopbuffer \startbuffer[right] \hfill¿Cómo? \hfill¡No! \stopbuffer \starttext \startTEXpage[offset=2em] \startembeddedxtable[framecolor=red, align=hanging, foregroundstyle={\ss\bfd}, offset=overlay] \startxrow \startxcell[leftframe=on] \getbuffer[standard]\stopxcell \stopxrow \startxrow[toffset=2em] \startxcell[rightframe=on] \getbuffer[right]\stopxcell \startxcell[rightframe=on, align=nothanging] \getbuffer[right]\stopxcell \stopxrow \stopembeddedxtable \stopTEXpage \stoptext It shows that question and exclamation marks are sligtly protruded. Well, in Spanish (and Galician in some ortographies) there are opening exclamation and quotation marks. I think it would make sense to have the same protrusion values for opening quotation and exclamation marks as for the closing ones. you need to patch font-imp-quality.lua: vectors['punctuation'] = { [0x003F] = { 0,0.20 }, -- ? [0x00BF] = { 0.20, 0}, -- ¿ [0x0021] = { 0,0.20 }, -- ! [0x00A1] = { 0.20, 0, }, -- ¡ - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
[NTG-context] protrusion with opening exclamation and question marks
Hi Hans, I have the following sample: \definefontfeature[default][default] [protrusion=quality] \setupxtable[frame=off, option=stretch] \startbuffer[standard] ¿Cómo? ¡No! \stopbuffer \startbuffer[right] \hfill¿Cómo? \hfill¡No! \stopbuffer \starttext \startTEXpage[offset=2em] \startembeddedxtable[framecolor=red, align=hanging, foregroundstyle={\ss\bfd}, offset=overlay] \startxrow \startxcell[leftframe=on] \getbuffer[standard]\stopxcell \stopxrow \startxrow[toffset=2em] \startxcell[rightframe=on] \getbuffer[right]\stopxcell \startxcell[rightframe=on, align=nothanging] \getbuffer[right]\stopxcell \stopxrow \stopembeddedxtable \stopTEXpage \stoptext It shows that question and exclamation marks are sligtly protruded. Well, in Spanish (and Galician in some ortographies) there are opening exclamation and quotation marks. I think it would make sense to have the same protrusion values for opening quotation and exclamation marks as for the closing ones. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
[NTG-context] xtables multipage horizontally
Hi, the wiki says for xtables and multipage "yes, even horizontally". How can I do that? Doing this: \setupxtable[split=yes] is not enough since this only gives vertically splitting. Both http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf and http://wiki.contextgarden.net/xtables do not talk about this. be ba ___ 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 ___
Re: [NTG-context] xtables setup
Am 2018-07-29 um 17:30 schrieb Pablo Rodriguez : > On 07/29/2018 11:28 AM, Henning Hraban Ramm wrote: >> Hello again, >> I’m trying xtables for the first time. >> >> Is it possible to setup defined rows/columns like with natural tables, e.g. >> for a header, like in my example? >> The commented lines below are wrong. Is there another way? > > Hi Hraban, > > I never used natural tables. > > The right approach would be: > >\setupxtable[headtable] >[bottomframe={\ifnum\currentxtablerow = 6 on\fi}, > topframe={\ifcase\currentxtablerow\or on\or on\else off\fi}] > > I hope it helps, Thank you, this is interesting. Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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 ___
Re: [NTG-context] xtables setup
On 07/29/2018 11:28 AM, Henning Hraban Ramm wrote: > Hello again, > I’m trying xtables for the first time. > > Is it possible to setup defined rows/columns like with natural tables, e.g. > for a header, like in my example? > The commented lines below are wrong. Is there another way? Hi Hraban, I never used natural tables. The right approach would be: \setupxtable[headtable] [bottomframe={\ifnum\currentxtablerow = 6 on\fi}, topframe={\ifcase\currentxtablerow\or on\or on\else off\fi}] I hope it helps, Pablo -- http://www.ousia.tk ___ 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 ___
[NTG-context] xtables setup
Hello again, I’m trying xtables for the first time. Is it possible to setup defined rows/columns like with natural tables, e.g. for a header, like in my example? The commented lines below are wrong. Is there another way? \definextable[headtable] % table with repeated head \setupxtable[headtable][ option={stretch,width}, frame=off, split=repeat, header=repeat, ] % like in natural tables - doesn’t work... %\setupxtable[headtable][r][first][topframe=on,before={\blank[small]}] %\setupxtable[headtable][r][1][topframe=on,bottomframe=on,style={\ss\bf}] %\setupxtable[headtable][r][last][bottomframe=on] \starttext \startxtable[headtable] \startxtablehead \startxrow \startxcell Level \stopxcell\startxcell numbered \stopxcell\startxcell unnumbered \stopxcell \stopxrow \stopxtablehead \startxtablebody \startxrow\startxcell 0\stopxcell\startxcell part\stopxcell\startxcell —\stopxcell\stopxrow \startxrow\startxcell 1\stopxcell\startxcell chapter\stopxcell\startxcell title\stopxcell\stopxrow \startxrow\startxcell 2\stopxcell\startxcell section\stopxcell\startxcell subject\stopxcell\stopxrow \startxrow\startxcell 3\stopxcell\startxcell subsection\stopxcell\startxcell subsubject\stopxcell\stopxrow \startxrow\startxcell 4\stopxcell\startxcell subsubsection\stopxcell\startxcell subsubsubject\stopxcell\stopxrow \stopxtablebody \stopxtable \stoptext Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___ 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 ___
[NTG-context] Spacebefore and spaceafter a Float
Hi, I am trying to adjust the space between my tables and the body text. Below is a minimal example. My problem is that I can seem to get the before= or after= to do anything no matter what command I enter. I have also tried spacebefore= and spaceafter= Any idea what I'm doing wrong? Sincerely, John Grasty \setupfloat[table][before={\blank[2*big]}] \setupxtable[frame=off] \setupxtable[head][topframe=on,bottomframe=on] \setupxtable[body][] \setupxtable[foot][bottomframe=on] \starttext \input douglas \startplacetable[title={Cost Overview}] \startxtable \startxtablehead[head] \startxrow \startxcell[align=right] \stopxcell \startxcell[align=right] (\$) \stopxcell \stopxrow \stopxtablehead \startxtablebody[body] \startxrow \startxcell[align=right] Lodging \stopxcell \startxcell[align=right] 150 \stopxcell \stopxrow \startxrow \startxcell[align=right] Fee \stopxcell \startxcell[align=right] 160 \stopxcell \stopxrow \startxrow \startxcell[align=right] Meals \stopxcell \startxcell[align=right] 100 \stopxcell \stopxrow \startxrow \startxcell[align=right] Van \stopxcell \startxcell[align=right] 175 \stopxcell \stopxrow \stopxtablebody \startxtablefoot[foot] \startxrow \startxcell[align=right] Other Outings \stopxcell \startxcell[align=right] 40 \stopxcell \stopxrow \stopxtablefoot \stopxtable \stopplacetable \input douglas \stoptext ___ 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 ___
Re: [NTG-context] conditional format in xtables
On 04/10/2018 11:07 PM, Wolfgang Schuster wrote: > The normal \doif... commands don’t work because they aren’t expandable > but you can use the \expdoif... commands (look into setup-en.pdf for all > of them). Many thanks for your reply, Wolfgang. TeX conditionals are fine for me and I need \ifcase and \ifodd. I must admit that now I don’t understand what expansion actually is. Many thanks for your help, Pablo >> Pablo Rodriguez 10. April 2018 um 19:18 >> Dear list, >> >> thanks to Wolfgang, I learnt to set conditional format in xtables, such >> as in: >> >> \setupxtable >> [foregroundcolor={\ifnum\currentxtablecolumn=2 red\else green\fi}] >> \starttext >> \startxtable >> \startxrow >> \startxcell one \stopxcell >> \startxcell two \stopxcell >> \startxcell tree \stopxcell >> \startxcell four \stopxcell >> \stopxrow >> \stopxtable >> \stoptext >> >> My question is whether I can use ConTeXt conditionals instead of the >> ones from TeX. {\doifelse{\currentxtablecolumn}{2}{red}{green}} doesn’t >> work 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 / 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 > ___ > -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] \ifcase changes default align in xtables
In your example the argument for the align key is always empty which results in the default alignment for a frame which put the content in the middle of the box. Wolfgang Pablo Rodriguez <mailto:oi...@gmx.es> 10. April 2018 um 21:05 Dear list, I have the following sample: \setupxtable[mytable] [option={stretch, height}, align={\ifcase\currentxtablerow\fi}] \starttext \startxtable[mytable] \startxrow \startxcell 1 \stopxcell \startxcell 2 \stopxcell \stopxrow \startxrow \startxcell 3 \stopxcell \startxcell 4 \stopxcell \stopxrow \stopxtable \startxtable[option={stretch, height}] \startxrow \startxcell 1 \stopxcell \startxcell 2 \stopxcell \stopxrow \startxrow \startxcell 3 \stopxcell \startxcell 4 \stopxcell \stopxrow \stopxtable \stoptext For some strange reason, when using \ifcase in align, default is changed from {high, left} to {lohi, center}. Shouldn’t defaults be the same? BTW, if I set align to {\ifodd\currentxtablerow\fi}. I wonder whether this might be a bug. 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 / 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 ___
Re: [NTG-context] conditional format in xtables
The normal \doif... commands don’t work because they aren’t expandable but you can use the \expdoif... commands (look into setup-en.pdf for all of them). Wolfgang Pablo Rodriguez <mailto:oi...@gmx.es> 10. April 2018 um 19:18 Dear list, thanks to Wolfgang, I learnt to set conditional format in xtables, such as in: \setupxtable [foregroundcolor={\ifnum\currentxtablecolumn=2 red\else green\fi}] \starttext \startxtable \startxrow \startxcell one \stopxcell \startxcell two \stopxcell \startxcell tree \stopxcell \startxcell four \stopxcell \stopxrow \stopxtable \stoptext My question is whether I can use ConTeXt conditionals instead of the ones from TeX. {\doifelse{\currentxtablecolumn}{2}{red}{green}} doesn’t work 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 / 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 ___
[NTG-context] \ifcase changes default align in xtables
Dear list, I have the following sample: \setupxtable[mytable] [option={stretch, height}, align={\ifcase\currentxtablerow\fi}] \starttext \startxtable[mytable] \startxrow \startxcell 1 \stopxcell \startxcell 2 \stopxcell \stopxrow \startxrow \startxcell 3 \stopxcell \startxcell 4 \stopxcell \stopxrow \stopxtable \startxtable[option={stretch, height}] \startxrow \startxcell 1 \stopxcell \startxcell 2 \stopxcell \stopxrow \startxrow \startxcell 3 \stopxcell \startxcell 4 \stopxcell \stopxrow \stopxtable \stoptext For some strange reason, when using \ifcase in align, default is changed from {high, left} to {lohi, center}. Shouldn’t defaults be the same? BTW, if I set align to {\ifodd\currentxtablerow\fi}. I wonder whether this might be a bug. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
[NTG-context] conditional format in xtables
Dear list, thanks to Wolfgang, I learnt to set conditional format in xtables, such as in: \setupxtable [foregroundcolor={\ifnum\currentxtablecolumn=2 red\else green\fi}] \starttext \startxtable \startxrow \startxcell one \stopxcell \startxcell two \stopxcell \startxcell tree \stopxcell \startxcell four \stopxcell \stopxrow \stopxtable \stoptext My question is whether I can use ConTeXt conditionals instead of the ones from TeX. {\doifelse{\currentxtablecolumn}{2}{red}{green}} doesn’t work here. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] natural tables to extreme tables
On 2/28/2018 10:28 PM, Thomas A. Schmitz wrote: Hi, for my experimenting with tables: is there a way to set up individual columns in xtables? Maybe I'm thick tonight, but I couldn't find anything in the manual or the source. If I have this setup \setupTABLE [frame=on,split=repeat] \setupTABLE [column] [1] [width=0.7cm,align=left] \setupTABLE [column] [2] [width=0.5cm,align=left] \setupTABLE [column] [3] [width=6cm,align={normal,verytolerant,stretch}] \setupTABLE [column] [4] [width=8cm,align={normal,verytolerant,stretch}] \setupTABLE [column] [5] [width=1cm,align={normal,verytolerant,stretch}] how would this translate into \setupxtable? page 26 of the xtable manual ... you define tagged settings and can use these tag for cells and rows - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
[NTG-context] natural tables to extreme tables
Hi, for my experimenting with tables: is there a way to set up individual columns in xtables? Maybe I'm thick tonight, but I couldn't find anything in the manual or the source. If I have this setup \setupTABLE [frame=on,split=repeat] \setupTABLE [column] [1] [width=0.7cm,align=left] \setupTABLE [column] [2] [width=0.5cm,align=left] \setupTABLE [column] [3] [width=6cm,align={normal,verytolerant,stretch}] \setupTABLE [column] [4] [width=8cm,align={normal,verytolerant,stretch}] \setupTABLE [column] [5] [width=1cm,align={normal,verytolerant,stretch}] how would this translate into \setupxtable? Thomas ___ 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 ___
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise opera
On Sun, 07 Jan 2018 14:13:11 +0100 Wolfgang Schuster <schuster.wolfg...@gmail.com> wrote: > > Reality does not match the manual page you quated. > > I recommend that you test before you send out manual pages which > > are not accurate with the actual processing. > > The description for the \startxcell command was written two years ago > and nothing > has changed since then but you have use the \setupxtable command to > create a named setup. Context does not "test" and silently ignores errors, unless they are syntactically incorrect. So unknown keywords and key=value keys are ignored. When one tries to use an "instance" that was not declared, or incorrectly declared, than this usually leads to no effect. Wolfgang made a HUGE effort in combing through ALL of the sources to create the "interface" xml files. He (and others) also work to keep them up to date as the sources evolve. Perhaps before throwing out complaints about the documentation, we (users) should always submit a complete MWE (but it should not contain any unnecessary extra). Quite often, the error is a mixture of keywords with key=value pairs, other times it is an incorrect or misspelled keyword or key, and sometimes it is a real bug or else a missing (and useful) new feature. Alan ___ 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 ___
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise opera
jdh <mailto:dhen...@gmail.com> 6. Januar 2018 um 23:42 You're right, the manual says what you pasted. I agree that it is logical and makes sense, but the actual program does not do it. My version is: "mtx-context I was using: version: 2017.08.29 19:35 I updated to: version: 2018.01.05 19:26 Reality does not match the manual page you quated. I recommend that you test before you send out manual pages which are not accurate with the actual processing. The description for the \startxcell command was written two years ago and nothing has changed since then but you have use the \setupxtable command to create a named setup. \setupxtable[emphasized][foregroundstyle=italic] \starttext \startxtable[width=4cm,height=4cm,align={middle,lohi}] \startxrow \startxcell Default settings \stopxcell \startxcell[emphasized] Named settings \stopxcell \stopxrow \startxrow \startxcell[foregroundcolor=red] Direct settings \stopxcell \startxcell[emphasized][foregroundcolor=red] Named + direct settings \stopxcell \stopxrow \stopxtable \stoptext 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://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise opera
You're right, the manual says what you pasted. I agree that it is logical and makes sense, but the actual program does not do it. My version is: "mtx-context I was using: version: 2017.08.29 19:35 I updated to: version: 2018.01.05 19:26 Reality does not match the manual page you quated. I recommend that you test before you send out manual pages which are not accurate with the actual processing. Regards Alan Braslau <braslau.l...@comcast.net> wrote: > According to i-context.pdf ($CONTEXTHOME/tex/context/interface/mkiv) > > 1 2 > \startxcell [...] [..,..=..,..] ... \stopxcell > OPT OPT > 1 NAME > 2 nx=NUMBER > ny=NUMBER > nc=NUMBER > nr=NUMBER > inherits: \setupxtable > > > > On Fri, 05 Jan 2018 15:50:51 -0800 > "jdh" <dhen...@gmail.com> wrote: > > > > > No it wont compile with two groups. It takes the second as content. > > It may be a version difference. But it likewise would not work as is > > for me with puting the key=value into the 1st bracket pair. > > > > Version parsing difference? > > > > Alan Braslau <braslau.l...@comcast.net> wrote: > > > > > No, in ConTeXt one NEVER, EVER mixes key=value lists with simple > > > keywords (parsing would otherwise be very less efficient). > > > > > > The feature to be able to declare a "namespace" (such as the > > > one called "suffix") having particular values of its parameters is > > > really powerful. Think of it as "xtable:suffix" that inherits from > > > the namespace "xtable" but then lives a life of its own... > > > > > > \startxcell takes and optional namespace specification, i.e. > > > [suffix] and an optional key=value list of parameters, i.e. > > > [ny=2,...]. These parameters override locally the values that are > > > otherwise carried by the namespace. > > > > > > ConTeXt gurus: I hope that I have gotten this explanation right. > > > > > > Alan > > > > > > > > > > > > > > > > > > On Fri, 5 Jan 2018 17:12:40 +0100 > > > Floris van Manen <v...@klankschap.nl> wrote: > > > > > > > apparently > > > > > > > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > > > > > > > should be > > > > > > > >\startxcell[suffix, ny=2] cell a 1 \stopxcell > > > > > > > > > > > > > > > > > > > > > On 5 Jan 2018, at 14:32, Hans Hagen <pra...@wxs.nl> wrote: > > > > > > > > > > On 1/5/2018 4:57 AM, Henri wrote: > > > > >> Dear list, > > > > >> The Natural Tables have this great feature that I can control > > > > >> the layout with rowwise, columnwise, or cellwise setups. For > > > > >> example: \starttext > > > > >> \setupTABLE [frame=off] > > > > >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] > > > > >> \setupTABLE [c] [2] [style=italic] > > > > >> \setupTABLE [2] [3] [color=red] > > > > >> \setupTABLE [r] [last] [bottomframe=on] > > > > >> \startTABLE > > > > >> \NC A \NC A \NC A \NC\NR > > > > >> \NC B \NC B \NC B \NC\NR > > > > >> \NC C \NC C \NC C \NC\NR > > > > >> \NC D \NC D \NC D \NC\NR > > > > >> \NC E \NC E \NC E \NC\NR > > > > >> \stopTABLE > > > > >> \stoptext > > > > > > > > > > it's also an extremely inefficient method > > > > > > > > > >> How can I do such a thing with Extreme Tables? If it is not > > > > >> yet possible I'd like to request the inclusion of such a > > > > >> mechanism. > > > > > from the manual, named setups: > > > > > > > > > > \setupxtable[suffix][align=middle,foregroundcolor=red] > > > > > \setupxtable[blabla][foregroundstyle=slanted] > > > > > \setupxtable[crap] [foregroundcolor=blue] > > > > > \setupxtable[bold] [crap][foregroundstyle=bold] > > > > > > > > > > \startxtable % [frame=off] > > > > >\startxtablehead > > > > >\startxrow[bold] > > > > >\startxcell[suffix] head a \stopxcell > > > &
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise opera
According to i-context.pdf ($CONTEXTHOME/tex/context/interface/mkiv) 1 2 \startxcell [...] [..,..=..,..] ... \stopxcell OPT OPT 1 NAME 2 nx=NUMBER ny=NUMBER nc=NUMBER nr=NUMBER inherits: \setupxtable On Fri, 05 Jan 2018 15:50:51 -0800 "jdh" <dhen...@gmail.com> wrote: > > No it wont compile with two groups. It takes the second as content. > It may be a version difference. But it likewise would not work as is > for me with puting the key=value into the 1st bracket pair. > > Version parsing difference? > > Alan Braslau <braslau.l...@comcast.net> wrote: > > > No, in ConTeXt one NEVER, EVER mixes key=value lists with simple > > keywords (parsing would otherwise be very less efficient). > > > > The feature to be able to declare a "namespace" (such as the > > one called "suffix") having particular values of its parameters is > > really powerful. Think of it as "xtable:suffix" that inherits from > > the namespace "xtable" but then lives a life of its own... > > > > \startxcell takes and optional namespace specification, i.e. > > [suffix] and an optional key=value list of parameters, i.e. > > [ny=2,...]. These parameters override locally the values that are > > otherwise carried by the namespace. > > > > ConTeXt gurus: I hope that I have gotten this explanation right. > > > > Alan > > > > > > > > > > > > On Fri, 5 Jan 2018 17:12:40 +0100 > > Floris van Manen <v...@klankschap.nl> wrote: > > > > > apparently > > > > > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > > > > > should be > > > > > >\startxcell[suffix, ny=2] cell a 1 \stopxcell > > > > > > > > > > > > > > > > On 5 Jan 2018, at 14:32, Hans Hagen <pra...@wxs.nl> wrote: > > > > > > > > On 1/5/2018 4:57 AM, Henri wrote: > > > >> Dear list, > > > >> The Natural Tables have this great feature that I can control > > > >> the layout with rowwise, columnwise, or cellwise setups. For > > > >> example: \starttext > > > >> \setupTABLE [frame=off] > > > >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] > > > >> \setupTABLE [c] [2] [style=italic] > > > >> \setupTABLE [2] [3] [color=red] > > > >> \setupTABLE [r] [last] [bottomframe=on] > > > >> \startTABLE > > > >> \NC A \NC A \NC A \NC\NR > > > >> \NC B \NC B \NC B \NC\NR > > > >> \NC C \NC C \NC C \NC\NR > > > >> \NC D \NC D \NC D \NC\NR > > > >> \NC E \NC E \NC E \NC\NR > > > >> \stopTABLE > > > >> \stoptext > > > > > > > > it's also an extremely inefficient method > > > > > > > >> How can I do such a thing with Extreme Tables? If it is not > > > >> yet possible I'd like to request the inclusion of such a > > > >> mechanism. > > > > from the manual, named setups: > > > > > > > > \setupxtable[suffix][align=middle,foregroundcolor=red] > > > > \setupxtable[blabla][foregroundstyle=slanted] > > > > \setupxtable[crap] [foregroundcolor=blue] > > > > \setupxtable[bold] [crap][foregroundstyle=bold] > > > > > > > > \startxtable % [frame=off] > > > >\startxtablehead > > > >\startxrow[bold] > > > >\startxcell[suffix] head a \stopxcell > > > >\startxcell[blabla] head b \stopxcell > > > >\startxcell head c \stopxcell > > > >\stopxrow > > > >\stopxtablehead > > > >\startxtablebody > > > >\startxrow > > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > > >\startxcell cell b 1 \stopxcell > > > >\startxcell cell c 1 \stopxcell > > > >\stopxrow > > > >\startxrow > > > >\startxcell cell b 2 \stopxcell > > > >\startxcell cell c 2 \stopxcell > > > >\stopxrow > > > >\startxrow > > > >\startxcell[suff
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise opera
No it wont compile with two groups. It takes the second as content. It may be a version difference. But it likewise would not work as is for me with puting the key=value into the 1st bracket pair. Version parsing difference? Alan Braslau <braslau.l...@comcast.net> wrote: > No, in ConTeXt one NEVER, EVER mixes key=value lists with simple > keywords (parsing would otherwise be very less efficient). > > The feature to be able to declare a "namespace" (such as the > one called "suffix") having particular values of its parameters is > really powerful. Think of it as "xtable:suffix" that inherits from the > namespace "xtable" but then lives a life of its own... > > \startxcell takes and optional namespace specification, i.e. [suffix] > and an optional key=value list of parameters, i.e. [ny=2,...]. These > parameters override locally the values that are otherwise carried by > the namespace. > > ConTeXt gurus: I hope that I have gotten this explanation right. > > Alan > > > > > > On Fri, 5 Jan 2018 17:12:40 +0100 > Floris van Manen <v...@klankschap.nl> wrote: > > > apparently > > > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > > > should be > > > >\startxcell[suffix, ny=2] cell a 1 \stopxcell > > > > > > > > > > > On 5 Jan 2018, at 14:32, Hans Hagen <pra...@wxs.nl> wrote: > > > > > > On 1/5/2018 4:57 AM, Henri wrote: > > >> Dear list, > > >> The Natural Tables have this great feature that I can control the > > >> layout with rowwise, columnwise, or cellwise setups. For example: > > >> \starttext > > >> \setupTABLE [frame=off] > > >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] > > >> \setupTABLE [c] [2] [style=italic] > > >> \setupTABLE [2] [3] [color=red] > > >> \setupTABLE [r] [last] [bottomframe=on] > > >> \startTABLE > > >> \NC A \NC A \NC A \NC\NR > > >> \NC B \NC B \NC B \NC\NR > > >> \NC C \NC C \NC C \NC\NR > > >> \NC D \NC D \NC D \NC\NR > > >> \NC E \NC E \NC E \NC\NR > > >> \stopTABLE > > >> \stoptext > > > > > > it's also an extremely inefficient method > > > > > >> How can I do such a thing with Extreme Tables? If it is not yet > > >> possible I'd like to request the inclusion of such a mechanism. > > > from the manual, named setups: > > > > > > \setupxtable[suffix][align=middle,foregroundcolor=red] > > > \setupxtable[blabla][foregroundstyle=slanted] > > > \setupxtable[crap] [foregroundcolor=blue] > > > \setupxtable[bold] [crap][foregroundstyle=bold] > > > > > > \startxtable % [frame=off] > > >\startxtablehead > > >\startxrow[bold] > > >\startxcell[suffix] head a \stopxcell > > >\startxcell[blabla] head b \stopxcell > > >\startxcell head c \stopxcell > > >\stopxrow > > >\stopxtablehead > > >\startxtablebody > > >\startxrow > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > >\startxcell cell b 1 \stopxcell > > >\startxcell cell c 1 \stopxcell > > >\stopxrow > > >\startxrow > > >\startxcell cell b 2 \stopxcell > > >\startxcell cell c 2 \stopxcell > > >\stopxrow > > >\startxrow > > >\startxcell[suffix] cell a 3 \stopxcell > > >\startxcell cell b 3 \stopxcell > > >\startxcell cell c 3 \stopxcell > > >\stopxrow > > >\startxrow > > >\startxcell[suffix] cell a 4 \stopxcell > > >\startxcell cell b 4 \stopxcell > > >\startxcell cell c 4 \stopxcell > > >\stopxrow > > >\startxrow > > >\startxcell[suffix] cell a 5 \stopxcell > > >\startxcell cell b 5 \stopxcell > > >\startxcell cell c 5 \stopxcell > > >\stopxrow > > >\stopxtablebody > >
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise operations
No, in ConTeXt one NEVER, EVER mixes key=value lists with simple keywords (parsing would otherwise be very less efficient). The feature to be able to declare a "namespace" (such as the one called "suffix") having particular values of its parameters is really powerful. Think of it as "xtable:suffix" that inherits from the namespace "xtable" but then lives a life of its own... \startxcell takes and optional namespace specification, i.e. [suffix] and an optional key=value list of parameters, i.e. [ny=2,...]. These parameters override locally the values that are otherwise carried by the namespace. ConTeXt gurus: I hope that I have gotten this explanation right. Alan On Fri, 5 Jan 2018 17:12:40 +0100 Floris van Manen <v...@klankschap.nl> wrote: > apparently > > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > > should be > >\startxcell[suffix, ny=2] cell a 1 \stopxcell > > > > > > On 5 Jan 2018, at 14:32, Hans Hagen <pra...@wxs.nl> wrote: > > > > On 1/5/2018 4:57 AM, Henri wrote: > >> Dear list, > >> The Natural Tables have this great feature that I can control the > >> layout with rowwise, columnwise, or cellwise setups. For example: > >> \starttext > >> \setupTABLE [frame=off] > >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] > >> \setupTABLE [c] [2] [style=italic] > >> \setupTABLE [2] [3] [color=red] > >> \setupTABLE [r] [last] [bottomframe=on] > >> \startTABLE > >> \NC A \NC A \NC A \NC\NR > >> \NC B \NC B \NC B \NC\NR > >> \NC C \NC C \NC C \NC\NR > >> \NC D \NC D \NC D \NC\NR > >> \NC E \NC E \NC E \NC\NR > >> \stopTABLE > >> \stoptext > > > > it's also an extremely inefficient method > > > >> How can I do such a thing with Extreme Tables? If it is not yet > >> possible I'd like to request the inclusion of such a mechanism. > > from the manual, named setups: > > > > \setupxtable[suffix][align=middle,foregroundcolor=red] > > \setupxtable[blabla][foregroundstyle=slanted] > > \setupxtable[crap] [foregroundcolor=blue] > > \setupxtable[bold] [crap][foregroundstyle=bold] > > > > \startxtable % [frame=off] > >\startxtablehead > >\startxrow[bold] > >\startxcell[suffix] head a \stopxcell > >\startxcell[blabla] head b \stopxcell > >\startxcell head c \stopxcell > >\stopxrow > >\stopxtablehead > >\startxtablebody > >\startxrow > >\startxcell[suffix][ny=2] cell a 1 \stopxcell > >\startxcell cell b 1 \stopxcell > >\startxcell cell c 1 \stopxcell > >\stopxrow > >\startxrow > >\startxcell cell b 2 \stopxcell > >\startxcell cell c 2 \stopxcell > >\stopxrow > >\startxrow > >\startxcell[suffix] cell a 3 \stopxcell > >\startxcell cell b 3 \stopxcell > >\startxcell cell c 3 \stopxcell > >\stopxrow > >\startxrow > >\startxcell[suffix] cell a 4 \stopxcell > >\startxcell cell b 4 \stopxcell > >\startxcell cell c 4 \stopxcell > >\stopxrow > >\startxrow > >\startxcell[suffix] cell a 5 \stopxcell > >\startxcell cell b 5 \stopxcell > >\startxcell cell c 5 \stopxcell > >\stopxrow > >\stopxtablebody > > \stopxtable > > > > > > > > - > > Hans Hagen | PRAGMA ADE > > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > > - > > ___ > > 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 > > ___ > > > ___ 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 ___
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise operations
apparently >\startxcell[suffix][ny=2] cell a 1 \stopxcell should be \startxcell[suffix, ny=2] cell a 1 \stopxcell > On 5 Jan 2018, at 14:32, Hans Hagen <pra...@wxs.nl> wrote: > > On 1/5/2018 4:57 AM, Henri wrote: >> Dear list, >> The Natural Tables have this great feature that I can control the layout >> with rowwise, columnwise, >> or cellwise setups. For example: >> \starttext >> \setupTABLE [frame=off] >> \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] >> \setupTABLE [c] [2] [style=italic] >> \setupTABLE [2] [3] [color=red] >> \setupTABLE [r] [last] [bottomframe=on] >> \startTABLE >> \NC A \NC A \NC A \NC\NR >> \NC B \NC B \NC B \NC\NR >> \NC C \NC C \NC C \NC\NR >> \NC D \NC D \NC D \NC\NR >> \NC E \NC E \NC E \NC\NR >> \stopTABLE >> \stoptext > > it's also an extremely inefficient method > >> How can I do such a thing with Extreme Tables? If it is not yet possible >> I'd like to request the >> inclusion of such a mechanism. > from the manual, named setups: > > \setupxtable[suffix][align=middle,foregroundcolor=red] > \setupxtable[blabla][foregroundstyle=slanted] > \setupxtable[crap] [foregroundcolor=blue] > \setupxtable[bold] [crap][foregroundstyle=bold] > > \startxtable % [frame=off] >\startxtablehead >\startxrow[bold] >\startxcell[suffix] head a \stopxcell >\startxcell[blabla] head b \stopxcell >\startxcell head c \stopxcell >\stopxrow >\stopxtablehead >\startxtablebody >\startxrow >\startxcell[suffix][ny=2] cell a 1 \stopxcell >\startxcell cell b 1 \stopxcell >\startxcell cell c 1 \stopxcell >\stopxrow >\startxrow >\startxcell cell b 2 \stopxcell >\startxcell cell c 2 \stopxcell >\stopxrow >\startxrow >\startxcell[suffix] cell a 3 \stopxcell >\startxcell cell b 3 \stopxcell >\startxcell cell c 3 \stopxcell >\stopxrow >\startxrow >\startxcell[suffix] cell a 4 \stopxcell >\startxcell cell b 4 \stopxcell >\startxcell cell c 4 \stopxcell >\stopxrow >\startxrow >\startxcell[suffix] cell a 5 \stopxcell >\startxcell cell b 5 \stopxcell >\startxcell cell c 5 \stopxcell >\stopxrow >\stopxtablebody > \stopxtable > > > > - > Hans Hagen | PRAGMA ADE > Ridderstraat 27 | 8061 GH Hasselt | The Netherlands > tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl > - > ___ > 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 > ___ signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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 ___
Re: [NTG-context] xtables: rowwise, columnwise, and cellwise operations
On 1/5/2018 4:57 AM, Henri wrote: Dear list, The Natural Tables have this great feature that I can control the layout with rowwise, columnwise, or cellwise setups. For example: \starttext \setupTABLE [frame=off] \setupTABLE [r] [first] [topframe=on,bottomframe=on,style=bold] \setupTABLE [c] [2] [style=italic] \setupTABLE [2] [3] [color=red] \setupTABLE [r] [last] [bottomframe=on] \startTABLE \NC A \NC A \NC A \NC\NR \NC B \NC B \NC B \NC\NR \NC C \NC C \NC C \NC\NR \NC D \NC D \NC D \NC\NR \NC E \NC E \NC E \NC\NR \stopTABLE \stoptext it's also an extremely inefficient method How can I do such a thing with Extreme Tables? If it is not yet possible I'd like to request the inclusion of such a mechanism. from the manual, named setups: \setupxtable[suffix][align=middle,foregroundcolor=red] \setupxtable[blabla][foregroundstyle=slanted] \setupxtable[crap] [foregroundcolor=blue] \setupxtable[bold] [crap][foregroundstyle=bold] \startxtable % [frame=off] \startxtablehead \startxrow[bold] \startxcell[suffix] head a \stopxcell \startxcell[blabla] head b \stopxcell \startxcell head c \stopxcell \stopxrow \stopxtablehead \startxtablebody \startxrow \startxcell[suffix][ny=2] cell a 1 \stopxcell \startxcell cell b 1 \stopxcell \startxcell cell c 1 \stopxcell \stopxrow \startxrow \startxcell cell b 2 \stopxcell \startxcell cell c 2 \stopxcell \stopxrow \startxrow \startxcell[suffix] cell a 3 \stopxcell \startxcell cell b 3 \stopxcell \startxcell cell c 3 \stopxcell \stopxrow \startxrow \startxcell[suffix] cell a 4 \stopxcell \startxcell cell b 4 \stopxcell \startxcell cell c 4 \stopxcell \stopxrow \startxrow \startxcell[suffix] cell a 5 \stopxcell \startxcell cell b 5 \stopxcell \startxcell cell c 5 \stopxcell \stopxrow \stopxtablebody \stopxtable - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
Re: [NTG-context] professional looking tables
Thank you for your help so far. Now I am close to what I'd like to achieve. I want to insert a foot on every pages except on the last page (at the end of the table). Is it possible? I have this simple code: \starttext \setupxtable[split=repeat,header=repeat,footer=repeat] \startxtable[frame=off,topframe=on,bottomframe=on,toffset=2pt,boffset=4pt] \startxtablehead \startxrow[bottomframe=off,rulethickness=2pt] \startxcell Head \stopxcell \stopxrow \stopxtablehead \startxtablenext \startxrow[topframe=off] \startxcell Continued from previous page \stopxcell \stopxrow \startxrow \startxcell Next \stopxcell \stopxrow \stopxtablenext \startxtablefoot[bottomframe=off] \startxrow \startxcell Continued on next page \stopxcell \stopxrow \stopxtablefoot \startxtablebody \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \startxrow \startxcell \input tufte \stopxcell \stopxrow \stopxtablebody \stopxtable \stoptext Thank you, bcsikos ___ 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 ___
Re: [NTG-context] professional looking tables
Hans Hagen írta: >On 12/22/2016 4:02 PM, Csikos Bela wrote: >> Pablo Rodriguez írta: >>> On 12/18/2016 07:19 PM, Csikos Bela wrote: >>>> Dear context users: >>>> [...] >>>> I see that context offers several table environments. Which one of them >>>> is suitable for making professional (publication quality) tables? >>>> [...] >>>> Is this feasible in current context? >>> >>> Dear Csikos, >>> >>> http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your >>> friend here. >> >> Thank you. I started to learn xtables but I have problems. When I use >> toffset and boffset the table is not rendered correctly. The width of the >> columns are not correct, the defined widths are not applied to the columns. >> See my example code below and the corresponding pdf result, xtables example >> 1. >> I use context beta standalone: ConTeXt ver: 2016.10.12 17:26 MKIV beta >> fmt: 2016.10.13 int: english/english. >> >> Code: >> >> \starttext >> >> xtables example 1 >> >> \startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm] >> \startxrow >> \startxcell[width=4cm] First Column \stopxcell >> \startxcell[width=5cm] Second Column \stopxcell >> \startxcell[width=2cm] Third Column \stopxcell >> \stopxrow >> \startxrow >> \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. >> Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. >> \stopxcell >> \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. >> \stopxcell >> \startxcell Lorem ipsum \stopxcell >> \stopxrow >> \startxrow >> \startxcell Pellentesque habitant morbi tristique senectus et netus >> \stopxcell >> \startxcell Pellentesque habitant morbi tristique senectus et netus >> \stopxcell >> \startxcell Pellentesque \stopxcell >> \stopxrow >> \startxrow >> \startxcell Donec nunc lorem, sollicitudin vel sodales eget >> \stopxcell >> \startxcell Donec nunc lorem, sollicitudin vel sodales eget Donec >> nunc lorem, sollicitudin vel sodales eget \stopxcell >> \startxcell Donec \stopxcell >> \stopxrow >> \stopxtable >> >> \stoptext >> >> How can I fix this? > >\setupxtable[one] [width=4cm] >\setupxtable[two] [width=5cm] >\setupxtable[three][width=2cm] > >\startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm] > \startxrow > \startxcell[one] First Column \stopxcell > \startxcell[two] Second Column \stopxcell > \startxcell[three] Third Column \stopxcell > \stopxrow > \startxrow > \startxcell[one] Lorem ipsum dolor sit amet, consectetur >adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, >viverra nec risus. \stopxcell > \startxcell[two] Lorem ipsum dolor sit amet, consectetur >adipiscing elit. \stopxcell > \startxcell[three] Lorem ipsum \stopxcell > \stopxrow > \startxrow > \startxcell[one] Pellentesque habitant morbi tristique >senectus et netus \stopxcell > \startxcell[two] Pellentesque habitant morbi tristique >senectus et netus \stopxcell > \startxcell[three] Pellentesque \stopxcell > \stopxrow > \startxrow > \startxcell[one] Donec nunc lorem, sollicitudin vel sodales >eget \stopxcell > \startxcell[two] Donec nunc lorem, sollicitudin vel sodales >eget Donec nunc lorem, sollicitudin vel sodales eget \stopxcell > \startxcell[three] Donec \stopxcell > \stopxrow >\stopxtable > OK, this works. Thank you for the very fast answer! bcsikos _ ___ 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 ___
Re: [NTG-context] professional looking tables
On 12/22/2016 4:02 PM, Csikos Bela wrote: Pablo Rodriguez írta: On 12/18/2016 07:19 PM, Csikos Bela wrote: Dear context users: [...] I see that context offers several table environments. Which one of them is suitable for making professional (publication quality) tables? [...] Is this feasible in current context? Dear Csikos, http://www.pragma-ade.com/general/manuals/xtables-mkiv.pdf is your friend here. Thank you. I started to learn xtables but I have problems. When I use toffset and boffset the table is not rendered correctly. The width of the columns are not correct, the defined widths are not applied to the columns. See my example code below and the corresponding pdf result, xtables example 1. I use context beta standalone: ConTeXt ver: 2016.10.12 17:26 MKIV beta fmt: 2016.10.13 int: english/english. Code: \starttext xtables example 1 \startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm] \startxrow \startxcell[width=4cm] First Column \stopxcell \startxcell[width=5cm] Second Column \stopxcell \startxcell[width=2cm] Third Column \stopxcell \stopxrow \startxrow \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. \stopxcell \startxcell Lorem ipsum dolor sit amet, consectetur adipiscing elit. \stopxcell \startxcell Lorem ipsum \stopxcell \stopxrow \startxrow \startxcell Pellentesque habitant morbi tristique senectus et netus \stopxcell \startxcell Pellentesque habitant morbi tristique senectus et netus \stopxcell \startxcell Pellentesque \stopxcell \stopxrow \startxrow \startxcell Donec nunc lorem, sollicitudin vel sodales eget \stopxcell \startxcell Donec nunc lorem, sollicitudin vel sodales eget Donec nunc lorem, sollicitudin vel sodales eget \stopxcell \startxcell Donec \stopxcell \stopxrow \stopxtable \stoptext How can I fix this? \setupxtable[one] [width=4cm] \setupxtable[two] [width=5cm] \setupxtable[three][width=2cm] \startxtable[frame=off,topframe=on,bottomframe=on,toffset=0.4cm,boffset=0.6cm] \startxrow \startxcell[one] First Column \stopxcell \startxcell[two] Second Column \stopxcell \startxcell[three] Third Column \stopxcell \stopxrow \startxrow \startxcell[one] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur massa turpis, semper quis fringilla ut, viverra nec risus. \stopxcell \startxcell[two] Lorem ipsum dolor sit amet, consectetur adipiscing elit. \stopxcell \startxcell[three] Lorem ipsum \stopxcell \stopxrow \startxrow \startxcell[one] Pellentesque habitant morbi tristique senectus et netus \stopxcell \startxcell[two] Pellentesque habitant morbi tristique senectus et netus \stopxcell \startxcell[three] Pellentesque \stopxcell \stopxrow \startxrow \startxcell[one] Donec nunc lorem, sollicitudin vel sodales eget \stopxcell \startxcell[two] Donec nunc lorem, sollicitudin vel sodales eget Donec nunc lorem, sollicitudin vel sodales eget \stopxcell \startxcell[three] Donec \stopxcell \stopxrow \stopxtable - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl - ___ 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 ___
[NTG-context] space before and after an xtable
Dear list, I have the following sample: \setupxtable[option={stretch}] \setupxtable[beforeafter] [before={\blank[big]}, after={\blank[big]}] \starttext \dorecurse{5}{\startembeddedxtable[beforeafter] \startxrow \startxcell first\stopxcell \startxcell second\stopxcell \stopxrow \stopembeddedxtable} \dorecurse{5}{\blank[big]\startembeddedxtable \startxrow \startxcell third\stopxcell \startxcell fourth\stopxcell \stopxrow \stopembeddedxtable\blank[big]} \stoptext Since before and after don’t seem to be available for \setupxtable, is there a way to add a dimension before and after the xtable using \setupxtable? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
Re: [NTG-context] underscore added by xtable
On Thu, Sep 08 2016, Wolfgang Schuster wrote: > bla bla\blank[depth] I'm really really sorry, Wolfgang, but the result is not the same, when the white-space needs stretching: --8<---cut here---start->8--- \setupalign[height] \setupwhitespace[0.5ex plus 0.2ex] \setupxtable[frame=off, boffset=0pt, toffset=0pt, rulethickness=0pt] \starttext Good\crlf \startxtable \startxrow \startxcell spacing \stopxcell \stopxrow \startxrow \startxcell here. \stopxcell \stopxrow \stopxtable Unwanted\blank[depth] \startxtable \startxrow \startxcell vertical \stopxcell \stopxrow \startxrow \startxcell space. \stopxcell \stopxrow \stopxtable \framed[height=16cm]{bla} \framed[height=16cm]{bla} \stoptext --8<---cut here---end--->8--- Nevertheless, thanks for your efforts! -- Peter ___ 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] applying properties to columns / rows in xtables
On 02/17/2016 04:22 PM, Wolfgang Schuster wrote: > [...] > \setupxtable[align=\ifcase\currentxtablecolumn\or flushright\else middle\fi] Many thanks for your fast reply, Wolfgang. This is exactly what I need. I wouldn’t have found out myself in centuries. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] applying properties to columns / rows in xtables
Pablo Rodriguez <mailto:oi...@gmx.es> 17. Februar 2016 um 16:12 Sorry, Wolfgang. You’re right, I forgot to tell- I want to avoid tagging each cell to get this: \starttext \startxtable[option=stretch] \startxrow \startxcell[align=left] one \stopxcell \startxcell[align=center] two \stopxcell \stopxrow \startxrow \startxcell[align=left] alpha \stopxcell \startxcell[align=center] beta \stopxcell \stopxrow \stopxtable \stoptext I don’t know whether there is something similar to: \setupxtable[column:first][align=left] Having to add an identifier to the xcell is something that I would like to avoid too. Many thanks for your help, Pablo Wolfgang Schuster <mailto:schuster.wolfg...@gmail.com> 17. Februar 2016 um 16:01 What do you want to do? Wolfgang Pablo Rodriguez <mailto:oi...@gmx.es> 17. Februar 2016 um 15:48 Dear list, having this basic xtable (adapted from xtables-mkiv.pdf): \starttext \startxtable[option=stretch] \startxrow \startxcell one \stopxcell \startxcell two \stopxcell \stopxrow \startxrow \startxcell alpha \stopxcell \startxcell beta \stopxcell \stopxrow \stopxtable \stoptext Is there any way to apply properties to the first column and the second column without having to add an identifier to each xcell? In this sample, it would be easy. In a longer xtable, I would like to avoid it :-). \starttext \setupxtable[align=\ifcase\currentxtablecolumn\or flushright\else middle\fi] \startxtable[option=stretch] \startxrow \startxcell one \stopxcell \startxcell two \stopxcell \stopxrow \startxrow \startxcell alpha \stopxcell \startxcell beta \stopxcell \stopxrow \stopxtable \stoptext 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] applying properties to columns / rows in xtables
On 02/17/2016 04:01 PM, Wolfgang Schuster wrote: >> Pablo Rodriguez 17. Februar 2016 um 15:48 >> In this sample, it would be easy. In a longer xtable, I would like to >> avoid it :-). > > What do you want to do? Sorry, Wolfgang. You’re right, I forgot to tell- I want to avoid tagging each cell to get this: \starttext \startxtable[option=stretch] \startxrow \startxcell[align=left] one \stopxcell \startxcell[align=center] two \stopxcell \stopxrow \startxrow \startxcell[align=left] alpha \stopxcell \startxcell[align=center] beta \stopxcell \stopxrow \stopxtable \stoptext I don’t know whether there is something similar to: \setupxtable[column:first][align=left] Having to add an identifier to the xcell is something that I would like to avoid too. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___
[NTG-context] setting lineheight in embedded xtables
Hi, I have a small problem with adjusting the height of embedded xtables. Here's my example (the colors are there just to see that all the setups are read and applied): \startbuffer[test] First line of text This is the translation. It is slightly longer than the width of the paragraph. Second line of text third line of text An even longer translation which should span three rows of the table. fourth line of text fifth line of text. \stopbuffer \startxmlsetups xml:somesetups \xmlsetsetup{#1}{text|bilingual|bilingualrow|bilingualcell}{xml:*} \stopxmlsetups \xmlregistersetup{xml:somesetups} \startxmlsetups xml:text \xmlflush{#1} \stopxmlsetups \startxmlsetups xml:bilingual \startembeddedxtable [Bilingual] \xmlflush{#1} \stopembeddedxtable \stopxmlsetups \startxmlsetups xml:bilingualrow \startxrow [height=\the\baselineskip,background=color,backgroundcolor=gray] \xmlflush{#1} \stopxrow \stopxmlsetups \startxmlsetups xml:bilingualcell \startxcell [width=0.4\textwidth,align=normal,ny=\xmlattdef{#1}{ny}{1}] \xmlflush{#1} \stopxcell \stopxmlsetups \setupxtable [Bilingual] [option=stretch, frame=on, align=normal, columndistance=1em, foregroundcolor=darkred] \starttext \xmlprocessbuffer{main}{test}{} \stoptext Problem: while the fist table follows the height assignment for table rows, in the second table, the lines are much higher. When I try to reproduces in a TeX file and apply the height=\the\baselineskip to every row individually, it works. What's going wrong here? All best Thomas ___ 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] issues with typeface selection
On 08/09/2015 07:02 PM, Hans Hagen wrote: [...] hm, hard to catch (esp if we want to do that everywhere it will be a slow downer) ... i'll do it for cells but so far other mechanisms were less sensitive for this (we'd need an extension to luatex for handling such cases ... maybe i'll look into that later) as i don't upload today you can test \setupxtable[newtimes][foregroundstyle=\newtimes] \startxcell[newtimes] ...\stopxcell Many thanks for your fix, Hans. It works perfect now. Pablo -- http://www.ousia.tk ___ 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] issues with typeface selection
On 8/9/2015 4:06 PM, Pablo Rodriguez wrote: On 08/08/2015 04:18 PM, Wolfgang Schuster wrote: [...] All I can tell at the moment is that the problem is related to the “x” font size. \starttext \startxtable \startxrow \startxcell[foregroundstyle=\txx] % this fails: foregroundstyle=\tx \CONTEXT \stopxcell \stopxrow \stopxtable \stoptext Wolfgang, I’m afraid that compilation also crashes with font commands in foregroundstyle: \definefontfamily[newtimes][serif][TeX Gyre Termes] \setupbodyfont[palatino, 12pt] \setuphead[section][style=\newtimes\tfx] \starttext \section{Comparision} \startxtable \startxrow \startxcell[foregroundstyle=\newtimes] \ConTeXt\stopxcell \stopxrow \stopxtable \stoptext hm, hard to catch (esp if we want to do that everywhere it will be a slow downer) ... i'll do it for cells but so far other mechanisms were less sensitive for this (we'd need an extension to luatex for handling such cases ... maybe i'll look into that later) as i don't upload today you can test \setupxtable[newtimes][foregroundstyle=\newtimes] \startxcell[newtimes] ...\stopxcell - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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 ___
[NTG-context] issues with xtable
Dear list, I have the following sample: \setupxtable[frame=on, option=stretch] \setupxtable[name][foregroundstyle=\bfc, ny=3, align=lohi] \setupxtable[cv][foregroundstyle=\em, ny=2, align=bottom] \setupxtable[contact][foregroundstyle=\em, align=flushright] \starttext \startxtable \startxrow \startxcell[name][ny=3]Some Name\stopxcell \startxcell[contact]Some Address Here\stopxcell \stopxrow \startxrow \startxcell[cv][ny=2]Curriculum vitae\stopxcell \startxcell[contact]City, State, 5\stopxcell \stopxrow \startxrow \startxcell[contact](000) 111-\stopxcell \stopxrow \startxrow \startxcell[contact]user@domain.level\stopxcell \stopxrow \startxrow \startxcell[contact]http://contextgarden.net\stopxcell \stopxrow \stopxtable \stoptext And I experiencing three issues. The first issue is I don’t know why there is a third column at all. I may be dowing something wrong, but where does ConTeXt read that there is a third xcell on any xrow? (I guess this might be a bug.) The second issue is that align=lohi doesn’t center vertically the cell contents. There is slightly less vertical space before the text than before it. The third issue is that spanning information isn’t read from \setupxtable, but I thas to be added at the xcell itself. Wouldn’t it be possible to read it from \setupxtable also? Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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] embeddedxtable
On 24 May 2015, at 22:53, Wolfgang Schuster schuster.wolfg...@gmail.commailto:schuster.wolfg...@gmail.com wrote: The spaces in the output are produced by the spaces between the tags (\xmlstrip doesn’t seem to work) and you have to use a combination of \removeunwantedspaces and \ignorespaces to remove them. There is something I do not understand and I hope you can explain this. The table is typeset by the \xmlflush{#1} in the table macro: \startxmlsetups xmlcommon:table Z\bgroup \setupxtable[% Setup defaults leftmargindistance=0pt,rightmargindistance=0pt, offset=2pt,height=fit,width=fit, align={center,lohi},columndistance=0pt] \setupxtableparameters{#1} \startlocationbox{#1} \removeunwantedspaces \startembeddedxtable X\xmlflush{#1}Y\stopembeddedxtable \ignorespaces \stoplocationbox \egroup \stopxmlsetups The X and Y have been placed around the \xmlflush to see what happens. Why do I see them 3 times? It looks as if the embeddedxtable-line is called 3 times (or maybe 4 times once for each row with the last call vanishing). However, the table macro itself is called only once, the Z at the beginning proves that. I cannot explain this. Another observation: inserting a newline after the ?xml-tag also does insert a space just before the Z. Hans van der Meer xtablespace.pdf Description: xtablespace.pdf ___ 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] embeddedxtable
Am 25.05.2015 um 11:26 schrieb Meer, H. van der h.vanderm...@uva.nl: On 24 May 2015, at 22:53, Wolfgang Schuster schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote: The spaces in the output are produced by the spaces between the tags (\xmlstrip doesn’t seem to work) and you have to use a combination of \removeunwantedspaces and \ignorespaces to remove them. There is something I do not understand and I hope you can explain this. The table is typeset by the \xmlflush{#1} in the table macro: \startxmlsetups xmlcommon:table Z\bgroup \setupxtable[% Setup defaults leftmargindistance=0pt,rightmargindistance=0pt, offset=2pt,height=fit,width=fit, align={center,lohi},columndistance=0pt] \setupxtableparameters{#1} \startlocationbox{#1} \removeunwantedspaces \startembeddedxtable X\xmlflush{#1}Y\stopembeddedxtable \ignorespaces \stoplocationbox \egroup \stopxmlsetups The X and Y have been placed around the \xmlflush to see what happens. Why do I see them 3 times? It looks as if the embeddedxtable-line is called 3 times (or maybe 4 times once for each row with the last call vanishing). However, the table macro itself is called only once, the Z at the beginning proves that. I cannot explain this. This is normal and needed for the calculation of the cell widths and heights. This mechanism is called trial typesetting and used by a few mechanism (e.g. float captions) to get the dimensions of the content. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] embeddedxtable
On 24 May 2015, at 22:53, Wolfgang Schuster schuster.wolfg...@gmail.commailto:schuster.wolfg...@gmail.com wrote: Am 24.05.2015 um 21:33 schrieb Meer, H. van der h.vanderm...@uva.nlmailto:h.vanderm...@uva.nl: Here an example as minimal as I could construct. The spaces in the output are produced by the spaces between the tags (\xmlstrip doesn’t seem to work) and you have to use a combination of \removeunwantedspaces and \ignorespaces to remove them. To center your table this isn’t necessary when you replace \midaligned with a framedtext environment in combination with “location=middle” or use a float command like \placefigure. I think I can reduce the number of places where spaces have to be suppressed. With just 2 \removeunwantedspaces and 1 \ignorespaces I get rid of most of them. The \framed[offset=0pt] shows where spurious space is still inserted. Only 1 space remains inside the framed: in the vertical dimension below the table. Any idea where this comes from? Some parameter to change in the \framerd perhaps? Of course I would be happier if none of these space-suppressing is necessary in my code, because ConTeXt takes care of them. Hans van der Meer \startxmlsetups xmlcommon:table \bgroup \setupxtable[% Setup defaults leftmargindistance=0pt,rightmargindistance=0pt, offset=2pt,height=fit,width=fit, align={center,lohi},columndistance=0pt] \setupxtableparameters{#1} \startlocationbox{#1} \startembeddedxtable \xmlflush{#1} \removeunwantedspaces \stopembeddedxtable \stoplocationbox \egroup \ignorespaces \stopxmlsetups \startxmlsetups xmlcommon:tr \bgroup \setupxtableparameters{#1} \removeunwantedspaces \startxrow \xmlflush{#1} \stopxrow \egroup \stopxmlsetups xtablespace.pdf Description: xtablespace.pdf ___ 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] embeddedxtable
Am 24.05.2015 um 18:01 schrieb Meer, H. van der h.vanderm...@uva.nl: Defined as follows: \def\setupxtableparameters#1{% #1 is the node \setupframeparameters{#1}{\setupxtable}% \setupToAttribute{#1}{\setupxtable}{foregroundstyle}{style}{style}{\tf}% \setupToAttribute{#1}{\setupxtable}{offset}{cellpadding}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{columndistance}{cellspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{spaceinbetween}{rowspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{option}{option}{}{}% } \def\setupframeparameters#1#2{% % color % Always set background to color if backgroundcolor is set. \doifnot{\xmlatt{#1}{bgcolor}}{\empty}{#2[background=color]}% % But it can be overridden. \doifnot{\xmlatt{#1}{background}}{\empty}{#2[background=\xmlatt{#1}{background}]}% \setupToAttribute{#1}{#2}{foregroundcolor}{color}{}{darkblue}% \setupToAttribute{#1}{#2}{backgroundcolor}{bgcolor}{}{green}% % frame \doifnot{\xmlatt{#1}{frame}}{\empty}% {#2[frame=off]\setframeparts{\xmlatt{#1}{frame}}{#2}}% \setupToAttribute{#1}{#2}{framecolor}{framecolor}{}{black}% \setupToAttribute{#1}{#2}{corner}{corner}{}{rectangular}% \setupToAttribute{#1}{#2}{radius}{radius}{}{0.5ex}% \setupToAttribute{#1}{#2}{backgroundcorner}{bgcorner}{}{rectangular}% \setupToAttribute{#1}{#2}{backgroundradius}{bgradius}{}{0.5ex}% % dimensions \setupToAttribute{#1}{#2}{rulethickness}{rulethickness}{}{3pt}% \doifnot{\xmlatt{#1}{height}}{\empty}% {#2[height=\NumberCollect{\xmlattdef{#1}{height}{fit},\the\makeupheight}]}% \doifnot{\xmlatt{#1}{width}}{\empty}% {#2[width=\NumberCollect{\xmlattdef{#1}{width}{fit},\the\textwidth}]}% % alignment \setupToAttribute{#1}{#2}{strut}{strut}{}{on}% \setupToAttribute{#1}{#2}{align}{align}{html}{normal}% \setupToAttribute{#1}{#2}{align}{valign}{html}{lohi}% } % Setup parameter to attribute. % #1 = node, #2 = setup, #3 = param, #4 = attrib, #5 = category, #6 = default. \def\setupToAttribute#1#2#3#4#5#6{% % Only executed if attribute is present. \doifexistattribute{#1}{#4}% % Attribute is present but category can be empty. {\doifelse{#5}{\empty}% {\doifelse{\xmlatt{#1}{#4}}{\empty}% {#2[#3=#6]}% attribute present but empty then take default {#2[#3=\xmlatt{#1}{#4}]}% attribute has content }% {#2[#3=\xlat{#1}{#5}{#4}{#6}]}% translate from category }% } In this case you have to provide a working minimal example. 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___
Re: [NTG-context] embeddedxtable
In this case you have to provide a working minimal example. Wolfgang Here an example as minimal as I could construct. Hans van der Meer The following example outputs show what happens with and without the \unskip's in the code. [cid:E7DC008D-E8CB-4F0A-BC45-9E8E4969C8DB] [cid:8A14737A-52AE-4B90-A03B-FA36FFF321E0] Also I am adding two other examples made by the same code, one in 2012 and one just now. Note the extensions to the right of each row. They are absent in the older version. [cid:1110D708-ADD3-46B8-A49B-143200704DA7][cid:539F8473-CC40-4CDB-AFC6-48AF306DD3F5] The example code follows here: % Switching on attribute being present (even if empty) or absent. \def\doifexistattribute#1#2{\doifnot{\xmlattdef{#1}{#2}{__NOT__}}{__NOT__}}%{#3} % Translate attribute: #1 = node, #2 = category #3 = attribute #4 = default value. \def\xlat#1#2#3#4{\xmlvalue{#2}{\xmlatt{#1}{#3}}{#4}} % Setup parameter to attribute. % #1 = node, #2 = setup, #3 = param, #4 = attrib, #5 = category, #6 = default. \def\setupToAttribute#1#2#3#4#5#6{% % Only executed if attribute is present. \doifexistattribute{#1}{#4}% % Attribute is present but category can be empty. {\doifelse{#5}{\empty}% {\doifelse{\xmlatt{#1}{#4}}{\empty}% {#2[#3=#6]}% attribute present but empty then take default {#2[#3=\xmlatt{#1}{#4}]}% attribute has content }% {#2[#3=\xlat{#1}{#5}{#4}{#6}]}% translate from category }% } % Setup flag (an TeX-if) from attribute values on,off,no,yes,true,false. % #1=node #2=flag: execute \attributetrue or \attributefalse \def\setFlagToAttribute#1#2{% \doifexistattribute{#1}{#2}% {% \doifinset{\xmlatt{#1}{#2}}{on,yes,true}{\csname#2true\endcsname}% \doifinset{\xmlatt{#1}{#2}}{off,no,false}{\csname#2false\endcsname}% }% } \startxmlsetups xmlcommon \xmlsetsetup{\xmldocument}{error|store|restore|include |table|tr|td|tbody }{xmlcommon:*} \stopxmlsetups \xmlregistersetup{xmlcommon} % Place at top/middle(default)/bottom location. \def\startlocationbox#1{% \let\templocation\relax \doif{\xmlatt{#1}{location}}{top}{\def\templocation{\vtop}}% \doif{\xmlatt{#1}{location}}{middle}{\def\templocation{\vcenter}}% \doif{\xmlatt{#1}{location}}{center}{\def\templocation{\vcenter}}% \doif{\xmlatt{#1}{location}}{bottom}{\def\templocation{\vbox}}% \templocation\bgroup\ifx\templocation\relax\else\vss\fi } \let\stoplocationbox\egroup \def\setupframeparameters#1#2{% % color % Always set background to color if backgroundcolor is set. \doifnot{\xmlatt{#1}{bgcolor}}{\empty}{#2[background=color]}% % But it can be overridden. \doifnot{\xmlatt{#1}{background}}{\empty}{#2[background=\xmlatt{#1}{background}]}% \setupToAttribute{#1}{#2}{foregroundcolor}{color}{}{darkblue}% \setupToAttribute{#1}{#2}{backgroundcolor}{bgcolor}{}{green}% % frame \doifnot{\xmlatt{#1}{frame}}{\empty}% {#2[frame=off]\setframeparts{\xmlatt{#1}{frame}}{#2}}% \setupToAttribute{#1}{#2}{framecolor}{framecolor}{}{black}% \setupToAttribute{#1}{#2}{corner}{corner}{}{rectangular}% \setupToAttribute{#1}{#2}{radius}{radius}{}{0.5ex}% \setupToAttribute{#1}{#2}{backgroundcorner}{bgcorner}{}{rectangular}% \setupToAttribute{#1}{#2}{backgroundradius}{bgradius}{}{0.5ex}% % dimensions \setupToAttribute{#1}{#2}{rulethickness}{rulethickness}{}{3pt}% \doifnot{\xmlatt{#1}{height}}{\empty}% {#2[height=\NumberCollect{\xmlattdef{#1}{height}{fit},\the\makeupheight}]}% \doifnot{\xmlatt{#1}{width}}{\empty}% {#2[width=\NumberCollect{\xmlattdef{#1}{width}{fit},\the\textwidth}]}% % alignment \setupToAttribute{#1}{#2}{strut}{strut}{}{on}% \setupToAttribute{#1}{#2}{align}{align}{html}{normal}% \setupToAttribute{#1}{#2}{align}{valign}{html}{lohi}% } % Setups for tables with xtable. \def\setupxtableparameters#1{% \setupframeparameters{#1}{\setupxtable}% \setupToAttribute{#1}{\setupxtable}{foregroundstyle}{style}{style}{\tf}% \setupToAttribute{#1}{\setupxtable}{offset}{cellpadding}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{columndistance}{cellspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{spaceinbetween}{rowspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{option}{option}{}{}% } \startxmlsetups xmlcommon:table \bgroup \xmlstripanywhere{#1}{.} \setupxtable[% Setup defaults leftmargindistance=0pt,rightmargindistance=0pt, offset=2pt,height=fit,width=fit, align={center,lohi},columndistance=0pt] \setupxtableparameters{#1} \startlocationbox{#1} \startembeddedxtable\xmlflush{#1}\stopembeddedxtable \stoplocationbox \egroup \stopxmlsetups \startxmlsetups xmlcommon:tbody \xmlstripanywhere{#1}{.} \bgroup \setupxtableparameters{#1} \startxtablebody \xmlflush{#1} \stopxtablebody \egroup \stopxmlsetups \startxmlsetups xmlcommon:tr \unskip \xmlstripanywhere{#1}{.} \unskip \bgroup \unskip \setupxtableparameters{#1} \unskip \startxrow \unskip =\xmlflush{#1} \stopxrow \egroup \unskip \stopxmlsetups \startxmlsetups xmlcommon:td \unskip \xmlstrip{#1}{.} \bgroup \setupxtableparameters{#1} \startxcell[nc=\xmlattdef{#1}{colspan}{1},nr=\xmlattdef{#1}{rowspan}{1}] \xmlflush{#1} \stopxcell \egroup \stopxmlsetups \starttext
Re: [NTG-context] embeddedxtable
Defined as follows: \def\setupxtableparameters#1{% #1 is the node \setupframeparameters{#1}{\setupxtable}% \setupToAttribute{#1}{\setupxtable}{foregroundstyle}{style}{style}{\tf}% \setupToAttribute{#1}{\setupxtable}{offset}{cellpadding}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{columndistance}{cellspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{spaceinbetween}{rowspacing}{}{0pt}% \setupToAttribute{#1}{\setupxtable}{option}{option}{}{}% } \def\setupframeparameters#1#2{% % color % Always set background to color if backgroundcolor is set. \doifnot{\xmlatt{#1}{bgcolor}}{\empty}{#2[background=color]}% % But it can be overridden. \doifnot{\xmlatt{#1}{background}}{\empty}{#2[background=\xmlatt{#1}{background}]}% \setupToAttribute{#1}{#2}{foregroundcolor}{color}{}{darkblue}% \setupToAttribute{#1}{#2}{backgroundcolor}{bgcolor}{}{green}% % frame \doifnot{\xmlatt{#1}{frame}}{\empty}% {#2[frame=off]\setframeparts{\xmlatt{#1}{frame}}{#2}}% \setupToAttribute{#1}{#2}{framecolor}{framecolor}{}{black}% \setupToAttribute{#1}{#2}{corner}{corner}{}{rectangular}% \setupToAttribute{#1}{#2}{radius}{radius}{}{0.5ex}% \setupToAttribute{#1}{#2}{backgroundcorner}{bgcorner}{}{rectangular}% \setupToAttribute{#1}{#2}{backgroundradius}{bgradius}{}{0.5ex}% % dimensions \setupToAttribute{#1}{#2}{rulethickness}{rulethickness}{}{3pt}% \doifnot{\xmlatt{#1}{height}}{\empty}% {#2[height=\NumberCollect{\xmlattdef{#1}{height}{fit},\the\makeupheight}]}% \doifnot{\xmlatt{#1}{width}}{\empty}% {#2[width=\NumberCollect{\xmlattdef{#1}{width}{fit},\the\textwidth}]}% % alignment \setupToAttribute{#1}{#2}{strut}{strut}{}{on}% \setupToAttribute{#1}{#2}{align}{align}{html}{normal}% \setupToAttribute{#1}{#2}{align}{valign}{html}{lohi}% } % Setup parameter to attribute. % #1 = node, #2 = setup, #3 = param, #4 = attrib, #5 = category, #6 = default. \def\setupToAttribute#1#2#3#4#5#6{% % Only executed if attribute is present. \doifexistattribute{#1}{#4}% % Attribute is present but category can be empty. {\doifelse{#5}{\empty}% {\doifelse{\xmlatt{#1}{#4}}{\empty}% {#2[#3=#6]}% attribute present but empty then take default {#2[#3=\xmlatt{#1}{#4}]}% attribute has content }% {#2[#3=\xlat{#1}{#5}{#4}{#6}]}% translate from category }% } Hans van der Meer On 24 May 2015, at 17:31, Wolfgang Schuster schuster.wolfg...@gmail.commailto:schuster.wolfg...@gmail.com wrote: Am 24.05.2015 um 15:32 schrieb Meer, H. van der h.vanderm...@uva.nlmailto:h.vanderm...@uva.nl: I can get rid of the unwanted spaces before the table by inserting a whole bunch of \unskip's in my code. All the \unskip's in the following code are necessary. I guess this observation will be enough to repair the ConText code. Or do I have to change something in my code? \startxmlsetups xmlcommon:tr \unskip \xmlstripanywhere{#1}{.} \unskip \bgroup \unskip \setupxtableparameters{#1} \unskip \startxrow \unskip\xmlflush{#1} \stopxrow \egroup \unskip \stopxmlsetups \startxmlsetups xmlcommon:td \unskip \xmlstrip{#1}{.} \bgroup \setupxtableparameters{#1} \startxcell[nc=\xmlattdef{#1}{colspan}{1},nr=\xmlattdef{#1}{rowspan}{1}] \xmlflush{#1} \stopxcell \egroup \stopxmlsetups How did you define the \setupxtableparameters command in your example? Wolfgang ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nlmailto: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 ___
Re: [NTG-context] aligning \placetable with bidi
On 11/16/2014 8:53 PM, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, In the following, we middle align both \placetable's: \setupbodyfont[tt] \definefont[ALM][file:almfixed.otf*arabic at 12pt] \setupdirections[bidi=global] \setupxtable[width=1in] \showframe \starttext \startalignment[middle] \ALM \placetable[middle,none]{} {\startxtable \startxrow \startxcell Text 1 \stopxcell \startxcell[align=r2l] النص ١ \stopxcell \stopxrow \stopxtable} \placetable[middle,none]{} {\righttoleft \startxtable \startxrow \startxcell[align=r2l] النص ١ \stopxcell \startxcell Text 1 \stopxcell \stopxrow \stopxtable} \stopalignment \stoptext Only the first \placetable is aligned correctly; how do we get the second one -- \righttoleft table -- middle aligned? See attached. i can fix the funny lap but still we need to have some concept of cells running from l2r or r2l .. - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ___ 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] Macros in \start-stopTABLE
On Sun, 16 Nov 2014 00:24:57 -0700, Pablo Rodriguez oi...@gmx.es wrote: On 11/16/2014 05:50 AM, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, In the following, the first table works and the second one does not: [...] What do I need to do to get this macro right here? Hi Idris, I don’t know how you could make it work with TABLE, but your macro seems to work with xtables: \setupbodyfont[tt] \definefont[ALM][file:almfixed.otf*arabic at 12pt] \setupdirections[bidi=global] \define\NCD{\stopxcell\startxcell\righttoleft} \setupxtable[width=1in] \starttext \ALM \placetable[right,none]{} {\startxtable \startxrow \startxcell Text 2 \NCD النص 2 \stopxcell \stopxrow \stopxtable} \stoptext Just in case it helps, Very helpful, I'm switching to xtables. I hope we can get bidi-paragraph options for the cell commands built into the core so we needn't write out \righttoleft etc e.g. \start-stopxcellR, \start-stopxcellL Thanks a lot and Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 ___ 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 ___
[NTG-context] aligning \placetable with bidi
Dear gang, In the following, we middle align both \placetable's: \setupbodyfont[tt] \definefont[ALM][file:almfixed.otf*arabic at 12pt] \setupdirections[bidi=global] \setupxtable[width=1in] \showframe \starttext \startalignment[middle] \ALM \placetable[middle,none]{} {\startxtable \startxrow \startxcell Text 1 \stopxcell \startxcell[align=r2l] النص ١ \stopxcell \stopxrow \stopxtable} \placetable[middle,none]{} {\righttoleft \startxtable \startxrow \startxcell[align=r2l] النص ١ \stopxcell \startxcell Text 1 \stopxcell \stopxrow \stopxtable} \stopalignment \stoptext Only the first \placetable is aligned correctly; how do we get the second one -- \righttoleft table -- middle aligned? See attached. Best wishes Idris -- Idris Samawi Hamid Professor of Philosophy Colorado State University Fort Collins, CO 80523 xtable-bidi.pdf Description: Adobe PDF document ___ 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] Macros in \start-stopTABLE
On 11/16/2014 05:50 AM, Idris Samawi Hamid ادريس سماوي حامد wrote: Dear gang, In the following, the first table works and the second one does not: [...] What do I need to do to get this macro right here? Hi Idris, I don’t know how you could make it work with TABLE, but your macro seems to work with xtables: \setupbodyfont[tt] \definefont[ALM][file:almfixed.otf*arabic at 12pt] \setupdirections[bidi=global] \define\NCD{\stopxcell\startxcell\righttoleft} \setupxtable[width=1in] \starttext \ALM \placetable[right,none]{} {\startxtable \startxrow \startxcell Text 2 \NCD النص 2 \stopxcell \stopxrow \stopxtable} \stoptext Just in case it helps, Pablo -- http://www.ousia.tk ___ 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] xtables and xml and lua
On 6/18/2014 1:03 PM, Thomas A. Schmitz wrote: Hi all, I'm terribly sorry I have to send three files for this test case, but I'm trying to process xml with lua, so it's difficult to do otherwise. I have two problems: 1. (probably unrelated to xml/lua): when I try to set the options (l. 22-3 in test-style.tex) \setupxtable [split=yes, spaceinbetween=medium] for the xtable environment, I get an error: tex errorerror on line 22 in file /mnt/shared/context/tex/texmf-context/tex/context/base/cont-yes.mkiv: ! You can't use `\prevdepth' in horizontal mode \nointerlineskip ^^@-\prevdepth -\thousandpoint l.22 \nointerlineskip \ctxcommand #1o-\directlua {commands.#1} \tabl_x_process ...lse \tabl_x_flush_text_checked \fi \fi \ctxcommand {x_tab... l.8 } \ctxlxml #1h-\ctxlua {lxml.#1} l.91 \stopluacode This looks like a buglet in xtables to me. 2. I would like to test whether a certain element has already been seen (l. 8-13 in test-style.lua). However, since tables are two-pass, the test will always return true. How could I test properly? many ways ... (ok, i might provide some hook into tables) ... three attached i bet you'll choose the third solution Hans - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com | www.pragma-pod.nl - ?xml version=1.0 encoding=utf-8? a b c1/c dText/d /b b c2/c dMore text/d /b b c2/c dEven more text/d /b b c2/c dAnd more/d /b b c3/c dAnd even more/d /b /a -- solution 1 -- local lasttitle = nil -- -- function xml.functions.test_b(t) -- local title = xml.text(t, c) -- local content = xml.text(t, d) -- context.startxrow() -- context.startxcell( { background=color, backgroundcolor=yellow } ) -- if lasttitle == title then -- context.color( { red }, title) -- else -- lasttitle = title -- context.color( { blue }, title) -- end -- context.stopxcell() -- context.startxcell() -- context(content) -- context.stopxcell() -- context.stopxrow() -- end -- solution 2 -- local titles = { } -- -- function xml.functions.reset_b(t) -- titles = { } -- end -- -- function xml.functions.test_b(t) -- local title = xml.text(t, c) -- local content = xml.text(t, d) -- context.startxrow() -- context.startxcell( { background=color, backgroundcolor=yellow } ) -- if titles[title] then -- context.color( { red }, title) -- else -- titles[title] = true -- context.color( { blue }, title) -- end -- context.stopxcell() -- context.startxcell() -- context(content) -- context.stopxcell() -- context.stopxrow() -- end -- solution 3 function xml.functions.test_b(t) local title = xml.text(t, c) local content = xml.text(t, d) context.startxrow() context.startxcell( { background=color, backgroundcolor=yellow } ) if xml.text(t,./preceding-sibling::/[-1]) == title then context.color( { red }, title) else context.color( { blue }, title) end context.stopxcell() context.startxcell() context(content) context.stopxcell() context.stopxrow() end test-style.tex Description: TeX document ___ 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 ___
[NTG-context] Multipage xtables starts at the wrong page
Hello everyone, I'm using ConTeXt to write a technical manual and I'm facing with some strange behavior I don't know how to overcome. I need a multipage table and I'm using the xtables. This is a (stripped down) version of a part of my document: \mainlanguage [en] \setupxtable [externaldocs] [split=repeat, header=repeat, bodyfont=8pt, foregroundstyle=\ss, option=stretch, align=middle, frame=off, bottomframe=on, framecolor=elitalblue] \setupxtable [externaldocsheader] [background=color, backgroundcolor=black, foregroundcolor=white, foregroundstyle=\ss\bf] \starttext \chapter{Introduction} \startxtable [externaldocs] \startxtablehead \startxrow [externaldocsheader] \startxcell AD No. \stopxcell \startxcell Title \stopxcell \startxcell Doc No. \stopxcell \startxcell Issue \stopxcell \startxcell Date \stopxcell \startxcell Applicability \stopxcell \stopxrow \stopxtablehead \startxtablebody \dorecurse{60}{ \startxrow \startxcell AD No. \stopxcell \startxcell Title \stopxcell \startxcell Doc No. \stopxcell \startxcell Issue \stopxcell \startxcell Date \stopxcell \startxcell Applicability \stopxcell \stopxrow } \stopxtablebody \stopxtable \stoptext What I get, however, is a table that starts at page 2 and not just after the chapter head. If the number of rows is smaller and the table fit the first page, then it starts at the right place. What I'm doing wrong? Thank you very much, Marco ___ 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] two questions for the simplest slides
On 22/07/12 09:58, Wolfgang Schuster wrote: Am 21.07.2012 um 21:25 schrieb Peter Münster: On Sat, Jul 21 2012, Pablo Rodríguez wrote: Page is red and text is white. [...] You mean something like this? Many thanks for your reply, Wolfgang. I mean something like that, but I have problems when adding such an xtable: \startxtable[option={stretch,width},frame=off,split=yes] \dorecurse{100}{ \startxrow \startxcell right \stopxcell \startxcell left \stopxcell \stopxrow} \stopxtable The xtable itself won't be aligned when I set split=yes and won't be split in pages. BTW, how can I make that the first column are aligned to the right? \setupxtable[xcell][1][align=right] doesn't seem to work. Many thanks for your help, Pablo -- http://www.ousia.tk ___ 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 ___