* Table in header, or multicolumn header
@ 2013-12-13 15:00 Marco Pallante
2013-12-15 14:31 ` Wolfgang Schuster
0 siblings, 1 reply; 3+ messages in thread
From: Marco Pallante @ 2013-12-13 15:00 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1: Type: text/plain, Size: 800 bytes --]
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
[-- Attachment #2: header-writer.png --]
[-- Type: image/png, Size: 26335 bytes --]
[-- Attachment #3: Type: text/plain, Size: 485 bytes --]
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Table in header, or multicolumn header
2013-12-13 15:00 Table in header, or multicolumn header Marco Pallante
@ 2013-12-15 14:31 ` Wolfgang Schuster
2013-12-16 8:56 ` Marco Pallante
0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-12-15 14:31 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 13.12.2013 um 16:00 schrieb Marco Pallante <marco.pallante@gmail.com>:
> 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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Table in header, or multicolumn header
2013-12-15 14:31 ` Wolfgang Schuster
@ 2013-12-16 8:56 ` Marco Pallante
0 siblings, 0 replies; 3+ messages in thread
From: Marco Pallante @ 2013-12-16 8:56 UTC (permalink / raw)
To: ntg-context
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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-12-16 8:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-13 15:00 Table in header, or multicolumn header Marco Pallante
2013-12-15 14:31 ` Wolfgang Schuster
2013-12-16 8:56 ` Marco Pallante
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).