Re: [NTG-context] Balancing vertical placement of table

2010-02-02 Thread Design Department

On 2010-01-31, at 8:58 AM, Wolfgang Schuster wrote:

> Am 31.01.10 16:50, schrieb Design Department:
> 
>>> Is the content for each element short enough to fit on one page
>>> or do you have content which needs more pages?
>> 
>> The content always fits on a single page.
> 
> Here is a goodie which is only documented in the ConTeXt source.

Thank-you Wolfgang.
As always, I'm indebted.

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


Re: [NTG-context] Balancing vertical placement of table

2010-01-31 Thread Design Department

>> I have a single page layout as follows:
>> 
>> * Landscape + letter page
>> * Block of multi-line text (variable number of lines) which occupies the 
>> left third of the page
>> * Table with variable number of rows which occupies the right two-thirds of 
>> the page
>> 
>> I'm using \framed for the left text block and \placetable for the table. Is 
>> their a way to vertically place the table such that one-third of the 
>> vertical whitespace (above and below the table) is placed above the table, 
>> two-thirds below the table? The number of rows in the table varies enough 
>> that a fixed top position looks sub-optimal.
>> 
>> Is it possible to do something similar with the block of text, perhaps using 
>> a different top/bottom split for the vertical whitespace?
>> 
>> Are \framed and \placetable the best way to do this?
> 
> Is the content for each element short enough to fit on one page
> or do you have content which needs more pages?

The content always fits on a single page.
___
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] Balancing vertical placement of table

2010-01-29 Thread Design Department
I have a single page layout as follows:

* Landscape + letter page
* Block of multi-line text (variable number of lines) which occupies the left 
third of the page
* Table with variable number of rows which occupies the right two-thirds of the 
page

I'm using \framed for the left text block and \placetable for the table. Is 
their a way to vertically place the table such that one-third of the vertical 
whitespace (above and below the table) is placed above the table, two-thirds 
below the table? The number of rows in the table varies enough that a fixed top 
position looks sub-optimal.

Is it possible to do something similar with the block of text, perhaps using a 
different top/bottom split for the vertical whitespace?

Are \framed and \placetable the best way to do this?

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


Re: [NTG-context] Table macro choices?

2009-12-06 Thread Design Department
> The best I can do.

Thanks Wolfgang. At first glance, it appears to cover the essentials.
I'll need to hack on it for a few days to test the minor requirements that 
aren't so obvious in the sample PDF, but this gets me going again.

A particular advantage (if I'm interpreting this layout correctly) is avoiding 
the use of column spans for header and footer material (other than the actual 
column headings). This report has a number of different tabular layouts that I 
didn't show you, each with unique column counts. Much more reliable if it isn't 
necessary to watch colspan values in the meta-data sections (which should 
really be includes.)

I would think the general requirement here isn't that unusual for certain types 
of technical reports. This report is for a regulatory compliance application. 
If printed pages within a single report are ever separated, it is essential 
that the meta-data for the inspection be available on each page, not just the 
first or last. The same must be true for many scientific and technical layouts.

I particularly need to get my head around what's different from my initial 
approach.
Once again, thanks. I'll report on results in a few days for anyone following 
this.


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


Re: [NTG-context] Table macro choices?

2009-12-05 Thread Design Department

On 2009-12-05, at 7:55 AM, Wolfgang Schuster wrote:

> 
> Am 04.12.2009 um 22:58 schrieb Design Department:
> 
>> Earlier this year I attempted to set tabular material using ConTeXt while 
>> meeting *all* the following requirements:
>>> Some columns need fixed width, content must wrap to multiple lines
>>> Multi-page tables
>>> Column headings must repeat on every page
>>> Additional header information is required on every page 
>>> Additional footer information containing tabular text and graphics is 
>>> required on every page
>>> Forced page breaks on arbitrary selected rows
>>> Horizontal rules between specified groups of rows
>> 
>> I was unable to meet all these requirements and reverted to LaTeX. It works, 
>> but I prefer ConTeXt and the LaTeX version takes a painfully long time to 
>> converge on optimal column widths. I'm now using TeXLive 2009, rather than 
>> 2008 - has anything changed in ConTeXt that will meet these requirements?
> 
> Can you show a example from the LaTeX output.

For Walfgang, and anyone else who has thoughts, here's a sample PDF.
http://docs.google.com/fileview?id=0B3ld3P7qGRnwOTRmOWJhYTEtMGQ1Yy00ZGE4LTk0NmQtYzk3NmJlYWIzM2Zh&hl=en

The main point is that the tabular material runs from just a single to several 
hundred rows and each page *must* contain both the header and footer 
explanations associated with the table. Normally the pages are broken at a 
fixed increment of rows depending on the type of data, usually 20 or 32 per 
page, but other values are possible. For good measure, field technicians often 
want a forced page break at an arbitrary row position.

Two of the table columns contain data which may wrap to multiple lines, as 
illustrated.

Is all this possible without writing a new tabular macro? I could get close, 
but couldn't get the table footer repeating on every page or the forced page 
breaks. That was using the TeXLive 2008 distribution.


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


Re: [NTG-context] Table macro choices?

2009-12-05 Thread Design Department

On 2009-12-05, at 7:55 AM, Wolfgang Schuster wrote:

> 
> Am 04.12.2009 um 22:58 schrieb Design Department:
> 
>> Earlier this year I attempted to set tabular material using ConTeXt while 
>> meeting *all* the following requirements:
>>> Some columns need fixed width, content must wrap to multiple lines
>>> Multi-page tables
>>> Column headings must repeat on every page
>>> Additional header information is required on every page 
>>> Additional footer information containing tabular text and graphics is 
>>> required on every page
>>> Forced page breaks on arbitrary selected rows
>>> Horizontal rules between specified groups of rows
>> 
>> I was unable to meet all these requirements and reverted to LaTeX. It works, 
>> but I prefer ConTeXt and the LaTeX version takes a painfully long time to 
>> converge on optimal column widths. I'm now using TeXLive 2009, rather than 
>> 2008 - has anything changed in ConTeXt that will meet these requirements?
> 
> Can you show a example from the LaTeX output.

If I remove a few sensitive items I can generate a sample PDF. Is this what you 
mean, Wolfgang? I've never seen attachments in mailing list - is that allowed? 
I could also include a link to it hosted somewhere else. That's probably the 
better solution but it will take a bit of time.

The LaTeX itself is a series of templates with mixed Ruby code, and so it 
doesn't seem practical to post the LaTeX code itself.

cheers,
David Richardson
___
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] Table macro choices?

2009-12-04 Thread Design Department
Earlier this year I attempted to set tabular material using ConTeXt while 
meeting *all* the following requirements:
  > Some columns need fixed width, content must wrap to multiple lines
  > Multi-page tables
  > Column headings must repeat on every page
  > Additional header information is required on every page 
  > Additional footer information containing tabular text and graphics is 
required on every page
  > Forced page breaks on arbitrary selected rows
  > Horizontal rules between specified groups of rows

I was unable to meet all these requirements and reverted to LaTeX. It works, 
but I prefer ConTeXt and the LaTeX version takes a painfully long time to 
converge on optimal column widths. I'm now using TeXLive 2009, rather than 2008 
- has anything changed in ConTeXt that will meet these requirements?

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


[NTG-context] Which Table Layout Mode

2009-04-21 Thread Design Department
I'm having great difficulty finding a table mode that accomplishes
everything I need:

Multi-page: no problem
Repeating headers: no problem
Repeating footers: don't actually need columns in footers, just a
table-wide block containing diagrams and abbreviation footnotes. Must
appear on every page, though. 'tables' or 'tabulate' mode works OK.
lintetables?
Horizontal lines: no problem (except linetables?)
Alternate row shading: natural tables work fine, don't see how to do
this with 'tables'  or 'tabulate' mode. linetables?
Forced page break at arbitrary rows: [after=\page] doesn't seem to
work in natural tables, don't see how to do this with 'tables' or
'tabulate' mode. linetables?

I've tried all the table modes, including linetables and can't find a
mode that gives me all required features.
Is this combination of tabular features not possible?

-- 
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
___


[NTG-context] Natural tables with \placetable

2009-04-17 Thread Design Department
Can anyone tell me why this table example is placed on the left margin
on the first page and the right margin on subsequent pages?
My intention is to place against the right margin on all pages.

\starttext
\placetable[right, 4*line, split]
  {none}
  {\bTABLE[split=repeat,option=stretch, textwidth=3in]
\bTABLEhead[rulethickness=1pt]
  \bTR
 \bTH[align={middle}] head \eTH
  \eTR
\eTABLEhead
\bTABLEbody
\dorecurse{6}{
  \bTR
\bTD
  {\input knuth \par}
\eTD
  \eTR
}
\eTABLEbody
\bTABLEfoot
  \bTR
\bTH footer  \eTH
  \eTR
\eTABLEfoot
  \eTABLE}
\stoptext


-- 
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
___


[NTG-context] Forced page break with tables macros?

2009-04-15 Thread Design Department
Is it possible to force a page break at an arbitrary row when using
the 'tables' macros?

-- 
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
___


[NTG-context] Natural Table Footers

2009-04-15 Thread Design Department
Is the lack of repeating footers in natural tables due to
implementation difficulties well beyond that for repeating headers or
is the feature considered inappropriate typography?

-- 
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
___


Re: [NTG-context] Table macro alternatives

2009-04-14 Thread Design Department
Found it. Thanks again.
I had read it some time ago, but it didn't fully register then - I
think I was hoping to use natural tables at the time.

-- 
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
___


Re: [NTG-context] Table placement with forced width

2009-04-14 Thread Design Department
> 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
___


Re: [NTG-context] Table macro alternatives

2009-04-14 Thread Design Department
>> Is alignmentcharacter available in table macros other than natural tables?
>
> http://wiki.contextgarden.net/Tables_Overview
> Wolfgang

There is no mention of alignmentcharacter anywhere other than for
natural tables, but the wiki is hardly comprehensive.
That's why I'm asking here.

-- 
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
___


[NTG-context] Table macro alternatives

2009-04-14 Thread Design Department
Is alignmentcharacter available in table macros other than natural tables?

I would prefer to use natural tables but absolutely require a footer
at the bottom of the table on every page.
The footer doesn't need to contain columns - it can be a box the width
of the table.

Any suggestions on achieving this using 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
___


Re: [NTG-context] [***SPAM***] Re: Table placement with forced width

2009-04-14 Thread Design Department
On Tue, Apr 14, 2009 at 2:40 AM, Bill Long  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
___


[NTG-context] Table placement with forced width

2009-04-13 Thread Design Department
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
___


Re: [NTG-context] Paragraphs in Layers

2009-04-09 Thread Design Department
Thks. I was incorrectly assuming that the dimension properties,
especially width, should be set in \definelayer.
I'm not clear on the purpose of a separate \definelayer command,
unless it's to allow the abstraction of layer offsets from topspace
and backspace value, the way I have in this example.

It works now, though, and I'll accept that as an answer given my
unwillingness to review that code for \definelayer ;-)


-- 
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
___


Re: [NTG-context] Paragraphs in Layers

2009-04-09 Thread Design Department
Just tried the following snippet on the live.contextgarden.net with no joy:
The layer content appears on a single line, whether I use \par, \\,
\endgraf, \crlf or no line ending at all.

\definelayer[TicketSummary]
  [x=\backspace, y=\topspace
width=4in, height=4in,
repeat=no]
\setlayerframed[TicketSummary]
  [hoffset=.5\backspace, voffset=2.5in]{
\bold{Client Name:} \\
Acme Corporation \\
\bold{Location of Work:}
Main warehouse
}

\setupbackgrounds[page][background={TicketSummary}]

\starttext
Hello world!
\stoptext

-- 
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
___


[NTG-context] Paragraphs in Layers

2009-04-09 Thread Design Department
Why does the following produce a single line when the layer content
produces four lines in normal flow?
How are paragraphs and new lines produced in layers?

I've tried \par, \endgraf, \crlf and \\ without success.

\definelayer[TicketSummary]
  [x=\backspace, y=\topspace
width=4in, height=4in,
repeat=no]
\setlayer[TicketSummary]
  [hoffset=.5\backspace, voffset=2.5in]{
\bold{Client Name:}
Acme Corporation

\bold{Location of Work:}
Main warehouse
}

-- 
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
___


[NTG-context] Multiple Page Backgrounds

2009-04-08 Thread Design Department
I have a need for multiple repeating page backgrounds: an imported PDF
document and one or more dynamically generated items that are layered
on top.
I've found a discussion in the archives from January 2006, but it hasn't helped.

\setupbackgrounds[page][background=Letterhead,DisclaimerWatermark,SignatureBlock,DocumentStatus]
doesn't work, only the last layer defined shows (each of the dynamic
backgrounds is defined as a layer.)

Does the plural in setupbackgrounds not mean multiple backgrounds? If
so, is there a stacking order (the imported PDF letterhead may have an
opaque background)?

Also, the first document page requires a table and text block
side-by-side. I probably could use a float for the text block, but
wanted to use a layer.
Am I approaching this the wrong way?

-- 
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
___


Re: [NTG-context] Multi-line headers

2009-04-08 Thread Design Department
\setupheadertexts[][{\framed[frame=off,width=fit,align=flushright]{line1\\line
2.}}]

Thks. Works now.

A further minor question:
One of the lines sometimes ends with a period and it would be nice to
have it optically aligned. Is this possible?
The document is a tabular report, so this is a minor point. Just wondering.

--
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
___


Re: [NTG-context] Multi-line headers

2009-04-08 Thread Design Department
On Wed, Apr 8, 2009 at 2:42 AM, Wolfgang Schuster <
schuster.wolfg...@googlemail.com> wrote:

> \setupheadertexts[nothing on
> left][{\framed[frame=off,width=fit,align=right]{line1\\line2}}]
>
> Wolfgang


Thanks Wolfgang.
Not quite correct yet, though.

The individual lines in your example are aligned flush-left in a box that is
on the right of the page.
I need lines that are aligned flush-right in the box on the right of the
page - the width of each line varies.

I'm trying nested \framed elements, but not having any success.
-- 
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
___


[NTG-context] Multi-line headers

2009-04-07 Thread Design Department
I need a multi-line header in the right page corner, with content
right-aligned.
\setupheadertexts[nothing on left][line 1 \par line 2] doesn't work.

Is using a \vbox the correct method of handling this?
If so, how?

\setupheadertexts[nothing on left][\vbox{line 1 \blank line 2] puts the
header in the left corner.

-- 
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
___