Re: [NTG-context] latest beta, problem with natural tables and alignment character

2014-06-17 Thread Hans Hagen

On 6/17/2014 5:49 AM, Brian Landy wrote:

Almost all of the tables I generate via code, not by hand, so I found it more 
convenient to include a trailing % because I occasionally did run across an 
instance where it mattered, and wasn't (and am not) sufficiently skilled at 
TeX/ConTeXt to know how to predict those occurrences.

It's somewhat similar for always wrapping the contents in {}, I thought I had 
run into some cases in the past where it was necessary, so just include them 
always rather than manually add them with the content when they are required.  
Are there negative consequences (performance, memory usage, ...) to writing it 
as I did?  Or is the difference just cosmetic?


the empty [] always has a performance hit, for {} it depends what extra 
restores have to happen



Best regards,
Brian

On Jun 16, 2014, at 6:57 PM, Hans Hagen pra...@wxs.nl wrote:


so instead of

\bTD[]{Bond}\eTD%

use this:

\bTD Bond \eTD


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




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




--

-
  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] PDF Forms - expanding multi-line text fields

2014-06-17 Thread Michael Guravage
I am composing a document that contains pdf forms. Example code in Widgets
Uncovered, shows how to specify the height and width of a multi-line text
field. Here is a small example:

\usemodule[fields]
\setupinteraction[state=start]
\setupfield [TextSetup]
[width=\textwidth,height=5em,background=screen,backgroundscreen=.97,frame=off]
\definefield [Block] [text] [TextSetup]
\starttext
   \field [Block]
\stoptext

In this example the height is 5em.  The field will scroll lines up when the
height of the lines typed exceeds the height of the field. Click outside
the field and the field displays the first n-lines that fit within its
height.

My question is, is it possible to tell the field to expand beyond its
initial field height to display all its lines?

A second less pressing question is, is it possible to tell lines to wrap
when they exceed the field width?


-- 
With kind regards,

Michael Guravage
___
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] latest beta, problem with natural tables and alignment character

2014-06-17 Thread Hans Hagen

On 6/16/2014 11:51 PM, Brian Landy wrote:

Hi, I was testing the latest beta (2014.06.15) and noticed I am getting incorrect output 
using natural tables with alignment characters.  I produced a small example that 
demonstrates the problem, and attached output created with the version I'm testing 
(bad.pdf) and my prior version (good.pdf, ConTeXt 2013.06.10).  You can see in the bad 
file that ConTeXt doesn't properly align on the - and it introduces spurious 
spaces.


i assume you haven't updated in a while as this is not something last 
beta specific


the alignment code has been redone some time ago (the general mechanism 
is more clever now) and it was mostly made for aligning numbers (not so 
much for your case as - is seen as minus)


anyhow, i made it work a bit better with tables (extra pass needed)

\starttext

\enabletrackers[typesetters.characteralign]

\bgroup
\setupTABLE[column][1][aligncharacter=yes,alignmentcharacter={,}]
\bTABLE
\bTR \bTD  1,2   \eTD \bTD  1,2  \eTD \bTD xxx \eTD \eTR
\bTR \bTD - 1,2  \eTD \bTD -1,2  \eTD \bTD xxx \eTD \eTR
\bTR \bTD -1,2   \eTD \bTD -1,2  \eTD \bTD xxx \eTD \eTR
\bTR \bTD 11,2   \eTD \bTD 11,2  \eTD \bTD xxx \eTD \eTR
\bTR \bTD 11,224 \eTD \bTD 11,22 \eTD \bTD xxx \eTD \eTR
\eTABLE
\egroup

\bgroup
\setupTABLE[column][1][aligncharacter=yes,alignmentcharacter={-}]
\setupTABLE[column][2][aligncharacter=yes,alignmentcharacter={\endash}]
\bTABLE
\bTR \bTD  1-2\eTD \bTD  1\endash2\eTD\bTD xxx \eTD \eTR
\bTR \bTD  1-2\eTD \bTD  1\endash2\eTD\bTD xxx \eTD \eTR
\bTR \bTD  1-2\eTD \bTD  1\endash2\eTD\bTD xxx \eTD \eTR
\bTR \bTD 11-2\eTD \bTD 11\endash2\eTD\bTD xxx \eTD \eTR
\bTR \bTD 11-22 + \eTD \bTD 11\endash22 + \eTD\bTD xxx \eTD \eTR
\eTABLE
\egroup

\stoptext

the next beta can handle this

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
-
___
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] Rotate multiline text

2014-06-17 Thread Aditya Mahajan

Hi,

I want to rotate a multiline text by 90 degrees, and I thought that 
\framed[orientation=90] should do that. But it does not work as expected.


\defineframed[tightbox] [align=middle, width=fit, height=fit]
\defineframed[rotatebox][tightbox][orientation=90]

\starttext

\startlines
ABC \rotatebox{Random \crlf text } ABC
ABC \rotate{\tightbox{Random \crlf text }} ABC
\stoplines

\stoptext

I would like \rotatebox to behave the same as 
\rotate{\tightbox{..}}, but it does not. It appears that the width (or 
height?) or \rotatebox is set to broad.


Am I missing a magic option or is this a bug?

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