[NTG-context] Maybe an alignement issue of \vdots in mixed \NC and \VL (\definemathmatrix)

2024-05-12 Thread garulfo
Hi,

the  first \vdots in the third row is not centered.

\starttext
\definemathmatrix[mymatrix][matrix:parentheses]
\startformula
\startmymatrix
\NC A_1\VL B_1\NR
\HL
\NC \vdots \VL \vdots  \NR
\NC \vdots \NC \vdots  \NR% there is probably something from here
\HL
\NC A_n\VL B_n\NR
\stopmymatrix
\stopformula
\stoptext

https://wiki.contextgarden.net/Matrix_in_maths#Other_formatting_example
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: [ using horizontal table lines ]

2024-04-15 Thread Wolfgang Schuster

vm via ntg-context schrieb am 15.04.2024 um 13:15:

I'm probably using the \starttable incorrectly:

with this code I only get only *one* horizontal line in the header

[...]

with this code I get two horizontal lines, but the second is too short.

[...]

with this code I get two horizontal lines, with correct length, but 
above the wrong columns


[...]


diff:
\NC\DC\DC\DC\DL[4]\DL[4]\AR
\NC\DC\DC\DC\DL[4]\DL[3]\AR
\NC\DC\DC\DL[4]\DL[4]\AR

There is (probably) a correct way to solve this.


My suggestion is to switch to either natural table or extreme tables but 
it seems to me there is a problem with the division lines which always 
leave an empty column afterwards.


The following example should add horizontal lines above the first and 
third column but this setting results in an error. When I omit the last 
\DC the error disappears but as can be seen in the output the second 
line appears above the fourth column.


\starttext

\starttable[||]
%\DL  \DC  \DL  \DC  \DC \DR
\DL[red] \DC  \DL[red] \DC  \DR
\VL   01 \VL   02 \VL   03 \VL   04 \VL   05 \VL\SR
\stoptable

\stoptext

Wolfgang
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \starttable questions

2024-01-25 Thread Jim
On Thu, Jan 25, 2024 at 22:22 (+0100), Wolfgang Schuster wrote:

> Jim schrieb am 25.01.2024 um 22:01:
>> Hi Henning,

>> On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:

>>> Am 25.01.24 um 16:12 schrieb Jim:
>>> > Hi, I was wondering if anyone here could help me with these three things:
>>> > For a long time I have been using Wichura's TaBle macros (i.e., what one
>>> > gets with
>>> >   \input table
>>> > in plain TeX) and would like to use what appears to be ConTeXt's version 
>>> > of
>>> > those (i.e., what one gets with \starttable ... \stoptable).

>>> > However, https://wiki.contextgarden.net/Command/starttable says
>>> > The environment \starttable ... \stoptable is and (sic) old and
>>> > nearly obsolete way to handle tabular material
>>> > Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
>>> > time "soon", or is that wiki comment gratuitously pessimistic?

>>> Hans suggests to use tabulate as long as it fits.
>> I just gave that a try, using the same syntax as \starttable:

>> \starttable[|c|c|]
>> \HL
>> \VL \bf Year \VL \bf Citizens \VL\SR
>> \HL
>> \VL 1675 \VL ˜428 \VL\FR
>> \VL 1795 \VL 1124 \VL\MR
>> \VL 1880 \VL 2405 \VL\MR
>> \VL 1995 \VL 7408 \VL\LR
>> \HL
>> \stoptable

>> \starttabulate[|c|c|]
>> \HL
>> \VL \bf Year \VL \bf Citizens \VL\SR
>> \HL
>> \VL 1675 \VL ˜428 \VL\FR
>> \VL 1795 \VL 1124 \VL\MR
>> \VL 1880 \VL 2405 \VL\MR
>> \VL 1995 \VL 7408 \VL\LR
>> \HL
>> \stoptabulate

>> While tabulate produced a table with the above input, it needs some work to
>> make the table look good.  (The columns are too narrow, the vrules don't
>> meet the hrules, ...).

>> Perhaps these can be fixed with some tweaking, but I notice that in all of
>> https://wiki.contextgarden.net/Command/starttabulate
>> and
>> https://wiki.contextgarden.net/Tabulate
>> and
>> http://www.ntg.nl/maps/22/28.pdf
>> there is a conspicuous lack of examples with vrules.  And the tables in the
>> (at least) the starttabulate wiki page which use vrules don't use tabulate
>> to create the tables.

>> Coincidence?  I think not.  :-)

> Table which rely on rules to make the content readable have a serious
> problem
> (read Edward Tufte books how you can improve the visual style) but the
> better
> alternative in this case are either natural tables or extreme tables.

> Below is a example which uses the table like wrapper for natural tables
> which makes adding rules and changing the padding around text very
> simple because each table cell is a \framed block with all its options.

> \starttext

> \startsetups[ruledtable]
>   \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em]
>   \setupTABLE [column] [each]  [leftframe=on,rightframe=on]
>   \setupTABLE [row]    [first]
> [topframe=on,bottomframe=on,foregroundstyle=bold]
>   \setupTABLE [row]    [last]  [bottomframe=on]
> \stopsetups

> \startTABLE[setups=ruledtable]
> \NC Year \NC Citizens \NC\NR
> \NC 1675 \NC ˜428 \NC\NR
> \NC 1795 \NC 1124 \NC\NR
> \NC 1880 \NC 2405 \NC\NR
> \NC 1995 \NC 7408 \NC\NR
> \stopTABLE

> \stoptext

Wolfgang,

thanks for the response and the sample code.

[ Note to anyone else trying out this example: there are non-breakable
  spaces above, and depending on your system if you copy and paste them
  into a file, they will cause this code to fail.  ]


I won't argue with you about readability of tables, but if I am typesetting
something for someone and they want it a certain way, I don't want to get
into an argument about it with them either.  :-)


The nice thing about your setup above is that it is nice and structured.
But if a table calls for some row, column or cell to be treated
differently, I guess I am in for some more reading.

Cheers.
Jim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \starttable questions

2024-01-25 Thread Wolfgang Schuster

Jim schrieb am 25.01.2024 um 22:01:

Hi Henning,

On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:


Am 25.01.24 um 16:12 schrieb Jim:

Hi, I was wondering if anyone here could help me with these three things:
For a long time I have been using Wichura's TaBle macros (i.e., what one
gets with
  \input table
in plain TeX) and would like to use what appears to be ConTeXt's version of
those (i.e., what one gets with \starttable ... \stoptable).



However, https://wiki.contextgarden.net/Command/starttable says
The environment \starttable ... \stoptable is and (sic) old and
nearly obsolete way to handle tabular material
Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
time "soon", or is that wiki comment gratuitously pessimistic?



Hans suggests to use tabulate as long as it fits.

I just gave that a try, using the same syntax as \starttable:

\starttable[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptable

\starttabulate[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptabulate

While tabulate produced a table with the above input, it needs some work to
make the table look good.  (The columns are too narrow, the vrules don't
meet the hrules, ...).

Perhaps these can be fixed with some tweaking, but I notice that in all of
https://wiki.contextgarden.net/Command/starttabulate
and
https://wiki.contextgarden.net/Tabulate
and
http://www.ntg.nl/maps/22/28.pdf
there is a conspicuous lack of examples with vrules.  And the tables in the
(at least) the starttabulate wiki page which use vrules don't use tabulate
to create the tables.

Coincidence?  I think not.  :-)


Table which rely on rules to make the content readable have a serious 
problem
(read Edward Tufte books how you can improve the visual style) but the 
better

alternative in this case are either natural tables or extreme tables.

Below is a example which uses the table like wrapper for natural tables
which makes adding rules and changing the padding around text very
simple because each table cell is a \framed block with all its options.

\starttext

\startsetups[ruledtable]
  \setupTABLE [frame=off,align=middle,loffset=.5em,roffset=.5em]
  \setupTABLE [column] [each]  [leftframe=on,rightframe=on]
  \setupTABLE [row]    [first] 
[topframe=on,bottomframe=on,foregroundstyle=bold]

  \setupTABLE [row]    [last]  [bottomframe=on]
\stopsetups

\startTABLE[setups=ruledtable]
\NC Year \NC Citizens \NC\NR
\NC 1675 \NC ˜428 \NC\NR
\NC 1795 \NC 1124 \NC\NR
\NC 1880 \NC 2405 \NC\NR
\NC 1995 \NC 7408 \NC\NR
\stopTABLE

\stoptext

Wolfgang

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


[NTG-context] Re: \starttable questions

2024-01-25 Thread Jim
Hi Henning,

On Thu, Jan 25, 2024 at 17:16 (+0100), Henning Hraban Ramm wrote:

> Am 25.01.24 um 16:12 schrieb Jim:
>> Hi, I was wondering if anyone here could help me with these three things:

>> For a long time I have been using Wichura's TaBle macros (i.e., what one
>> gets with
>>  \input table
>> in plain TeX) and would like to use what appears to be ConTeXt's version of
>> those (i.e., what one gets with \starttable ... \stoptable).


>> However, https://wiki.contextgarden.net/Command/starttable says
>> The environment \starttable ... \stoptable is and (sic) old and
>> nearly obsolete way to handle tabular material

>> Q1: are there plans to remove \starttable ... \endtable from ConTeXt any
>> time "soon", or is that wiki comment gratuitously pessimistic?


> Hans suggests to use tabulate as long as it fits.

I just gave that a try, using the same syntax as \starttable:

\starttable[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptable

\starttabulate[|c|c|]
\HL
\VL \bf Year \VL \bf Citizens \VL\SR
\HL
\VL 1675 \VL ˜428 \VL\FR
\VL 1795 \VL 1124 \VL\MR
\VL 1880 \VL 2405 \VL\MR
\VL 1995 \VL 7408 \VL\LR
\HL
\stoptabulate

While tabulate produced a table with the above input, it needs some work to
make the table look good.  (The columns are too narrow, the vrules don't
meet the hrules, ...).

Perhaps these can be fixed with some tweaking, but I notice that in all of
https://wiki.contextgarden.net/Command/starttabulate
and
https://wiki.contextgarden.net/Tabulate
and
http://www.ntg.nl/maps/22/28.pdf
there is a conspicuous lack of examples with vrules.  And the tables in the
(at least) the starttabulate wiki page which use vrules don't use tabulate
to create the tables.

Coincidence?  I think not.  :-)


> tabulate uses mostly the same syntax as table(s), but as far as I looked
> into the sources, it’s a different (and probably better) implementation.

> I’m quite sure \starttable will stay, it’s just discouraged since
> \startTABLE (natural tables) is better if you need more than \starttabulate.

I looked at that and played with it (briefly), but when I saw there was
something to make tables (i.e., \starttable) which used a syntax close to
what I already know, I thought I'd go with what I know.  At this point my
ConTeXt learning curve is pretty steep already, but perhaps at some point
in the future I'll be able to heed your advice.


>> In a recent answer on this list, Mikael helped someone by pointing out the
>> \HF[...] command.  The \HF command is not listed in the \starttable wiki 
>> page.

>> Q2: Is \HF[] documented anywhere?  If so, can someone point me to that/those
>> document(s)?

> I also don’t know anything about \HF and didn’t find it in the source.
> Are you sure it wasn’t just used in a math context?

It was indeed used in a math context.  Unfortunately, that knowledge
doesn't bring me any closer to finding the documentation.  (Which gets me
back to my learning curve. :-)

>> Perhaps an answer to Q2 will answer this one too, but in case it doesn't...

>> When using Wichura's \BeginTable ... \EndTable macros, I occasionally
>> use the \\+nm feature to add n points above the current line and/or m
>> points below the current line.

>> Q3: Does ConTexT's \starttable ... \endtable have this feature?
>> If so, how does one access this feature?

> Probably not, you don’t use \\ in a ConTeXt table.

That I already knew.

> There’s \TB[] that understands the same parameters as \blank

Thanks for that information.  Unfortunately, it doesn't work well for
tables with vrules, in either \starttabulate or \starttable.  However,
thanks for mentioning it, not all tables have vrules.

Cheers.
Jim
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / 
https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki : https://wiki.contextgarden.net
___


Re: [NTG-context] Feynman Diagrams

2023-04-12 Thread Aditya Mahajan via ntg-context
(k+.5)/dpp of p;
 endfor
enddef;
style_def dbl_dashes_arrow expr p =
  draw_dbl_dashes p;
  shrink (1.5);
cfill (arrow p);
  endshrink;
enddef;
style_def dashes_arrow expr p =
  draw_dashes p;
  cfill (arrow p);
enddef;
style_def dots expr p =
 save dpp;
 numeric dpp;
 dpp = ceiling (pixlen (p, 10) / dot_len) / length p;
 for k=0 upto dpp*length(p):
   cdrawdot point k/dpp of p;
 endfor
enddef;
style_def dbl_dots expr p =
  save dpp;
  numeric dpp;
  dpp = ceiling (pixlen (p, 10) / dot_len) / length p;
  begingroup
save oldpen;
pen oldpen;
oldpen := currentpen;
pickup oldpen scaled 3; % draw a thick linn
for k=0 upto dpp*length(p):
  cdrawdot point k/dpp of p;
endfor
pickup oldpen;
cullit;
for k=0 upto dpp*length(p):
  undrawdot point k/dpp of p;
endfor
cullit; % and remove the stuffing
  endgroup;
enddef;
style_def dbl_dots_arrow expr p =
  draw_dbl_dots p;
  shrink (1.5);
cfill (arrow p);
  endshrink;
enddef;
style_def dots_arrow expr p =
  draw_dots p;
  cfill (arrow p);
enddef;
style_def double expr p =
  save oldpen;
  pen oldpen;
  oldpen := currentpen;
  pickup oldpen scaled 3;
  ccutdraw p;
  pickup oldpen;
  cullit; undraw p; cullit;
enddef;
style_def double_arrow expr p =
  draw_double p;
  shrink (1.5);
cfill (arrow p);
  endshrink;
enddef;
style_def vanilla expr p = draw_plain p enddef;
style_def fermion expr p = draw_plain_arrow p enddef;
style_def quark expr p = draw_plain_arrow p enddef;
style_def electron expr p = draw_plain_arrow p enddef;
style_def photon expr p = draw_wiggly p enddef;
style_def boson expr p = draw_wiggly p enddef;
style_def gluon expr p = draw_curly p enddef;
style_def heavy expr p = draw_dbl_plain_arrow p enddef;
style_def ghost expr p = draw_dots_arrow p enddef;
style_def scalar expr p = draw_dashes_arrow p enddef;
vardef fermion expr path_arg =
  cfill (arrow (path_arg));
  path_arg
enddef;
vardef photon expr path_arg =
  wiggly path_arg
enddef;
vardef gluon expr path_arg =
  curly path_arg
enddef;
tracingstats:=1;
boolean vtracing;
vtracing := false; % true
def vinit =
  save vhash;
  numeric vlist.first, vlist.last;
  vlist.first := 1;
  vlist.last := 0;
  pair vlist[]loc;
  numeric vlist[]decor.size, vlist[]decor.ang,
vlist[]arc.first, vlist[]arc.last,
vlist[]arc[], vlist[]arc[]lsr,
vlist[]arc[]tns, vlist[]arc[]lbl.dist,
vlist[]arc[]tag, vlist[]arc[]wd, vlist[]arc[]rub,
vlist[]constr.first, vlist[]constr.last,
vlist[]constr[], lambdax[][], lambday[][];
  string vlist[]name, vlist[]lbl, vlist[]decor.sty,
vlist[]arc[]sty, vlist[]arc[]lbl, vlist[]arc[]lbl.side;
  numeric vlist[]lbl.ang;
  path vlist[]decor.shape;
  color vlist[]fore, vlist[]back,
vlist[]arc[]fore, vlist[]arc[]back;
  numeric plist.first, plist.last, plist[]cnt, plist[]vtx[],
   plist[]pull, plist[]lbl.ang, plist[]lbl.dist;
  string plist[]lbl, plist[]sty, plist[]cona, plist[]conb;
  plist.first := 1;
  plist.last := 0;
  numeric vlist[]poly.first, vlist[]poly.last,
vlist[]poly[], vlist[]poly[]idx;
  pair lambdap[][];
 color plist[]fore, plist[]back;
enddef;
def vertices =
  vlist.first upto vlist.last
enddef;
def varcs (text i) =
  vlist[i]arc.first upto vlist[i]arc.last
enddef;
def vconstr (text i) =
  vlist[i]constr.first upto vlist[i]constr.last
enddef;
def polygons =
  plist.first upto plist.last
enddef;
def vpoly (text i) =
  vlist[i]poly.first upto vlist[i]poly.last
enddef;
vardef venter suffix v =
  if not vexists v:
vlist.last := vlist.last + 1;
vhash.v := vlist.last;
vlist[vhash.v]name := str v;
vlist[vhash.v]loc := (whatever,whatever);
vlist[vhash.v]arc.first := 1;
vlist[vhash.v]arc.last := 0;
vlist[vhash.v]constr.first := 1;
vlist[vhash.v]constr.last := 0;
vlist[vhash.v]lbl := "";
vlist[vhash.v]lbl.ang := whatever;
vlist[vhash.v]lbl.dist := 3thick;
vlist[vhash.v]fore := (whatever, whatever, whatever);
vlist[vhash.v]back := (whatever, whatever, whatever);
vlist[vhash.v]poly.first := 1;
vlist[vhash.v]poly.last := 0;
  fi
enddef;
vardef vexists suffix v =
  if known vhash.v: true else: false fi
enddef;
vardef vlookup suffix v =
  if vexists v: vhash.v else: 0 fi
enddef;
vardef vloc suffix v =
  vlist[vlookup v]loc
enddef;
vardef vconnect (expr linesty) (text vl) =
  save from, nfrom, nto, nopt, sty;
  numeric from, nfrom, nto, nopt;
  string sty;
  getopt (opt, linesty);
  sty := opt[opt.first];
  if known opt[opt.first]arg:
message "feynmf: line styles don't take arguments.  "
 & "Argument `" & opt[opt.first]arg & "' ignored.";
  fi
  opt.first := opt.first + 1;
  forsuffixes to = vl:
venter to;
nto := vlookup to;
if known nfrom:
  vlist[nfrom]arc.last := vlist[nfrom]arc.last + 1;
  vlist[nfrom]arc[vlist[nfrom]arc.last] := nto;
  vlist[nfrom]arc[vlist[nfrom]arc.last]tns := 1;
  if nfrom <> nto:
vlist[nto]arc.last := v

Re: [NTG-context] Bug in tabulate

2023-03-21 Thread Hans Hagen via ntg-context

On 3/21/2023 7:20 AM, Li Yanrui (李延瑞) via ntg-context wrote:

Hi,

Please see the following example:

\startTEXpage[offset=5mm]
\starttabulate[|c|c|c|]
\VL 1 \VL 2 \VL 3\VL\NR
\stoptabulate
\blank
\starttabulate[|c|c|c|]
\NC 1 \NC 2 \NC 3\NR
\stoptabulate
\stopTEXpage

In its result, there is a rule in the left side of the second tabulate. 
The result is attached. My lmtx version is 2023.03.20 17:07.

in tabl-tbl.mkxl you can patch this

\def\tabl_tabulate_vrule_reset_step % undefined or relax
  {\gletcsname\??tabulatevrule0\endcsname\undefined
   \gletcsname\??tabulatevrule\the\fastloopindex\endcsname\undefined}

after that remake the format,

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Bug in tabulate

2023-03-21 Thread 李延瑞
Hi,

Please see the following example:

\startTEXpage[offset=5mm]
\starttabulate[|c|c|c|]
\VL 1 \VL 2 \VL 3\VL\NR
\stoptabulate
\blank
\starttabulate[|c|c|c|]
\NC 1 \NC 2 \NC 3\NR
\stoptabulate
\stopTEXpage

In its result, there is a rule in the left side of the second tabulate. The
result is attached. My lmtx version is 2023.03.20 17:07.

-- 
Best regards,

Li Yanrui


foo.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


[NTG-context] Double Lines

2023-01-02 Thread Ursula Hermann via ntg-context
Dear List,
The following example is from the mailing list:

I would like to have double vertical Lines with $\Vert instead of \VL, and also 
\HL.

How can I do this with an Math Modus?
\setupcolors[state=start]
\starttext
\null\vskip15ex
\hskip1em\framed[orientation=90,frame=off]{\bf
Region}\blank\vskip-25.5ex
\starttable[|c|l|r|r|r|r|r|r|r|]
\DC \DC \DL[7] \DR
\NC \NC \VL \use{7}\ReFormat[cB]{Years} \VL \AR
\DC \DC \DL[7] \DR
\NC \NC \VL \ReFormat[cB]{$<1$} \VL \ReFormat[cB]{$1-2$} \VL
\ReFormat[cB]{$3-4$} \VL \ReFormat[cB]{$5-9$} \VL \ReFormat[cB]{$10-14$}
\VL \ReFormat[cB]{$15+$} \VL \ReFormat[cB]{Total} \VL \AR
\HL
%    \VL \offset[y=8ex]{\framed[orientation=90,frame=off]{\bf Region}}
\VL East \VL 32 \VL 54 \VL 59 \VL 112 \VL 77 \VL 118 \VL 452 \VL \AR
    \VL \null\hskip2em\null \VL {\bf East} \VL 32 \VL 54 \VL 59 \VL 112
\VL 77 \VL 118 \VL 452 \VL \AR
    \VL \VL {\bf Midwest} \VL 31 \VL 68 \VL 68 \VL 120 \VL 63 \VL 173
\VL 523 \VL \AR
    \VL \VL {\bf South} \VL 53 \VL 92 \VL 93 \VL 158 \VL 106 \VL 158
\VL 660 \VL \AR
    \VL \VL {\bf West} \VL 41 \VL 56 \VL 67 \VL 78 \VL 45 \VL 86 \VL
373 \VL \AR
\DC \DL[8] \DR
    \VL \VL {\bf Total} \VL 157 \VL 270 \VL 287 \VL 468 \VL 291 \VL 535
\VL 2008 \VL \AR
\HL
\stoptable
\stoptext

Many Thanks
Uschi
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
I'm not quite I understand:
Are you saying I should leave the caption in "global scope"?

Regarding the second version: Shouldn't that be:
\startlocalfootnotes
\footnotetext[asdf]{asdf} % this
%\footnotetext[asdf]{\footnote{asdf}} % instead of this
\startplacetable[title={A breakfast table.\note[asdf]}]
 \placelegend
 {\starttable[|l|r|]
 \HL
     \VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
     \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
\VL\LR
 \HL
 \stoptable}
 {\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

?

Best,
Denis

> -Ursprüngliche Nachricht-
> Von: ntg-context  Im Auftrag von Hans Hagen
> via ntg-context
> Gesendet: Donnerstag, 16. Juni 2022 14:13
> An: Denis Maier via ntg-context 
> Cc: Hans Hagen 
> Betreff: Re: [NTG-context] local footnotes and captions
> 
> On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:
> > Hi,
> >
> > another experiment with footnotes in captions, this time local footnotes :
> >
> > %%%
> >
> > \setupcaptions[location=top]
> >
> > \starttext
> >
> >      \startlocalfootnotes
> >
> >      \placetable
> >
> >      % The caption
> >
> >      {A breakfast table.\footnote{asdf}}
> >
> >      % the table
> >
> >      \placelegend
> >
> >      {\starttable[|l|r|]
> >
> >          \HL
> >
> >      \VL Spam \footnote {lovely} \VL Bacon \footnote
> > {wonderful} \VL\FR
> >
> >      \VL Eggs \footnote {wonderful} \VL Spam \footnote
> > {lovely} \VL\LR
> >
> >      \HL
> >
> >      \stoptable}
> >
> >      % the footnotes
> >
> >      {\placelocalfootnotes}
> >
> > \stoplocalfootnotes
> >
> > \stoptext
> >
> > %%%
> >
> > Two observations :
> >
> > 1. the footnote numbering is a bit odd, shouldn’t the footnote in the
> > caption be numbered with 1?
> >
> > 2. The footnote in the caption is not included in the local footnotes.
> > Why is that?
> \starttext
> 
> \startplacetable[title={A breakfast table.\footnote{asdf}}]
>  \startlocalfootnotes
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>      \HL
>      \stoptable}
>  {\placelocalfootnotes}
>  \stoplocalfootnotes
> \stopplacetable
> 
> \startlocalfootnotes
> \footnotetext[asdf]{\footnote{asdf}}
> \startplacetable[title={A breakfast table.\note[asdf]}]
>  \placelegend
>  {\starttable[|l|r|]
>  \HL
>  \VL Spam \footnote {lovely}\VL Bacon \footnote
> {wonderful} \VL\FR
>  \VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely}
> \VL\LR
>  \HL
>  \stoptable}
>  {\placelocalfootnotes}
> \stopplacetable
> \stoplocalfootnotes
> 
> \stoptext
> 
> 
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net archive  :
> https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] local footnotes and captions

2022-06-16 Thread Hans Hagen via ntg-context

On 6/16/2022 12:43 PM, Denis Maier via ntg-context wrote:

Hi,

another experiment with footnotes in captions, this time local footnotes :

%%%

\setupcaptions[location=top]

\starttext

     \startlocalfootnotes

     \placetable

     % The caption

     {A breakfast table.\footnote{asdf}}

     % the table

     \placelegend

     {\starttable[|l|r|]

     \HL

     \VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} 
\VL\FR


     \VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} 
\VL\LR


     \HL

     \stoptable}

     % the footnotes

     {\placelocalfootnotes}

\stoplocalfootnotes

\stoptext

%%%

Two observations :

1. the footnote numbering is a bit odd, shouldn’t the footnote in the 
caption be numbered with 1?


2. The footnote in the caption is not included in the local footnotes. 
Why is that?

\starttext

\startplacetable[title={A breakfast table.\footnote{asdf}}]
\startlocalfootnotes
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes
\stopplacetable

\startlocalfootnotes
\footnotetext[asdf]{\footnote{asdf}}
\startplacetable[title={A breakfast table.\note[asdf]}]
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely}\VL Bacon \footnote 
{wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam  \footnote {lovely} 
   \VL\LR

\HL
\stoptable}
{\placelocalfootnotes}
\stopplacetable
\stoplocalfootnotes

\stoptext


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] local footnotes and captions

2022-06-16 Thread Denis Maier via ntg-context
Hi,
another experiment with footnotes in captions, this time local footnotes :

%%%
\setupcaptions[location=top]
\starttext
\startlocalfootnotes
\placetable
% The caption
{A breakfast table.\footnote{asdf}}
% the table
\placelegend
{\starttable[|l|r|]
\HL
\VL Spam \footnote {lovely} \VL Bacon \footnote {wonderful} \VL\FR
\VL Eggs \footnote {wonderful} \VL Spam \footnote {lovely} \VL\LR
\HL
\stoptable}
% the footnotes
{\placelocalfootnotes}
\stoplocalfootnotes
\stoptext
%%%

Two observations :
1. the footnote numbering is a bit odd, shouldn't the footnote in the caption 
be numbered with 1?
2. The footnote in the caption is not included in the local footnotes. Why is 
that?

Denis

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Aditya Mahajan via ntg-context
On Sat, 8 Jan 2022, Joel via ntg-context wrote:

> I created a table that has some cells span multiple rows. This works good 
> with cells that span an odd-number of rows, but when I try to span 4 rows, 
> the text isn't quite vertically centered. How can I get the cell with the 
> text "Archaeon Eon" to be a little lower, so it is centered within its box?

I would also recommend natural tables. But, for tables, you can use 
\Lower(dims){} to improve vertical alignment. For example:

\starttext

\starttable[|c|c|]
\NC {\bf Eons} \NC {\bf Eras} \NC \AR
\HL
\NC Hadeon Eon \VL \NC \AR
\HL
\NC \VL Eoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \Lower(1\lineheight){Archaeon Eon} \VL Paleoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Mesoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoarchean Era \NC \AR

\HL\NC \VL Paleoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoproterozoic Era \NC \AR
\HL


\HL\NC \VL Paleozoic Era \NC \AR
\DC \DL[1] \DR
\NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Cenozoic Era \NC \AR
\HL
\stoptable

\stoptext


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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Joel via ntg-context
 Thank you! The code is much easier to understand than the other way I was 
trying to use.
--Joel

On Saturday, January 8, 2022, 04:00:12 PM MST, Willi Egger via ntg-context 
 wrote:  
 
 I would suggest not to use \starttable at all.

To me the most suitable table environment for such a table is \bTABLE \eTABLE. 
It gives you all kind of control over layout, dimensions, frames on and off etc.

\setupTABLE[c][1][leftframe=off,width=40mm]
\setupTABLE[c][2][rightframe=off, width=60mm]
\setupTABLE[c][each][align={lohi,center}]
\bTABLE
    \bTR
        \bTD {\bf Eons}\eTD \bTD {\bf Eras} \eTD
    \eTR
    \bTR
        \bTD  Hadeon Eon \eTD \bTD \eTD
    \eTR
    \bTR
        \bTD[ny=4] Archanon Eon  \eTD \bTD Eoarchean Era \eTD
    \eTR
    \bTR
        \bTD Paleoarchean Era \eTD
    \eTR
    \bTR
        \bTD Mesoarchean Era \eTD 
    \eTR
    \bTR
        \bTD Neoarchean Era \eTD
    \eTR
    \bTR
        \bTD[ny=3] Proterozoic Eon \eTD    \bTD Paleoproterozoic Era \eTD
    \eTR
    \bTR    
        \bTD Mesoproterozoic Era \eTD
    \eTR
    \bTR
        \bTD Neoproterozoic Era\eTD
    \eTR
    \bTR
        \bTD[ny=3] Phanerozoic Eon \eTD \bTD Paleozoic Era \eTD
    \bTR    
        \bTD Mesozoic Era\eTD
    \eTR
    \bTR
        \bTD Cenozoic Era \eTD
    \eTR
\eTABLE

Willi

> On 8 Jan 2022, at 22:39, Joel via ntg-context  wrote:
> 
> I created a table that has some cells span multiple rows. This works good 
> with cells that span an odd-number of rows, but when I try to span 4 rows, 
> the text isn't quite vertically centered. How can I get the cell with the 
> text "Archaeon Eon" to be a little lower, so it is centered within its box?
> 
> --Joel
> 
> Minimum working example:
> 
> \starttext
> 
> \starttable[|c|c|]
> \NC {\bf Eons} \NC {\bf Eras} \NC \AR
> \HL
> \NC Hadeon Eon \VL \NC \AR
> \HL
> \NC \VL Eoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \smash{Archaeon Eon} \VL Paleoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Mesoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoarchean Era \NC \AR
> 
> \HL\NC \VL Paleoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoproterozoic Era \NC \AR
> \HL
> 
> 
> \HL\NC \VL Paleozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Cenozoic Era \NC \AR
> \HL
> \stoptable
> 
> \stoptext
> 
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Willi Egger via ntg-context
I would suggest not to use \starttable at all.

To me the most suitable table environment for such a table is \bTABLE \eTABLE. 
It gives you all kind of control over layout, dimensions, frames on and off etc.

\setupTABLE[c][1][leftframe=off,width=40mm]
\setupTABLE[c][2][rightframe=off, width=60mm]
\setupTABLE[c][each][align={lohi,center}]
\bTABLE
\bTR
\bTD {\bf Eons}\eTD \bTD {\bf Eras} \eTD
\eTR
\bTR
\bTD  Hadeon Eon \eTD \bTD \eTD
\eTR
\bTR
\bTD[ny=4] Archanon Eon  \eTD \bTD Eoarchean Era \eTD
\eTR
\bTR
\bTD Paleoarchean Era \eTD
\eTR
\bTR
\bTD Mesoarchean Era \eTD 
\eTR
\bTR
\bTD Neoarchean Era \eTD
\eTR
\bTR
\bTD[ny=3] Proterozoic Eon \eTD \bTD Paleoproterozoic Era \eTD
\eTR
\bTR
\bTD Mesoproterozoic Era \eTD
\eTR
\bTR
\bTD Neoproterozoic Era\eTD
\eTR
\bTR
\bTD[ny=3] Phanerozoic Eon \eTD \bTD Paleozoic Era \eTD
\bTR
 \bTD Mesozoic Era\eTD
\eTR
\bTR
\bTD Cenozoic Era \eTD
\eTR
\eTABLE

Willi

> On 8 Jan 2022, at 22:39, Joel via ntg-context  wrote:
> 
> I created a table that has some cells span multiple rows. This works good 
> with cells that span an odd-number of rows, but when I try to span 4 rows, 
> the text isn't quite vertically centered. How can I get the cell with the 
> text "Archaeon Eon" to be a little lower, so it is centered within its box?
> 
> --Joel
> 
> Minimum working example:
> 
> \starttext
> 
> \starttable[|c|c|]
> \NC {\bf Eons} \NC {\bf Eras} \NC \AR
> \HL
> \NC Hadeon Eon \VL \NC \AR
> \HL
> \NC \VL Eoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \smash{Archaeon Eon} \VL Paleoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Mesoarchean Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoarchean Era \NC \AR
> 
> \HL\NC \VL Paleoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Neoproterozoic Era \NC \AR
> \HL
> 
> 
> \HL\NC \VL Paleozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
> \DC \DL[1] \DR
> \NC \VL Cenozoic Era \NC \AR
> \HL
> \stoptable
> 
> \stoptext
> 
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] How to create cell data that spans four rows in a table?

2022-01-08 Thread Joel via ntg-context
I created a table that has some cells span multiple rows. This works good with 
cells that span an odd-number of rows, but when I try to span 4 rows, the text 
isn't quite vertically centered. How can I get the cell with the text "Archaeon 
Eon" to be a little lower, so it is centered within its box?
--Joel
Minimum working example:
\starttext

\starttable[|c|c|]
\NC {\bf Eons} \NC {\bf Eras} \NC \AR
\HL
\NC Hadeon Eon \VL \NC \AR
\HL
\NC \VL Eoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \smash{Archaeon Eon} \VL Paleoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Mesoarchean Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoarchean Era \NC \AR

\HL\NC \VL Paleoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC Proterozoic Eon \VL Mesoproterozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Neoproterozoic Era \NC \AR
\HL


\HL\NC \VL Paleozoic Era \NC \AR
\DC \DL[1] \DR
\NC Phanerozoic Eon \VL Mesozoic Era \NC \AR
\DC \DL[1] \DR
\NC \VL Cenozoic Era \NC \AR
\HL
\stoptable

\stoptext


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] upload

2021-10-22 Thread Hans Hagen via ntg-context

On 10/21/2021 9:13 PM, Pablo Rodriguez via ntg-context wrote:

On 10/21/21 8:04 PM, Hans Hagen via ntg-context wrote:

Hi,

I cleaned up some more backend code.  There were some mails about dates
and such and although the date field in setupinteraction works ok a more
drastic overload is doen with directives. The reason is that the fact
that we can set the date (and traler) is only because it permits
generating pdf files that can be compared. No date as a bad idea anyway.

\setupinteraction[title=My Title]
% \enabledirectives[backend.date=2034-06-07]


Many thanks for the new version, Hans.

Is there a way to add time and timezone in backend.date?


Pablo : transparencies should work again (wrong alias fixed).


Many thanks for this fix too.

Sorry for insisting, but could you check what is wrong with an extra
blank space in rotated imposition
(https://mailman.ntg.nl/pipermail/ntg-context/2021/103909.html)?

.. it was not really a minimal example ...

\showframe

\starttext
\topskip4cm
\rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\page


\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\page
\rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\page


\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\page
\stoptext

so, you need to wrap it, like

\startpagemakeup \rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\stoppagemakeup
\startpagemakeup 
\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\stoppagemakeup
\startpagemakeup \rotate[rotation=90] 
{\externalfigure[A3page.pdf][page=1,width=\textheight]}\stoppagemakeup
\startpagemakeup 
\rotate[rotation=270]{\externalfigure[A3page.pdf][page=2,width=\textheight]}\stoppagemakeup


and not make it 'sort of text that breaks or not across the page'. Now 
it is an interesting question why ... (spoiler: nice animation:)


\starttext
\topskip4cm
\dostepwiserecurse{0}{360}{1}{

\rotate[rotation=#1]{\externalfigure[A3page.pdf][page=1,width=\textheight]}
}
\stoptext

so we probably cross some threshold with some angles and because these 
are basically lines, we then get an interplay woth topskip, maxdepth etc 
(which normally goes unnoticed)


the good news is that you can play with it because rotate is normally 
configured for inline usage (so we get depth and height) you can use the 
location parameter to do otherwise:


% normal default depth fit broad high middle

\starttext
\topskip4cm
\dostepwiserecurse{0}{360}{1}{

\ruledhbox{\rotate[rotation=#1,location=high]{\externalfigure[A3page.pdf][page=1,width=\textheight]}}
}
\stoptext

irr it's actually shown somewhere in a manual but the source also has this

% \dostepwiserecurse{0}{360}{10}
%   {\startlinecorrection[blank]
%\hbox
%  {\expanded{\setuprotate[rotation=\recurselevel]}%
%   \traceboxplacementtrue
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=depth] 
{\ruledhbox{\bfb  (depth)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=fit] 
{\ruledhbox{\bfb(fit)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=broad] 
{\ruledhbox{\bfb  (broad)%
%   \hbox to 
.2\hsize{\hss\ruledhbox{\rotate[location=normal]{\ruledhbox{\bfb 
(normal)%
%   \hbox to .2\hsize{\hss\ruledhbox{\rotate[location=high] 
{\ruledhbox{\bfb   (high)}

%\stoplinecorrection}

% \def\Test{\ruledhbox{%
% \def\DemoX{\vl\kern.5\emwidth\vl}%
% \kern\emwidth\ruledhpack{\green\rotate[rotation=20] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\blue \rotate[rotation=0] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\red  \rotate[rotation=-20] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\green\rotate[rotation=200] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\blue \rotate[rotation=180] 
{\ruledhpack{\DemoX}}}%
% \kern\emwidth\ruledhpack{\red 
\rotate[rotation=-200]{\ruledhpack{\DemoX}}}%

% \kern\emwidth}}

% \startTEXpage[offset=10pt,align=middle]
% \setuprotate[location=fit] \Test \par 
{\infofont\setstrut\strut fit} \par
% \setuprotate[location=depth]   \Test \par 
{\infofont\setstrut\strut depth}   \par
% \setuprotate[location=broad]   \Test \par 
{\infofont\setstrut\strut broad}   \par
% \setuprotate[location=high]\Test \par 
{\infofont\setstrut\strut high}\par
% \setuprotate[location=middle]  \Test \par 
{\infofont\setstrut\strut middle}  \par
% \setuprotate[location=default] \Test \par 
{\infofont\setstrut\strut default} \par

% \stopTEXpage

so, not a bug but a features (that code hasn't been touched for ages, 
apart from maybe some lmtx interface adaptation), and if it's not in the 
wiki .. you know what to do now


Hans

-
  Hans Hagen | PRAGMA ADE

[NTG-context] lmtx upload

2021-01-11 Thread Hans Hagen

Hi,

I uploaded a new lmtx. Nothing spectacular as I'm still playign with 
compact font support (as explained in previous mails). Most seem to work 
now.


New magic:

\startTEXpage[offset=10pt]
\vl\glyph  `M\vl\quad
\vl\glyph raise 3pt`M\vl\quad
\vl\glyph left  3pt`M\vl\quad
\vl\glyphright  2pt`M\vl\quad
\vl\glyph raise -4pt right  4pt`M\vl\quad
\vl\glyph left -1pt  right -1pt`M\vl
\stopTEXpage

This is part of some experiments with manipulating glyph dimensions 
instead of font kerns. These extensions will stay (who knows when it 
comes un handy) but we will probably stick to font kerns as default.


\startTEXpage[offset=10pt]
\showfontkerns
\showglyphs
\strut average\par
\vskip-2ex
\enabledirectives[fonts.injections.method=advance]
{\red \strut average}\par
\stopTEXpage

Both methods have their pros and cons.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-27 Thread Hans Hagen

On 11/27/2020 10:07 AM, Otared Kavian wrote:

Hi Hans,

Thanks for your insight!
Indeed I'll wikify what you explained, once I have tested it with the next 
upload. Would  \HL and \VL be also available in mkiv ?

Dunno yet ... it's not that hard but I'm in lmtx mode now.

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-27 Thread Otared Kavian
Hi Hans,

Thanks for your insight!
Indeed I'll wikify what you explained, once I have tested it with the next 
upload. Would  \HL and \VL be also available in mkiv ?

Best regards: Otared

> On 26 Nov 2020, at 23:23, Hans Hagen  wrote:
> 
> On 11/26/2020 8:43 PM, Otared Kavian wrote:
>> Hi Jean-Philippe,
>> A few weeks ago I saw briefly the discussion about Hans' message regarding 
>> \noalign and the the new definitions of \HR and \VR that you are sending. 
>> Indeed your solution works great !
>> Just for the case other people may have the same question about writing 
>> block matrix, I copy below the whole example which can be found later in the 
>> mail archive.
>> (For mkiv, I don't know how to do the same thing…).
> 
> The \noaligned permits a \protected definition. Otherwise one has to do 
> something
> 
> \def\VR{\noalign\bgroup
>   
> that command then does the rule and ends the noalign. Also, that one cannot 
> be \protected (a pitty in case one uses \expanded or so)
> 
> So ... a multistep approach. Plenty of that in mkiv.
> 
>> %%% begin block-matrix.tex
>> % in LMTX defining \HR and \VR to create block matrices:
>> \pushoverloadmode
>> \noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
>> \popoverloadmode
>> \def\VR{\dosingleempty\doVR}
>> \def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}
> 
> given the \HR definition that should be
> 
> \tolerant\protected\def\VR[#1]{\NC ...\NC}
> 
>> \definemathmatrix[mymatrix]
>>  [left={\left(\,},
>>  right={\, \right)}]
>> \starttext   
>> \startformula
>>  \startmymatrix
>>  \NC A \VR  B \NR
>>  \HR
>>  \NC C \VR  D \NR
>>  \stopmymatrix
>> \stopformula
>> \stoptext
> 
> Anyway, a feature like this should be in sync with other table mechanisms, so
> 
> \definemathmatrix
>  [mymatrix]
>  [left={\left\lparent\thinspace},
>   right={\thinspace\right\rparent}]
> 
> \starttext
> 
> \startformula
>   \startmymatrix
>   \NC A \VL  B \NR
>   \HL
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \startformula
>   \startmymatrix
>   \NC A \VL[3,green]  B \NR
>   \HL[10,red]
>   \NC C \VL  D \NR
>   \stopmymatrix
> \stopformula
> 
> \stoptext
> 
> A bit more code needed but the next upload will have it. Of course you have 
> to wikify it.
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] mathmatrix and internal lines

2020-11-26 Thread Hans Hagen

On 11/26/2020 8:43 PM, Otared Kavian wrote:

Hi Jean-Philippe,

A few weeks ago I saw briefly the discussion about Hans' message regarding 
\noalign and the the new definitions of \HR and \VR that you are sending. 
Indeed your solution works great !
Just for the case other people may have the same question about writing block 
matrix, I copy below the whole example which can be found later in the mail 
archive.
(For mkiv, I don't know how to do the same thing…).


The \noaligned permits a \protected definition. Otherwise one has to do 
something


\def\VR{\noalign\bgroup
  that command then does the rule and ends the noalign. Also, that one 
cannot be \protected (a pitty in case one uses \expanded or so)


So ... a multistep approach. Plenty of that in mkiv.


%%% begin block-matrix.tex
% in LMTX defining \HR and \VR to create block matrices:
\pushoverloadmode
\noaligned\tolerant\protected\def\HR[#1]{\noalign{\hrule #1}}
\popoverloadmode

\def\VR{\dosingleempty\doVR}
\def\doVR[#1]{\NC \hskip-0.5em \vrule #1 \hskip-0.5em \NC}


given the \HR definition that should be

\tolerant\protected\def\VR[#1]{\NC ...\NC}


\definemathmatrix[mymatrix]
[left={\left(\,},
right={\, \right)}]

\starttext  

\startformula
\startmymatrix
\NC A \VR  B \NR
\HR
\NC C \VR  D \NR
\stopmymatrix
\stopformula

\stoptext


Anyway, a feature like this should be in sync with other table 
mechanisms, so


\definemathmatrix
  [mymatrix]
  [left={\left\lparent\thinspace},
   right={\thinspace\right\rparent}]

\starttext

\startformula
\startmymatrix
\NC A \VL  B \NR
\HL
\NC C \VL  D \NR
\stopmymatrix
\stopformula

\startformula
\startmymatrix
\NC A \VL[3,green]  B \NR
\HL[10,red]
\NC C \VL  D \NR
\stopmymatrix
\stopformula

\stoptext

A bit more code needed but the next upload will have it. Of course you 
have to wikify it.


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Vertical lines in matrices

2020-05-04 Thread Jeong Dal
Dear Weber Mattias,

Please see page 10 of “mathalign.pdf” made by Aditya.
He showed the way of writing  aligned math including  matrices.
For example,

\startformula

 \startmatrix[left={\left(\,},right={\,\right)}]

  \NC 1 \NC 0 \NC 0 \NR
  \NC 0 \NC 1 \NC 0 \NR
  \NC 0 \NC 0 \NC 1 \NR
\stopmatrix 
  \stopformula 
There are many other examples that you can use.

Best regards,
Dalyoung

> Message: 2
> Date: Sun, 3 May 2020 17:47:24 +
> From: "Weber, Matthias" 
> To: mailing list for ConTeXt users 
> Subject: [NTG-context] Vertical lines in matrices
> Message-ID: 
> Content-Type: text/plain; charset="utf-8"
> 
> Dear List,
> 
> I am trying to get vertical (separating) lines into matrices, as is possible 
> in tables:
> 
> \starttext
> \startformula
> \left(
> \starttable[|c|c|c|]
> \NC 0 \NC  0\VL  0 \FR
> \NC 1 \NC  0\VL  1 \FR
> \stoptable
> \right)
> \stopformula
> \stoptext
> 


___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Vertical lines in matrices

2020-05-04 Thread Weber, Matthias
Thanks Jeong,

I was aware of this. While there is no solution that adds vertical lines into 
matrices, one can juxtapose two (or more) of them with
properly chosen delimiters, like so:

\definemathmatrix
  [bvmatrix]
  [left={\left(\,},right={\ \right\vert}]

\definemathmatrix
  [rbmatrix]
  [left={\left.\,},right={\,\right)}]
  
\starttext
\startformula
\startbvmatrix
\NC 0 \NC  0\NC  0 \NR
\NC 1 \NC  0\NC  1 \NR
\stopbvmatrix
\startrbmatrix
\NC  0 \NR
\NC  1 \NR
\stoprbmatrix
\stopformula
\stoptext

> On May 4, 2020, at 04:25, Jeong Dal  wrote:
> 
> Dear Weber Mattias,
> 
> Please see page 10 of “mathalign.pdf” made by Aditya.
> He showed the way of writing  aligned math including  matrices.
> For example,
> 
> \startformula
> 
>  \startmatrix[left={\left(\,},right={\,\right)}]
> 
>   \NC 1 \NC 0 \NC 0 \NR
>   \NC 0 \NC 1 \NC 0 \NR
>   \NC 0 \NC 0 \NC 1 \NR
> 
> \stopmatrix 
>   \stopformula 
> There are many other examples that you can use.
> 
> Best regards,
> Dalyoung
> 
>> Message: 2
>> Date: Sun, 3 May 2020 17:47:24 +
>> From: "Weber, Matthias" 
>> To: mailing list for ConTeXt users 
>> Subject: [NTG-context] Vertical lines in matrices
>> Message-ID: 
>> Content-Type: text/plain; charset="utf-8"
>> 
>> Dear List,
>> 
>> I am trying to get vertical (separating) lines into matrices, as is possible 
>> in tables:
>> 
>> \starttext
>> \startformula
>> \left(
>> \starttable[|c|c|c|]
>> \NC 0 \NC  0\VL  0 \FR
>> \NC 1 \NC  0\VL  1 \FR
>> \stoptable
>> \right)
>> \stopformula
>> \stoptext
>> 
> 
> 
> ___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


[NTG-context] Vertical lines in matrices

2020-05-03 Thread Weber, Matthias
Dear List,

I am trying to get vertical (separating) lines into matrices, as is possible in 
tables:

\starttext
\startformula
\left(
\starttable[|c|c|c|]
\NC 0 \NC  0\VL  0 \FR
\NC 1 \NC  0\VL  1 \FR
\stoptable
\right)
\stopformula
\stoptext

But my parentheses don’t fit, and I am not sure whether using tables in math 
mode is the proper way of doing things.
\startmatrix seems to ignore a \VL.

Any. suggestions?

Thanks,

Matthias
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


Re: [NTG-context] Tabulate backgroundcolors

2018-09-10 Thread Hans Hagen

On 9/10/2018 12:45 PM, Henri Menke wrote:

bump


already fixed but no upload yet (maybe later today)


On 09/07/2018 09:58 AM, Henri Menke wrote:

Dear list,

I'm trying to color the background of “p” cells in tabulate.  The MWE
below will fail with the error “Undefined control sequence \IMPOSSIBLE”
but when I enter scrollmode to finish the run, I get a PDF which looks
exactly as intended.  Looks like it's not \IMPOSSIBLE after all but
there is actually just a definition missing.  Can you please fix this?

Cheers, Henri

---

\starttext
\starttabulate[|CM{black}l|CM{gray}p|][distance=none]
   \HL
   \VL \color[white]{\bf Table NAME} \CM[black] \VL\NR
   \HL
   \VL \VL \bf Description: \VL\NR
   \HL
   \VL \VL
 \startitemize
 \dorecurse{60}{\item Item \recurselevel}
 \stopitemize
   \VL\NR
   \HL
\stoptabulate
\stoptext



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate backgroundcolors

2018-09-10 Thread Henri Menke
bump

On 09/07/2018 09:58 AM, Henri Menke wrote:
> Dear list,
> 
> I'm trying to color the background of “p” cells in tabulate.  The MWE
> below will fail with the error “Undefined control sequence \IMPOSSIBLE”
> but when I enter scrollmode to finish the run, I get a PDF which looks
> exactly as intended.  Looks like it's not \IMPOSSIBLE after all but
> there is actually just a definition missing.  Can you please fix this?
> 
> Cheers, Henri
> 
> ---
> 
> \starttext
> \starttabulate[|CM{black}l|CM{gray}p|][distance=none]
>   \HL
>   \VL \color[white]{\bf Table NAME} \CM[black] \VL\NR
>   \HL
>   \VL \VL \bf Description: \VL\NR
>   \HL
>   \VL \VL
> \startitemize
> \dorecurse{60}{\item Item \recurselevel}
> \stopitemize
>   \VL\NR
>   \HL
> \stoptabulate
> \stoptext
> 

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Tabulate backgroundcolors

2018-09-06 Thread Henri Menke
Dear list,

I'm trying to color the background of “p” cells in tabulate.  The MWE
below will fail with the error “Undefined control sequence \IMPOSSIBLE”
but when I enter scrollmode to finish the run, I get a PDF which looks
exactly as intended.  Looks like it's not \IMPOSSIBLE after all but
there is actually just a definition missing.  Can you please fix this?

Cheers, Henri

---

\starttext
\starttabulate[|CM{black}l|CM{gray}p|][distance=none]
  \HL
  \VL \color[white]{\bf Table NAME} \CM[black] \VL\NR
  \HL
  \VL \VL \bf Description: \VL\NR
  \HL
  \VL \VL
\startitemize
\dorecurse{60}{\item Item \recurselevel}
\stopitemize
  \VL\NR
  \HL
\stoptabulate
\stoptext

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] future versions - synctex

2018-08-21 Thread Hans Hagen

On 8/21/2018 10:00 AM, Procházka Lukáš Ing. wrote:

When building a document (or more precisely: documentation which 
consists of many documents), I'm widely referring to other files via 
\input, \component etc., I'm widely using \defs, \defines and \buffers 
defined in separate files (as these defs are used at more places - so 
let them being defined in one source file) and I'm often generating 
texts by Lua (e.g. tables - being read and parsed from a text in a 
\start/\stopluacode block or e.g. Excel named range read via LuaXls or 
from a .xml - and typeset by a Lua function, which allows simply change 
all \NC into \VL in a particular place).


The lengthy process is to EDIT (almost) finished docs/documentation. And 
at this place, it would be very handy if synctex worked. So I vote for a 
better click-in-PDF-go-to-source support.


in principle you can push  / pop input states but for such a variety of 
input you have to do that yourself in the styles ... and it will quickly 
become a performance issue then


the core will not get that kind of hard coded synctex flip-flopping

fwiw, the xml sub mechanism does support that kind of functionality as 
option (only because a collegue uses xml with deeply nested inclusions 
spread all over a direcory structure)


I don't know anything deep about how sync is provided. But my layman 
point of view would be that whenever a character (or a "box") is to be 
placed on the page (or into output stream), ConTeXt should know which is 
the "deepest - currently read" source file, the line, moreover the 
column - and that position could result into "pick-and-go" position.


only partly ... you don't know where a macro comes from (or what lua 
code generated something) and it makes no sense either to go bakc to 
some macro ... in fact, synctex support in context blocks going to 
styles because those who edit files are not supposed to change styles


things like headers and footers come from styles, not user input

and even much structure stuff comes from elsewhere (like titles of 
sections: they go via lua so there we already need to cheat input 
registration)


In this approach - "boxes" generated by Lua-in-ConTeXt should "jump" on 
\startluacode, \ctxlua, \cldcommand statement...


won't happen ... way too much overhead and it would polute the source 
too (i follow the principle that any new mechanism that gets added will 
not slow down compilation in a measurable way)



Anyway, i can cheat at the tex/lua end if needed and support e.g. titles
but i'm not going to pollute the code with every place where we come
from lua (also because in most cases there is no relation with the
source anyway then). Also, I will not add code that can have an impact
on performance when synctex is turned off.


Synctex should be turned on/off before source files are compiled into 
PDF - via command line option "--synctex" or 
\enabledirectives[system.synctex] before \starttext 
(\enabledirectives[system.synctex] after \starttext (\startcomponent) 
should be ignored?) - that could cause hooking picked Lua functions (or 
taking their "synctex-on" alternatives) - so normally (with synctex off) 
there wouldn't be any performance impact; worse performance would come 
only with synctex on - but it's user's choice.



But for a subset of
constructs that are relatively short in usage it is doable (but doesn't
really qualify as fun -- also, i don't use it myself).


Anyway, a better support for "pick-in-PDF-and-go-to-source" (synctex), 
namely when user "tunes" the docs to their final stage, would be great.
I think that the current approach to hard code synctex libraries into a 
viewer is a limitation (instead an editor should call an external 
program with the page and coordinates so that an external program can 
then look at the synctex file and decide where to go in the editor. That 
way more sophisticated support is possible than the now hard coded 
heuristics. Keep in mind that these heuristics are tuned for latex and 
from context we generate the real minimal amount of synctex code that 
works without clashing with these heuristics. If that were not that case 
is would be unuseable.


Anyhow, there's only so much i can do about it (i'm not going to patch 
viewers). Currently synctex is mostly working for decent structured 
source (can be multiple files).


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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 /

Re: [NTG-context] future versions - synctex

2018-08-21 Thread Procházka Lukáš Ing .

Hello,

a bit later - I was thinking if to react here, after reading all about synctex 
and complicated support for complicatedly assembled source files - but my 
personal experience/wish...


On 7/24/2018 11:02 PM, Idris Samawi Hamid ادريس سماوي حامد wrote:

Hi Hans, all,



One needed feature that would be of general use is better support for
synctex. Thinking especially of structural elements such as headings,
footnotes, etc. which mostly do not work with synctex - i.e., clicking
on these elements in the pdf do not take one back to the correct
location in the relevant TEX file.


When building a document (or more precisely: documentation which consists of 
many documents), I'm widely referring to other files via \input, \component 
etc., I'm widely using \defs, \defines and \buffers defined in separate files 
(as these defs are used at more places - so let them being defined in one 
source file) and I'm often generating texts by Lua (e.g. tables - being read 
and parsed from a text in a \start/\stopluacode block or e.g. Excel named range 
read via LuaXls or from a .xml - and typeset by a Lua function, which allows 
simply change all \NC into \VL in a particular place).

The lengthy process is to EDIT (almost) finished docs/documentation. And at 
this place, it would be very handy if synctex worked. So I vote for a better 
click-in-PDF-go-to-source support.

On Wed, 25 Jul 2018 01:21:48 +0200, Hans Hagen  wrote:


Synctex is a beast. Basically it is not that useable for context which
is why we have a different implementation with a rather clean, minimal,
and predictable output. Unfortunately the usual approahc is to use a
library for interoreting the synctex files which has too much heuristics
built in. More flexible would be to let the viewer cann an external
program which then can interpret the synctex file based on a page and
position. This also would make it possible to have more clever
synchronization and/or adapt to a macro package. Anyway, were sort of
stuck and can only try to make the best of it.

That said, the context generated synctex file is nornally okay unless we
render from lua, which happens for instance with titles. Just try

\ctxlua{context("foo bar")}

and you will also see that there is no line related positioning.
Tweaking luatex for this is not really an options because whatever
decision we make here will backfire at some point. (I can look into some
option later but it needs bit of thinking)


I don't know anything deep about how sync is provided. But my layman point of view would be that whenever a 
character (or a "box") is to be placed on the page (or into output stream), ConTeXt should know 
which is the "deepest - currently read" source file, the line, moreover the column - and that 
position could result into "pick-and-go" position.

In this approach - "boxes" generated by Lua-in-ConTeXt should "jump" on 
\startluacode, \ctxlua, \cldcommand statement...


Anyway, i can cheat at the tex/lua end if needed and support e.g. titles
but i'm not going to pollute the code with every place where we come
from lua (also because in most cases there is no relation with the
source anyway then). Also, I will not add code that can have an impact
on performance when synctex is turned off.


Synctex should be turned on/off before source files are compiled into PDF - via command line option 
"--synctex" or \enabledirectives[system.synctex] before \starttext 
(\enabledirectives[system.synctex] after \starttext (\startcomponent) should be ignored?) - that 
could cause hooking picked Lua functions (or taking their "synctex-on" alternatives) - so 
normally (with synctex off) there wouldn't be any performance impact; worse performance would come 
only with synctex on - but it's user's choice.


But for a subset of
constructs that are relatively short in usage it is doable (but doesn't
really qualify as fun -- also, i don't use it myself).


Anyway, a better support for "pick-in-PDF-and-go-to-source" (synctex), namely when user 
"tunes" the docs to their final stage, would be great.

Best regards,

Lukas


(One complication is that for instance fixing it for some constructs
will break it for xml input which also supports synctex.)

Hans



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with an enumeration

2018-08-01 Thread Pablo Rodriguez
On 07/31/2018 11:58 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> That's not what I'm looking for but rather this:
> 
> *1.a.* blablablabla
> blablablabla
> *b.* blablablabla
> blablablabla
> *c.* blablablabla
> blablablabla
> 
> Which explains the use of the key intext

Hi Fabrice,

this is the best I get:

\setupitemgroup
   [itemize][1]
   [color=darkred,
option={packed,fit,paragraph,n}]

\setupitemgroup
   [itemize][2]
   [color=darkred,
distance=\spaceamount,
option={packed,fit,intext,a}]

Otherwise, deploying the option "intext" seems to handle the width of
first itemization level as zero.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] table and tabulate "negative" extra spacing

2018-05-21 Thread Alan Braslau
On Mon, 21 May 2018 15:47:41 -0400 (EDT)
Aditya Mahajan <adit...@umich.edu> wrote:

> On Mon, 21 May 2018, Alan Braslau wrote:
> 
> > Hello,
> >
> > In \starttable and \starttabulate, one can add extra blank space
> > between rows using \TB[...].
> >
> > Is there some way to add "negative" spacing, that is to tighten or
> > reduce the spacing between any two rows?  
> 
> Just use negative space:
> 
> \TB[-line]
> 
> or
> 
> \TB[-3cm]
> 
> Aditya

Interesting, this (obvious) feature works in the MWE below, but is
without effect in my real use case. I'll have to investigate...

Alan


\starttext

\startplacetable
\starttable [|c|c|]
\NC 1 \VL first row \AR
\TB[-1cm]
\NC 2 \VL second row \AR
\stoptable
\stopplacetable

\blank [5cm]

\startplacetable
\starttabulate [|c|c|]
\NC 1 \VL first row \NC\NR
\TB[-1cm]
\NC 2 \VL second row \NC\NR
\stoptabulate
\stopplacetable

\stoptext
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] setting row height?

2017-12-29 Thread Floris van Manen
/thankyou
F

> On 29 Dec 2017, at 14:14, Lars <axteff...@gmail.com> wrote:
> 
> Hey there,
> 
> I suggest you use the extreme tables mechanism instead. AFAIK it is the most 
> consistent way to-date. A simple table would look like (also see attached 
> output jpg at the bottom of the mail):
> 
> 
> \starttext
> 
>   \startxtable[height=3cm] % Use it globally...
> 
> \startxrow
>   \startxcell
> first top
>   \stopxcell
>   \startxcell
> second top
>   \stopxcell
> \stopxrow
> 
> \startxrow[height=1cm] % ... or locally.
>   \startxcell
> first bot
>   \stopxcell
>   \startxcell
> second bot
>   \stopxcell
> \stopxrow
> 
>   \stopxtable
> 
> \stoptext
> 
> 
> 
> Cheers.
> 
> 
> 
> Am 28/12/2017 um 20:44 schrieb Floris van Manen:
>> What is the (preferred) way to set the height of table rows?
>> e.g. the online documentation tells me how to set the width, not the height.
>> or how to set the height of the table?
>> 
>> \starttable[*{4}{|w(7mm)}|][textwidth=max]\HL[5]
>> \VL[5]{1} \VL[1]{0} \VL[5]{2} \VL[1]{8} \VL[5]\AR\HL[1]
>> \VL[5]{8} \VL[1]{~} \VL[5]{~} \VL[1]{1} \VL[5]\AR\HL[5]
>> \VL[5]{0} \VL[1]{~} \VL[5]{~} \VL[1]{2} \VL[5]\AR\HL[1]
>> \VL[5]{2} \VL[1]{8} \VL[5]{1} \VL[1]{0} \VL[5]\AR\HL[5]
>> \stoptable
>> 
>> 
>> 
>> Thanks
>> .F
>> 
>> 
>> 
>> 
>> ___
>> 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://context.aanhet.net
>> 
>> archive  :
>> https://bitbucket.org/phg/context-mirror/commits/
>> 
>> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] setting row height?

2017-12-29 Thread Lars

Hey there,

I suggest you use the *extreme tables* mechanism instead. AFAIK it is 
the most consistent way to-date. A simple table would look like (also 
see attached output jpg at the bottom of the mail):



\starttext

  \startxtable[height=3cm] % Use it globally...

\startxrow
  \startxcell
first top
  \stopxcell
  \startxcell
second top
  \stopxcell
\stopxrow

\startxrow[height=1cm] % ... or locally.
  \startxcell
first bot
  \stopxcell
  \startxcell
second bot
  \stopxcell
\stopxrow

  \stopxtable

\stoptext



Cheers.



Am 28/12/2017 um 20:44 schrieb Floris van Manen:

What is the (preferred) way to set the height of table rows?
e.g. the online documentation tells me how to set the width, not the height.
or how to set the height of the table?

\starttable[*{4}{|w(7mm)}|][textwidth=max]\HL[5]
\VL[5]{1} \VL[1]{0} \VL[5]{2} \VL[1]{8} \VL[5]\AR\HL[1]
\VL[5]{8} \VL[1]{~} \VL[5]{~} \VL[1]{1} \VL[5]\AR\HL[5]
\VL[5]{0} \VL[1]{~} \VL[5]{~} \VL[1]{2} \VL[5]\AR\HL[1]
\VL[5]{2} \VL[1]{8} \VL[5]{1} \VL[1]{0} \VL[5]\AR\HL[5]
\stoptable



Thanks
.F



___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] setting row height?

2017-12-28 Thread Floris van Manen
What is the (preferred) way to set the height of table rows?
e.g. the online documentation tells me how to set the width, not the height.
or how to set the height of the table?

\starttable[*{4}{|w(7mm)}|][textwidth=max]\HL[5]
\VL[5]{1} \VL[1]{0} \VL[5]{2} \VL[1]{8} \VL[5]\AR\HL[1]
\VL[5]{8} \VL[1]{~} \VL[5]{~} \VL[1]{1} \VL[5]\AR\HL[5]
\VL[5]{0} \VL[1]{~} \VL[5]{~} \VL[1]{2} \VL[5]\AR\HL[1]
\VL[5]{2} \VL[1]{8} \VL[5]{1} \VL[1]{0} \VL[5]\AR\HL[5]
\stoptable



Thanks
.F



signature.asc
Description: Message signed with OpenPGP using GPGMail
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate containing high element

2017-10-31 Thread Taco Hoekwater

Hi,

This should work:

  \tabulatesplitlinemode=0 % 1 | 2, default: 1
  % controls the splitting dimensions for lines in ‘p’ mode 
  % 0: do nothing
  % 1: make each line exactly the height and depth of \strut
  % 2: make each line at least the height and depth height of \strut


Undocumented, so likely to change in the next beta ;)

Best wishes,
Taco


> On 31 Oct 2017, at 12:55, Procházka Lukáš Ing. <l...@pontex.cz> wrote:
> 
> Hello,
> 
> any idea?
> 
> My other attempts to constrain the row height to reflect its highest member 
> fail, too.
> 
> Is it possible in the tabulate environment at all?
> 
> Best regards,
> 
> Lukas
> 
> 
> On Mon, 30 Oct 2017 09:04:18 +0100, Procházka Lukáš Ing. <l...@pontex.cz> 
> wrote:
> 
>> Hello,
>> 
>> On Sun, 29 Oct 2017 23:50:51 +0100, Aditya Mahajan <adit...@umich.edu> wrote:
>> 
>>> On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:
>>> 
>>>> Hello,
>>>> 
>>>> how to make tabulate row "aware" of some content of some "bigger" height?
>>>> 
>>>> In the following sample:
>>>> 
>>>> 
>>>> \starttext
>>>> \starttabulate[|pd(.4\textwidth)|p|]
>>>>  \HL
>>>>  \NC
>>>>\framed[location=top,width=1in,height=1in]{Abc}
>>>>  \VL
>>>>Def
>>>>  \NC\NR
>>>>  \HL
>>>> \stoptabulate
>>>> \stoptext
>>>> 
>>> 
>>> (Untested): Does
>>> 
>>> \dontleavehmode \framed 
>> 
>> unfortunately, it does not...
>> 
>> Lukas
>> 
>>> work better?
>>> 
>>> Aditya
>> 
>> 
> 
> 
> -- 
> Ing. Lukáš Procházka | mailto:l...@pontex.cz
> Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
> IDDS:nrpt3sn
> Bezová 1658
> 147 14 Praha 4
> 
> Mob.: +420 702 033 
> 396___
> 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

Taco Hoekwater
Elvenkind BV




___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate containing high element

2017-10-31 Thread Procházka Lukáš Ing .

Hello,

any idea?

My other attempts to constrain the row height to reflect its highest member 
fail, too.

Is it possible in the tabulate environment at all?

Best regards,

Lukas


On Mon, 30 Oct 2017 09:04:18 +0100, Procházka Lukáš Ing. <l...@pontex.cz> wrote:


Hello,

On Sun, 29 Oct 2017 23:50:51 +0100, Aditya Mahajan <adit...@umich.edu> wrote:


On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:


Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
\starttabulate[|pd(.4\textwidth)|p|]
  \HL
  \NC
\framed[location=top,width=1in,height=1in]{Abc}
  \VL
Def
  \NC\NR
  \HL
\stoptabulate
\stoptext



(Untested): Does

\dontleavehmode \framed 


unfortunately, it does not...

Lukas


work better?

Aditya






--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

Tabul-with-HighElem.mkiv
Description: Binary data


Tabul-with-HighElem.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate containing high element

2017-10-30 Thread Procházka Lukáš Ing .

Hello,

On Sun, 29 Oct 2017 23:50:51 +0100, Aditya Mahajan <adit...@umich.edu> wrote:


On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:


Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
\starttabulate[|pd(.4\textwidth)|p|]
  \HL
  \NC
\framed[location=top,width=1in,height=1in]{Abc}
  \VL
Def
  \NC\NR
  \HL
\stoptabulate
\stoptext



(Untested): Does

\dontleavehmode \framed 


unfortunately, it does not...

Lukas


work better?

Aditya



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate containing high element

2017-10-29 Thread Aditya Mahajan

On Sun, 29 Oct 2017, Procházka Lukáš Ing. wrote:


Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
\starttabulate[|pd(.4\textwidth)|p|]
  \HL
  \NC
\framed[location=top,width=1in,height=1in]{Abc}
  \VL
Def
  \NC\NR
  \HL
\stoptabulate
\stoptext



(Untested): Does

\dontleavehmode \framed 

work better?

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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Tabulate containing high element

2017-10-29 Thread Procházka Lukáš Ing .

Hello,

how to make tabulate row "aware" of some content of some "bigger" height?

In the following sample:


\starttext
  \starttabulate[|pd(.4\textwidth)|p|]
\HL
\NC
  \framed[location=top,width=1in,height=1in]{Abc}
\VL
  Def
\NC\NR
\HL
  \stoptabulate
\stoptext


content of the \framed flows out of the height of the first row;
I'd like the first row to have height of the highest element (here: the \framed 
- be 1 in).

How to achieve this?

Thank you in advance.

Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

t2.mkiv
Description: Binary data


t2.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate and \VL

2017-10-24 Thread Procházka Lukáš Ing .

Hello,

I noticed that \VL's behavior over several lines has been fixed - thank you, 
Hans!

Best regards,

Lukas


On Thu, 05 Oct 2017 15:28:54 +0200, Hans Hagen <pra...@wxs.nl> wrote:


On 10/5/2017 8:57 AM, Procházka Lukáš Ing. wrote:

Hello,

maybe a very basic question -
- but in the sample bellow the VL of the first row is drawn only to
height of the first line of the 2line paragraph;
how to make the VL "full-height"?

it needs an extension so you have to be patient



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Tabulate and \VL

2017-10-05 Thread Hans Hagen

On 10/5/2017 8:57 AM, Procházka Lukáš Ing. wrote:

Hello,

maybe a very basic question -
- but in the sample bellow the VL of the first row is drawn only to 
height of the first line of the 2line paragraph;

how to make the VL "full-height"?

it needs an extension so you have to be patient


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Tabulate and \VL

2017-10-05 Thread Procházka Lukáš Ing .

Hello,

maybe a very basic question -
- but in the sample bellow the VL of the first row is drawn only to height of 
the first line of the 2line paragraph;
how to make the VL "full-height"?


\starttext
  \starttabulate[|l|p|]
\NC Hello \VL This is a dummy but very lng text which goes into 
several (one, two, three?) lines \NC\NR
\NC Something \VL else \NC\NR
  \stoptabulate
\stoptext


Best regards,

Lukas


--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
IDDS:nrpt3sn
Bezová 1658
147 14 Praha 4

Mob.: +420 702 033 396

TabulVL.mkiv
Description: Binary data


TabulVL.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] change width of a character with fonts.handlers.otf.addfeature

2017-05-19 Thread Hans Hagen

On 5/19/2017 9:34 AM, Ulrike Fischer wrote:

In extensions-001.tex
(http://minimals.metatex.org/current/context/test/doc/context/tests/mkiv/fonts/extensions-001.tex)
there is an example how to add or change the kern between two chars:


fonts.handlers.otf.addfeature {
name = "ktest",
type = "kern",
data = {
a = { b = -500 },
}
}


Can this be used to implement also a "Single adjustment positioning"
which would effectivly change the width of character?

(http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.a)

(I tried a few probable variants but got either errors or no effect
at all).


I'll add support for 'single' to user features:

\startluacode
fonts.handlers.otf.addfeature {
name = "stest",
type = "single",
data = {
a = { -30, 0, -50, 0 },
}
}
\stopluacode

\definefontfeature[whatever][default][stest=yes]

\starttext

\definedfont[Serif*whatever] \vl a\vl

\stoptext



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] output of the table is wierd

2017-03-16 Thread Wolfgang Schuster



Jeong Dal <mailto:hak...@me.com>
16. März 2017 um 15:28via Postbox 
<https://www.postbox-inc.com/?utm_source=email_medium=sumlink_campaign=reach>

Dear all,

I made a column as following:
…
\starttabulate[|c|c]
\HL
\NC $\sim (p \vee q)$ \VL $\sim p \ \wedge \sim q$ \NC\NR \HL
\NC $\sim (p \ \wedge q)$ \VL $\sim p \vee \sim q$ \NC\NR \HL
\NC $\sim (p \to q) $ \VL $p \wedge \sim q$ \NC\NR \HL
\NC $\sim (p \leftrightarrow q)$ \VL $(p \ \wedge \sim q) \vee (q \ 
\wedge \sim p)$ \NC\NR \HL

\stoptabulate
…

The first column is OK.
But lines in the first three rows in the second column expanded to the 
width as wide as the last row.

So the it looked very strange.

Is there a way to avoid such a bad looking output?
You forgat a | at the end of the table template. You can also simplify 
your table when

you add “m” to each cell setting which typesets each cell in math mode, e.g.

\starttext

\starttabulate[|mc|]
\NC a + b = c \NC\NR
\stoptabulate

\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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] output of the table is wierd

2017-03-16 Thread Jeong Dal
Dear all,

I made a column as following:
…
\starttabulate[|c|c]
\HL
\NC $\sim (p \vee q)$ \VL   $\sim p \ 
\wedge \sim q$ \NC\NR \HL
\NC $\sim (p \ \wedge q)$ \VL   $\sim p 
\vee \sim q$ \NC\NR \HL
\NC $\sim (p \to q) $ \VL   $p \wedge \sim 
q$ \NC\NR \HL
\NC $\sim (p \leftrightarrow q)$\VL $(p \ 
\wedge \sim q) \vee (q \ \wedge \sim p)$ \NC\NR \HL
\stoptabulate   
…

The first column is OK.
But lines in the first three rows in the second column expanded to the width as 
wide as the last row.
So the it looked very strange.

Is there a way to avoid such a bad looking output?
I am using latest luatex and ConTeXt stand alone in OSX.

Thank you.

Best regards,

Dalyoung
 
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Alignment for narrower text

2016-04-03 Thread Wolfgang Schuster

Jan Tosovsky <mailto:j.tosov...@email.cz>
2. April 2016 um 23:42
I thought Hans could also mean something like example below, but while 
leftskip should 'indent' all lines inside paragraph, it works only for 
the first one. Moreover, protrusion is not applied as well. And \crlf 
doesn't seem to be soft linebreak as it behaves like normal \par 
command - which is most likely explanation for that indenting issue.


{\leftskip=2cm
“line1\crlf
line2\crlf
line3\crlf
line4.
}
Indenting the whole textblock with \leftskip (or better ConTeXt’s 
narrower environment)

doesn’t prevent protrusion as can be seen in the following example.

\definefontfeature[default][default][protrusion=quality]

\setupbodyfont[modern-designsize]

\starttext

“\vl Text\par
 \vl Text

\startnarrower
“\vl Text\par
 \vl Text
\stopnarrower

\blank[3*line]\setupalign[hanging]

“\vl Text\par
 \vl Text

\startnarrower
“\vl Text\par
 \vl Text
\stopnarrower

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

Re: [NTG-context] Problem with tabulate and \VL command

2015-12-03 Thread Alan BRASLAU
Hi David,

Your example, as shown below, does not give an error using the recent
standalone distribution (your installation dates from last May).

Alan


On Thu, 3 Dec 2015 23:05:29 +
"Arnold, David" <david-arn...@redwoods.edu> wrote:

> Hi,
> 
> I entered:
> 
> 
> \starttabulate[]
> \NC test \VL test \VL test \VL\NR
> \VL test \NC test \VL test \VL\NR
>     \VL test \VL test \NC test \VL\NR
> \VL test \VL test \VL test \NC\NR
> \stoptabulate
> 
> And got this error:
> 
> ! Undefined control sequence.
> \tabulatecontent ->\NC test \VL
> 
> Can someone help me with this?
> 
> SC216H-Mac-02:fall15 darnold$ context --version
> 
> resolvers   | trees | analyzing '/Users/darnold/Library/texmf'
> mtx-context | ConTeXt Process Management 0.61
> mtx-context |
> mtx-context | main context
> file: /usr/local/texlive/2015/texmf-dist/tex/context/base/context.mkiv
> mtx-context | current version: 2015.05.18 12:26
> 
> Compile in Context via the Teashop editor.
> 
> David Arnold
> College of the Redwoods
___
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] Problem with tabulate and \VL command

2015-12-03 Thread Arnold, David
Hi,

I entered:


\starttabulate[]
\NC test \VL test \VL test \VL\NR
\VL test \NC test \VL test \VL\NR
\VL test \VL test \NC test \VL\NR
\VL test \VL test \VL test \NC\NR
\stoptabulate

And got this error:

! Undefined control sequence.
\tabulatecontent ->\NC test \VL

Can someone help me with this?

SC216H-Mac-02:fall15 darnold$ context --version

resolvers   | trees | analyzing '/Users/darnold/Library/texmf'
mtx-context | ConTeXt Process Management 0.61
mtx-context |
mtx-context | main context file: 
/usr/local/texlive/2015/texmf-dist/tex/context/base/context.mkiv
mtx-context | current version: 2015.05.18 12:26

Compile in Context via the Teashop editor.

David Arnold
College of the Redwoods
___
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] Multi-page (split) natural tables and footnotes

2015-06-07 Thread Christoph Reller
On Sun, Jun 7, 2015 at 12:00 PM ota...@gmail.com wrote:


 Hi Christoph,

 There exists a local footnotes environment in floats, as in the following
 example: I don’t know if it solves the problem you mention…

 
 \starttext
 \startlocalfootnotes
 \placetable[align=middle]{A table with footnotes.}
 {\starttable[|l|r|]
   \HL
   \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
   \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
   \HL
   \stoptable}
 {\placelocalfootnotes}
 \stoplocalfootnotes
 \stoptext
 

 Best regards: OK


Thank you Otared for your suggestion!

\startlocalfootnotes ... \stoplocalfootnotes only solves the problem
partially.

Solved: I can now use the usual \footnote{...} command and the footnote
does not disappear.
Unsolved: All the footnotes in the table still appear on the last page of a
multi-page table instead of the actual page where they are written.

To illustrate the latter problem I have a new MWE. The footnote mark in the
first table row receives a footnote text on the second page - it should be
on the first page.

Does anybody have a solution to this? Is it not supported? (I have ConTeXt
Version 2015.05.03 21:46)

Thank you for any feedback,
Christoph

MWE:

\starttext

\startlocalfootnotes
  \placetable[split][]{}{
\bTABLE
\bTR \bTD This \eTD \bTD That
\footnote{This footnote should appear on page 1.}
\eTD \eTR
\dorecurse{50}{\bTR \bTD This \eTD \bTD That \eTD \eTR}
\eTABLE}
  \placelocalfootnotes
\stoplocalfootnotes

\stoptext
___
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] Multi-page (split) natural tables and footnotes

2015-06-07 Thread Otared Kavian
Hi Christoph,

There exists a local footnotes environment in floats, as in the following 
example: I don’t know if it solves the problem you mention…


\starttext

\startlocalfootnotes 
\placetable[align=middle]{A table with footnotes.}
{\starttable[|l|r|]
  \HL
  \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
  \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
  \HL
  \stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes

\stoptext


Best regards: OK

 On 06 Jun 2015, at 21:41, Christoph Reller christoph.rel...@gmail.com wrote:
 
 Hi,
 
 How can I get footnotes working with split tables? Is this not supported?
 
 The workaround with \note[...] \footnotetext[...]{...} can only be used to 
 place footnotes on the first or on the last page of the table. For a long 
 multi-page table this is not satisfactory.
 
 The wiki mentions using \automigrateinserts, but it has no effect here.
 
 Any help is welcome!
 
 Cheers,
 Christoph
 
 MWE:
 
 \automigrateinserts
 \starttext
 \placetable[split][]{}{
   \bTABLE
   \bTR \bTD This \eTD \bTD That.
   \footnote{This footnote disappears.}
   \note[working]
   \eTD \eTR
   \eTABLE}
   \footnotetext[working]{This footnote works.}
 \stoptext
 
 ___
 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
___

[NTG-context] Export: \setuphemistich distance=

2015-03-18 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

In the attached, we export hemistiches:

===
\setupexport[cssfile=sh_ahmad-qajar.css]
\setupbackend[export=yes]

\usemodule[hemistich]

\setuphemistich
  [width=local,
   distance=1\emwidth,
   separator=]

   \setuphemistich
  [leftcolor=,
   separatorcolor=,
   rightcolor=]

   \setuphemistich
  % [separator=\vl\hskip.25em\vl]
  [separator=]

%% We need separate lines in the export, so use \start|stoplines
\definestartstop[VERSES][before={\blank[medium]\startlines  
\noindentation},after={\stoplines \blank[medium]}]

\starttext
\startVERSES
\hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the  
Decision.}
\hemistiches{Thus tight spaces will often widen;}{And open spaces will  
often get tight.}

\stopVERSES
\stoptext
===

In the output we get

===
div
 div class=lines
  div class=linediv class=lineBecome a shunner of your  
affairs;Entrust all affairs to the Decision./divdiv class=lineThus  
tight spaces will often widen;And open spaces will often get  
tight./div/div

 /div
/div
===

Is there anyway to tag and export the distance info:

distance=1\emwidth

so that we can get some space in the xhtml. Note that I do not expect any  
of the alignment that the hemistiches module provides. Just some  
reasonable space.


That said: How do I design a \start|stophemistiches environment that would  
get tagged in the output as such (i.e., div class=hemistiches)?


Thanks in advance and best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Export: \setuphemistich distance=

2015-03-18 Thread Wolfgang Schuster

 Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Dear gang,
 
 In the attached, we export hemistiches:
 
 ===
 \setupexport[cssfile=sh_ahmad-qajar.css]
 \setupbackend[export=yes]
 
 \usemodule[hemistich]
 
 \setuphemistich
  [width=local,
   distance=1\emwidth,
   separator=]
 
   \setuphemistich
  [leftcolor=,
   separatorcolor=,
   rightcolor=]
 
   \setuphemistich
  % [separator=\vl\hskip.25em\vl]
  [separator=]
 
 %% We need separate lines in the export, so use \start|stoplines
 \definestartstop[VERSES][before={\blank[medium]\startlines 
 \noindentation},after={\stoplines \blank[medium]}]
 \starttext
 \startVERSES
 \hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the 
 Decision.}
 \hemistiches{Thus tight spaces will often widen;}{And open spaces will often 
 get tight.}
 \stopVERSES
 \stoptext
 ===
 
 In the output we get
 
 ===
 div
 div class=lines
  div class=linediv class=lineBecome a shunner of your affairs;Entrust 
 all affairs to the Decision./divdiv class=lineThus tight spaces will 
 often widen;And open spaces will often get tight./div/div
 /div
 /div
 ===
 
 Is there anyway to tag and export the distance info:
 
 distance=1\emwidth
 
 so that we can get some space in the xhtml. Note that I do not expect any of 
 the alignment that the hemistiches module provides. Just some reasonable 
 space.
 
 That said: How do I design a \start|stophemistiches environment that would 
 get tagged in the output as such (i.e., div class=hemistiches)?

You have to add tag commands in the source of the module to get tags in the 
exported text.

The distance between both texts in the output can be set with CSS but first you 
need tags.

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
___

Re: [NTG-context] Export: \setuphemistich distance=

2015-03-18 Thread Wolfgang Schuster

 Am 18.03.2015 um 20:45 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 On Wed, 18 Mar 2015 11:51:13 -0600, Wolfgang Schuster 
 schuster.wolfg...@gmail.com mailto:schuster.wolfg...@gmail.com wrote:
 
 
 Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد 
 isha...@colostate.edu:
 
 Dear gang,
 
 In the attached, we export hemistiches:
 
 ===
 \setupexport[cssfile=sh_ahmad-qajar.css]
 \setupbackend[export=yes]
 
 \usemodule[hemistich]
 
 \setuphemistich
 [width=local,
  distance=1\emwidth,
  separator=]
 
  \setuphemistich
 [leftcolor=,
  separatorcolor=,
  rightcolor=]
 
  \setuphemistich
 % [separator=\vl\hskip.25em\vl]
 [separator=]
 
 %% We need separate lines in the export, so use \start|stoplines
 \definestartstop[VERSES][before={\blank[medium]\startlines 
 \noindentation},after={\stoplines \blank[medium]}]
 \starttext
 \startVERSES
 \hemistiches{Become a shunner of your affairs;}{Entrust all affairs to the 
 Decision.}
 \hemistiches{Thus tight spaces will often widen;}{And open spaces will 
 often get tight.}
 \stopVERSES
 \stoptext
 ===
 
 In the output we get
 
 ===
 div
 div class=lines
 div class=linediv class=lineBecome a shunner of your 
 affairs;Entrust all affairs to the Decision./divdiv class=lineThus 
 tight spaces will often widen;And open spaces will often get 
 tight./div/div
 /div
 /div
 ===
 
 Is there anyway to tag and export the distance info:
 
 distance=1\emwidth
 
 so that we can get some space in the xhtml. Note that I do not expect any 
 of the alignment that the hemistiches module provides. Just some reasonable 
 space.
 
 That said: How do I design a \start|stophemistiches environment that would 
 get tagged in the output as such (i.e., div class=hemistiches)?
 
 You have to add tag commands in the source of the module to get tags in the 
 exported text.
 
 The distance between both texts in the output can be set with CSS but first 
 you need tags.
 
 Hi Wolfgang,
 
 Can you give an example of adding tag commands to a macro or to a 
 \start-stopcommand? Thanks as always for the clarity and


Something like this should do it for the hemistiches module.

\unexpanded\def\dodohemistiches#1[#2]#3#4%
  {\dontleavehmode
   \begingroup
   \doifassignmentelse{#2}
 {\edef\currenthemistich{#1}%
  \setupcurrenthemistich[#2]}
 {\def\currenthemistich{#2}}%
   \doifelse{\hemistichparameter\c!width}\v!local
 {\scratchwidth\availablehsize}
 {\scratchwidth\hemistichparameter\c!width\relax}%
   \spaceskip\zeropoint\s!plus\plusone\s!fill\relax
+  \dostarttagged\t!division\currenthemistich
   \hbox to \scratchwidth\bgroup
 \scratchwidth.5\dimexpr\scratchwidth-\hemistichparameter\c!distance\relax
 \hbox to \scratchwidth\bgroup
+  \dostarttagged\t!construct\c!lefttext
   \usehemistichstyleandcolor\c!leftstyle\c!leftcolor#3%
+  \dostoptagged
 \egroup
 \hss
 \begingroup
+  \dostarttagged\t!construct\c!separator
   \usehemistichstyleandcolor\c!separatorstyle\c!separatorcolor
   \hemistichparameter\c!separator
+  \dostoptagged
 \endgroup
 \hss
 \hbox to \scratchwidth\bgroup
+  \dostarttagged\t!construct\c!righttext
   \usehemistichstyleandcolor\c!rightstyle\c!rightcolor#4%
+  \dostoptagged
 \egroup
   \egroup
+  \dostoptagged
   \endgroup}

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
___

Re: [NTG-context] Export: \setuphemistich distance=

2015-03-18 Thread Idris Samawi Hamid ادريس سماوي حامد
On Wed, 18 Mar 2015 11:51:13 -0600, Wolfgang Schuster  
schuster.wolfg...@gmail.com wrote:




Am 18.03.2015 um 15:04 schrieb Idris Samawi Hamid ادريس سماوي حامد  
isha...@colostate.edu:


Dear gang,

In the attached, we export hemistiches:

===
\setupexport[cssfile=sh_ahmad-qajar.css]
\setupbackend[export=yes]

\usemodule[hemistich]

\setuphemistich
 [width=local,
  distance=1\emwidth,
  separator=]

  \setuphemistich
 [leftcolor=,
  separatorcolor=,
  rightcolor=]

  \setuphemistich
 % [separator=\vl\hskip.25em\vl]
 [separator=]

%% We need separate lines in the export, so use \start|stoplines
\definestartstop[VERSES][before={\blank[medium]\startlines  
\noindentation},after={\stoplines \blank[medium]}]

\starttext
\startVERSES
\hemistiches{Become a shunner of your affairs;}{Entrust all affairs to  
the Decision.}
\hemistiches{Thus tight spaces will often widen;}{And open spaces will  
often get tight.}

\stopVERSES
\stoptext
===

In the output we get

===
div
div class=lines
 div class=linediv class=lineBecome a shunner of your  
affairs;Entrust all affairs to the Decision./divdiv  
class=lineThus tight spaces will often widen;And open spaces will  
often get tight./div/div

/div
/div
===

Is there anyway to tag and export the distance info:

distance=1\emwidth

so that we can get some space in the xhtml. Note that I do not expect  
any of the alignment that the hemistiches module provides. Just some  
reasonable space.


That said: How do I design a \start|stophemistiches environment that  
would get tagged in the output as such (i.e., div  
class=hemistiches)?


You have to add tag commands in the source of the module to get tags in  
the exported text.


The distance between both texts in the output can be set with CSS but  
first you need tags.


Hi Wolfgang,

Can you give an example of adding tag commands to a macro or to a  
\start-stopcommand? Thanks as always for the clarity and


Best wishes
Idris
--
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Tables, Row Span, and Colors

2015-03-12 Thread Troy Henderson
The following code produces my table, but I could not get the text Region
to span rows 3-7.  So, I would like


   1. the word Region to be inside the table and not hacked in the way
   that I have it.
   2. to make the (spanned) cell containing Years have a gray background.
   3. to make each of the column heading cells (i.e., the ones containing
   1, 1-2, ..., 15+, and Total to have a gray background.
   4. to have the (spanned) cell containing Region (from #1) have a gray
   background.
   5. to have the row heading cells (i.e., the ones containing East,
   Midwest, South, West, and Total) have a gray background.

I would appreciate any help in attaining this wish list.

Thanks in advance,

Troy

—— Code Starts Here ——

\setupcolors[state=start]
\starttext
\null\vskip15ex
\hskip1em\framed[orientation=90,frame=off]{\bf
Region}\blank\vskip-25.5ex
\starttable[|c|l|r|r|r|r|r|r|r|]
\DC \DC \DL[7] \DR
\NC \NC \VL \use{7}\ReFormat[cB]{Years} \VL \AR
\DC \DC \DL[7] \DR
\NC \NC \VL \ReFormat[cB]{$1$} \VL \ReFormat[cB]{$1-2$} \VL
\ReFormat[cB]{$3-4$} \VL \ReFormat[cB]{$5-9$} \VL \ReFormat[cB]{$10-14$}
\VL \ReFormat[cB]{$15+$} \VL \ReFormat[cB]{Total} \VL \AR
\HL
%\VL \offset[y=8ex]{\framed[orientation=90,frame=off]{\bf Region}}
\VL East \VL 32 \VL 54 \VL 59 \VL 112 \VL 77 \VL 118 \VL 452 \VL \AR
\VL \null\hskip2em\null \VL {\bf East} \VL 32 \VL 54 \VL 59 \VL 112
\VL 77 \VL 118 \VL 452 \VL \AR
\VL \VL {\bf Midwest} \VL 31 \VL 68 \VL 68 \VL 120 \VL 63 \VL 173
\VL 523 \VL \AR
\VL \VL {\bf South} \VL 53 \VL 92 \VL 93 \VL 158 \VL 106 \VL 158
\VL 660 \VL \AR
\VL \VL {\bf West} \VL 41 \VL 56 \VL 67 \VL 78 \VL 45 \VL 86 \VL
373 \VL \AR
\DC \DL[8] \DR
\VL \VL {\bf Total} \VL 157 \VL 270 \VL 287 \VL 468 \VL 291 \VL 535
\VL 2008 \VL \AR
\HL
\stoptable
\stoptext
___
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] How to draw this picture?

2015-01-17 Thread Rob Heusdens
I am working on an economic book, which I convert from a paper edition
into a digital edition, which contains some figures I want to recreate
using context or other tool.

In logical terms, the picture represents some economic figures and
visualizes how some figure (e.g. National income and the amount) is the
sum of some other figures, in which it can be split up.

In logic terms the figure then explains that:

A can be split up into B and C. B can be split up into D and E. D is F. E
can be split into G,H,I and K.

Graphically this is depicted like a table containing 4 columns and 5 rows,
and the split into is drawn as two diagonal lines (one right-up and
another righ down) which shows how the element on the left column is split
up into the elements on the right column using the diagonal lines that
center in the left element, drawn to the right top and right bottom
element.

I worked this out into context as a simple table, and used instead of the
diagonal lines only vertical lines. Which is less expressive, but still
visualizes the splitting sufficiently I hope.

But I would like to rework this picture, using a brace instead of a
vertical line, similar to how in a formula one uses mathcases.

I tried to use mathcases, but it seems mathcases can't be nested??

I was thinking of other solutions, like replacing the vertical line with a
small column in which to put a vertical stretched brace symbol, at the
appriopriate lowered cell, but don't know how the vertical stretch a
glyph.

What is the best way to code this in ConText? (preferred is to use the
symbol left brace.)

Greetings,

Rob

---

context code now used:

\starttable[s0|cp(.2\textwidth)|cp(.2\textwidth)|cp(.2\textwidth)|cp(.25\textwidth)|]
\NC \NC \VL Variabel\\ kapitaal\\ 10 \VL Arbeidsloon v/d\\
productie-arbeiders\\ 10 \NC \AR
\NC \NC \VL  \NC \NC \AR
\NC \NC \VL  \NC \NC \AR
\NC \VL Nationaal\\ inkomen\\ 30 \VL \VL Winst van de\\ industriële
kapitalist\\ 10 \NC \AR
\NC \VL \VL  \VL \NC \AR
\NC \VL \VL \VL Commerciële\\ winst\\ 3 \NC \AR
\NC Totaal\\ maatschappelijk\\ product\\ 90 \VL \VL Meerwaarde\\ 20 \VL 
Rente\\ 2 \NC \AR
\NC \VL \VL  \VL Grondrente\\ 5 \NC \AR
\NC \VL \NC  \NC  \NC \AR
\NC \VL Vervanging \\ v/h verbruikte \\ constante\\ kapitaal\\ 60 \NC \NC 
\NC \AR
\stoptable

___
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] Inline math in table in combination fails

2013-09-19 Thread Hans Hagen

On 9/19/2013 1:27 AM, Marco Patzer wrote:

Hi,

The following example results in the error “You can't assign a
glue_spec node to a prev field”

\starttext
   \startcombination [2*1]
 {\starttable [|c|]
  \NC \math{1} \VL\NR\HL
  \stoptable}{}
 {\starttable [|c|]
  \NC \math{2} \VL\NR
  \stoptable}{}
   \stopcombination
\stoptext

It works without the combination, without the vertical or horizontal
rule and when no math mode is used. It used to work some time ago,
so I assume it's a bug.


it went unnoticed as works in my experimental branch ... i just forgot 
to copy back a variable initialization


fixed

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] Inline math in table in combination fails

2013-09-18 Thread Marco Patzer
Hi,

The following example results in the error “You can't assign a
glue_spec node to a prev field”

\starttext
  \startcombination [2*1]
{\starttable [|c|]
 \NC \math{1} \VL\NR\HL
 \stoptable}{}
{\starttable [|c|]
 \NC \math{2} \VL\NR
 \stoptable}{}
  \stopcombination
\stoptext

It works without the combination, without the vertical or horizontal
rule and when no math mode is used. It used to work some time ago,
so I assume it's a bug.

Marco


signature.asc
Description: Digital signature
___
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 cell frames

2013-09-12 Thread hwitloc

Is it possible to have different colored table cell border frames?
I tried using the \setuptables[rulecolor=...] but it didn't work.  
Here is a minimal example:

%
\setuptables[rulecolor=red]
\starttext
   \starttable[|l|c|]  
\NC Column \#1 \VL Column \#2 \SR
\DL\DC\DR
\NC City   \VL Prefecture \LR
\stoptable
\stoptext

%


Please advise.
___
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] \startfloattext ... \stopfloattext

2013-09-09 Thread Christian Prim
What is the context way to place text near a table (or another float) in an
enumeration-environment?

I just want to have the text just this right to the table. The second
item 2) should be below the table.

In the (not so) MWE all is fine, but the table is not indented.

When I use \placetable the text is indented, but the second item is placed
near the table on the right. (I could insert a \blank[xycm] but I don't
think it's the way to solve my problem.)

Thanks for all comments

Christian

\starttext
\startitemize[n,packed,joinedup][stopper=)]
\item Abhängigkeit der Beschleunigung von der Wagenmasse $m$:
\blank
$M=$ \hl[5] \unit{kg}
\blank
\starttabletext[left,high,none]{}{
%\placetable[left,high,none]{}{
\starttable[|l|l|]
\HL
\VL $m$ in kg \VL $a$ in \unit{m isquare s} \VL\NR
\HL
\VL \qquad \VL \qquad \VL\AR
\VL \VL \VL\AR
\HL
\VL \VL \VL\AR
\VL \VL \VL\AR
\HL
\VL \VL \VL\AR
\VL \VL \VL\AR
\HL
\stoptable}
Just this text near the table!
\stoptabletext
\item second item ...
\stoptext
___
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] \startfloattext ... \stopfloattext

2013-09-09 Thread Hans Hagen

On 9/9/2013 2:38 PM, Christian Prim wrote:

What is the context way to place text near a table (or another float) in
an enumeration-environment?

I just want to have the text just this right to the table. The
second item 2) should be below the table.

In the (not so) MWE all is fine, but the table is not indented.

When I use \placetable the text is indented, but the second item is
placed near the table on the right. (I could insert a \blank[xycm] but I
don't think it's the way to solve my problem.)

Thanks for all comments

Christian

\starttext
\startitemize[n,packed,joinedup][stopper=)]
\item Abhängigkeit der Beschleunigung von der Wagenmasse $m$:
\blank
$M=$ \hl[5] \unit{kg}
\blank
\starttabletext[left,high,none]{}{
%\placetable[left,high,none]{}{
\starttable[|l|l|]
\HL
\VL $m$ in kg \VL $a$ in \unit{m isquare s} \VL\NR
\HL
\VL \qquad \VL \qquad \VL\AR
\VL \VL \VL\AR
\HL
\VL \VL \VL\AR
\VL \VL \VL\AR
\HL
\VL \VL \VL\AR
\VL \VL \VL\AR
\HL
\stoptable}
Just this text near the table!
\stoptabletext
\item second item ...
\stoptext


one of the solution is to use paired boxes:

\starttext

\definepairedbox
  [mylegend]
  [location={right,top}] % width=10cm

\startitemize[n,packed,joinedup][stopper=)]
\startitem
some introduction text \blank and some more \blank
\startplacemylegend
\startcontent
\starttable[|l|l|]
\HL \VL foo \VL bar \VL \NR \HL
\VL \VL \VL \AR \VL \VL \VL \AR \HL
\VL \VL \VL \AR \VL \VL \VL \AR \HL
\VL \VL \VL \AR \VL \VL \VL \AR \HL
\stoptable
\stopcontent
\startcaption
\input ward
\stopcaption
\stopplacemylegend
\stopitem
\startitem
and even more
\stopitem
\stopitemize

\stoptext

I patched the beta a bit so that for a horizontal variant the hsize is 
calculated automatically.


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
___


Re: [NTG-context] \startfloattext ... \stopfloattext

2013-09-09 Thread Christian Prim
Thanks, Hans

that was exactly what I needed.

Christian


2013/9/9 Hans Hagen pra...@wxs.nl

 On 9/9/2013 2:38 PM, Christian Prim wrote:

 What is the context way to place text near a table (or another float) in
 an enumeration-environment?

 I just want to have the text just this right to the table. The
 second item 2) should be below the table.

 In the (not so) MWE all is fine, but the table is not indented.

 When I use \placetable the text is indented, but the second item is
 placed near the table on the right. (I could insert a \blank[xycm] but I
 don't think it's the way to solve my problem.)

 Thanks for all comments

 Christian

 \starttext
 \startitemize[n,packed,**joinedup][stopper=)]
 \item Abhängigkeit der Beschleunigung von der Wagenmasse $m$:
 \blank
 $M=$ \hl[5] \unit{kg}
 \blank
 \starttabletext[left,high,**none]{}{
 %\placetable[left,high,none]{}**{
 \starttable[|l|l|]
 \HL
 \VL $m$ in kg \VL $a$ in \unit{m isquare s} \VL\NR
 \HL
 \VL \qquad \VL \qquad \VL\AR
 \VL \VL \VL\AR
 \HL
 \VL \VL \VL\AR
 \VL \VL \VL\AR
 \HL
 \VL \VL \VL\AR
 \VL \VL \VL\AR
 \HL
 \stoptable}
 Just this text near the table!
 \stoptabletext
 \item second item ...
 \stoptext


 one of the solution is to use paired boxes:

 \starttext

 \definepairedbox
   [mylegend]
   [location={right,top}] % width=10cm

 \startitemize[n,packed,**joinedup][stopper=)]
 \startitem
 some introduction text \blank and some more \blank
 \startplacemylegend
 \startcontent
 \starttable[|l|l|]
 \HL \VL foo \VL bar \VL \NR \HL

 \VL \VL \VL \AR \VL \VL \VL \AR \HL
 \VL \VL \VL \AR \VL \VL \VL \AR \HL
 \VL \VL \VL \AR \VL \VL \VL \AR \HL
 \stoptable
 \stopcontent
 \startcaption
 \input ward
 \stopcaption
 \stopplacemylegend
 \stopitem
 \startitem
 and even more
 \stopitem
 \stopitemize

 \stoptext

 I patched the beta a bit so that for a horizontal variant the hsize is
 calculated automatically.

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

[NTG-context] [***SPAM***] Re: [***SPAM***] How to reduce vertical spacing after this table

2013-07-08 Thread d.henman

Wolfgang,
   thank you very much, for the solution to the problem I was having.  
   I am surprised tha placelegend was necessary. I thought that simiply
   putting the placefootnotes inside the caption would be sufficient.  

   The solution you provided works well.  Much appreciated.

   

Wolfgang Schuster schuster.wolfg...@gmail.com wrote:
 
 Am 06.07.2013 um 11:09 schrieb hwit...@gmail.com:
 
  
  I'Ve been trying dozens of combinations to try to reduce the vertical space 
  between the a table and the local footer to some items in the table, but 
  have just been running into a wall.
  
  Here is a minimal example.   For my application there is just too much 
  space between the bottom of the table and the footnote.   That is the 
  problem.  Also is there a more elegant way to get the footnote aligned 
  under the table to the left side.  I am using narrower to force it to 
  postion.  This doesn't show up right in the minimal, but it works.
  
  Help in solving this would be greatly appreciated.
  
  %
  
  \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote 
  header symbols
  
  \starttext
  \subject{Subject Name}
 \blank
   \startlocalfootnotes   % [conversion=set fnsym]
   \setupnotation[footnote][numberconversion=fnsym,rule=off] % change 
  footnote symbols
  \midaligned 
   {
   \placetable[here,none][]{}
 {
 \setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
  \starttable[|c|c|c|c|c|c|c|c|c|]
  \HL
  \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
   \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
  \VL$\oplus$  \VL\MR
  \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
  \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
  \HL
  \stoptable 
 }
   }
  \setupnarrower[left=2.5cm]  % to align footnote under the table
  \startnarrower[left]
\placelocalfootnotes[here]
  \stopnarrower
  
\stoplocalfootnotes
  \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes 
  to global 
  
  \stoptext
 
 Slightly modified solution I already wrote three hours ago for another thread 
 regarding a similar question:
 
 \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]
 
 \starttext
 
 \subject{Subject Name}
 
 \startplacetable[location={force,none}]
   \startlocalfootnotes \setupnotation[footnote][numberconversion=fnsym]
   \startplacelegend
   \startcontent
   \starttable[|c|c|c|c|c|c|c|c|c|][bodyfont=10pt]
   \HL
   \VL X-ITEM
   \VL
   \VL $\oplus$\footnote[hanzi]{Traditional 
 Characters}
   \VL
   \VL $\oplus$\note[hanzi]
   \VL
   \VL $\oplus$
   \VL
   \VL $\oplus$
   \VL\MR
   \VL Y-ITEM
   \VL
   \VL $\oplus$
   \VL
   \VL$\oplus$
   \VL 
   \VL $\oplus$
   \VL
   \VL $\oplus$
   \VL\MR
   \HL
   \stoptable 
   \stopcontent
   \startcaption
   \placelocalfootnotes
   \stopcaption
   \stopplacelegend
   \stoplocalfootnotes
 \stopplacetable
 
 \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
 ___
___
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] [***SPAM***] Placement of a table's footnotes

2013-07-06 Thread Wolfgang Schuster

Am 06.07.2013 um 07:40 schrieb d.henman dhen...@gmail.com:

 
 Here is a minimal example of my attempt to get a footnot(s) just below a 
 table.
 
 As it is the footnote is dislayed to the right of the table.
 
 Minimal example: 
 
 %---
 
 \starttext
 
 \midaligned
   {
\startlocalfootnotes   % [conversion=set fnsym]
\setupnotation[footnote][rule=off] % change footnote symbols
 
\starttable[|c|c|c|c|]
   \HL
 \VL col-1 \VL col-2 $\dagger$\footnote[myfootnote]{Re: X} \VL  col-3 \VL 
 col-4 \VL \MR
   \HL
\stoptable
 %\placelocalfootnotes[here]
\placelocalfootnotes[here]
\stoplocalfootnotes
\setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes 
 to global 
   }
 
 \stoptext
 
 %--


\starttext

\startplacetable[location={force,nonumber}]
\startlocalfootnotes
\setupnotation[footnote][numberconversion=set 1]
\startplacelegend
\startcontent
\starttable[|c|c|c|c|]
\HL
\VL col-1 \VL col-2\footnote{Re: X} \VL  col-3 
\VL col-4 \VL \MR
\HL
\stoptable
\stopcontent
\startcaption
\placelocalfootnotes
\stopcaption
\stopplacelegend
\stoplocalfootnotes
\stopplacetable

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


[NTG-context] [***SPAM***] How to reduce vertical spacing after this table

2013-07-06 Thread hwitloc

I'Ve been trying dozens of combinations to try to reduce the vertical space 
between the a table and the local footer to some items in the table, but have 
just been running into a wall.

Here is a minimal example.   For my application there is just too much space 
between the bottom of the table and the footnote.   That is the problem.  Also 
is there a more elegant way to get the footnote aligned under the table to the 
left side.  I am using narrower to force it to postion.  This doesn't show up 
right in the minimal, but it works.

Help in solving this would be greatly appreciated.

%

\defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote header 
symbols

\starttext
\subject{Subject Name}
\blank
  \startlocalfootnotes   % [conversion=set fnsym]
  \setupnotation[footnote][numberconversion=fnsym,rule=off] % change footnote 
symbols
\midaligned 
  {
  \placetable[here,none][]{}
{
\setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
 \starttable[|c|c|c|c|c|c|c|c|c|]
 \HL
 \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
  \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
\VL$\oplus$  \VL\MR
 \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
 \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
 \HL
 \stoptable 
}
  }
\setupnarrower[left=2.5cm]  % to align footnote under the table
\startnarrower[left]
   \placelocalfootnotes[here]
\stopnarrower

   \stoplocalfootnotes
 \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes to 
global 

\stoptext

%
___
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] [***SPAM***] How to reduce vertical spacing after this table

2013-07-06 Thread Wolfgang Schuster

Am 06.07.2013 um 11:09 schrieb hwit...@gmail.com:

 
 I'Ve been trying dozens of combinations to try to reduce the vertical space 
 between the a table and the local footer to some items in the table, but have 
 just been running into a wall.
 
 Here is a minimal example.   For my application there is just too much space 
 between the bottom of the table and the footnote.   That is the problem.  
 Also is there a more elegant way to get the footnote aligned under the table 
 to the left side.  I am using narrower to force it to postion.  This doesn't 
 show up right in the minimal, but it works.
 
 Help in solving this would be greatly appreciated.
 
 %
 
 \defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]  % footnote header 
 symbols
 
 \starttext
 \subject{Subject Name}
\blank
  \startlocalfootnotes   % [conversion=set fnsym]
  \setupnotation[footnote][numberconversion=fnsym,rule=off] % change footnote 
 symbols
 \midaligned 
  {
  \placetable[here,none][]{}
{
\setuptables[bodyfont=10pt,after=\nowhitespace,spaceafter=none]
 \starttable[|c|c|c|c|c|c|c|c|c|]
 \HL
 \VL X-ITEM \VL  \VL$\oplus$ \footnote[hanzi]{Traditional Characters} \VL
  \VL$\oplus$ \note[hanzi]\VL\VL$\oplus$ \VL 
 \VL$\oplus$  \VL\MR
 \VL Y-ITEM\VL  \VL$\oplus$ \VL  \VL$\oplus$ \VL 
 \VL$\oplus$ \VL \VL$\oplus$  \VL\MR
 \HL
 \stoptable 
}
  }
 \setupnarrower[left=2.5cm]% to align footnote under the table
 \startnarrower[left]
   \placelocalfootnotes[here]
 \stopnarrower
 
   \stoplocalfootnotes
 \setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes to 
 global 
 
 \stoptext

Slightly modified solution I already wrote three hours ago for another thread 
regarding a similar question:

\defineconversion[fnsym][\m{\dagger},\m{*},\m{**},\m{***}]

\starttext

\subject{Subject Name}

\startplacetable[location={force,none}]
\startlocalfootnotes \setupnotation[footnote][numberconversion=fnsym]
\startplacelegend
\startcontent
\starttable[|c|c|c|c|c|c|c|c|c|][bodyfont=10pt]
\HL
\VL X-ITEM
\VL
\VL $\oplus$\footnote[hanzi]{Traditional 
Characters}
\VL
\VL $\oplus$\note[hanzi]
\VL
\VL $\oplus$
\VL
\VL $\oplus$
\VL\MR
\VL Y-ITEM
\VL
\VL $\oplus$
\VL
\VL$\oplus$
\VL 
\VL $\oplus$
\VL
\VL $\oplus$
\VL\MR
\HL
\stoptable 
\stopcontent
\startcaption
\placelocalfootnotes
\stopcaption
\stopplacelegend
\stoplocalfootnotes
\stopplacetable

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


[NTG-context] [***SPAM***] Placement of a table's footnotes

2013-07-05 Thread d.henman

Here is a minimal example of my attempt to get a footnot(s) just below a table.

As it is the footnote is dislayed to the right of the table.

Minimal example: 

%---

\starttext

\midaligned
   {
\startlocalfootnotes   % [conversion=set fnsym]
\setupnotation[footnote][rule=off] % change footnote symbols

\starttable[|c|c|c|c|]
   \HL
 \VL col-1 \VL col-2 $\dagger$\footnote[myfootnote]{Re: X} \VL  col-3 \VL 
col-4 \VL \MR
   \HL
\stoptable
%\placelocalfootnotes[here]
\placelocalfootnotes[here]
\stoplocalfootnotes
\setupnotation[footnote][numberconversion=n,rule=on]  % restore footnotes 
to global 
   }

\stoptext

%--

___
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

2013-05-03 Thread Wolfgang Schuster

Am 03.05.2013 um 10:52 schrieb Wolfgang Schuster schuster.wolfg...@gmail.com:

 The space between the columns can be controlled by the i, j or k keywords 
 which accepts a number or a dimension as argument.
 
 %  i  in skip left of column
 %  j  in skip right of column
 %  k  in skip around column

I’m sorry but the keys accept only a number which uses the values of 
\setuptabulate[unit=dimension]

\starttext

\starttabulate[|l|l|]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

\starttabulate[|i1l|l|]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

\starttabulate[|j1l|l|]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

\starttabulate[|k1l|l|]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

\blank[2cm]

\starttabulate[|l|l|]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

\starttabulate[|l|l|][unit=2cm]
\VL Left column \VL Right Column \VL\NR
\stoptabulate

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


Re: [NTG-context] Line break in a cell of a table

2013-04-17 Thread Aditya Mahajan

On Wed, 17 Apr 2013, H. Özoguz wrote:


Good morning together,

I want this:


\starttext

\starttable[|l|l|]

\HL

\NC First Entry \\ (Explanation) \VL Second Entry \AR


(Unrelated, but you are using a wrong syntax. Each row should be:

\NC  \NC ... \NC \AR)


\HL

\stoptable

\stoptext


That is, line break after First Entry, but without leaving the first cell 
(first row, first column). The code does not work, how to?


Use p column instead of l column

\starttable[|p|l|]
...
\stoptable

BTW, I think that it is better to use Natural Table or tabulate instead of 
table environment. For example, you can write:


\startTABLE
\NC First Entry \\ (Explanation) \NC Second Entry \NC \NR
\stopTABLE

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
___

Re: [NTG-context] Finetuning distances in cells

2013-04-17 Thread H. Özoguz

(Sorry, there were typos in the code).
The offset between the top and bottom rule in each cell. Change them to
something drastic like 1cm to see the affect.

\startsetups table:setups
\setupTABLE[align={lohi}, loffset=1pt, boffset=3cm, align=flushleft]
\stopsetups

\starttext
\bTABLE[setups=table:setups]
\bTR
\bTD[nc=3, align=middle, style=italic]
 Natürliche Methoden
\eTD
\eTR
\bTR
\bTD One\eTD
\bTD Two\eTD
\bTD Three  \eTD
\eTR
\eTABLE
\stoptext


Aditya


Thanks, exactly what I wanted!
Is it possible with this table-environment to create a table, where not 
all four horizontal and vertical lines are set? For example like:


\starttext
\starttable[|l|c|l|]

\NC Blub1 \VL Blub2 \VL Blub3 \AR

\HL

\NC Lalala \VL Brumm \VL Boff \AR

\HL

\stoptable
\stoptext


Huseyin



___
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] Finetuning distances in cells

2013-04-17 Thread Aditya Mahajan

On Wed, 17 Apr 2013, H. Özoguz wrote:


(Sorry, there were typos in the code).
The offset between the top and bottom rule in each cell. Change them to
something drastic like 1cm to see the affect.

\startsetups table:setups
\setupTABLE[align={lohi}, loffset=1pt, boffset=3cm, align=flushleft]
\stopsetups

\starttext
\bTABLE[setups=table:setups]
\bTR
\bTD[nc=3, align=middle, style=italic]
 Natürliche Methoden
\eTD
\eTR
\bTR
\bTD One\eTD
\bTD Two\eTD
\bTD Three  \eTD
\eTR
\eTABLE
\stoptext


Aditya


Thanks, exactly what I wanted!
Is it possible with this table-environment to create a table, where not all 
four horizontal and vertical lines are set? For example like:


\starttext
\starttable[|l|c|l|]

\NC Blub1 \VL Blub2 \VL Blub3 \AR

\HL

\NC Lalala \VL Brumm \VL Boff \AR

\HL

\stoptable
\stoptext


\setupTABLE[row][1][frame=off,leftframe=on,rightframe=on]
\setupTABLE[column][first,last][frame=off,topframe=on,bottomframe=on]

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
___

[NTG-context] Center-Aligment in column spans

2013-04-16 Thread H. Özoguz

Hi,

my table is:

\starttext
\starttable[|l|l|l|]

\NC {\bf Methode} \VL {\bf Relevanz} \VL {\bf Bewertung} \SR

\HL \use{3} {\it Natürliche Methoden} \SR

\NC Klevirak \VL 5-6 \VL Toll \AR

\stoptable

\stoptext


I know want the spanning column with the entry Natürliche Methoden to 
be aligned in the center ob the cell. Direct trys with 
\startaligment[center] failed, who knows how?


Thanks
Huseyin

___
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] Center-Aligment in column spans

2013-04-16 Thread Wolfgang Schuster

Am 16.04.2013 um 14:40 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Hi,
 
 my table is:
 
 \starttext
 \starttable[|l|l|l|]
 
 \NC {\bf Methode} \VL {\bf Relevanz} \VL {\bf Bewertung} \SR
 
 \HL \use{3} {\it Natürliche Methoden} \SR
 
 \NC Klevirak \VL 5-6 \VL Toll \AR
 
 \stoptable
 
 \stoptext
 
 
 I know want the spanning column with the entry Natürliche Methoden to be 
 aligned in the center ob the cell. Direct trys with \startaligment[center] 
 failed, who knows how?

\starttext

\starttable[|l|l|l|]
\NC \bf Methode \VL \bf Relevanz \VL \bf Bewertung \NC\AR
\HL
\NC \THREE\JustCenter \it Natürliche Methoden \NC\AR
\HL
\NC Klevirak \VL 5-6 \VL Toll \NC\AR
\stoptable

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


Re: [NTG-context] Center-Aligment in column spans

2013-04-16 Thread H. Özoguz

\starttext

\starttable[|l|l|l|]
\NC \bf Methode \VL \bf Relevanz \VL \bf Bewertung \NC\AR
\HL
\NC \THREE\JustCenter \it Natürliche Methoden \NC\AR
\HL
\NC Klevirak \VL 5-6 \VL Toll \NC\AR
\stoptable

\stoptext

Wolfgang


Thanks! And how to center the complete table on the 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
___


Re: [NTG-context] Center-Aligment in column spans

2013-04-16 Thread Wolfgang Schuster

Am 16.04.2013 um 15:13 schrieb H. Özoguz h.oezo...@mmnetz.de:

 \starttext
 
 \starttable[|l|l|l|]
 \NC \bf Methode \VL \bf Relevanz \VL \bf Bewertung \NC\AR
 \HL
 \NC \THREE\JustCenter \it Natürliche Methoden \NC\AR
 \HL
 \NC Klevirak \VL 5-6 \VL Toll \NC\AR
 \stoptable
 
 \stoptext
 
 Wolfgang
 
 Thanks! And how to center the complete table on the page?

\startplacetable[location={none,force}]
TABLE
\stopplacetable

or

\startlinealignment[middle]
TABLE
\stoplinealignment

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
___


Re: [NTG-context] Center-Aligment in column spans

2013-04-16 Thread H. Özoguz

Am 16.04.2013 17:41, schrieb ntg-context-requ...@ntg.nl:

\starttext

\starttable[|l|l|l|]
\NC \bf Methode \VL \bf Relevanz \VL \bf Bewertung \NC\AR
\HL
\NC \THREE\JustCenter \it Nat?rliche Methoden \NC\AR
\HL
\NC Klevirak \VL 5-6 \VL Toll \NC\AR
\stoptable

\stoptext

Wolfgang


Thanks! And how to center the complete table on the page?


Now I see that \JustCenter does not really center:

\starttext

\starttable[|l|c|l|]

\NC {\bf Column 1} \VL {\bf Column 2} \VL {\bf Column 3} \SR

\HL \THREE\JustCenter \it Natürliche Methoden \SR

\NC First entry \VL short entry \VL looogn entry \AR

\stoptable

\stoptext


You can see, that Natürliche Methoden is not correctly centered. For 
my purpose, it would be indeed not best to center it with respect to the 
complete row of the table, but with respect to the middle-column (second 
one) only. So that Natürliche Methoden is directly centered above 
short entry. Howto?


Thanks.

Huseyin



___
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] Center-Aligment in column spans

2013-04-16 Thread Wolfgang Schuster

Am 16.04.2013 um 18:20 schrieb H. Özoguz h.oezo...@mmnetz.de:

 Am 16.04.2013 17:41, schrieb ntg-context-requ...@ntg.nl:
 \starttext
  
  \starttable[|l|l|l|]
  \NC \bf Methode \VL \bf Relevanz \VL \bf Bewertung \NC\AR
  \HL
  \NC \THREE\JustCenter \it Nat?rliche Methoden \NC\AR
  \HL
  \NC Klevirak \VL 5-6 \VL Toll \NC\AR
  \stoptable
  
  \stoptext
  
  Wolfgang
  
  Thanks! And how to center the complete table on the page?
 
 Now I see that \JustCenter does not really center:
 
 \starttext
 \starttable[|l|c|l|]
 \NC {\bf Column 1} \VL {\bf Column 2} \VL {\bf Column 3} \SR
 \HL \THREE\JustCenter \it Natürliche Methoden \SR
 \NC First entry \VL short entry \VL looogn entry \AR
 \stoptable
 \stoptext
 
 You can see, that Natürliche Methoden is not correctly centered. For my 
 purpose, it would be indeed not best to center it with respect to the 
 complete row of the table, but with respect to the middle-column (second one) 
 only. So that Natürliche Methoden is directly centered above short entry. 
 Howto?

The text isn’t centered in your example because you always miss tags.

1. You forgot the \NC before \AR and \SR.

2. You forgot the \NC at the begin of the second row.

3. You don’t need braces around \bf because style change are local to cells.

\starttext
\starttable[|l|c|l|]
\NC \bf Column 1 \VL \bf Column 2 \VL \bf Column 3 \NC\AR
\HL
\NC \THREE\JustCenter \it Natürliche Methoden \NC\AR
\NC First entry \VL short entry \VL looogn entry \NC\AR
\stoptable
\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
___

[NTG-context] Line break in a cell of a table

2013-04-16 Thread H. Özoguz

Good morning together,

I want this:


\starttext

\starttable[|l|l|]

\HL

\NC First Entry \\ (Explanation) \VL Second Entry \AR

\HL

\stoptable

\stoptext


That is, line break after First Entry, but without leaving the first 
cell (first row, first column). The code does not work, how to?



Thanks.
Huseyin


___
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] options of \setupnotation and \setupnote

2013-04-15 Thread Hans Hagen

On 4/15/2013 4:30 PM, Marco Patzer wrote:

On 2013–04–15 Hans Hagen wrote:


@Hans: The module documentation fails to build for this module.

   mtxrun --script modules --process $(mtxrun core-sys.mkiv)


mtxrun --script modules --process auto:core-sys.mkiv


Thanks, I didn't know that one.


weird ... works here


Sorry, copy-paste error on my side (as Wolfgang already noticed).
It's strc-not.mkvi that fails, not core-sys.mkiv.


a more mkiv-ishc example is:

\startlocalnotes[footnote]
  \placetable
{Some Table}
\placeontopofeachother
  {\starttable[|l|r|]
   \HL
   \VL Nota\footnote{Bene} \VL Bene\footnote{Nota} \VL\SR
   \VL Bene\footnote{Nota} \VL Nota\footnote{Bene} \VL\SR
   \HL
   \stoptable}

{\setupnotation[footnote][alternative={serried},distance=.5em,after=\hskip1em]%
   \placelocalnotes[footnote]}
\stoplocalnotes




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


Re: [NTG-context] Latest beta breaks LuajitTeX

2013-04-03 Thread luigi scarso
hm I will see asap

On Wed, Apr 3, 2013 at 12:46 PM, Marco Patzer home...@lavabit.com wrote:
 Hi,

 the latest beta throws:

 mtx-context | redirect texlua - luajittex: luajittex --luaonly 
 /tmp/luajitbug/newbeta/tex/texmf-linux-64/bin/mtxrun --script context --jit 
 t --redirected/tmp/luajitbug/newbeta/tex/texmf-linux-64/bin/mtxrun:15230: 
 attempt to index field 'searchers' (a nil value)

 Example:

 \starttext
   Foobar
 \stoptext


 Marco

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



-- 
luigi
___
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] to pass an argument in a macro

2012-12-22 Thread Roland Thiers
Bonjour,
I am new in ConTeXt. I love its features. I need some (or a lot of) help.
I tried to get a macro which compute some values for a math function. With help
from the wiki ConTeXt Garden and some time I could do that 
- write my function userdata.f
- write another function to put the values in a table : userdata.tabf
- put both of them in a file /Users/rolandt/context/mesfonctionsluatex.lua
- In a file.tex, I use that macro : 
\def\tabf#1#2%
{\startluacode
dofile(/Users/rolandt/context/mesfonctionsluatex.lua)
userdata.tabf(#1,#2)
\stopluacode}


Here are the functions:

-- fonction cube
-- on utilise l'espace de nom userdata
userdata=userdata or {}

function userdata.f(x)
   context(x*x*x)
end

-- fonction tabf
-- which makes a table , compute  6 values, b=first x, c = step

userdata=userdata or {}

function userdata.tabf(b,c)
 context.starttable{*{7}{|l}|}
local b=b
local c=c
context(\\HL)
context(\\VL x )  for i=1,6 do context(\\NC .. b+(i-1)*c) end
context(\\VL..\\AR)
context(\\HL)
context(\\VL f(x) ) for i=1,6 do context(\\NC)
context(userdata.f(b+(i-1)*c)) end 
context(\\VL..\\LR)
context(\\HL)
context.stoptable()
end

I am sure it could be much better but it works !
Evidently I need a third argument to be able to choose how many values compute.
I failed completely (I don't understand how arguments are passed).
I tried things like : context.starttable{*{%s}{|l}|,a} but ... fatal error :)
I would appreciate some help or  what to read to improve understanding that kind
of things.
Best regards,
Roland



___
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] to pass an argument in a macro

2012-12-22 Thread Wolfgang Schuster

Am 23.12.2012 um 02:58 schrieb Roland Thiers roland.thi...@gmail.com:

 Bonjour,
 I am new in ConTeXt. I love its features. I need some (or a lot of) help.
 I tried to get a macro which compute some values for a math function. With 
 help
 from the wiki ConTeXt Garden and some time I could do that 
 - write my function userdata.f
 - write another function to put the values in a table : userdata.tabf
 - put both of them in a file /Users/rolandt/context/mesfonctionsluatex.lua
 - In a file.tex, I use that macro : 
 \def\tabf#1#2%
 {\startluacode
 dofile(/Users/rolandt/context/mesfonctionsluatex.lua)
 userdata.tabf(#1,#2)
 \stopluacode}

When you Lua code is in the same folder as the TeX file you can use
\ctxloadluafile{myfile} to load the Lua file.

 Here are the functions:
 
 -- fonction cube
 -- on utilise l'espace de nom userdata
 userdata=userdata or {}
 
 function userdata.f(x)
   context(x*x*x)
 end
 
 -- fonction tabf
 -- which makes a table , compute  6 values, b=first x, c = step
 
 userdata=userdata or {}
 
 function userdata.tabf(b,c)
 context.starttable{*{7}{|l}|}
 local b=b
 local c=c
 context(\\HL)
 context(\\VL x )  for i=1,6 do context(\\NC .. b+(i-1)*c) end
 context(\\VL..\\AR)
 context(\\HL)
 context(\\VL f(x) ) for i=1,6 do context(\\NC)
 context(userdata.f(b+(i-1)*c)) end 
 context(\\VL..\\LR)
 context(\\HL)
 context.stoptable()
 end

\startluacode

userdata = userdata   or {}
userdata.roland = userdata.roland or {}

local roland = userdata.roland

function roland.f(x)
context(x*x*x)
end

function roland.table(min,max,step)
local min  = tonumber(min)
local max  = tonumber(max)
local step = tonumber(step)
context.starttable({string.format(|*{%d}{l|},max-min+2)})
context.HL()
context.VL()
context(x)
for i=min,max do
context.NC()
context(min+(i-1)*step)
end
context.VL()
context.FR()
context.HL()
context.VL()
context(f(x))
for i=min,max do
context.NC()
roland.f(min+(i-1)*step)
end 
context.VL()
context.AR()
context.HL()
context.stoptable()
end

\stopluacode

\define[3]\TableFuntion
  {\ctxlua{userdata.roland.table(#1,#2,#3)}}

\starttext 
\TableFuntion{1}{6}{1}
\TableFuntion{2}{7}{1}
\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
___


Re: [NTG-context] making tables with lua

2012-10-17 Thread Procházka Lukáš Ing . - Pontex s . r . o .

Hello,

my experience is that the best way is to create the table first, then to call 
Lua function to typeset the table.

You may choose whether the table will be typeset with 'tabulate' family 
functions or 'TABLE' family; I may recommend you the latter as it gives you 
much more control of the final look than the former; 'TABLE' is much better 
anyway.

Once you have such functions prepared, you just select to type:

printTabulate(mytab) -- via 'tabulate'

or

printTABLE(mytab) -- via 'TABLE'

If you insist on 'tabulate' family, you could use the following snippet for 
your start:


\starttext
  \startluacode
local tab = {{1,2},{3,4}}

printTabulate = function(tab)
  context.starttabulate{| .. string.rep(c|, #tab[1])}
context.HL()
for _, r in ipairs(tab) do
  for _, c in ipairs(r) do
context.VL()
context(c)
  end
  context.VL()
  context.NR()
  context.HL()
end
  context.stoptabulate()
end

printTabulate(tab)
  \stopluacode
\stoptext


You can write a similar function(s) to typeset via 'TABLE'.

Best regards,

Lukas


On Wed, 17 Oct 2012 03:13:39 +0200, Jeong Dal hak...@me.com wrote:


Dear all,

I used code which generates the table as following:

\startluacode
local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL
context.starttabulate { |c|c|c|c|c|c|c|c|c|c| }
HL()
for i=1, 6, 1 do
for j=1,10 ,1 do
k= i % 3
if k==1 then
VL() context(10*(i - k)/3+j)
else
VL()
end
end
VL()
NR()
if k==0 then
HL()
end
end
context.stoptabulate()
\stopluacode

But it has a fixed column definition as |c|c|c|c|c|c|c|c|c|c| and the number 
of columns.
I wonder it is possible to use the variable for j to control the number of 
columns and the column setting.
Of course, I may put similar codes  which are different only in the number of 
columns and column settings when I need a table.
But I have many similar tables whose number of columns are different only.
If such a method is possible, I'd like to put such a code in 
\startbuffer…\stopbudffer and call it to generate tables of various number of 
columns given at each time.
I also don't know whether it is possible to convey a number from ConTeXt to the 
variable in Lua code.

I write this email because I saw a hope in recent discussion Re: Fwd: Need help 
with \definetabulate which has a method to vary the column setting.

\definetabulate
[whatever]
[|l|r|]

\definetabulate
[whatever][else]
[|l|c|r|]


It may be a lazy man's question with no need for others.

Thank you for reading.

Best regards,

Dalyoung



--
Ing. Lukáš Procházka [mailto:l...@pontex.cz]
Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

t-Tabulate.mkiv
Description: Binary data


t-Tabulate.pdf
Description: Adobe PDF document
___
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] making tables with lua

2012-10-17 Thread Hans Hagen
On 17-10-2012 03:13, Jeong Dal wrote:
 Dear all,
 
 I used code which generates the table as following:
 
 \startluacode
 local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL
 context.starttabulate { |c|c|c|c|c|c|c|c|c|c| }
 HL()
 for i=1, 6, 1 do
   for j=1,10 ,1 do
   k= i % 3
   if k==1 then
   VL() context(10*(i - k)/3+j)
   else
   VL()
   end
   end
   VL()
   NR()
   if k==0 then
   HL()
   end
 end
 context.stoptabulate()
 \stopluacode
 
 But it has a fixed column definition as |c|c|c|c|c|c|c|c|c|c| and the 
 number of columns.


context.starttabulate { string.rep(|c,10+1) }


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


Re: [NTG-context] making tables with lua

2012-10-17 Thread Jeong Dal
Dear Proch?zka Luk?? Ing and Hans,

Thank you for the reply.

It works fine.

I modify your code to write a matrix and it also works too.

\startformula
\startluacode
local NC, NR = context.NC, context.NR
local t = {{1,0,3,4},{0,2,-2,5},{0,0,1,2}}
context.startmatrix() --{left={\left (\,},right={\,\right)}})
for _, r in ipairs(t) do
for _, c in ipairs(r) do
NC()
context(c)
end
NR()
end
context.stopmatrix()
\stopluacode
\stopformula

But I couldn't put ( ) before and after matrix.
If I use
context.startmatrix({left={\left (\,},right={\,\right)}})
then it wrote left… as text before the matrix.

How to enclose matrix with (  )?

Thank you again.

Best regards,

Dalyoung




  4. Re: making tables with lua
 (Proch?zka Luk?? Ing. - Pontex s. r. o.)
 
 
 Once you have such functions prepared, you just select to type:
 
 printTabulate(mytab) -- via 'tabulate'
 
 or
 
 printTABLE(mytab) -- via 'TABLE'
 
 If you insist on 'tabulate' family, you could use the following snippet for 
 your start:
 
 
 \starttext
  \startluacode
local tab = {{1,2},{3,4}}
 
printTabulate = function(tab)
  context.starttabulate{| .. string.rep(c|, #tab[1])}
context.HL()
for _, r in ipairs(tab) do
  for _, c in ipairs(r) do
context.VL()
context(c)
  end
  context.VL()
  context.NR()
  context.HL()
end
  context.stoptabulate()
end
 
printTabulate(tab)
  \stopluacode
 \stoptext
 
 
 You can write a similar function(s) to typeset via 'TABLE'.
 
 Best regards,
 
 Lukas
 
 
 On Wed, 17 Oct 2012 03:13:39 +0200, Jeong Dal hak...@me.com wrote:
 
 Dear all,
 
 I used code which generates the table as following:
 
 \startluacode
 local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL
 context.starttabulate { |c|c|c|c|c|c|c|c|c|c| }
 HL()
 for i=1, 6, 1 do
  for j=1,10 ,1 do
  k= i % 3
  if k==1 then
  VL() context(10*(i - k)/3+j)
  else
  VL()
  end
  end
  VL()
  NR()
  if k==0 then
  HL()
  end
 end
 context.stoptabulate()
 \stopluacode
 
 But it has a fixed column definition as |c|c|c|c|c|c|c|c|c|c| and the 
 number of columns.
 I wonder it is possible to use the variable for j to control the number of 
 columns and the column setting.
 Of course, I may put similar codes  which are different only in the number 
 of columns and column settings when I need a table.
 But I have many similar tables whose number of columns are different only.
 If such a method is possible, I'd like to put such a code in 
 \startbuffer?\stopbudffer and call it to generate tables of various number 
 of columns given at each time.
 I also don't know whether it is possible to convey a number from ConTeXt to 
 the variable in Lua code.
 
 I write this email because I saw a hope in recent discussion Re: Fwd: Need 
 help with \definetabulate which has a method to vary the column setting.
 
 \definetabulate
 [whatever]
 [|l|r|]
 
 \definetabulate
 [whatever][else]
 [|l|c|r|]
 
 
 It may be a lazy man's question with no need for others.
 
 Thank you for reading.
 
 Best regards,
 
 Dalyoung
 
 
 -- 
 Ing. Luk?? Proch?zka [mailto:l...@pontex.cz]
 Pontex s. r. o.  [mailto:pon...@pontex.cz] [http://www.pontex.cz]
 Bezov? 1658
 147 14 Praha 4
 
 Tel: +420 244 062 238
 Fax: +420 244 461 038
 -- next part --
 A non-text attachment was scrubbed...
 Name: t-Tabulate.mkiv
 Type: application/octet-stream
 Size: 496 bytes
 Desc: not available
 URL: 
 http://www.ntg.nl/pipermail/ntg-context/attachments/20121017/d9e8158e/attachment-0001.obj
 -- next part --
 A non-text attachment was scrubbed...
 Name: t-Tabulate.pdf
 Type: application/pdf
 Size: 5121 bytes
 Desc: not available
 URL: 
 http://www.ntg.nl/pipermail/ntg-context/attachments/20121017/d9e8158e/attachment-0001.pdf
 
 --
 
 Message: 5
 Date: Wed, 17 Oct 2012 08:55:01 +0200
 From: luigi scarso luigi.sca...@gmail.com
 To: mailing list for ConTeXt users ntg-context@ntg.nl
 Subject: Re: [NTG-context] ConTeXt unofficial test suite stub
 Message-ID:
   CAG5iGsB6f+sEzwu6O_p=+TnDzdwFoq4Y3=69z6c5evbt5_p...@mail.gmail.com
 Content-Type: text/plain; charset=utf-8
 
 On Wed, Oct 17, 2012 at 8:44 AM, Marco Pessotto melmo...@gmail.com wrote:
 
 Aditya Mahajan adit...@umich.edu writes:
 
 It may be worthwhile to merge the two repos.
 
 I'm on my way. I'll keep you posted.
 
 
 Can you use graphicsmagick ?
 
 
 -- 
 luigi
 -- next part --
 An HTML attachment was scrubbed...
 URL: 
 http://www.ntg.nl/pipermail/ntg-context/attachments/20121017/a99aa46a/attachment.html
 
 --
 
 ___
 If your question is of interest to others as well, please add an entry to the 
 Wiki

[NTG-context] making tables with lua

2012-10-16 Thread Jeong Dal
Dear all,

I used code which generates the table as following:

\startluacode
local NC, NR, HL, VL = context.NC, context.NR, context.HL, context.VL
context.starttabulate { |c|c|c|c|c|c|c|c|c|c| }
HL()
for i=1, 6, 1 do
for j=1,10 ,1 do
k= i % 3
if k==1 then
VL() context(10*(i - k)/3+j)
else
VL()
end
end
VL()
NR()
if k==0 then
HL()
end
end
context.stoptabulate()
\stopluacode

But it has a fixed column definition as |c|c|c|c|c|c|c|c|c|c| and the number 
of columns.
I wonder it is possible to use the variable for j to control the number of 
columns and the column setting.
Of course, I may put similar codes  which are different only in the number of 
columns and column settings when I need a table.
But I have many similar tables whose number of columns are different only.
If such a method is possible, I'd like to put such a code in 
\startbuffer…\stopbudffer and call it to generate tables of various number of 
columns given at each time. 
I also don't know whether it is possible to convey a number from ConTeXt to the 
variable in Lua code.

I write this email because I saw a hope in recent discussion Re: Fwd: Need 
help with \definetabulate which has a method to vary the column setting.

\definetabulate
[whatever]
[|l|r|]

\definetabulate
[whatever][else]
[|l|c|r|]


It may be a lazy man's question with no need for others.

Thank you for reading.

Best regards,

Dalyoung

___
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] How to draw a red frame of a row in a matrix?

2012-07-25 Thread Wolfgang Schuster

Am 25.07.2012 um 11:43 schrieb Hans Hagen:

 On 25-7-2012 11:20, dalyoung wrote:
 Dear all,
 
 I made a matrix as follows and I'd like to draw a red frame over the i-th 
 row in a matrix.
 
 \startformula
 \startmatrix[left={\left (\,},right={\,\right)}]
 \NC a_{11} \NC a_{12} \NC \dots \NC a_{1n} \NR
 \NC \vdots \NC \vdots \NC \vdots \NC \vdots \NR
 \NC   a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \NR
 \NC \vdots \NC \vdots \NC \ddots \NC \vdots \NR
 \NC   a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NR
 \stopmatrix
 \stopformula
 
 But \frame or \inframe is not working inside matrix.
 Is there a way to do that?
 
 maybe \mframed


He’s looking for \HL and \VL commands like the table below has to frame a 
complete row in the matrix.

\starttext

\startformula
\startmatrix[left={\left(\,},right={\,\right)}]
\NC a_{11} \NC a_{12} \NC \cdots \NC a_{1n} \NR
\NC \vdots \NC \vdots \NC \vdots \NC \vdots \NR
\noalign{\hrule}
\NC a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \NR
\noalign{\hrule}
\NC \vdots \NC \vdots \NC \ddots \NC \vdots \NR
\NC a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NR
\stopmatrix
\stopformula

\starttable[|*{4}{b{\strut}Mc|}]
\NC a_{11} \NC a_{12} \NC \cdots \NC a_{1n} \NC\NR
\NC \vdots \NC \vdots \NC \vdots \NC \vdots \NC\NR
\HL
\VL a_{i1} \NC a_{i2} \NC \cdots \NC a_{in} \VL\NR
\HL
\NC \vdots \NC \vdots \NC \ddots \NC \vdots \NC\NR
\NC a_{m1} \NC a_{m2} \NC \cdots \NC a_{mn} \NC\NR
\stoptable

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


[NTG-context] about \startformula\startalign error

2012-07-22 Thread dalyoung
Dear all,

In the following sample file, an error occurs in \startformula\startalign ... 
\stopalign\stopformula.
The similar error occurs if I use \startformula\startmathcases.

but \startmatrix works well. 

Did I do something wrong? 

Thank you for reading.

Best regards,

Dalyoung

%%
\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\FR
\HL
\NC $y$ \VL \startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula \VL \VL \NC\LR
\HL
\stoptable
\stoptext


Log file

mtx-context | run 1: luatex 
--fmt=/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en
 --jobname=test1 
--lua=/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/formats/cont-en.lui
 --no-parse-first-line --c:currentrun=1 --c:input=./test1.tex --c:kindofrun=1 
cont-yes.mkiv
This is LuaTeX, Version beta-0.70.2-2012052309 (TeX Live 2012)
...
...
fonts  fallback modern rm 12pt is loaded
! Missing } inserted.
system  tex  error on line 16 in file test1.tex: Missing ...
6 \starttable[|c|c|w4cm|w4cm|]
7 \HL
8 \NC A \VL B \VL C \VL D \NC\SR
9 \HL
10 \NC $x$ \VL \startmatrix
11 \NC x' = \NC \NR
12 \NC y' = \NC \NR
13 \stopmatrix \VL \VL \NC\FR
14 \HL
15 \NC $y$ \VL \startformula\startalign
16  \NC x' = \NC \NR
17 \NC y' = \NC \NR
18 \stopalign\stopformula \VL \VL \NC\LR
19 \HL
20 \stoptable

inserted text
}
to be read again
\halign
\math_both_eqalign_no_aligned ...fi \fi #1\halign
\ifcase \eqalignmode \or t...
to be read again
\NC
l.16 \NC
x' = \NC \NR
? x
mkiv lua stats  used config file   
___
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] about \startformula\startalign error

2012-07-22 Thread Aditya Mahajan
On 2012-07-22, at 8:21 AM, dalyoung hak...@me.com wrote:

 Dear all,
 
 In the following sample file, an error occurs in \startformula\startalign ... 
 \stopalign\stopformula.
 The similar error occurs if I use \startformula\startmathcases.
 
 but \startmatrix works well. 
 
 Did I do something wrong? 
 
 Thank you for reading.
 
 Best regards,
 
 Dalyoung
 
 %%
 \starttext
 \starttable[|c|c|w4cm|w4cm|]
 \HL
 \NC A \VL B \VL C \VL D \NC\SR
 \HL
 \NC $x$ \VL \startmatrix
 \NC x' = \NC \NR
 \NC y' = \NC \NR
 \stopmatrix \VL \VL \NC\FR
 \HL
 \NC $y$ \VL \startformula\startalign
 \NC x' = \NC \NR
 \NC y' = \NC \NR
 \stopalign\stopformula \VL \VL \NC\LR
 \HL
 \stoptable
 \stoptext
 %%%

\startformula must occur inside a vbox. So, use a matrix environment as you are 
doing, or wrap the formula inside a \framed[align=normal].

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
___


Re: [NTG-context] about \startformula\startalign error

2012-07-22 Thread dalyoung
Dear Aditya,


 \startformula must occur inside a vbox. So, use a matrix environment as you 
 are doing, or wrap the formula inside a \framed[align=normal].
 

Thank you for your solution.

\framed[frame=off,align=normal]{\startformula\startalign ... 
\stopalign\stopformula}

is working.

I have two more questions.

1. In the output of the following code, 'x' in the first column is vertically 
centered, but matrix in the second column is not(located at top). What option 
can solve this?

\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\SR
\HL
\stoptable


2. In the output of the following code, the matrix in the second column is 
vertically centered, but 'x' in the first column is located at the bottom.

\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $y$ \VL {\framed[frame=off, align=normal]{\startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula}} \VL \VL \NC\LR
\HL
\stoptable
\stoptext

Both of them are good for compiling, but need a slight touch.

Would you please tell me how to set all columns vertical centered?

Best regards,

Dalyoung
___
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] about \startformula\startalign error

2012-07-22 Thread Aditya Mahajan

On Mon, 23 Jul 2012, dalyoung wrote:


I have two more questions.

1. In the output of the following code, 'x' in the first column is 
vertically centered, but matrix in the second column is not(located at 
top). What option can solve this?


Normally matrices are centered on the math axis (and their location can be 
controlled by location=(low|lohi|high) keys, but for some reason that is 
not working in a table.



\starttable[|c|c|w4cm|w4cm|]


The normal syntax is w(4cm) ...


\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $x$ \VL \startmatrix
\NC x' = \NC \NR
.\NC y' = \NC \NR
\stopmatrix \VL \VL \NC\SR


The matrix should be in math mode $\startmatrix ... \stopmatrix$


\HL
\stoptable


2. In the output of the following code, the matrix in the second column is 
vertically centered, but 'x' in the first column is located at the bottom.

\starttext
\starttable[|c|c|w4cm|w4cm|]
\HL
\NC A \VL B \VL C \VL D \NC\SR
\HL
\NC $y$ \VL {\framed[frame=off, align=normal]{\startformula\startalign
\NC x' = \NC \NR
\NC y' = \NC \NR
\stopalign\stopformula}} \VL \VL \NC\LR
\HL
\stoptable
\stoptext

Both of them are good for compiling, but need a slight touch.


Use the \frame aligning options (better to hide this in a macro):

\starttext
\starttable[|c|c|]
\HL
\NC A \VL B \VL \SR
\HL
\NC $x$ \VL \framed[frame=no,height=fit, strut=no, 
location=lohi,align=normal]{

\setupformula[spacebefore=,spaceafter=]
\startformula \startalign
\NC x' \NR
\NC y' \NR
\stopalign \stopformula} \VL \SR
\HL
\stoptable
\stoptext

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
___


[NTG-context] report of strange(?) output depending on the location of \StartSteps ... \StopSteps

2012-07-21 Thread dalyoung
Dear all,

This is a small thing which is OK to be ignored.
Please pardon me if it is a noise for you.

I used to use \usemodule[pre60] for step by step output for presentation.
Some time ago, I faced a strange pdf output.

For example, I want two steps inside the second item. So, I use the following:

\usemodule[pre60]
...
...

Test of \tex{StartSteps}.
\blank
\startitemize
\item first item
\item second item
\StartSteps
\startitemize
\item flush 1 \FlushStep
\item flush 2 \FlushStep
\stopitemize
\StopSteps
\item third item
\stopitemize

\page
\starttable[|c|c|c|c|c|c|]
\HL
\VL \VL A \VL B \VL C \VL D \VL E \VL\FR
\HL
\VL \VL 2\VL 1\VL 3\VL 2\VL 2\VL\SR
\HL
\stoptable
...

I got correct steps flush1 and flush 2, but the table after the steps was 
disappeared.(just white page)
If I change the order of table and items, both are displayed and worked well. I 
have tested in many ways to know why the table disappeared after \StartStep. I 
found that it is neither the order of the code nor the some other settings.

It is the level of the location of \StartSteps.
If I put \StartSteps in the first level of itemization, there is no problem. Of 
course, I have to put more \FlushStep like

Test of \tex{StartSteps}.
\blank
\StartSteps
\startitemize
\item first item
\item second item \FlushStep
\StartSteps
\startitemize
\item flush 1 \FlushStep
\item flush 2 \FlushStep
\stopitemize
\StopSteps
\item third item \FlushStep
\stopitemize

\page
\starttable[|c|c|c|c|c|c|]
\HL
\VL \VL A \VL B \VL C \VL D \VL E \VL\FR
\HL
\VL \VL 2\VL 1\VL 3\VL 2\VL 2\VL\SR
\HL
\stoptable

I report this just for information which may be already known to Hans, 
Wolfgang, et al.  

One appreciation is that \StartSteps ... \StopSteps works well with 
Simpleslides module nicely!

Thanks and have a nice weekend.

Best regards,

Dalyoung

___
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] Tables still broken?

2012-07-06 Thread Meer, H. van der
Are tables still broken? If so, any pointers to when it will be repaired?
The table did typeset in the past without problems.

I get an error with this recent version of ConTeXt:

ConTeXt  ver: 2012.07.04 23:48 MKIV  fmt: 2012.7.6  int: english/english

! Use of \secondstagestarttable doesn't match its definition.

system   tex  error on line 5 in file Tabellen/tabel-engels.tex: Use 
of  ...

 1 % Part of Practicumboek Cryptografie - ConTeXt version
 2 %
 3 \placetable{}{\smallsize\tt
 4 \starttable[s1|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|r|]
 5   \HL
 6 \VL \VL ~-A\NC ~-B\NC ~-C\NC ~-D\NC ~-E\NC ~-F\NC ~-G\NC ~-H\NC ~-I\NC 
~-J\NC ~-K\NC ~-L\NC ~-M\NC
..
\dostarttable ...enotes \firststagestarttable \fi 
  \fi [#1]
\syst_helpers_double_empty_one_spaced ...1[{#2}][]
   
to be read again 
   \HL 
l.5 \HL

Hans van der Meer



___
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] \starttabulate inside a \placelegend is not working

2011-12-20 Thread Charles

Hi,

I would like to put a table (\starttabulate ... \stoptabulate) inside a 
\placelegend in order to have local footnotes. The compilation is OK for 
\starttable but failing with \starttabulate.


Some help please?

Thanks

Charles


\starttext

\startlocalfootnotes
\placetable{A table with footnotes.}
  \placelegend
{\starttable[|l|r|]
  \HL
  \VL One\footnote{First} \VL Two\footnote{Second} \VL\FR
  \VL Three\footnote{Third} \VL Four\footnote{Fourth} \VL\LR
  \HL
  \stoptable}
{\placelocalfootnotes}
\stoplocalfootnotes

\startlocalfootnotes
\placetable{A table with footnotes.}
  \placelegend
{\starttabulate[|l|c|c|c|]
  \HL
  \NC \NC One \NC Two \NC Three \NC\NR
  \HL
  \NC Ten \NC \checkmark\footnote{First} \NC \NC \NC \NC\NR
  \NC Twenty \NC \checkmark \NC \checkmark\footnote{Second} \NC \NC 
\NC\NR

  \HL
  \stoptabulate}
{\placelocalfootnotes}
\stoplocalfootnotes

\stoptext
___
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] float names and lists

2011-11-24 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Consider the following:

=
\definefloat[tablecw]   
% \setupfloat[tablecw]  
\setupcaption[tablecw][prefix=Table]

\starttext
  \setupfloats[location=middle]
  \placetable
  [here]
  [tablecw:test]{A Caption.}
  {\starttable[|c|c|c|]
  \HL
  \VL Test \VL  Test  \VL Test  \VL\FR
  \HL
  \stoptable}

  \setupfloats[location=middle]
  \placetablecw
  [here]
  [tablecw:test]{A Caption.}
  {\starttable[|c|c|c|]
  \HL
  \VL Test \VL  Test  \VL Test  \VL\FR
  \HL
  \stoptable}

  \placelistoftables

  % \placelistoftablescws
 \stoptext
=

Two challenges:

1. How do I change the prefix that heads the caption of a table? For  
example, \definefloat[tablecw] produces


Tablecw 1

I want to keep the command name of the float but change the prefix. I  
tried things like


\setupcaption[tablecw][prefix=My Table]
\setupcaption[tablecw][name=My Table]

but no success.

2. \placelistoftablescws produces an undefined control sequence: What am I  
missing here?


Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] Double height rows using natural tables?

2011-11-24 Thread Pavneet Arora
I have tried various combinations and have so far been unsuccessful in getting a 
row of double height using natural tables.  I am following up and enclosing a 
minimal example, along with the a previous incarnation using TABLE, which does 
give me the intended layout.


Any suggestions on how to do the same using natural tables would be greatly 
appreciated.


advTHANKSance.


--
-
- Pavneet Arora

\setuppapersize[legal]
\setuplayout[header=0in,footer=0in,topspace=0.75in,backspace=1.25in]
\setuppagenumbering[location=]
\setupbodyfont[11pt]
\starttext
%\showlayout[pt,in]
%\showbodyfont
\define\unused{
{\inframed
 [foregroundstyle=type,
  background=color,
  backgroundcolor=gray,
  frame=off]
{\tt [Unused]}}
}
\def\spare{\dosingleempty\doSpare}
\def\doSpare[#1]{%
	\iffirstargument
		{\tt [#1]}
	\else
		{\tt [15A]}
	\fi
	{\tt [Spare]}
}
\startalignment[center]
{\tfb Electrical Room Electrical Panel}
\blank
{\tfa\sc Electrical Panel}
\blank
{\tfa Panel Model: Siemens}
\blank
{\tfb \tt [DRAFT---To Be Verified]}
\blank[2*big]
\stopalignment

\setupTABLE[frame=off]
\setupTABLE[r][each][height=0.35in]
\setupTABLE[c][1,3][align={center,lohi},width=0.75in]
\setupTABLE[c][2,4][align={flushleft,lohi},width=2.25in,loffset=0.1in]
\setupTABLE[r][4,6][topframe=on]
\setupTABLE[r][1][topframe=on,bottomframe=on]
\setupTABLE[r][last][bottomframe=on]

\midaligned{
\bTABLE
\bTABLEbody
	\bTR
		\bTD Circuit \eTD
		\bTD Description \eTD
		\bTD Circuit \eTD
		\bTD Description \eTD
	\eTR
%	\bTR
%		\bTD [nr=2] 5 \eTD \bTD [nr=2] Bedrooms 2+3 Arc Fault Plugs \eTD
%		\bTD [nr=2] 6 \eTD \bTD [nr=2] Roof Heating Cable \eTD
%	\eTR
	\bTR
		\bTD [nr=2] 7 \eTD \bTD [nr=2] Bedroom 4 Arc Fault Plug \eTD
		\bTD [nr=2] 8 \eTD \bTD [nr=2] \unused \eTD
	\eTR
\eTABLEbody
\eTABLE
}
\stoptext


test.pdf
Description: Adobe PDF document
\setuppapersize[letter]
\setuplayout[header=0in,footer=0in,topspace=0.75in,backspace=1.25in]
\setuppagenumbering[location=]
\switchtobodyfont[11pt]
\starttext
\startalignment[center]
\placetable[here][]{none}
\starttable[|cw(0.75in)|lw(1.5in)|cw(0.75in)|lw(1.5in)|]
\HL
\NC {\sc Circuit} \NC {\sc Description} \VL {\sc Circuit} \NC {\sc Description} \NC\SR
\HL
\NC \LOW{7} \NC \LOW{Bedrooms 2+3 Arc Fault Plug} \VL \LOW{8} \NC \LOW{\tt Unused} \NC\FR
\DC \DC \VL \NC \NC\MR
\HL
\NC \LOW{9} \NC \LOW{Bedroom 4 Arc Fault Plug} \VL \LOW{10} \NC \LOW{\tt Spare} \NC\FR
\DC \DC \VL \NC \NC\MR
\HL
\stoptable
\stoptext


test-.pdf
Description: Adobe PDF document
___
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] float names and lists

2011-11-24 Thread Idris Samawi Hamid ادريس سماوي حامد
On Thu, 24 Nov 2011 13:32:04 -0700, Idris Samawi Hamid ادريس   سماوي حامد isha...@colostate.edu wrote: 2. \placelistoftablescws produces an undefined control sequence: What am   I missing here?Experimenting from here, it seems there has been a protocol change:Given \definefloatwe used to have\placelistoffloatswith 's' at the end. Now it's just\placelistoffloatSo the following now works:\definefloat[tablecw]	\setuplabeltext[tablecw=Table]\starttext  \setupfloats[location=middle]  \placetable  [here]  [tablecw:test]{A Regular Caption.}  {\starttable[|c|c|c|]\HL  \VL Test \VL  Test  \VL Test  \VL\FR  \HL  \stoptable}\setupfloats[location=middle]  \placetablecw  [here]  [tablecw:test]{An Alternate Caption.}  {\starttable[|c|c|c|]\HL  \VL Test \VL  Test  \VL Test  \VL\FR  \HL  \stoptable}\placelistoftables\placelistoftablecw \stoptext Still, a criterium=component option etc would be quite useful, as mentioned in another message ...Best wishesIdris-- Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523___
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] more table trouble ...

2011-11-12 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

Here's another table that worked fine in MkII but not MkIV:

=
\starttext
  \starttable[|l|l|]
  \VL test  \VL \LOW{test}   \VL\FR
  \DL\DC \DR
  \stoptable
\stoptext
=

! Use of \DL doesn't match its definition.

system   tex  error on line 4 in file taqwa-ibadah-test.tex: Use  
of  ...


1 \starttext
2   \starttable[|l|l|]
3   \VL test  \VL \LOW{test}   \VL\FR
4 \DL\DC \DR
5   \stoptable
6 \stoptext
7

l.4   \DL\DC
 \DR
=

Please advise!

Best wishes
Idris

--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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 bug in MkIV?

2011-11-07 Thread Hans Hagen

On 7-11-2011 03:17, Idris Samawi Hamid ادريس   سماوي حامد wrote:

Dear gang,

It seems that \starttable has a bug in MkIV:

\starttext
\starttable{|c|c|c|}


 [   ]


\HL
\VL Test \VL Test \VL Test \VL\FR
\stoptable
\stoptext



-
  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] Table bug in MkIV?

2011-11-06 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

It seems that \starttable has a bug in MkIV:

\starttext
  \starttable{|c|c|c|}
  \HL
  \VL Test \VL  Test  \VL Test \VL\FR
  \stoptable
\stoptext

This is LuaTeX, Version beta-0.71.0-2011071409 (rev 4332)
 \write18 enabled.
(placetable.tex

ConTeXt  ver: 2011.11.05 01:19 MKIV  fmt: 2011.11.6  int: english/english

:

! Undefined control sequence.

system   tex  error on line 3 in file placetable.tex: Undefined  
control sequence ...


1 \starttext
2   \starttable{|c|c|c|}
3 \HL
4   \VL Test \VL  Test  \VL Test \VL\FR
5   \stoptable
6 \stoptext
7

l.3   \HL

?

Works in mkii (this is part of my ongoing work to port my huge mkii  
project to MkIV).


Please advise!

Best wishes
Idris
--
Professor Idris Samawi Hamid, Editor-in-Chief
International Journal of Shīʿī Studies
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___

  1   2   3   >