ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Tabulate: vertical distance between rows
@ 2013-05-22 13:20 Procházka Lukáš Ing. - Pontex s. r. o.
  2013-05-22 15:30 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2013-05-22 13:20 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

Hello,

are there more ways how to affect vertical distance between rows within \start/stop-tabulate?

1) There is one, described on wiki (http://wiki.contextgarden.net/Tabulate):

----
\unprotect
\appendtoks
   \blank[halfline]
\to \t_tabl_tabulate_every_after_row
\protect

...
----

Its problem is that I don't know how to call it by Lua.
The following code fails:

----
   \startluacode
     context[[
\unprotect
\appendtoks
   \blank[halfline]
\to \t_tabl_tabulate_every_after_row
\protect
]]
   \stopluacode

...
----

So how to make it acceptable by Ctx?


2) Is there another way, e.g. inserting something each time before \NC\NR or elsewhere)?

This brings no effect:

----
   \starttabulate[|l|r|]
     \NC a \NC b \blank\NC\blank\NR
     \NC A \NC B \NC\NR
   \stoptabulate
----

As I intend to typeset a table (into tabulate) via Lua, adding an extra sequence/command anywhere when a table row is typeset is no problem.

Questions are: a) what would be such sequence and b) where it should be placed?


My whole testing code is attached.

Thank you in advance.

Best regards,

Lukas


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

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

[-- Attachment #2: t-Tabul.mkiv --]
[-- Type: application/octet-stream, Size: 566 bytes --]

\starttext
  %\unprotect
  %\appendtoks
  %  \blank[halfline]
  %\to \t_tabl_tabulate_every_after_row
  %\protect

  \starttabulate[|l|r|]
    \NC a \NC b \NC\NR
    \NC A \NC B \NC\NR
  \stoptabulate

  \starttabulate[|l|r|]
    \NC a \NC b \blank\NC\blank\NR
    \NC A \NC B \NC\NR
  \stoptabulate

  \startluacode
    context[[
\unprotect
\appendtoks
  \blank[halfline]
\to \t_tabl_tabulate_every_after_row
\protect
]]
  \stopluacode

  \starttabulate[|l|r|]
    \NC a \NC b \NC\NR
    \NC A \NC B \NC\NR
  \stoptabulate
\stoptext

[-- Attachment #3: t-Tabul.pdf --]
[-- Type: application/pdf, Size: 6457 bytes --]

[-- Attachment #4: Type: text/plain, Size: 485 bytes --]

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Tabulate: vertical distance between rows
  2013-05-22 13:20 Tabulate: vertical distance between rows Procházka Lukáš Ing. - Pontex s. r. o.
@ 2013-05-22 15:30 ` Wolfgang Schuster
  2013-05-23  7:51   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2013-05-22 15:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 22.05.2013 um 15:20 schrieb Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz>:

> Hello,
> 
> are there more ways how to affect vertical distance between rows within \start/stop-tabulate?
> 
> 1) There is one, described on wiki (http://wiki.contextgarden.net/Tabulate):
> 
> ----
> \unprotect
> \appendtoks
>  \blank[halfline]
> \to \t_tabl_tabulate_every_after_row
> \protect

This is only a hack and shouldn’t be used.

> Its problem is that I don't know how to call it by Lua.
> The following code fails:
> 
> ----
>  \startluacode
>    context[[
> \unprotect
> \appendtoks
>  \blank[halfline]
> \to \t_tabl_tabulate_every_after_row
> \protect
> ]]
>  \stopluacode
> 
> ...
> ----
> 
> So how to make it acceptable by Ctx?
> 
> 
> 2) Is there another way, e.g. inserting something each time before \NC\NR or elsewhere)?
> 
> This brings no effect:
> 
> ----
>  \starttabulate[|l|r|]
>    \NC a \NC b \blank\NC\blank\NR
>    \NC A \NC B \NC\NR
>  \stoptabulate
> ----
> 
> As I intend to typeset a table (into tabulate) via Lua, adding an extra sequence/command anywhere when a table row is typeset is no problem.


You can use the \TB which accepts the same keywords as \blank.

\starttext

\starttabulate
\NC one  \NC two   \NC\NR 
\NC two  \NC three \NC\NR 
\TB[line]
\NC four \NC five  \NC\NR 
\TB[1cm]
\NC six  \NC seven \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

* Re: Tabulate: vertical distance between rows
  2013-05-22 15:30 ` Wolfgang Schuster
@ 2013-05-23  7:51   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2013-05-23  7:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... Great, thank you!

I added some info to wiki (http://wiki.contextgarden.net/Tabulate).

Best regards,

Lukas


> You can use the \TB which accepts the same keywords as \blank.
>
> \starttext
>
> \starttabulate
> \NC one  \NC two   \NC\NR
> \NC two  \NC three \NC\NR
> \TB[line]
> \NC four \NC five  \NC\NR
> \TB[1cm]
> \NC six  \NC seven \NC\NR
> \stoptabulate
>
> \stoptext
>
> Wolfgang

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

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

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

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

end of thread, other threads:[~2013-05-23  7:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 13:20 Tabulate: vertical distance between rows Procházka Lukáš Ing. - Pontex s. r. o.
2013-05-22 15:30 ` Wolfgang Schuster
2013-05-23  7:51   ` Procházka Lukáš Ing. - Pontex s. r. o.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).