ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Table placement with forced width
@ 2009-04-13 19:31 Design Department
  2009-04-14  8:40 ` [***SPAM***] " Bill Long
  2009-04-14 16:48 ` Wolfgang Schuster
  0 siblings, 2 replies; 5+ messages in thread
From: Design Department @ 2009-04-13 19:31 UTC (permalink / raw)
  To: ntg-context

Hi all,

I need a table that is 2/3 \pagewidth and placed against the right page margin.

\SetTableToWidth{6in}
\setuptables[split=repeat]
\starttablehead
\NC Description \NC Quantity \NC Units \NC Rate \NC Amount \NC \NR
\HL
\stoptablehead
\starttabletail
\NC \SL This ticket is not an invoice. Pay on receipt of invoice.
\NC\FOUR \NC\NR
\stoptabletail

\placetable[right,5*line,split=repeat][tab:costs]{}
\starttables[|l|c|c|c|r|]
\NC 1 man unit \NC 4 \NC hr \NC 125.00 \NC 500.00 \NC \NR
\NC Kilometre charges \NC 100 \NC km \NC .85 \NC 85.00 \NC \NR
\NC Field Kit \NC 1 \NC day \NC 50.0 \NC 50.00 \NC \NR
\HL
\NC \bold{Total:} (all work performed on this ticket, before taxes)
\NC\THREE \NC \$ 635.00 \NC \NR
\stoptables

The table flows into, and off the right margin area. What am I doing wrong?
Also, \SetTableToWidth{.67\pagewidth} produces an error. Is there a
way to specify a fraction of \pagewidth?

Even though this example is short, the table may run to multiple pages
and I need both headers and footers to repeat.
I also need to eventually shade alternate row backgrounds.
Is there a better table macro choice?

-- 
david
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* [***SPAM***] Re:  Table placement with forced width
  2009-04-13 19:31 Table placement with forced width Design Department
@ 2009-04-14  8:40 ` Bill Long
  2009-04-14 16:21   ` Design Department
  2009-04-14 16:48 ` Wolfgang Schuster
  1 sibling, 1 reply; 5+ messages in thread
From: Bill Long @ 2009-04-14  8:40 UTC (permalink / raw)
  To: ntg-context

I think the natural table works fine with your requirements.

http://www.pragma-ade.com/general/manuals/enattab.pdf

On Mon, Apr 13, 2009 at 01:31:09PM -0600, Design Department wrote:
> Hi all,
> 
> I need a table that is 2/3 \pagewidth and placed against the right page margin.
> 
> \SetTableToWidth{6in}
> \setuptables[split=repeat]
> \starttablehead
> \NC Description \NC Quantity \NC Units \NC Rate \NC Amount \NC \NR
> \HL
> \stoptablehead
> \starttabletail
> \NC \SL This ticket is not an invoice. Pay on receipt of invoice.
> \NC\FOUR \NC\NR
> \stoptabletail
> 
> \placetable[right,5*line,split=repeat][tab:costs]{}
> \starttables[|l|c|c|c|r|]
> \NC 1 man unit \NC 4 \NC hr \NC 125.00 \NC 500.00 \NC \NR
> \NC Kilometre charges \NC 100 \NC km \NC .85 \NC 85.00 \NC \NR
> \NC Field Kit \NC 1 \NC day \NC 50.0 \NC 50.00 \NC \NR
> \HL
> \NC \bold{Total:} (all work performed on this ticket, before taxes)
> \NC\THREE \NC \$ 635.00 \NC \NR
> \stoptables
> 
> The table flows into, and off the right margin area. What am I doing wrong?
> Also, \SetTableToWidth{.67\pagewidth} produces an error. Is there a
> way to specify a fraction of \pagewidth?
> 
> Even though this example is short, the table may run to multiple pages
> and I need both headers and footers to repeat.
> I also need to eventually shade alternate row backgrounds.
> Is there a better table macro choice?
> 

-- 
   卷137_28 【送丘健至州敕放作时任下邽县】储光羲 

太史登观台,天街耀旄头。大君忽霆震,诏爵冠军侯。 
南必梁孙源,西将圉昆丘。河陇征击卒,虎符到我州。 
朝集咸林城,师言乱啁啾。杀气变木德,凛凛如高秋。 
元戎启神皇,庙堂发嘉谋。息兵业稼穑,归马复休牛。 
和风开阴雪,大耀中天流。欢声殷河岳,涵荡非烟浮。 
邦牧新下车,德礼彼甿讴。乾坤日交泰,吾亦遂优游。



___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: [***SPAM***] Re: Table placement with forced width
  2009-04-14  8:40 ` [***SPAM***] " Bill Long
@ 2009-04-14 16:21   ` Design Department
  0 siblings, 0 replies; 5+ messages in thread
From: Design Department @ 2009-04-14 16:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Apr 14, 2009 at 2:40 AM, Bill Long <longweilai@sohu.com> wrote:
> I think the natural table works fine with your requirements.

Repeating table footers? I understood this was not possible with natural tables.

-- 
david
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Table placement with forced width
  2009-04-13 19:31 Table placement with forced width Design Department
  2009-04-14  8:40 ` [***SPAM***] " Bill Long
@ 2009-04-14 16:48 ` Wolfgang Schuster
  2009-04-14 17:21   ` Design Department
  1 sibling, 1 reply; 5+ messages in thread
From: Wolfgang Schuster @ 2009-04-14 16:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 13.04.2009 um 21:31 schrieb Design Department:

> The table flows into, and off the right margin area. What am I doing  
> wrong?
> Also, \SetTableToWidth{.67\pagewidth} produces an error. Is there a
> way to specify a fraction of \pagewidth?

No, because ConTeXt has no dimension with the name \pagewidth, you couls
use \textwidth for the width of the textblock. Even then your setup is
useless because your table is wider than 2/3 of the textwidth (it is  
even
wider than the complete textblock).

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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

* Re: Table placement with forced width
  2009-04-14 16:48 ` Wolfgang Schuster
@ 2009-04-14 17:21   ` Design Department
  0 siblings, 0 replies; 5+ messages in thread
From: Design Department @ 2009-04-14 17:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

> No, because ConTeXt has no dimension with the name \pagewidth, you couls
> use \textwidth for the width of the textblock. Even then your setup is
> useless because your table is wider than 2/3 of the textwidth (it is even
> wider than the complete textblock).
Thks. I must have been lost in space - I intended to use \paperwidth.

-- 
david
___________________________________________________________________________________
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  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


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

end of thread, other threads:[~2009-04-14 17:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-04-13 19:31 Table placement with forced width Design Department
2009-04-14  8:40 ` [***SPAM***] " Bill Long
2009-04-14 16:21   ` Design Department
2009-04-14 16:48 ` Wolfgang Schuster
2009-04-14 17:21   ` Design Department

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).