[NTG-context] Fwd: Spacing issue of xtable with itemize

2017-12-20 Thread Lars

Hello together,

example was from v11-28 by the way. Now in v12-20 it's working as expected.

Thank you very much for the fix.

Cheers


 Weitergeleitete Nachricht 
Betreff:Spacing issue of xtable with itemize
Datum:  Wed, 13 Dec 2017 15:56:29 +0100
Von:Lars 
An: ntg-context@ntg.nl



Hi guys,

I found a pretty annoying behaviour of xtable spacing (in my case when 
using an itemization inside the table). I hope you guys can help me out. 
MWE is:


\starttext

  \startxtable[frame=on]

\startxrow
  \startxcell[width=3cm]

\startitemize[packed]
  \startitem

here a short line

  \stopitem
\stopitemize

  \stopxcell
\stopxrow

\startxrow
  \startxcell

\startitemize[packed]
  \startitem

here filled with some words to force a rather long line

  \stopitem
\stopitemize

  \stopxcell
\stopxrow

  \stopxtable

\stoptext

To this mail I also attached a picture of my PDF output, that I edited 
slightly to make my point clear. Have a look at the spacing between 
content and bottomframe in the second row of each table please...

Is there any way to change this?

Cheers and thanks in advance, Lars


___
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] Question to Lua and Postgres (and ConTeXt)

2017-12-20 Thread Hans Hagen

On 12/20/2017 8:12 PM, Tomas Hala wrote:

Hi all,

I installed the module (I'm at CentOS 6.6) by yum install luasql-postgres, ok. 
Then I used:

lua myscript.lua
/usr/bin/luamyscript.lua
/usr/local/bin/lua myscript.lua

I discovered that it is version dependent: lua (=/usr/local/bin/lua) does not 
operate, it is 5.3, whereas /usr/bin/lua works ok, it is 5.1.
At the command line, it is not a problem to choose another lua interpreter than 
the default one is.
But if I use the same lua script within the ConTeXt, I came across the same 
problem because the default version in ConTeXt is 5.2.

First, I thought about the way how to change version of lua inside the current 
version of ConTeXt  (is it possible?)
but the same behaviour appeared when I tryed older versions (TL 2010, 2011, 
2012) containing lua v5.1 by the default.
It seems that file postgres.so which is the main important is not visible for 
ConTeXt.

Neither
 package.path = '/usr/lib/lua/5.1/luasql;',
not copying the postgres.so to the current directory did not help.

I have any clue how to fix it. Have you any ideas?


I never used postgres (it's on my todo list to have a look at it, as we 
also ship mysql and sqlite support in context where we don't depend on 
libraries).


The current Luatex is 5.2 so you can forget about 5.1 then. Beginnning 
next year we will switch the garden version of luatex to use lua 5.3 but 
for tex live we will wait till after the 2018 code freeze (we might 
provide an extra luatex53 for testing so that one can take a year to 
update). We might provide a compile switch for 5.2 after we move 
forward. The context code is already 5.3 ready (that is: for as far as 
we can see and have tested) and i run luatex with 5.3 .. so, you can:


(1) wait till we move the 53 related code into experimental (this might 
happen around the turn of the year

(2) decide to delay 5.3 till we release a beta based on experimental
(3) find some 52 suitable code (and keep in mind then that we will move 
to 53)


For those who are curious about why we don't simply switch: there is a 
fundamental low level change in lua (number system) that in some usage 
can have consequences. Our (luigi and i) experiences are:


(1) one has to adapt code, but it's often clear when; one also have to 
realize that luajittex is a hybrid 5.1/5.2 and some day maybe 5.3


(2) we have done quite some testing to figure out a dramatic 
(showstopping) slowdown in number to string conversion but in the end 
managed to get around it


(3) we measure some 5-10 overal speed improvement on average context 
usage (upto some 10% on lua runs but we spend only 50% time in lua, so 
th egap between luatex and luajittex becomes smaller) as tex has a lot 
of integer manipulations


In retrospect on the one hand it was easier than we thought but we spent 
quite some time on it anyway (and of course we then wonder if it's worth 
the time and trouble as it never pays off).



Thanks in advance,

Tomáš



! LuaTeX error :3: module 'luasql.postgres' not found:
no field package.preload['luasql.postgres']
no file './luasql/postgres.so'
no file '/usr/local/lib/lua/5.1/luasql/postgres.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './luasql.so'
no file '/usr/local/lib/lua/5.1/luasql.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
:3: in main chunk.



___
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] type and typing comments for TeX and Lua

2017-12-20 Thread Hans Hagen

On 12/20/2017 8:45 PM, Pablo Rodriguez wrote:

On 12/20/2017 12:53 PM, Hans Hagen wrote:

On 12/18/2017 11:50 PM, Pablo Rodriguez wrote:

[...]

% Differs per lexer:

\definestartstop
  [XmlSnippetComment]
  [color=,
   style=]


I’m afraid that the scite module isn’t an option for me.


Then you need to configure the highligheters yourself


Many thanks for your reply, Hans.

I don’t mind to set up the highlighters myself, but the problem is the
following.

XmlSnippetComment only contains the text inside the comment, but not the
marks ().

LuaSnippetComment contains the marker (only --), but not the text.

TexSnippetComment contains the marker (%), but not the text.

Would it be possible that there are two SnippetComments for all lexers:
SnippetCommentMark and SnippetCommentText?
very low priority ... there is some logic behind these that i don't want 
to break


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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen

On 12/20/2017 6:44 PM, Aditya Mahajan wrote:

On Wed, 20 Dec 2017, Hans Hagen wrote:


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]



I recently had a problem where \testpage was misbehaving while 
\testpagesyncronized worked correctly. The example above is another 
situation where syncronization solves the problem.


that is actually more tricky as trying toi sync the page buildern (and 
spacing) is rather sensitive


Does syncronization have any drawbacks (other than speed)? If not, then 
what is the overhead of "synchronizing everything"? ConTeXt is quite 
fast, and I for one, wouldn't mind a few mili second delay in each 
compilation for saving a few hours of debugging time!
normally i can deal with the speed (in this case it's probably not 
measurable) and normally i manage to add features without much of a 
penalty (of course sometimes it can mean hours of programming and 
testing) ... speaking of speed, probably no one notices when context 
becomes faster (mkiv definitely has not become slower over the years) 
unless the fact that no one complains is a good sign


concerning syncing each time ... i can think of it but it needs an extra 
set of state variables per head then (and probbaly a way to turn that 
trickery off)



-
  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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen

On 12/20/2017 6:40 PM, Aditya Mahajan wrote:

On Wed, 20 Dec 2017, Hans Hagen wrote:

 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen 
To: Henri 

On 12/19/2017 9:15 PM, Henri wrote:

 Dear list,

 Motivated by
 https://tex.stackexchange.com/questions/406892
 I wanted to disable page breaks for parts.  This works on all pages,
 except the first page of a
 document.  Why?  MWE is below as always.  Reproducible with TL 2017 and
 latest beta.

 Cheers, Henri



 \setuphead
    [part]
    [page=no]

 \starttext

 \startpart[title=Part One]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart
   \startpart[title=Part Two]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart

 \stoptext
this relates to the fatc that there has to be some node on the page 
that registers the part information and as chapter flushes a page that 
one ends up on a page then


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

%  solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
   \synchronizehead{part}%
\to \everybeforepagebody

%  solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's 
still not 100% predictable but it might work out ok in most cases.


Another option, that I posted on Tex.se is:

\setuphead[chapter][continue=no]

So that the page is not flushed by \startchapter immediate after a 
\startpart.
there is still a (potentially) interfering node then (which can then be 
seen from the chapter line starting lower)


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] Question to Lua and Postgres (and ConTeXt)

2017-12-20 Thread Henning Hraban Ramm
Am 2017-12-20 um 20:12 schrieb Tomas Hala :

> I installed the module (I'm at CentOS 6.6) by yum install luasql-postgres, 
> ok. Then I used:

LuaSQL claims to work on Lua 5.1, 5.2 and 5.3:
https://keplerproject.github.io/luasql/

Maybe you must install postgresql-dev?

> ! LuaTeX error :3: module 'luasql.postgres' not found:
>   no field package.preload['luasql.postgres']
>   no file './luasql/postgres.so'
>   no file '/usr/local/lib/lua/5.1/luasql/postgres.so'
>   no file '/usr/local/lib/lua/5.1/loadall.so'
>   no file './luasql.so'
>   no file '/usr/local/lib/lua/5.1/luasql.so'
>   no file '/usr/local/lib/lua/5.1/loadall.so'
> stack traceback:
>   [C]: in function 'require'
>   :3: in main chunk.

Do you have postgres.so and the other libraries in one of the mentioned 
locations?


Greetlings, Hraban
---
http://www.fiee.net
http://wiki.contextgarden.net
GPG Key ID 1C9B22FD

___
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] type and typing comments for TeX and Lua

2017-12-20 Thread Pablo Rodriguez
On 12/20/2017 12:53 PM, Hans Hagen wrote:
> On 12/18/2017 11:50 PM, Pablo Rodriguez wrote:
>> [...]
> % Differs per lexer:
> 
> \definestartstop
>  [XmlSnippetComment]
>  [color=,
>   style=]
> 
>> I’m afraid that the scite module isn’t an option for me.
>
> Then you need to configure the highligheters yourself

Many thanks for your reply, Hans.

I don’t mind to set up the highlighters myself, but the problem is the
following.

XmlSnippetComment only contains the text inside the comment, but not the
marks ().

LuaSnippetComment contains the marker (only --), but not the text.

TexSnippetComment contains the marker (%), but not the text.

Would it be possible that there are two SnippetComments for all lexers:
SnippetCommentMark and SnippetCommentText?

Many thanks for your help,

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
___

[NTG-context] Question to Lua and Postgres (and ConTeXt)

2017-12-20 Thread Tomas Hala
Hi all,

I installed the module (I'm at CentOS 6.6) by yum install luasql-postgres, ok. 
Then I used:

lua myscript.lua
/usr/bin/luamyscript.lua
/usr/local/bin/lua myscript.lua

I discovered that it is version dependent: lua (=/usr/local/bin/lua) does not 
operate, it is 5.3, whereas /usr/bin/lua works ok, it is 5.1.
At the command line, it is not a problem to choose another lua interpreter than 
the default one is.
But if I use the same lua script within the ConTeXt, I came across the same 
problem because the default version in ConTeXt is 5.2.

First, I thought about the way how to change version of lua inside the current 
version of ConTeXt  (is it possible?)
but the same behaviour appeared when I tryed older versions (TL 2010, 2011, 
2012) containing lua v5.1 by the default. 
It seems that file postgres.so which is the main important is not visible for 
ConTeXt.

Neither
 package.path = '/usr/lib/lua/5.1/luasql;', 
not copying the postgres.so to the current directory did not help. 

I have any clue how to fix it. Have you any ideas?

Thanks in advance,

Tomáš



! LuaTeX error :3: module 'luasql.postgres' not found:
no field package.preload['luasql.postgres']
no file './luasql/postgres.so'
no file '/usr/local/lib/lua/5.1/luasql/postgres.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
no file './luasql.so'
no file '/usr/local/lib/lua/5.1/luasql.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'require'
:3: in main chunk.



___
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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Aditya Mahajan

On Wed, 20 Dec 2017, Hans Hagen wrote:


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]



I recently had a problem where \testpage was misbehaving while 
\testpagesyncronized worked correctly. The example above is another 
situation where syncronization solves the problem.


Does syncronization have any drawbacks (other than speed)? If not, then 
what is the overhead of "synchronizing everything"? ConTeXt is quite fast, 
and I for one, wouldn't mind a few mili second delay in each compilation 
for saving a few hours of debugging time!


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] Fwd: Re: Stray blank page with part

2017-12-20 Thread Aditya Mahajan

On Wed, 20 Dec 2017, Hans Hagen wrote:

 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen 
To: Henri 

On 12/19/2017 9:15 PM, Henri wrote:

 Dear list,

 Motivated by
 https://tex.stackexchange.com/questions/406892
 I wanted to disable page breaks for parts.  This works on all pages,
 except the first page of a
 document.  Why?  MWE is below as always.  Reproducible with TL 2017 and
 latest beta.

 Cheers, Henri



 \setuphead
    [part]
    [page=no]

 \starttext

 \startpart[title=Part One]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart
   \startpart[title=Part Two]
    \startchapter[title=Chapter One]
    \stopchapter
    \startchapter[title=Chapter Two]
    \stopchapter
 \stoppart

 \stoptext
this relates to the fatc that there has to be some node on the page that 
registers the part information and as chapter flushes a page that one ends up 
on a page then


%  solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

%  solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
   \synchronizehead{part}%
\to \everybeforepagebody

%  solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's still 
not 100% predictable but it might work out ok in most cases.


Another option, that I posted on Tex.se is:

\setuphead[chapter][continue=no]

So that the page is not flushed by \startchapter immediate after a 
\startpart.


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] type and typing comments for TeX and Lua

2017-12-20 Thread Hans Hagen

On 12/18/2017 11:50 PM, Pablo Rodriguez wrote:

Hans,

sorry for insisting, but I really need this.

I have the following sample:

 \definetype[context][option=tex]
 \definetype[lua][option=lua]
 \starttext
 \startTEXpage[offset=2em]

 a \TEX\ inline comment: \context{ag%befe}

 \Lua\ inline comment: \lua{agb --efe}

 \startTEX
 This is text. % a comment, not \comment
 \stopTEX

 \startXML
 This is text.
 \stopXML

 \startLUA
 if code=="code" then --this is a comment
 \stopLUA
 \stopTEXpage
 \stoptext

Would it be possible that all comments in type and typing (at least, for
Lua, XML and TeX) would have the same formatting for the whole comment
contents, including the comment signs?

Sorry, but with the current output, it is hard to see (for total
newbies) what is part of the comment and what not. And the text editor
will display something different.


It depends on the lexer ...

% \usemodule[scite] % use editor logic

% DIffers per lexer:

\definestartstop
[XmlSnippetComment]
[color=,
 style=]


I’m afraid that the scite module isn’t an option for me.

Then you need to configure the highligheters yourself

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
___

[NTG-context] Fwd: Re: Stray blank page with part

2017-12-20 Thread Hans Hagen




 Forwarded Message 
Subject: Re: [NTG-context] Stray blank page with part
Date: Wed, 20 Dec 2017 11:50:11 +0100
From: Hans Hagen 
To: Henri 

On 12/19/2017 9:15 PM, Henri wrote:

Dear list,

Motivated by
https://tex.stackexchange.com/questions/406892
I wanted to disable page breaks for parts.  This works on all pages, except the 
first page of a
document.  Why?  MWE is below as always.  Reproducible with TL 2017 and latest 
beta.

Cheers, Henri



\setuphead
   [part]
   [page=no]

\starttext

\startpart[title=Part One]
   \startchapter[title=Chapter One]
   \stopchapter
   \startchapter[title=Chapter Two]
   \stopchapter
\stoppart
  
\startpart[title=Part Two]

   \startchapter[title=Chapter One]
   \stopchapter
   \startchapter[title=Chapter Two]
   \stopchapter
\stoppart

\stoptext
this relates to the fatc that there has to be some node on the page that 
registers the part information and as chapter flushes a page that one 
ends up on a page then


% solution 1:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\setuptexttexts
  [\synchronizehead{part}]

% solution 2:

\setuphead
  [part]
  [page=no,
   placehead=hidden]

\appendtoks
\synchronizehead{part}%
\to \everybeforepagebody

% solution 3 (new in beta):

\setuphead
  [part]
  [placehead=section]

This will delay the flush till the next section head gets place. It's 
still not 100% predictable but it might work out ok in most cases.


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
___