![](https://secure.gravatar.com/avatar/07dc62ae58949a24f1532f0bfd7c083b.jpg?s=120&d=mm&r=g)
Hello everyone, I'm starting to write some technical documents for a customer. I used MS Word in the past because that's what they use, then switched to OO Writer for the last job, but I'm not very comfortable with neither of them, so I decided to switch to ConTeXt. However, I'm facing with a problem. Page headings must contain a three columns table, with a logo in the left cell, a title in the middle one and finally some rows with a document reference number, the issue, the issue date and "page/pages" numbers. I'm not sure if I should use the \startcolumns environment (but it doesn't seems to work in headers or footers) or one of the various table environments. Could you give me some advice? I attached a screenshot of what the header looks like in Writer. Thank you, Marco Pallante
![](https://secure.gravatar.com/avatar/b79687264c3e06cba13b54d05b12a9f5.jpg?s=120&d=mm&r=g)
Am 13.12.2013 um 16:00 schrieb Marco Pallante
Hello everyone,
I'm starting to write some technical documents for a customer. I used MS Word in the past because that's what they use, then switched to OO Writer for the last job, but I'm not very comfortable with neither of them, so I decided to switch to ConTeXt.
However, I'm facing with a problem. Page headings must contain a three columns table, with a logo in the left cell, a title in the middle one and finally some rows with a document reference number, the issue, the issue date and "page/pages" numbers.
I'm not sure if I should use the \startcolumns environment (but it doesn't seems to work in headers or footers) or one of the various table environments.
Could you give me some advice?
I attached a screenshot of what the header looks like in Writer.
You can try to use a table but there is a possibility for problems when you use xtables in your document which are split across pages. \startsetups[header:table] \startembeddedxtable[align={middle,lohi},strut=no] \startxrow \startxcell[width=0.25\paperwidth,nr=4] %\externalfigure[logo] \stopxcell \startxcell[width=0.40\paperwidth,nr=4] Document title \stopxcell \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Doc No. \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Revision \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Data \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Pagina \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \pagenumber/\lastpagenumber \stopxcell \stopxcellgroup \stopxrow \stopembeddedxtable \stopsetups \setupheadertexts[\texsetup{header:table}] \starttext \dorecurse{30}{\input knuth\par} \stoptext Wolfgang
![](https://secure.gravatar.com/avatar/07dc62ae58949a24f1532f0bfd7c083b.jpg?s=120&d=mm&r=g)
Wolfgang, Your solution seems to work perfectly: I get exactly what I want (I only have to remove frames around cells). I don't understand the possible problems: are you saying that if I use xtables in the body of the document (other than in the header), and those tables split across pages it could give unexpected behaviours? What if I don't use xtables in the body, but other tabular environments that allow splitting, such as TABLE or Linetable (I'm reading from the wiki, I never used that)? Thank you very much! Bye, Marco Pallante
You can try to use a table but there is a possibility for problems when you use xtables in your document which are split across pages.
\startsetups[header:table]
\startembeddedxtable[align={middle,lohi},strut=no] \startxrow \startxcell[width=0.25\paperwidth,nr=4] %\externalfigure[logo] \stopxcell \startxcell[width=0.40\paperwidth,nr=4] Document title \stopxcell \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Doc No. \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Revision \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Data \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \unknown \stopxcell \stopxcellgroup \stopxrow \startxrow \startxcellgroup[height=0.25\headerheight,foregroundstyle=small] \startxcell[width=0.10\paperwidth,align={flushright,lohi}] Pagina \stopxcell \startxcell[width=0.15\paperwidth,align={flushleft,lohi}] \pagenumber/\lastpagenumber \stopxcell \stopxcellgroup \stopxrow \stopembeddedxtable
\stopsetups
\setupheadertexts[\texsetup{header:table}]
\starttext \dorecurse{30}{\input knuth\par} \stoptext
Wolfgang
participants (2)
-
Marco Pallante
-
Wolfgang Schuster