Re: [NTG-context] Ignored spacings are ignored

2020-03-17 Thread Hans Hagen

On 3/17/2020 10:08 AM, Henri Menke wrote:

Dear list,

Sorry for the stupid title, I couldn't resist. :-)

LuaTeX has the option to adjust spacing between different classes of
math atoms.  However, looking in the TeXbook, page 170, in the table for
spacings between adjacent atoms, we find that some of those spacing are
undefined (* in the table) and therefore, when TeX encounters this
combination, spacing is just skipped.

This also translates to the parameters in LuaTeX.  For example the
combination Open-Bin is skipped by TeX and therefore setting the
corresponding parameter just does nothing.

\Umathordrelspacing\textstyle=50mu
\Umathopenbinspacing\textstyle=50mu
$a = (-2)$
\bye

So my question is, what is the point of the parameters that describe
these skipped combinations?  Shouldn't they just be deleted?
Alternatively, they could actually be implemented to do something.


When that system was set up we decided to keep these 'unused slots' 
becauseit makes the code nicer and also prevents errors in case one 
decided to implement some matrix like approach to settings. Making the 
engine bark on them would be comparable silly as having the empty slots 
that we now have in some unicode math alphabets (which forces all 
programs that do something with them to deal with the exceptions).


Anyway, these parameters have their limitations anyway. Say that we have 
this:


\def\whatevera
  {\Umathordrelspacing \textstyle=50mu
   \Umathopenbinspacing\textstyle=50mu}

\def\whateverb
  {\Umathordrelspacing \textstyle=25mu
   \Umathopenbinspacing\textstyle=25mu}

$\whatevera a = (-2)$

$\whateverb a = (-2)$

$ {\whatevera a = (-2)}\quad
  {\whateverb a = (-2)}\quad
  {\whatevera a = (-2)}
$

I presume that you can predict what you get given your question.
Now, to come to your question / remark, it is trivial to introduce a 
parameters, say \mathspacingmode, that obeys these spacing options 
(apart from possible weird side effects) but they are global.


However, in luametatex we can do this:

\def\whatevera
  {\frozen\Umathordrelspacing \textstyle=50mu
   \frozen\Umathopenbinspacing\textstyle=50mu}

\def\whateverb
  {\frozen\Umathordrelspacing \textstyle=25mu
   \frozen\Umathopenbinspacing\textstyle=25mu}

$\whatevera a = (-2)$

$\whateverb a = (-2)$

$ {\whatevera a = (-2)}\quad
  {\whateverb a = (-2)}\quad
  {\whatevera a = (-2)}
$

Read: we can save the state of parameters. So, as a quick and dirty 
experiment I added a feature that controls the spacing, think of:


$ {\whatevera a = ( -2)}\quad
  {\whateverb\frozen\Umathspacingmode\textstyle1 a = (-2)}\quad
  {\whatevera\frozen\Umathspacingmode\textstyle1 a = (-2)}
$

But ... the mentioned \frozen parameter feature is experimental and 
awaiting decisions / comments / suggestions of usefullness by Aditya, 
who has no time, so no hurry with that. After all, given the always 
acclaimed perfect math in tex (okay, according to some persistent 
naratives, context can't do math) all such extensions are debatable anyway.


One tricky part of these spacing issues is that these get applied 
selectively based on what goes left or right as well as circumstances. 
There's always the danger of 'fixing' this and a while later 'getting 
complains about some edge case that fails'. Which (I think) is why tex 
plays safe and assumes an occasional injected user space.


There are a few more edge cases with spacing but for now I leave these 
to your imagination.


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] Ignored spacings are ignored

2020-03-17 Thread Henri Menke
Dear list,

Sorry for the stupid title, I couldn't resist. :-)

LuaTeX has the option to adjust spacing between different classes of
math atoms.  However, looking in the TeXbook, page 170, in the table for
spacings between adjacent atoms, we find that some of those spacing are
undefined (* in the table) and therefore, when TeX encounters this
combination, spacing is just skipped.

This also translates to the parameters in LuaTeX.  For example the
combination Open-Bin is skipped by TeX and therefore setting the
corresponding parameter just does nothing.

\Umathordrelspacing\textstyle=50mu
\Umathopenbinspacing\textstyle=50mu
$a = (-2)$
\bye

So my question is, what is the point of the parameters that describe
these skipped combinations?  Shouldn't they just be deleted?
Alternatively, they could actually be implemented to do something.

More context: https://tex.stackexchange.com/questions/532758

Kind regards,
Henri
___
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] beta vs current

2020-01-30 Thread Hans Hagen

On 1/30/2020 9:56 PM, Henri Menke wrote:

On 1/31/20 8:37 AM, Aditya Mahajan wrote:

On Thu, 30 Jan 2020, Hans Hagen wrote:


Hi,

Already for quite some years the 'current' context release is the one
that ends up on texlive. The rest of the year we talk about betas and
very rarely an alpha release. This distinction no longer makes sense.

 From now on there will be no alpha, beta or current (with latest begin
the most recent of the three, when present): we only will have latest.
Most users follow the latest anyway and keeping a copy of some tree is
cheap.

There will of course be the yearly tex live snapshots and these will
have the year attached to them.

So, effectively nothing changes, apart from the fact that we no longer
use the labels (and distinction on the website).


I like this change.


A more fundamental distinction is between the versions:

pdftex|xetex : mkii (probaly not used that much any longer)
luatex|luajittex : mkiv (also the test for luatex dev)
luametatex   : lmtx (the (upcoming) real deal)

Mojca and I are diuscussing / working on an upgrade of the context
garden installations and repositories but more about that later,


Will lmtx be available on the next texlive?


Probably not, LuaMetaTeX sources are not public yet, so TeX Live can't
build it and I don't think they are going to just pull binaries into the
tree.  They are also very cautious with licensing, so unless something
is truly open source they won't pull it (e.g. https://ctan.org/pkg/pgf-pie).
the original idea was to have it ready (source code and binaries and so) 
but tl is already too far into freezing code etc so it would not be 
integrated anyway (testing, installation etc) and therefore our schedule 
could be delayed and we now take our time to properly organize the new 
infrastructure on the garden as well as make sure it compiles nicely on 
all platforms that we want (using the buildbot infrastructure) which in 
turn triggers other things


regarding luametatex being open source .. it will (as already announced) 
end up as part of the distribution but i don't want to push all that 
intermediate stuff in there (we have some quality standards, whatever 
one might think of that) and we're not in that hurry anyway


so, tex live will ship the luatex/mkiv combination and mojca, alan and i 
i will think of a good moment to release the rest


(and maybe next year we will make lmtx the default for tex live .. who 
knows; there is no reason to complicate installation by adding choices)


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] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Hans Hagen

On 12/17/2019 10:04 AM, Otared Kavian wrote:

Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
  
	\setupsynctex[state=start]


is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

you can check the (lmtx) beta (new luametatex bin etc)

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] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Hans Hagen

On 12/17/2019 10:04 AM, Otared Kavian wrote:

Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
  
	\setupsynctex[state=start]


is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

Best regards: OK
% begin file: bug-itemize-lmtx.tex

\setupsynctex[stat=start]

\setupsynctex[state=start] % if this is removed then everything is fine…

\setupquotation[style=italic,left={«~},right={~»}]

\showframe
\starttext

\startitemize[n]

\dorecurse{4}{\item This item \quotation{is shown correcly\dots}

\item This item \quotation{\dots is not shown correctly}}

\stopitemize

\stoptext
% end file: bug-itemize-lmtx.tex
took me a while to figure out that it is actually an engine issue 
(obscured in luatex but exposed in luametatex)


fixed in next beta

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] Very strange behaviour of itemize, \quotation and \dots

2019-12-17 Thread Otared Kavian
Hi Hans,

Last week I sent you a PDF showing a strange behaviour of \startitemize and 
\quotation in LMTX. I finally could nail down the origin of the problem: it 
seems that if the command
 
\setupsynctex[state=start]

is present twice at the beginning of the document, then the combination \item 
and \quotation and \dots prevents the item to be shown correctly…
(In my case I was typesetting a document with the above command in which a file 
containing it also was \input).

Below is the minimal example and its PDF.

Best regards: OK
% begin file: bug-itemize-lmtx.tex

\setupsynctex[stat=start]

\setupsynctex[state=start] % if this is removed then everything is fine…

\setupquotation[style=italic,left={«~},right={~»}]

\showframe
\starttext

\startitemize[n]

\dorecurse{4}{\item This item \quotation{is shown correcly\dots} 

\item This item \quotation{\dots is not shown correctly}}

\stopitemize

\stoptext
% end file: bug-itemize-lmtx.tex



bug-itemize-lmtx.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] Strange error with combination of itemization, footnote and \crlf

2019-11-04 Thread Pablo Rodriguez
On 10/31/19 11:43 AM, cont...@vivaldi.net wrote:
> Hello Hans,
>
> when do you plan to release next beta for ConTeXt with the fixed issue
> spoken bellow?

Hi Lukas,

I compile your minimal sample using any of these:

  LuaTeX 1.11 7215 + ConTeXt MkIV 2019.10.29 15:00
  LuaTeX 2.00 20190729 + ConTeXt MkIV 2019.10.28 18:57

Does none of them work for you?

Just in case it helps,

Pablo


> On 2019-10-22 23:54, Hans Hagen wrote:
>> On 10/22/2019 2:16 PM, cont...@vivaldi.net wrote:
>>> Hello,
>>>
>>> here is a minimal sample which doesn't compile:
>>>
>>> 
>>> \starttext
>>>    \startitemize
>>>      \item
>>>    A\footnote{%
>>>      B
>>>      \startitemize
>>>    \item C
>>>      \stopitemize
>>>    }\crlf
>>>    D
>>>
>>>      \item E %  This sample compiles when this line is commented
>>> (?!)
>>>    \stopitemize
>>> \stoptext
>>> 
>>>
>>> The error message is:
>>>
>>> "
>>> ...
>>> ...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465:
>>> attempt to index a nil value (local 'd')
>>>
>>>   2   \startitemize
>>>   3 \item
>>>   4   A\footnote{%
>>>   5 B
>>>   6 \startitemize
>>>   7   \item C
>>>   8 \stopitemize
>>>   9   }\crlf
>>> 10   D
>>> 11
>>> 12 >>  \item E %  This sample compiles when this line is
>>> commented
>>> 13   \stopitemize
>>> 14 \stoptext
>>> 15
>>> "
>>>
>>> When the "\item E" is commented, the sample compiles successfully.
>>>
>>> ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt:
>>> 2019.10.16  int: english/english".
>>>
>>> Any idea what's going wrong?
>> side effect of recent attempt to deal with nesting ... fixed in next
>> beta
>>
>> -
>>   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
> ___
>


--
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] Strange error with combination of itemization, footnote and \crlf

2019-10-31 Thread context

Hello Hans,

when do you plan to release next beta for ConTeXt with the fixed issue 
spoken bellow?


Normally, one can get beta here:

http://www.pragma-ade.nl/download-2.htm

but there is still beta from 2019-10-29.

(I'm still using Lua 5.3 version of ConTeXt.)

Or is it enough to re-run "first-setup.bat" from the ConTeXt 
installation directory, which uses "rsync" (points to 
"rsync://contextgarden.net/minimals/setup/mswin/bin/" and launches 
"mtxrun --script ./bin/mtx-update.lua")?


Best regards,

Lukas


On 2019-10-22 23:54, Hans Hagen wrote:

On 10/22/2019 2:16 PM, cont...@vivaldi.net wrote:

Hello,

here is a minimal sample which doesn't compile:


\starttext
   \startitemize
     \item
   A\footnote{%
     B
     \startitemize
   \item C
     \stopitemize
   }\crlf
   D

     \item E %  This sample compiles when this line is commented 
(?!)

   \stopitemize
\stoptext


The error message is:

"
...
...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: 
attempt to index a nil value (local 'd')


  2   \startitemize
  3 \item
  4   A\footnote{%
  5 B
  6 \startitemize
  7   \item C
  8 \stopitemize
  9   }\crlf
10   D
11
12 >>  \item E %  This sample compiles when this line is 
commented

13   \stopitemize
14 \stoptext
15
"

When the "\item E" is commented, the sample compiles successfully.

ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 
2019.10.16  int: english/english".


Any idea what's going wrong?
side effect of recent attempt to deal with nesting ... fixed in next 
beta


-
  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] Images run into each other when using side floats

2019-10-30 Thread Marco Patzer
On Wed, 30 Oct 2019 11:55:17 -0400 (EDT)
Aditya Mahajan  wrote:

> On Wed, 30 Oct 2019, Marco Patzer wrote:
> 
> > Hi!
> >
> > Some images run into each other when using floats. The following
> > example illustrates this. The second image (or frame) runs into the
> > side figure frame. How to prevent this?
> >
> > \setupfloat [figure] [default=left]
> >
> > \starttext
> >  \samplefile{knuth}
> >
> >  \startplacefigure [title=Foo]
> >\framed [width=5cm, height=5cm]{}
> >  \stopplacefigure
> >
> >  \samplefile{ward} \blank  
> Add:
> 
> \dontleavehmode

Thanks for the nudge in the right direction.

Is there a way to include the \dontleavehmode in the combinations?
The frame is actually a combination (removed while creating MWE).
The before key from \setupcombinations doesn't seem to do the right
thing here. If that's possible I can leave the sources as they are.

\setupfloat [figure] [default=left]

\starttext
  \samplefile{knuth}

  \startplacefigure [title=Foo]
\framed [width=5cm, height=5cm]{}
  \stopplacefigure

  \samplefile{ward} \blank

  \dontleavehmode
  \startcombination [1*1]
\startcontent \framed [width=4cm, height=4cm]{} \stopcontent
\startcaption Foo \stopcaption
  \stopcombination

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


Re: [NTG-context] Strange error with combination of itemization, footnote and \crlf

2019-10-22 Thread Hans Hagen

On 10/22/2019 2:16 PM, cont...@vivaldi.net wrote:

Hello,

here is a minimal sample which doesn't compile:


\starttext
   \startitemize
     \item
   A\footnote{%
     B
     \startitemize
   \item C
     \stopitemize
   }\crlf
   D

     \item E %  This sample compiles when this line is commented (?!)
   \stopitemize
\stoptext


The error message is:

"
...
...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt 
to index a nil value (local 'd')


  2   \startitemize
  3 \item
  4   A\footnote{%
  5 B
  6 \startitemize
  7   \item C
  8 \stopitemize
  9   }\crlf
10   D
11
12 >>  \item E %  This sample compiles when this line is commented
13   \stopitemize
14 \stoptext
15
"

When the "\item E" is commented, the sample compiles successfully.

ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 
2019.10.16  int: english/english".


Any idea what's going wrong?

side effect of recent attempt to deal with nesting ... fixed in next beta

-
  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] Strange error with combination of itemization, footnote and \crlf

2019-10-22 Thread context

Hello,

here is a minimal sample which doesn't compile:


\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

\item E %  This sample compiles when this line is commented (?!)
  \stopitemize
\stoptext


The error message is:

"
...
...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt 
to index a nil value (local 'd')


 2   \startitemize
 3 \item
 4   A\footnote{%
 5 B
 6 \startitemize
 7   \item C
 8 \stopitemize
 9   }\crlf
10   D
11
12 >>  \item E %  This sample compiles when this line is 
commented

13   \stopitemize
14 \stoptext
15
"

When the "\item E" is commented, the sample compiles successfully.

ConTeXt version: "ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 
2019.10.16  int: english/english".


Any idea what's going wrong?

Best regards,

Lukas
open source > level 1, order 1, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-yes.mkiv'
system  > 
system  > ConTeXt  ver: 2019.10.11 15:47 MKIV beta  fmt: 2019.10.16  
int: english/english
system  > 
system  > 'cont-new.mkiv' loaded
open source > level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'
system  > beware: some patches loaded from cont-new.mkiv
close source> level 2, order 2, name 
'd:/Ctx-Beta/tex/texmf-context/tex/context/base/mkiv/cont-new.mkiv'

system  > jobfiles > using path: d:\\Lukas\\ConTeXt\\Styles
system  > files > jobname 't', input 
'D:\\Lukas\\Jobs\\Chrastany-D5.DSPPS\\SO_201\\~TZ~\\t.mkiv', result 't'
fonts   > latin modern fonts are not preloaded
languages   > language 'en' is active
open source > level 2, order 3, name 
'D://Lukas/Jobs/Chrastany-D5.DSPPS/SO_201/~TZ~/t.mkiv'
fonts   > preloading latin modern fonts (second stage)
fonts   > 'fallback modern-designsize rm 12pt' is loaded

lua error   > lua error on line 12 in file 
D://Lukas/Jobs/Chrastany-D5.DSPPS/SO_201/~TZ~/t.mkiv:

...eta/tex/texmf-context/tex/context/base/mkiv/strc-num.lua:465: attempt to 
index a nil value (local 'd')

 2   \startitemize
 3 \item
 4   A\footnote{%
 5 B
 6 \startitemize
 7   \item C
 8 \stopitemize
 9   }\crlf
10   D
11 
12 >>  \item E %  This sample compiles when this line is commented
13   \stopitemize
14 \stoptext
15 

\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

\item E %  This sample compiles when this line is commented
  \stopitemize
\stoptext
\starttext
  \startitemize
\item
  A\footnote{%
B
\startitemize
  \item C
\stopitemize
  }\crlf
  D

%\item E %  This sample compiles when this line is commented
  \stopitemize
\stoptext


t-OK.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] \ctxlua and \startluacode ... \stopluacode

2019-10-16 Thread Rudolf Bahr
On Tue, Oct 15, 2019 at 10:15:34AM +0200, Hans Hagen wrote:
> On 10/15/2019 10:04 AM, Taco Hoekwater wrote:
> > Hi Rudolf,
> > 
> > > On 15 Oct 2019, at 00:50, Rudolf Bahr  wrote:
> > > 
> > > Now to your suggestion not to use "assert ()". Indeed it's a solution! My 
> > > program
> > > works! I append again its output (again just for fun!). Did you really 
> > > try it or
> > > has it been just an idea?
> > 
> > First, let me say that embedded lua versions are typically a little bit 
> > different
> > from standalone. Just how much different depends on the embedding program. 
> > Luatex
> > is actually pretty close to standalone lua. Luatex adds a bunch of 
> > extension libraries,
> > but it changes very little of the core language. And all those changes are 
> > documented
> > in the luatex manual. None of those changes affect your minimal example, 
> > except
> > that lua errors are handled a little differently.
> > 
> > Note that standalone lua *also* produces an error, as that is what assert() 
> > is
> > supposed to do. And when lua runs into an error, it ignores the rest of the 
> > current
> > chunk:
> > 
> >“... whenever an error occurs, Lua ends the current chunk and returns
> >to the application.” (from lua.org)
> > 
> > Standalone lua typically sees only one chunk (the file you pass on the 
> > command
> > line) but embedded lua implementation often see (sometimes many) more 
> > chunks.
> > In luatex’s case, each \directlua is a separate chunk (in ConTeXt, that 
> > means every
> > \startluacode block and every \ctxlua call is a separate chunk).
> > 
> > The only unusual thing here is that standalone lua silently quits and 
> > returns a
> > non-zero exit code to the shell, whereas luatex gives you the typical 
> > TeX-style
> > error prompt. The rationale for that is: lua errors can happen in many 
> > places in
> > your input file, and if they were silently ignored, your typeset pages 
> > could be
> > wrong without you realising it.
> > 
> > 
> > And to answer your question above: I did not have to try or guess. I know 
> > about
> > how assert() works because it is documented in the lua manual (and as it 
> > closely
> > mimics the assert() C function, that is easy for me to remember).
> as you say, it's all normal lua behaviour:
> 
> if you do:
> 
>   print(io.open("crap.crap"))
> 
> one gets
> 
>   nil crap.crap: No such file or directory2
> 
> and i think that assert then returns the second returned argument
> 
> but if one does
> 
>   context(io.open("crap.crap") and "yes" or "no")
> 
> then the first argument is checked against
> 
> Hans


Hi Hans, hi Taco!

For your answers and patient explanations I want to thank you, not to forget
[1], [2], [3] for instance! Now it gets clearer to me what the distinctive
features could be which one can encounter when using a combination of even so
wunderful programming languages as ConTeXt and Lua are!

Best wishes,

Rudolf

[1] https://wiki.contextgarden.net/Programming_in_LuaTeX
[2] http://www.luatex.org/svn/trunk/manual/luatex.pdf
[3] http://www.pragma-ade.com/general/manuals/cld-mkiv.pdf

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

2019-10-14 Thread Wolfgang Schuster

Susanne G. Loeber schrieb am 14.10.2019 um 15:16:

Hi,
I am looking for ways to adapt the layout and content of texts while
using ConTeXt. Put simple: show part of a text and sort these parts
based on data from the user and the author (.dat file). The biggest
problem is not knowing which part of the text will be first and how
many parts will be shown.

Can you ask a separate question for each individual problem.

So far, I am trying to get a hang of \setupdocument
(https://wiki.contextgarden.net/Project_structure), \startmode
(https://wiki.contextgarden.net/Modes), \definecolor
(https://wiki.contextgarden.net/Color) and \defineparagraphs
(https://wiki.contextgarden.net/Command/defineparagraphs)

I hope there are more ways to create adaptation.

I would also like to know whether certain combination don't work
together. For example, I cannot seem to get \doifmodeelse to work
inside a \defineparagraphs environment.

When you enable or disable a mode the state is local to the current group,
e.g. the state at the begin of a environment will be the same at the end
and changes in the environment are local to it. In most document this isn't
a problem because you enable/disable a mode at the begin of the document
and use the state at the whole document.

In your case you want the changed state to remain after the environment
has ended, to do this you have to use \globalenablemode[...] and
\globaldisablemode[...].

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] how to do adaptation

2019-10-14 Thread Susanne G. Loeber
Hi,
I am looking for ways to adapt the layout and content of texts while
using ConTeXt. Put simple: show part of a text and sort these parts
based on data from the user and the author (.dat file). The biggest
problem is not knowing which part of the text will be first and how
many parts will be shown.

So far, I am trying to get a hang of \setupdocument
(https://wiki.contextgarden.net/Project_structure), \startmode
(https://wiki.contextgarden.net/Modes), \definecolor
(https://wiki.contextgarden.net/Color) and \defineparagraphs
(https://wiki.contextgarden.net/Command/defineparagraphs)

I hope there are more ways to create adaptation.

I would also like to know whether certain combination don't work
together. For example, I cannot seem to get \doifmodeelse to work
inside a \defineparagraphs environment.

\defineparagraphs[BLpar][n=2, frame=on]
\setupparagraphs [BLpar][1][width=\dimexpr.3\textwidth]

\starttext

% Working
\enablemode[asg]

\doifmodeelse{asg} {\par First sentence} {\par Second sentence}
\disablemode[asg]
\doifmodeelse{asg} {\par First sentence} {\par Second sentence}
\doifnotmode{asg} {\par Third sentence}

% Not working
\enablemode[one]

\startBLpar
\doifmodeelse{one} {First sentence} {Second sentence} \disablemode[one]
\BLpar
% \disablemode[one] %% not helping
TOP1 paragraphs
\stopBLpar
% \disablemode[one] %% needed to make the example work

\startBLpar
\doifmodeelse{one} {First sentence} {Second sentence}
\BLpar
TOP2 paragraphs
\stopBLpar

\startBLpar
\doifnotmode{one} {Third sentence}
\BLpar
TOP3 paragraphs
\stopBLpar

\stoptext


Kind regards,
Susanne G. Loeber
___
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] MetaPost with Multiple Variable Sections

2019-09-18 Thread Jeroen
I have been working with MetaPost as following, which worked fine with one
startMPcode section with variables, but with 2 startMPcode Metapost
sections, it keeps telling me the numbers dont add up:


\definefloat  [floatright][figure]
\setupfloat   [floatright][default={right,none}]
\setuplayout  [backspace=20mm,width=170mm,topspace=20mm,height=250mm]

\starttext

\placefloatright{}{
\startMPcode
pair a, b;
a := (0,0);
b := (50,50);
draw a -- b;
\stopMPcode}

\placefloatright{}{
\startMPcode
pair a;
a := 2cm;
draw fullcircle scaled (2*a);
\stopMPcode}

\stoptext


I also have tried with the startbuffer combination as below, but this gave
the same error codes. Is there any other way of working with multiple
MetaPost sections with variables in a single document?


\definefloat  [floatright][figure]
\setupfloat   [floatright][default={right,none}]
\setuplayout  [backspace=20mm,width=170mm,topspace=20mm,height=250mm]

\starttext

\startbuffer
\startMPcode
pair a, b;
a := (0,0);
b := (50,50);
draw a -- b;
\stopMPcode
\stopbuffer

\floatright{}{\getbuffer}

\startbuffer
\startMPcode
pair a;
a := 2cm;
draw fullcircle scaled (2*a);
\stopMPcode
\stopbuffer

\floatright{}{\getbuffer}

\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] Cross referencing by using \useexternaldoument

2019-08-18 Thread Wolfgang Schuster

Willi Egger schrieb am 18.08.2019 um 17:30:

Hi all,

there is an old thread concerning this issue from september 2015. It appears 
unfortunately, that this issue persists.

You can reference to places inside a document, but references to an outside 
document are broken. The links do not work and no page numbers or texts are 
typeset from the external document.

Can someone help me to solve this?

I tried your example and had no problem to get the page and section numbers
from the other document. What you have to ensure is that the tuc-file 
for the

other document you want to refer dies exist because context uses it to get
the values for the numbers etc.

Wolfgang

local utilitydata = { }

utilitydata.comment={
 ["escape"]="[===[ ... ]===]",
 ["file"]="two",
 ["format"]="cont-en",
 ["stamp"]="2019.08.17 11:46",
 ["version"]=1.31,
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.variables then utilitydata.job.variables = { } end

utilitydata.job.variables.checksums={
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.variables then utilitydata.job.variables = { } end

utilitydata.job.variables.collected={
 ["macros"]={},
 ["randomseed"]=0.20989990234375,
 ["sectionblockorder"]={},
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.structure then utilitydata.job.structure = { } end

utilitydata.job.structure.collected={
 ["branches"]={},
 ["name"]="",
 ["type"]="text",
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.positions then utilitydata.job.positions = { } end

utilitydata.job.positions.collected={
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.passes then utilitydata.job.passes = { } end

utilitydata.job.passes.collected={
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.datasets then utilitydata.job.datasets = { } end

utilitydata.job.datasets.collected={
}

if not utilitydata.job then utilitydata.job = { } end
if not utilitydata.job.pagestates then utilitydata.job.pagestates = { } end

utilitydata.job.pagestates.collected={
}

if not utilitydata.structures then utilitydata.structures = { } end
if not utilitydata.structures.specials then utilitydata.structures.specials = { 
} end

utilitydata.structures.specials.collected={
}

if not utilitydata.structures then utilitydata.structures = { } end
if not utilitydata.structures.sections then utilitydata.structures.sections = { 
} end

utilitydata.structures.sections.collected={
 {
  ["block"]="bodypart",
  ["conversionset"]="default",
  ["language"]="en",
  ["numbers"]=1,
  ["separatorset"]="default",
  ["set"]="all",
 },
}

if not utilitydata.structures then utilitydata.structures = { } end
if not utilitydata.structures.counters then utilitydata.structures.counters = { 
} end

utilitydata.structures.counters.collected={
 ["chemical"]={
  { 0, 0 },
 },
 ["combination"]={
  { 0 },
 },
 ["endnote"]={
  { 0 },
 },
 ["figure"]={
  { 0, 0 },
 },
 ["footnote"]={
  { 0 },
 },
 ["formula"]={
  { 0, 0 },
 },
 ["graphic"]={
  { 0, 0 },
 },
 ["intermezzo"]={
  { 0, 0 },
 },
 ["itemgroup:itemize"]={
  { 0, 0 },
 },
 ["linenote"]={
  { 0 },
 },
 ["paragraph"]={
  { 0, 0 },
 },
 ["realpage"]={
  { 4 },
 },
 ["subpage"]={
  { 4 },
 },
 ["table"]={
  { 0, 0 },
 },
 ["textnote:note"]={
  { 0 },
 },
 ["userpage"]={
  { 4 },
 },
}

if not utilitydata.structures then utilitydata.structures = { } end
if not utilitydata.structures.lists then utilitydata.structures.lists = { } end

utilitydata.structures.lists.collected={
 {
  ["metadata"]=2,
  ["numberdata"]=3,
  ["references"]={
   ["block"]="bodypart",
   ["internal"]=1,
   ["realpage"]=4,
   ["reference"]="sec:second",
   ["section"]=1,
   ["used"]="fit",
  },
  ["titledata"]={
   ["label"]="chapter",
   ["title"]="Second document",
  },
 },
}

if not utilitydata.structures then utilitydata.structures = { } end
if not utilitydata.structures.pages then utilitydata.structures.pages = { } end

utilitydata.structures.pages.collected={
 {
  ["block"]="bodypart",
  ["number"]=1,
  ["numberdata"]=4,
  ["prefixdata"]=5,
  ["state"]="start",
 },
 {
  ["block"]="bodypart",
  ["number"]=2,
  ["numberdata"]=4,
  ["prefixdata"]=5,
 

Re: [NTG-context] OSFONTDIR

2019-08-16 Thread Hans Hagen

On 8/16/2019 7:40 AM, Henning Hraban Ramm wrote:

Am 2019-08-15 um 23:57 schrieb Hans Hagen :

On 8/15/2019 11:06 PM, Henning Hraban Ramm wrote:

Am 2019-08-15 um 08:08 schrieb Huseyin Özoguz :

I just moved to Win 10 (coming from Win 7) with a fresh system and installed 
Context.

My problem: The manual installed fonts are not stored in "Windows/Font" like before, but 
in "AppData/Local/Microsoft/Windows/Fonts" – the default Fonts, which came with windows, 
are still there in Windows/Font.

If I change OSFONTDIR to the new path and execute "mtxrun --script font 
--reload" after that, the new fonts are found by Context, but that seems no good 
way, because now the default-fonts are not found.

How to solve this situation? How can I prevent Win10 from installing manual installed 
fonts into this other path and instead install it into "Windows/Font"directly? 
(Other programs like Corel etc. have no problems finding those other fonts, regardles of 
there location or OSFONTDIR.)

Another solution: Give Context two pathes to look for fonts, is that possible?

OSFONTDIR is like other PATH variables, it can contain several paths, separated 
by ; (at least on Linux and OSX, maybe it’s : on Windows). My OSFONTDIR is 
rather lengthy to include my collections of commercial and free fonts (beware, 
that makes ConTeXt slow).

in what sense slow ... more fonts means of course a longer identification time 
when the database is made but that happen seldom (unless you refer to an 
unknown font in your document in which case a scan happens, but that should 
then be fixed in the style)


It’s been a while since I had my whole collection of literally thousands of 
fonts in OSFONTDIR, but re-scanning happens quite often  – yes, probably 
something’s wrong in my typescripts, or I call for an invalid combination 
somewhere.

At the moment I just get this error message on every run:

resolvers   | globbing | confusing filename, name: 
'SourceSansPro-SemiBold.ttf', lower: 'sourcesanspro-semibold.ttf', already: 
'SourceSansPro-Semibold.ttf'

maybe

\enabletrackers[fonts.names,fonts.warnings,fonts.specifications,fonts.rejections]

gives some clue. Normally the database is rescanned when there is a font 
not found (maybe new one) or the format is remade, but that then should 
be once. After that a bad typescript should jkust trigger missing font 
warnings.



I don’t understand what’s wrong with that font.


maybe nothing but some fonts can be on the system twice or have an 
internal name that is wrong or clashs with another one. In the worst 
case the clash could result in (maybe) this random hash ordering (per 
run), so you toggle between instances.


It's anyway why I always put fonts in texmf-fonts/fonts/data, even 
system fonts, just to be sure that i get want i expect.


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] OSFONTDIR

2019-08-15 Thread Henning Hraban Ramm
> Am 2019-08-15 um 23:57 schrieb Hans Hagen :
> 
> On 8/15/2019 11:06 PM, Henning Hraban Ramm wrote:
>>> Am 2019-08-15 um 08:08 schrieb Huseyin Özoguz :
>>> 
>>> I just moved to Win 10 (coming from Win 7) with a fresh system and 
>>> installed Context.
>>> 
>>> My problem: The manual installed fonts are not stored in "Windows/Font" 
>>> like before, but in "AppData/Local/Microsoft/Windows/Fonts" – the default 
>>> Fonts, which came with windows, are still there in Windows/Font.
>>> 
>>> If I change OSFONTDIR to the new path and execute "mtxrun --script font 
>>> --reload" after that, the new fonts are found by Context, but that seems no 
>>> good way, because now the default-fonts are not found.
>>> 
>>> How to solve this situation? How can I prevent Win10 from installing manual 
>>> installed fonts into this other path and instead install it into 
>>> "Windows/Font"directly? (Other programs like Corel etc. have no problems 
>>> finding those other fonts, regardles of there location or OSFONTDIR.)
>>> 
>>> Another solution: Give Context two pathes to look for fonts, is that 
>>> possible?
>> OSFONTDIR is like other PATH variables, it can contain several paths, 
>> separated by ; (at least on Linux and OSX, maybe it’s : on Windows). My 
>> OSFONTDIR is rather lengthy to include my collections of commercial and free 
>> fonts (beware, that makes ConTeXt slow).
> in what sense slow ... more fonts means of course a longer identification 
> time when the database is made but that happen seldom (unless you refer to an 
> unknown font in your document in which case a scan happens, but that should 
> then be fixed in the style)

It’s been a while since I had my whole collection of literally thousands of 
fonts in OSFONTDIR, but re-scanning happens quite often  – yes, probably 
something’s wrong in my typescripts, or I call for an invalid combination 
somewhere.

At the moment I just get this error message on every run:

resolvers   | globbing | confusing filename, name: 
'SourceSansPro-SemiBold.ttf', lower: 'sourcesanspro-semibold.ttf', already: 
'SourceSansPro-Semibold.ttf'

I don’t understand what’s wrong with that font.


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
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] align figures verticaly centered in \startcombination mode

2019-08-08 Thread Wolfgang Schuster

Jeong Dal schrieb am 08.08.2019 um 21:02:

Dear all,

In the following example, “align=middle” works for horizontal center.
Is there any way to align two figures with different height in vertically 
centered?

Thank you.

Best regards,

Dalyoung

\useMPlibrary[dum]
\setupinteraction[state=start]
\usemodule[pre-60]
\setupcombination[align=middle]
\starttext
\StartSteps
\startplacefigure[]
{\startcombination[2*2]
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
{{\externalfigure[bogus][height=.1\makeupheight]}{}\FlushStep}
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
{{\externalfigure[bogus][width=.3\makeupwidth]}{}\FlushStep}
\stopcombination}
\stopplacefigure
\StopSteps

\stoptext
Each entry in the combination environment consists of the content and a 
caption
but in your example you omitted the caption for each figures and as a 
result the second

and figure graphics are taken as caption.

To get the expected output you can provide a empty argument for the caption
of each graphic or use a table to arrange the images.

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] Figure labels in combinations

2019-07-30 Thread Luca Mauri
I am trying to typeset two or more figures next to each other, inside a 
floating environment, each with its own label. I am familiar with a mechanism 
of the form

\startplacefigure[reference=pic]
\startcombination[3*1]
{figure 1}{a}
{figure 2}{b}
{figure 3}{c}
\stopcombination
\stopplacefigure

which then requires
\in{figure}{b}[pic]
to reference, as documented on the context wiki. The problem with this 
mechanism is that if figure 2, say, is moved elsewhere and ts label becomes 
"d", all references to it have to be corrected by hand. Is there a mechanism to 
reference directly the figures inside, without having to depend on the outer 
float? What I am thinking of, is an hypothetical "\placeinlinefigure" command, 
so that one could write, in analogy with \placefigure,
\startplacefigure[number=no]
\startcombination[3*1]
{\placeinlinefigure[pic1]{figure 1}}{}
{\placeinlinefigure[pic2]{figure 2}}{}
{\placeinlinefigure[pic3]{figure 3}}{}
\stopcombination
\stopplacefigure

so that one could then use
\in[pic1]
Of course, there is then the issue of having the ability to use the same 
counter of the placefigure environment, and of disabling the combination 
caption. I could not find anything along these lines in the documentation; also 
tried to concoct a "nonfloating" float or to use an enumeration, but was not 
able to come up with a solution.
Luca
___
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] Spacing after combination

2019-07-16 Thread Alan Braslau
On Tue, 16 Jul 2019 22:32:39 +0200
Marco Patzer  wrote:

> However, I'd prefer to not have another environment around the
> combinations, but if there's no other way, I'd settle for your
> approach. So far that seems to be the best choice.

A combination is a construction, not really an "environment".

Alan
___
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] Spacing after combination

2019-07-16 Thread Marco Patzer
On Tue, 16 Jul 2019 21:09:15 +0200
Wolfgang Schuster  wrote:

> A alternative to using floats is to put the combination in a 
> linecorrection environment, i.e.
> 
> \startlinecorrection
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection
> 
> or
> 
> \startlinecorrection[blank]
>    \startcombination [2*2]
>    ...
>    \stopcombination
> \stoplinecorrection

I hadn't thought of this. That's better suited than a float.
However, I'd prefer to not have another environment around the
combinations, but if there's no other way, I'd settle for your
approach. So far that seems to be the best choice.

Thanks for the quick response.

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


Re: [NTG-context] Spacing after combination

2019-07-16 Thread Wolfgang Schuster

Willi Egger schrieb am 16.07.2019 um 20:46:

Marco,

there is a \setupcombination command:

\setupcombination [...,...] [..,..=..,..]
1 NAME
2 nx
ny
width height location distance alternative align continue before after 
inbetween style
color
OPT
= NUMBER
= NUMBER
= fit DIMENSION
= fit DIMENSION
= left middle right top bottom = DIMENSION
= label text
= inherits: \setupalign
= yes no
= COMMAND
= COMMAND
= COMMAND
= STYLE COMMAND
= COLOR

I hope this will enable you to get what you want.
None of these options is applied at the begin or end of the environment 
(use the following setup in the example).


\setupcombination
  [   before={\endgraf{\tttf    [before]}\endgraf},
   after={\endgraf{\tttf [after]}\endgraf},
   inbetween={\endgraf{\tttf [inbetween]}\endgraf}]


A alternative to using floats is to put the combination in a 
linecorrection environment, i.e.


\startlinecorrection
  \startcombination [2*2]
  ...
  \stopcombination
\stoplinecorrection

or

\startlinecorrection[blank]
  \startcombination [2*2]
  ...
  \stopcombination
\stoplinecorrection

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
___


Re: [NTG-context] Spacing after combination

2019-07-16 Thread Willi Egger
Marco,

there is a \setupcombination command:

\setupcombination [...,...] [..,..=..,..]
1 NAME
2 nx
ny
width height location distance alternative align continue before after 
inbetween style
color
OPT
= NUMBER
= NUMBER
= fit DIMENSION
= fit DIMENSION
= left middle right top bottom = DIMENSION
= label text
= inherits: \setupalign
= yes no
= COMMAND
= COMMAND
= COMMAND
= STYLE COMMAND
= COLOR

I hope this will enable you to get what you want.

Willi

> On 16 Jul 2019, at 17:08, Marco Patzer  wrote:
> 
> Hi!
> 
> Is there a way to influence the spacing after a combination is
> placed?
> 
> \useMPlibrary [dum]
> 
> \starttext
> 
> \startcombination [2*2]
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Foo\stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Bar\stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Lorem  \stopcaption
>  \startcontent \externalfigure  \stopcontent
>  \startcaption Ipsum  \stopcaption
> \stopcombination
> 
> \samplefile{knuth}
> 
> \stoptext
> 
> I know I could wrap it in a float and use the float to control the
> spacing, but it would be great if I could do without that float.
> 
> 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://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] Spacing after combination

2019-07-16 Thread Marco Patzer
Hi!

Is there a way to influence the spacing after a combination is
placed?

\useMPlibrary [dum]

\starttext

\startcombination [2*2]
  \startcontent \externalfigure  \stopcontent
  \startcaption Foo\stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Bar\stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Lorem  \stopcaption
  \startcontent \externalfigure  \stopcontent
  \startcaption Ipsum  \stopcaption
\stopcombination

\samplefile{knuth}

\stoptext

I know I could wrap it in a float and use the float to control the
spacing, but it would be great if I could do without that float.

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


Re: [NTG-context] Broken kerning if hz is turned on?

2019-06-02 Thread Hans Hagen

On 6/2/2019 1:07 PM, Mikael P. Sundqvist wrote:
On Sun, Jun 2, 2019 at 12:47 PM Hans Hagen <mailto:j.ha...@xs4all.nl>> wrote:


On 6/2/2019 8:36 AM, Mikael P. Sundqvist wrote:

 > I attach the output (latest lmtx). The word "endast" shows up as
"endas t".
that one is too weird indeed, might be a bug


I just tried with latest mkiv, and could not see the problem, so this 
might be some combination of lucida and lmtx. If so, that is good news, 
I guess.


Thanks for looking into it!

It has to do with values of threshold. I adapted the code a bit (next beta)

- a threshold is a pct of the font size (was designsize)
- i now default to 5pct which is .5 pt for a 10 pt font
- i also limit to max 10 pct and issue a warnign when > 5pct
- lucida might come out better with values < 5

I'm still considering to default to just .5pt but that is something I 
need to discuss with Wolfgang. Also a matter of testing.


These thresholds also relate to the size of the pdf file (small values 
means larger files). Now, another thing to keep in mind is that each 
expansion change (in one line there can be different expansion factors 
used) also triggeres a resync.


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] Unicode mathematics in ConTeXt

2019-05-04 Thread Hamid,Idris
On Sat, 04 May 2019 04:32:19 -0600, Wolfgang Schuster
 wrote:

> Hi Idris,
>
> please read this: https://www.w3.org/TR/unicode-xml/#Superscripts

Many thanks. The issue is clearer now, e.g.,

===
When used in mathematical context (MathML) it is recommended to
consistently use style markup for superscripts and subscripts. This is
because mathematical layout allows not just individual symbols, but entire
expressions to be superscripted or subscripted in a regular, nested manner.
===

Of course, consistent use of style markup means that we can't naively
extract superscript text from the pdf, e.g., \CATCA becomes 퓒nt.

OTOH, issues 4.i and 4.ii below are still perplexing. Are there any
workarounds?

Thanks again.

Best wishes
Idris

> Hamid,Idris schrieb am 03.05.2019 um 21:40:
>> Dear gang,
>>
>> Ok, I've made some progress:
>>
>> 1. tex-gyre etc. *do* support Unicode mathematics, but the version of
>> ConTeXt I was using had produced the wrong encoding in the pdf output.  
>> For
>> example, U+1D4D2 (퓒) in the input was being mapped to U+2D4D2 in the
>> output.
>>
>> Updating to the latest beta appears to have fixed this issue.
>>
>> 2. tex-gyre etc. appears to be missing some superscript characters,  
>> e.g.,
>> ⁿ (U+207F).
>>
>> 3. New example:
>>
>> ===
>> \setupbodyfont
>> [cambria,12pt]
>> % [pagella,12pt]
>> % [times,12pt]
>>
>> % \starttext
>> \startTEXpage
>> \def\ANTI{{^{\rm nt}}}
>> \def\ANTIU{{^{\rm ⁿᵗ}}}
>>
>> \def\CATCA{$\cal \bf C\ANTI$}
>> \def\CATCAU{$퓒\ANTIU$}
>>
>> 퓒 \CATCA \CATCAU
>> \stopTEXpage
>> % \stoptext
>> ===
>>
>> \CATCAU and \ANTIU use Unicode characters and superscripts directly,
>> instead of the old TeX method.
>>
>> 4. Issues. In the pdf output of \CATCAU:
>> i)   Why does ConTeXt make the second superscript larger than the first?
>> ii)  If one copies the text of the pdf output to an editor - even this
>> email client - the second superscript moves to a new line:
>>
>> 퓒 ⁿ
>> t
>>
>> Why does this happen? Is this a bug?
>>
>> 5. Here is what we want: 퓒 ⁿᵗ
>>
>> What is the proper or best way to get a character-superscript  
>> combination
>> in ConTeXt whose output can be copied and pasted to an editor and give  
>> the
>> correct result? What am I missing?
>>
>> Thank you in advance.
>>
>> Best wishes
>> Idris
>>
>> On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris
>>  wrote:
>>
>>> Dear gang,
>>>
>>> I need to convert a document from TeX-style to Unicode mathematics. For
>>> example:
>>>
>>> \starttext
>>> \def\ANTI{{^{\rm nt}}}
>>> \def\CATCA{$\cal \bf C\ANTI$}
>>>
>>> \CATCA
>>> \stoptext
>>>
>>> Issues:
>>>
>>> 1. I need calligraphic characters, but the relevant characters in
>>> latinmodern-math.otf are not encoded in (standard) Unicode. The same  
>>> goes
>>> for the tex-gyre-math fonts.
>>>
>>> 2. What comprehensive unicode-math fonts do you recommend as an
>>> alternative?
>>>
>>> 3. In the above example, \cal is used.
>>>
>>> 4. Other issues may arise, e.g., getting subscripts and superscripts
>>> correct. How might one rewrite the above with Unicode mathematics in
>>> mind?
>>> Is there a My Way or some other guide to Unicode mathematics in  
>>> ConTeXt?
>>>
>>> This writer has never had to think about this matter before so this is
>>> all
>>> new ground to learn. Thank you in advance for any guidance.
>>>
>>> Best wishes
>>> Idris
-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512
___
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] Unicode mathematics in ConTeXt

2019-05-04 Thread Wolfgang Schuster

Hi Idris,

please read this: https://www.w3.org/TR/unicode-xml/#Superscripts

Wolfgang


Hamid,Idris schrieb am 03.05.2019 um 21:40:

Dear gang,

Ok, I've made some progress:

1. tex-gyre etc. *do* support Unicode mathematics, but the version of
ConTeXt I was using had produced the wrong encoding in the pdf output. For
example, U+1D4D2 (퓒) in the input was being mapped to U+2D4D2 in the
output.

Updating to the latest beta appears to have fixed this issue.

2. tex-gyre etc. appears to be missing some superscript characters, e.g.,
ⁿ (U+207F).

3. New example:

===
\setupbodyfont
[cambria,12pt]
% [pagella,12pt]
% [times,12pt]

% \starttext
\startTEXpage
\def\ANTI{{^{\rm nt}}}
\def\ANTIU{{^{\rm ⁿᵗ}}}

\def\CATCA{$\cal \bf C\ANTI$}
\def\CATCAU{$퓒\ANTIU$}

퓒 \CATCA \CATCAU
\stopTEXpage
% \stoptext
===

\CATCAU and \ANTIU use Unicode characters and superscripts directly,
instead of the old TeX method.

4. Issues. In the pdf output of \CATCAU:
i)   Why does ConTeXt make the second superscript larger than the first?
ii)  If one copies the text of the pdf output to an editor - even this
email client - the second superscript moves to a new line:

퓒 ⁿ
t

Why does this happen? Is this a bug?

5. Here is what we want: 퓒 ⁿᵗ

What is the proper or best way to get a character-superscript combination
in ConTeXt whose output can be copied and pasted to an editor and give the
correct result? What am I missing?

Thank you in advance.

Best wishes
Idris

On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris
 wrote:


Dear gang,

I need to convert a document from TeX-style to Unicode mathematics. For
example:

\starttext
\def\ANTI{{^{\rm nt}}}
\def\CATCA{$\cal \bf C\ANTI$}

\CATCA
\stoptext

Issues:

1. I need calligraphic characters, but the relevant characters in
latinmodern-math.otf are not encoded in (standard) Unicode. The same goes
for the tex-gyre-math fonts.

2. What comprehensive unicode-math fonts do you recommend as an
alternative?

3. In the above example, \cal is used.

4. Other issues may arise, e.g., getting subscripts and superscripts
correct. How might one rewrite the above with Unicode mathematics in
mind?
Is there a My Way or some other guide to Unicode mathematics in ConTeXt?

This writer has never had to think about this matter before so this is
all
new ground to learn. Thank you in advance for any guidance.

Best wishes
Idris




___
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] Unicode mathematics in ConTeXt

2019-05-03 Thread Hamid,Idris
Dear gang,

Ok, I've made some progress:

1. tex-gyre etc. *do* support Unicode mathematics, but the version of  
ConTeXt I was using had produced the wrong encoding in the pdf output. For  
example, U+1D4D2 (퓒) in the input was being mapped to U+2D4D2 in the  
output.

Updating to the latest beta appears to have fixed this issue.

2. tex-gyre etc. appears to be missing some superscript characters, e.g.,  
ⁿ (U+207F).

3. New example:

===
\setupbodyfont
   [cambria,12pt]
   % [pagella,12pt]
   % [times,12pt]

% \starttext
\startTEXpage
\def\ANTI{{^{\rm nt}}}
\def\ANTIU{{^{\rm ⁿᵗ}}}

\def\CATCA{$\cal \bf C\ANTI$}
\def\CATCAU{$퓒\ANTIU$}

퓒 \CATCA \CATCAU
\stopTEXpage
% \stoptext
===

\CATCAU and \ANTIU use Unicode characters and superscripts directly,  
instead of the old TeX method.

4. Issues. In the pdf output of \CATCAU:
i)   Why does ConTeXt make the second superscript larger than the first?
ii)  If one copies the text of the pdf output to an editor - even this  
email client - the second superscript moves to a new line:

퓒 ⁿ
t

Why does this happen? Is this a bug?

5. Here is what we want: 퓒 ⁿᵗ

What is the proper or best way to get a character-superscript combination  
in ConTeXt whose output can be copied and pasted to an editor and give the  
correct result? What am I missing?

Thank you in advance.

Best wishes
Idris

On Wed, 01 May 2019 14:58:06 -0600, Hamid,Idris  
 wrote:

> Dear gang,
>
> I need to convert a document from TeX-style to Unicode mathematics. For
> example:
>
> \starttext
> \def\ANTI{{^{\rm nt}}}
> \def\CATCA{$\cal \bf C\ANTI$}
>
> \CATCA
> \stoptext
>
> Issues:
>
> 1. I need calligraphic characters, but the relevant characters in
> latinmodern-math.otf are not encoded in (standard) Unicode. The same goes
> for the tex-gyre-math fonts.
>
> 2. What comprehensive unicode-math fonts do you recommend as an
> alternative?
>
> 3. In the above example, \cal is used.
>
> 4. Other issues may arise, e.g., getting subscripts and superscripts
> correct. How might one rewrite the above with Unicode mathematics in  
> mind?
> Is there a My Way or some other guide to Unicode mathematics in ConTeXt?
>
> This writer has never had to think about this matter before so this is  
> all
> new ground to learn. Thank you in advance for any guidance.
>
> Best wishes
> Idris


-- 
Idris Samawi Hamid, Professor
Department of Philosophy
Colorado State University
Fort Collins, CO 80512

scratch.pdf
Description: scratch.pdf


scratch.tex
Description: scratch.tex
___
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] Welcome to LMTX

2019-04-01 Thread Hans Hagen

On 4/1/2019 5:36 PM, Joseph Wright wrote:

On 01/04/2019 15:55, Hans Hagen wrote:

Hi all,

After more than a decade of mkiv and luatex it's time to move on to a 
new stage. After all, nowadays a ten-year old program is considered to 
be really old, especially for those who consider a manual typeset 
three years ago as an indication of lack of progress. Therefore: 
welcome to lua(meta)tex 2.00 and context lmtx, the follow up on luatex 
and mkiv, if you dare. It has many deep-down changes but aims to be a 
simple evolution.


The average user will probably not notice many differences but 
nevertheless, when you are in for something new, you can give it a try:


  http://www.pragma-ade.nl/install.htm

Of course you should keep your current installation too. We're sure 
that there will be issues so when you run into unexpected surprises, 
you can blame us (and fall-back on the current Context beta and 
luatex). Of course with the proper mwe's (tex, metapost, lua, or a 
combination of these) we will try to solve them all, we have been 
testing. In due time more about this project will be revealed.


Hans Hagen & Alan Braslau


Hi Hans,

Thanks for the link to the code. A quick install suggests that a 'hello 
world' is working nicely from ConTeXt. However, if I try what you might 
expect from me


     luametatex --ini latex.ltx

things go a bit wrong:

     This is LuaMetaTeX, Version 2.00.0  (INITEX)
     ! error:  (system): missing find_write_file callback

(I also notice there is no plain-like format for testing, or at least 
that just "luametatex" yields an error.)


i might cook up something plain but it has a very low priority, after 
all, plain works with luatex


Clearly things work for ConTeXt, so there must be some early Lua magic 
or similar required. Any thoughts? (I don't get a .log or any other 
output.)
it's a stripped down "lean and mean" engine so it's very unlikely to 
work with plain and latex or other macro packages out of the box


a manual will come available around the context meeting, articles will 
be published the coming months and reveal a bit more


(all this involved over half a year of development and exploration, 
which itself is documented which will also surface around the ctx 
meeting or when i feel the need)


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] Welcome to LMTX

2019-04-01 Thread Joseph Wright

On 01/04/2019 15:55, Hans Hagen wrote:

Hi all,

After more than a decade of mkiv and luatex it's time to move on to a 
new stage. After all, nowadays a ten-year old program is considered to 
be really old, especially for those who consider a manual typeset three 
years ago as an indication of lack of progress. Therefore: welcome to 
lua(meta)tex 2.00 and context lmtx, the follow up on luatex and mkiv, if 
you dare. It has many deep-down changes but aims to be a simple evolution.


The average user will probably not notice many differences but 
nevertheless, when you are in for something new, you can give it a try:


  http://www.pragma-ade.nl/install.htm

Of course you should keep your current installation too. We're sure that 
there will be issues so when you run into unexpected surprises, you can 
blame us (and fall-back on the current Context beta and luatex). Of 
course with the proper mwe's (tex, metapost, lua, or a combination of 
these) we will try to solve them all, we have been testing. In due time 
more about this project will be revealed.


Hans Hagen & Alan Braslau


Hi Hans,

Thanks for the link to the code. A quick install suggests that a 'hello 
world' is working nicely from ConTeXt. However, if I try what you might 
expect from me


luametatex --ini latex.ltx

things go a bit wrong:

This is LuaMetaTeX, Version 2.00.0  (INITEX)
! error:  (system): missing find_write_file callback

(I also notice there is no plain-like format for testing, or at least 
that just "luametatex" yields an error.)


Clearly things work for ConTeXt, so there must be some early Lua magic 
or similar required. Any thoughts? (I don't get a .log or any other output.)


Joseph

___
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] Welcome to LMTX

2019-04-01 Thread Hans Hagen

Hi all,

After more than a decade of mkiv and luatex it's time to move on to a 
new stage. After all, nowadays a ten-year old program is considered to 
be really old, especially for those who consider a manual typeset three 
years ago as an indication of lack of progress. Therefore: welcome to 
lua(meta)tex 2.00 and context lmtx, the follow up on luatex and mkiv, if 
you dare. It has many deep-down changes but aims to be a simple evolution.


The average user will probably not notice many differences but 
nevertheless, when you are in for something new, you can give it a try:


 http://www.pragma-ade.nl/install.htm

Of course you should keep your current installation too. We're sure that 
there will be issues so when you run into unexpected surprises, you can 
blame us (and fall-back on the current Context beta and luatex). Of 
course with the proper mwe's (tex, metapost, lua, or a combination of 
these) we will try to solve them all, we have been testing. In due time 
more about this project will be revealed.


Hans Hagen & Alan Braslau

-
  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] degrade module

2019-02-18 Thread Alan Braslau
On Mon, 18 Feb 2019 22:09:32 +0100
Peter Münster  wrote:

> On Mon, Feb 18 2019, Alan Braslau wrote:
> 
> > My working solution is to put figures in subdirectories by resolution,  
> 
> The purpose of the downsample module is something else: a well defined
> resolution of the image in the PDF-file. A bitmap image does not have a
> resolution, only a width and a height in pixels. The resolution gets
> defined, when you specify the real dimensions.
> 

Incorrect, an image file contains width and height (in pixels) as well as a 
resolution, and the combination gives real dimensions (for a natural size).

A proper scan of a real object specifies all of this.

Alan
___
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] Missing number, treated as zero

2019-02-15 Thread Saša Janiška
On Fri, 15 Feb 2019 13:59:46 +0100
Wolfgang Schuster  wrote:

> You need (note the “start”)
> 
>  \startsection[title={...}]
> 
> when you use \stopsection.

Ahh, I managed to try just those combination which do not work...feeling really
embarrassed. :-(

Thank you for being kind and exposing my stupidity. ;)


Sincerely,
Gour

-- 
A person is said to be established in self-realization and is called a
yogī [or mystic] when he is fully satisfied by virtue of acquired
knowledge and realization. Such a person is situated in transcendence
and is self-controlled. He sees everything — whether it be pebbles,
stones or gold — as the same.


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


Re: [NTG-context] Sorting registers method for "uppercase like lowercase, diacritics ignored"

2019-01-20 Thread Henning Hraban Ramm
I don’t know if this setup is supposed to work with \place..., for me

\setupregister[method={zm,pm,zc,zm,uc}] works.

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

Am 2019-01-20 um 21:59 schrieb Marcus Vinicius Mesquita 
:

> Dear list,
> 
> In the wiki page https://wiki.contextgarden.net/Registers it is said that:
> 
> - There’s no preset for the combination "uppercase like lowercase, diacritics 
> ignored", try "zm,pm,zc,zm,uc".
> 
> Well, I tried all possible permutations thereof, and also the predefined 
> methods, and none gives what my editor wants, which is just "uppercase like 
> lowercase, diacritics ignored".
> See MWE attached. 
> Please, would somebody help me achieve the desired result?
> 
> TIA
> 
> ConTeXt version:
> ConTeXt Process Management 1.02
> current version: 2019.01.19 12:06
> 
> Marcus Vinicius 
> ___
> 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] Sorting registers method for "uppercase like lowercase, diacritics ignored"

2019-01-20 Thread Marcus Vinicius Mesquita
Dear list,

In the wiki page https://wiki.contextgarden.net/Registers it is said that:

- There’s no preset for the combination "uppercase like lowercase,
diacritics ignored", try "zm,pm,zc,zm,uc".

Well, I tried all possible permutations thereof, and also the predefined
methods, and none gives what my editor wants, which is just "uppercase like
lowercase, diacritics ignored".
See MWE attached.
Please, would somebody help me achieve the desired result?

TIA

ConTeXt version:
ConTeXt Process Management 1.02
current version: 2019.01.19 12:06

Marcus Vinicius


MWE.pdf
Description: Adobe PDF document


MWE.tex
Description: TeX 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] \quad confusion

2018-12-27 Thread Wolfgang Schuster

Floris van Manen schrieb am 27.12.18 um 10:43:

When trying to typeset, luatex kept complaining about incorrect parameters for 
‘minus’.
There is no \minus command in the source however.
So it turns out that the combination of using \quad with ‘plus’, 'minus', and 
some more make the error appear.
If i rewrite minus by {minus} the error does not show up either.

\starttext
\quad minuskel
\stoptext

Where do i go wrong?


There is nothing wrong with your example but the definition for \quad isn’t.

The \quad command uses the \hskip primitive which accepts besides the 
normal values which is inserted between the content also a variable part 
to shrink or stretch the inserted space. This variable part uses the 
“plus” and “minus” keywords (e.g. \hskip 1em minus .2em) which leads to 
the problem in your case.


One could stop TeX from parsing for the optional keywords with a 
delimiter for the \hskip command but this delimiter is missing in the 
definition for \quad. I’ll send a fix to the dev list and the problem 
should be fixed in the next beta but for the meantime you can add \relax 
after \quad (i.e. \quad\relax ...) to get rid of the error.


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
___

Re: [NTG-context] \quad confusion

2018-12-27 Thread Henri Menke
On 12/27/18 11:08 PM, Henri Menke wrote:
> On 12/27/18 10:43 PM, Floris van Manen wrote:
>> When trying to typeset, luatex kept complaining about incorrect parameters 
>> for ‘minus’.
>> There is no \minus command in the source however.
>> So it turns out that the combination of using \quad with ‘plus’, 'minus', 
>> and some more make the error appear.
>> If i rewrite minus by {minus} the error does not show up either.
> 
> That's because the skips in spac-hor.mkiv are defined like this
> 
> \unexpanded\def\enskip{\hskip.5\emwidth}
> \unexpanded\def\quad  {\hskip  \emwidth}
> \unexpanded\def\qquad {\hskip 2\emwidth}
> 
> The syntax for the \hskip primitive is
> 
> \hskip
> 
> and the definition of  is
> 
> plusminus
> 
> So “\quad minuskel” will expand to “\hskip\emwidth minuskel”.  You see
> what's going to happen?  The “minus” will be interpreted as part of the
> glue definition but no  is following it, so you get an error.  To
> fix the bug, the definitions in spac-hor.mkiv have to changed
> 
> \unexpanded\def\enskip{\hskip.5\emwidth\relax}
> \unexpanded\def\quad  {\hskip  \emwidth\relax}
> \unexpanded\def\qquad {\hskip 2\emwidth\relax}
> 
> As a temporary workaround you can also just copy them into your document.

There is even a comment in the TeXbook about this exact issue.

\danger Horizontal glue is created in the same way, but with ^|\hskip|
instead of\/ ^|\vskip|. For example, plain \TeX\ defines ^|\enskip| as an
abbreviation for the command `|\hskip.5em\relax|'; this skips
horizontally by
one ``^{en},'' i.e., by exactly half of an em in the current font. There
is no
stretching or shrinking in an |\enskip|. The control sequence ^|\relax|
after `|.5em|' prevents \TeX\ from thinking that a ^{keyword}
is present, in case the text following |\enskip| just happens to begin
with `|plus|' or `|minus|'.

> 
>> 
>> 
>> \starttext
>> \quad minuskel
>> \stoptext
>> 
>> 
>> Where do i go wrong?
>> 
>> Thanks.
>> Floris
>> 
>> 
>> ___
>> 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] \quad confusion

2018-12-27 Thread Henri Menke
On 12/27/18 10:43 PM, Floris van Manen wrote:
> When trying to typeset, luatex kept complaining about incorrect parameters 
> for ‘minus’.
> There is no \minus command in the source however.
> So it turns out that the combination of using \quad with ‘plus’, 'minus', and 
> some more make the error appear.
> If i rewrite minus by {minus} the error does not show up either.

That's because the skips in spac-hor.mkiv are defined like this

\unexpanded\def\enskip{\hskip.5\emwidth}
\unexpanded\def\quad  {\hskip  \emwidth}
\unexpanded\def\qquad {\hskip 2\emwidth}

The syntax for the \hskip primitive is

\hskip

and the definition of  is

plusminus

So “\quad minuskel” will expand to “\hskip\emwidth minuskel”.  You see
what's going to happen?  The “minus” will be interpreted as part of the
glue definition but no  is following it, so you get an error.  To
fix the bug, the definitions in spac-hor.mkiv have to changed

\unexpanded\def\enskip{\hskip.5\emwidth\relax}
\unexpanded\def\quad  {\hskip  \emwidth\relax}
\unexpanded\def\qquad {\hskip 2\emwidth\relax}

As a temporary workaround you can also just copy them into your document.

> 
> 
> \starttext
> \quad minuskel
> \stoptext
> 
> 
> Where do i go wrong?
> 
> Thanks.
> Floris
> 
> 
> ___
> 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] \quad confusion

2018-12-27 Thread Floris van Manen
When trying to typeset, luatex kept complaining about incorrect parameters for 
‘minus’.
There is no \minus command in the source however.
So it turns out that the combination of using \quad with ‘plus’, 'minus', and 
some more make the error appear.
If i rewrite minus by {minus} the error does not show up either.


\starttext
\quad minuskel
\stoptext


Where do i go wrong?

Thanks.
Floris



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] graphics

2018-12-07 Thread luigi scarso
On Fri, Dec 7, 2018 at 9:06 AM Mikael P. Sundqvist  wrote:

> On Tue, Dec 4, 2018 at 6:03 PM Hans Hagen  wrote:
> >
> > Hi,
> >
> > As most mechanism are reasonable okay now we can look into what future
> > versions of ConteXt should provide in terms of functionality. The
> > (luatex) engine is also more of less finished or at least stable in
> > terms of functionality.
> >
> > One possible area of further development is graphics so I'd like to know
> > if there are (reasonable) demands for more graphics support using
> > metapost. Alan and I are on-and-off working on some extensions and one
> > of the things we discuss is visualization of data. The question is of
> > course what should be done in the lua/mp/tex combination and what
> > externally but the combination has some advantages. There has been
> > presentations and discussions at the last meeting and graphics is always
> > a nice topic, and also kind of rewarding in terms of development.
> >
> > Of course other demands can be formulated too, but these then need to
> > come with well defined descriptions (or mockup examples).
> >
> > 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
> >
> ___
>
> Hi,
>
> I don't know if what I describe below is along the lines you ask for,
> but here comes two wishes:
>
> 1) Full support for drawing implicit curve plots. For some curves,
> like a lemniscate
> (https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli) one can easily
> succeed by using a parametrisation, but sometimes one end up with
> equations and to find a parametrisation might be difficult (not to say
> impossible).

sure, see  eg
https://math.stackexchange.com/questions/904782/is-there-a-general-way-to-parameterize-all-implicit-functions


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

Re: [NTG-context] graphics

2018-12-07 Thread Mikael P. Sundqvist
On Tue, Dec 4, 2018 at 6:03 PM Hans Hagen  wrote:
>
> Hi,
>
> As most mechanism are reasonable okay now we can look into what future
> versions of ConteXt should provide in terms of functionality. The
> (luatex) engine is also more of less finished or at least stable in
> terms of functionality.
>
> One possible area of further development is graphics so I'd like to know
> if there are (reasonable) demands for more graphics support using
> metapost. Alan and I are on-and-off working on some extensions and one
> of the things we discuss is visualization of data. The question is of
> course what should be done in the lua/mp/tex combination and what
> externally but the combination has some advantages. There has been
> presentations and discussions at the last meeting and graphics is always
> a nice topic, and also kind of rewarding in terms of development.
>
> Of course other demands can be formulated too, but these then need to
> come with well defined descriptions (or mockup examples).
>
> 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
> ___

Hi,

I don't know if what I describe below is along the lines you ask for,
but here comes two wishes:

1) Full support for drawing implicit curve plots. For some curves,
like a lemniscate
(https://en.wikipedia.org/wiki/Lemniscate_of_Bernoulli) one can easily
succeed by using a parametrisation, but sometimes one end up with
equations and to find a parametrisation might be difficult (not to say
impossible). I asked about this a while ago and got a simple solution
working for that curve, but I think a general working solution would
be neat. I think the bernoulli lemniscate could be a good test curve,
since it intersect itself.

2) Support for transforming images in a more general way. With the
zscaled, slanted, ... we are able to transform any object in an affine
way. It would be nice to be able to transform any object in a more
general way (i.e. by a mapping defined by the user). The example code
below shows what happens in the complex plane with a grid and a curve
when the mapping z to z^2 is applied. Perhaps I am missing something,
but I'm not able to apply this to a piece of text for example, or to
apply it directly to a picture. Instead, I have to loop over all
separate paths. I think the ideal would be to have a "ftransformed"
(or with some other name), and then just define a function (as fun in
the example below), and then be able to do "draw X ftransformed fun;",
where X is some(any?) general object. Is that doable?

/Mikael

%%% Example code
\starttext
\startMPpage[offset=3bp]
u:=3cm;

def fun(expr x,y) = (x**2-y**2,2*x*y) enddef;

def sq(expr kv,s) =
fun(xpart point 0 along kv,ypart point 0 along kv)
  for i=s step s until 1: -- fun(xpart point i along kv,ypart point i
along kv) endfor
enddef;

path rp;
rp = (0,-0.8)..(0.7,-0.2)..(0.7,0.6){dir
150}..(-0.7,0.4)..(-0.4,-0.5){dir 0}..cycle;


% Draw the original grid and the path
for i = -1 step 1/10 until 1+eps:
 for j = -1 step 1/10 until 1+eps:
  draw ((i,-1)--(i,1)) scaled u;
  draw ((-1,j)--(1,j)) scaled u;
 endfor;
endfor;

draw rp scaled u withcolor darkred withpen pencircle scaled 2bp;

% Draw the grid and curve after map z->z^2
draw image(
for i = -1 step 1/10 until 1+eps:
 for j = 0 step 1/10 until 1+eps:
  draw (sq(((i,0)--(i,1)),1/100)) scaled u;
  draw (sq(((-1,j)--(1,j)),1/100)) scaled u;
 endfor;
endfor;
draw (sq(rp,1/100)) scaled u withcolor darkred withpen pencircle scaled 2bp;
) xshifted 2.5u;

\stopMPpage
\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] graphics

2018-12-05 Thread Procházka Lukáš Ing .

Hello,

would it be possible to provide some samples finally?

That would be very handy especially for those who are used to create plots via 
"several clicks on Excel ribbon".

Personally, I am interested in 2D plots to be created loading (an) external data file(s) 
(text files formed into tables with some headers and comments marked by a letter in the 
beginning of the line), often altered by Lua somehow (e.g. trimming "bad" 
values).
I am used to use tickz/pgfplots for this purpose; use of pgfplots is (probably) 
very powerful but one has to study a lot of pages to create a simple plot 
followed by many try-and-see.
Also, support for showing extremal values (local extremes) in 2d plots is 
something handy.

"My" typical 2d plot looks:

A
|
30  | 24.1 <- local extreme
| +
20  |  --- ---   15.6 <- local extreme
|/ \  +
10  |   -- ---
|
+->
10. 20.  30.  40.

Best regards,

Lukas


On Tue, 04 Dec 2018 19:54:54 +0100, Alan Braslau  
wrote:


On Tue, 4 Dec 2018 18:03:14 +0100
Hans Hagen  wrote:


Hi,

As most mechanism are reasonable okay now we can look into what
future versions of ConteXt should provide in terms of functionality.
The (luatex) engine is also more of less finished or at least stable
in terms of functionality.

One possible area of further development is graphics so I'd like to
know if there are (reasonable) demands for more graphics support
using metapost. Alan and I are on-and-off working on some extensions
and one of the things we discuss is visualization of data. The
question is of course what should be done in the lua/mp/tex
combination and what externally but the combination has some
advantages. There has been presentations and discussions at the last
meeting and graphics is always a nice topic, and also kind of
rewarding in terms of development.

Of course other demands can be formulated too, but these then need to
come with well defined descriptions (or mockup examples).


Hans is alluding to work that we are doing to explore the possibilities
of lua + MetaPost in the treatment and visualization of data,
efficiently, with the possibility of handling large quantities of data.
Lua does this particularly well.

My first exercise has been a complete rewrite of the John Hobby graph
macros. It was/is an exercise in recreating the functionality "from
scratch", trying to use lua effectively when needed. The code and
approach is entirely new. My use case was the analysis of a large set
of data - entirely ridiculous for graphical display but containing
"outliers" or instances that are significant, and it works! I am
trying to generalize, and am doing this in my "free time".

So the aim is two-fold:

1) to efficiently handle large datasets through the use of lua

2) to generalize the notion of user data space from the
two-dimensional drawing space of MetaPost (and the represented page),
and affine transformations of this 2D space to other coordinate
systems and dimensions. We are not thinking about 3D rendering or
raytracing, but rather simple projections and other transformations
such as polar coordinates. (Of course, log scales, for example are a
"simple" non-linear transformation.)

I guess that Hans would like to expand the discussion to the future of
graphics in general, inviting input from everybody.

Alan



--
Ing. Lukáš Procházka | mailto:l...@pontex.cz
Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | IDDS: 
nrpt3sn | IČO: 40763439
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] graphics

2018-12-05 Thread Henri Menke
ConTeXt already comes with a full XML parser. SVG is XML. It would be
nice if it was possible to render some subset of SVG.

On 12/5/18 6:03 AM, Hans Hagen wrote:
> Hi,
> 
> As most mechanism are reasonable okay now we can look into what future
> versions of ConteXt should provide in terms of functionality. The
> (luatex) engine is also more of less finished or at least stable in
> terms of functionality.
> 
> One possible area of further development is graphics so I'd like to know
> if there are (reasonable) demands for more graphics support using
> metapost. Alan and I are on-and-off working on some extensions and one
> of the things we discuss is visualization of data. The question is of
> course what should be done in the lua/mp/tex combination and what
> externally but the combination has some advantages. There has been
> presentations and discussions at the last meeting and graphics is always
> a nice topic, and also kind of rewarding in terms of development.
> 
> Of course other demands can be formulated too, but these then need to
> come with well defined descriptions (or mockup examples).
> 
> 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
> ___

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

2018-12-04 Thread Alan Braslau
On Tue, 4 Dec 2018 18:03:14 +0100
Hans Hagen  wrote:

> Hi,
> 
> As most mechanism are reasonable okay now we can look into what
> future versions of ConteXt should provide in terms of functionality.
> The (luatex) engine is also more of less finished or at least stable
> in terms of functionality.
> 
> One possible area of further development is graphics so I'd like to
> know if there are (reasonable) demands for more graphics support
> using metapost. Alan and I are on-and-off working on some extensions
> and one of the things we discuss is visualization of data. The
> question is of course what should be done in the lua/mp/tex
> combination and what externally but the combination has some
> advantages. There has been presentations and discussions at the last
> meeting and graphics is always a nice topic, and also kind of
> rewarding in terms of development.
> 
> Of course other demands can be formulated too, but these then need to 
> come with well defined descriptions (or mockup examples).

Hans is alluding to work that we are doing to explore the possibilities
of lua + MetaPost in the treatment and visualization of data,
efficiently, with the possibility of handling large quantities of data.
Lua does this particularly well.

My first exercise has been a complete rewrite of the John Hobby graph
macros. It was/is an exercise in recreating the functionality "from
scratch", trying to use lua effectively when needed. The code and
approach is entirely new. My use case was the analysis of a large set
of data - entirely ridiculous for graphical display but containing
"outliers" or instances that are significant, and it works! I am
trying to generalize, and am doing this in my "free time".

So the aim is two-fold:

1) to efficiently handle large datasets through the use of lua

2) to generalize the notion of user data space from the
two-dimensional drawing space of MetaPost (and the represented page),
and affine transformations of this 2D space to other coordinate
systems and dimensions. We are not thinking about 3D rendering or
raytracing, but rather simple projections and other transformations
such as polar coordinates. (Of course, log scales, for example are a
"simple" non-linear transformation.) 

I guess that Hans would like to expand the discussion to the future of
graphics in general, inviting input from everybody.

Alan
___
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] graphics

2018-12-04 Thread Hans Hagen

Hi,

As most mechanism are reasonable okay now we can look into what future 
versions of ConteXt should provide in terms of functionality. The 
(luatex) engine is also more of less finished or at least stable in 
terms of functionality.


One possible area of further development is graphics so I'd like to know 
if there are (reasonable) demands for more graphics support using 
metapost. Alan and I are on-and-off working on some extensions and one 
of the things we discuss is visualization of data. The question is of 
course what should be done in the lua/mp/tex combination and what 
externally but the combination has some advantages. There has been 
presentations and discussions at the last meeting and graphics is always 
a nice topic, and also kind of rewarding in terms of development.


Of course other demands can be formulated too, but these then need to 
come with well defined descriptions (or mockup examples).


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] Unifraktur Maguntia features

2018-11-12 Thread Wolfgang Schuster

Hi Willi,

To be save you should make a combination of the onum/lnum and pnum/tnum 
features.


\definefontfamily [unifraktur] [rm] [Unifraktur Maguntia]
\definefontfamily [unifraktur] [tt] [Latin Modern Mono]

\setupbodyfont [unifraktur]

\definefontfeature [onum+pnum] [onum=yes,pnum=yes]
\definefontfeature [onum+tnum] [onum=yes,tnum=yes]
\definefontfeature [lnum+pnum] [lnum=yes,pnum=yes]
\definefontfeature [lnum+tnum] [lnum=yes,tnum=yes]

\starttext

Unifraktur Maguntia

\starttabulate[|lT|l|]
\NC default \NC 1234   \NC\NR
\NC onum + pnum \NC \feature[+][onum+pnum]1234 \NC\NR
\NC onum + tnum \NC \feature[+][onum+tnum]1234 \NC\NR
\NC lnum + pnum \NC \feature[+][lnum+pnum]1234 \NC\NR
\NC lnum + tnum \NC \feature[+][lnum+tnum]1234 \NC\NR
\stoptabulate

\stoptext

Wolfgang


Willi Egger schrieb am 12.11.18 um 16:41:

Hi all,

is there somebody among the ConTeXt users, who has experience with the font 
UnifrakturMaguntja (http://unifraktur.sourceforge.net/maguntia.html#)?

I tried all kind of approaches to get the font switching between lnum, tnum 
pnum and onum. — I come to the conclusion that I am unable to subtract and add 
features. I appreciate any help.

Please refer to the appended tex file.

Kind regards

willi


___
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] Projects and URLs

2018-11-03 Thread Axel Kielhorn
> Am 02.11.2018 um 13:08 schrieb Wolfgang Schuster 
> :
> 
> Axel Kielhorn schrieb am 02.11.18 um 10:10:
>> Hello!
>> 
>> Where is the best way to define URLs in a project?
>> 
>> I currently define them when I need them, but wouldn’t it be better to keep 
>> them in a project file and have only one location to edit when they change?
> 
> When you use \useurl in combination with \url or \from you can define them in 
> a environment file. To make themeasier to handle you can use a separate 
> environment file only for the urls.
> 
> 
> \setupinteraction[state=start]
> 
> \useurl [garden] [https://wiki.contextgarden.net/] [ConTeXt garden]
> 
> \starttext
> 
> \url [garden]
> 
> \from[garden]
> 
> \stoptext


Is there a way to loop over all defined urls to generate a link list (like a 
bibliography)?

Axel

___
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] Projects and URLs

2018-11-02 Thread Wolfgang Schuster

Axel Kielhorn schrieb am 02.11.18 um 10:10:

Hello!

Where is the best way to define URLs in a project?

I currently define them when I need them, but wouldn’t it be better to keep 
them in a project file and have only one location to edit when they change?


When you use \useurl in combination with \url or \from you can define 
them in a environment file. To make themeasier to handle you can use a 
separate environment file only for the urls.



\setupinteraction[state=start]

\useurl [garden] [https://wiki.contextgarden.net/] [ConTeXt garden]

\starttext

\url [garden]

\from[garden]

\stoptext


You can also avoid this two step method when you use the \goto command 
with the url keyword in the second argument.



\setupinteraction[state=start]

\starttext

\goto{\hyphenatedurl{https://wiki.contextgarden.net/}}[url(https://wiki.contextgarden.net/)]

\goto{ConTeXt garden}[url(https://wiki.contextgarden.net/)]

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

Re: [NTG-context] what defines the font size?

2018-10-19 Thread luigi scarso
In the previous experiments we have left unchanged the FontMatrix:
texgyrepagella-regular-2000.ttx:  
texgyrepagella-regular-500.ttx:  
texgyrepagella-regular.ttx:  
as well as all the other dimensions.
In texgyrepagella-regular-500.ttx we have 500 unitsPerEm and hence
500 units in a "glyph space" that should be  500*0.001 = 0.5 Postscript
points in the "text space".
But if we read the pdf specification , we see this:

"""
The glyph coordinate system is the space in which an individual character’s
glyph is defined. All path
coordinates and metrics shall be interpreted in glyph space. For all font
types except Type 3, the units of glyph
space are one-thousandth of a unit of text space; for a Type 3 font, the
transformation from glyph space to text
space shall be defined by a font matrix specified in an explicit FontMatrix
entry in the font.
"""

As result, the combination of unitsPerEm and FontMatrix must give the same
result of the "canonical values "
unitsPerEm=1000  and FontMatrix [ 0.001 0 0 0.001 0 0 ] = [1/1000 0 0
1/1000 0 0]:
this means that
unitsPerEm=500  should have a correct FontMatrix = [1/500 0 0 1/500 0 0] =
[2/1000 0 0 2/1000 0 0].
This explains why in  texgyrepagella-regular-500 the glyphs are 2 times
bigger:
its FontMatrix [ 0.001 0 0 0.001 0 0 ] = [1/1000 0 0 1/1000 0 0] needs a
factor 2
to give one-thousandth of a unit of text space.
The same -- mutatis mutandis --  for texgyrepagella-regular-2000:
unitsPerEm=2000 means a correct  FontMatrix = [1/2000 0 0 1/2000 0 0] =
[0.5/1000 0 0 0.5/1000 0 0]:
but in our case the FontMatrix is again  [ 0.001 0 0 0.001 0 0 ], so the
factor is 1/2 .

We can see these values into test-hello-500-1000-2000.pdf

<< /Length 350 >>
stream
0 g 0 G
0 g 0 G
BT
/F8 19.82 Tf
1 0 0 1 0 28.93918 Tm
[<003F>832<0033>479<0049>291<0049>291<0052>296<0039>500<007A>501<007A>]TJ
/F9 9.91 Tf
1 0 0 1 0 14.5196 Tm [<003F0033004900490052>-250<0053007A007A007A>]TJ
/F10 4.95 Tf
1 0 0 1 0 0.10003 Tm
[<003F>-416<0033>-239<0049>-146<0049>-145<0052>-523<006C>-251<007A>-250<007A>-250<007A>]TJ
ET
endstream
endobj

7 0 obj
<< /Font << /F8 10 0 R /F9 11 0 R /F10 12 0 R >> /ProcSet [ /PDF /Text ] >>

10 0 obj
<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont
/JDCZQP+TeXGyrePagella-Regular500 /DescendantFonts [ 29 0 R ] /ToUnicode 28
0 R >>
11 0 obj
<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont
/EDXNJZ+TeXGyrePagella-Regular /DescendantFonts [ 24 0 R ] /ToUnicode 23 0
R >>
12 0 obj
<< /Type /Font /Subtype /Type0 /Encoding /Identity-H /BaseFont
/BNOEVZ+TeXGyrePagella-Regular2000 /DescendantFonts [ 19 0 R ] /ToUnicode
18 0 R >>

/F9 is TeXGyrePagella-Regular, and has a Tf of  9.91 ~  10  ( it should
be 10, but the TeX point and the scaled math have their effects)
/F8 is  ~ 20, and /F10 ~ 5.

In test-500-1000-2000.pdf there are a bit different values, because we are
using 10pt.

unitsPerEm different from 1000 exist: for example, if we look at the Fell
types
(see http://iginomarini.com/fell/the-revival-fonts)
the IMFeENrm29C.otf has

$ grep unitsPerEm IMFeENrm29C.ttx


$ calc -p "1/2048"
0.00048828125

and the FontMatrix correctly says
$ grep FontMatrix IMFeENrm29C.ttx
  


(a luatex plain example is
%% test-fell.tex
\pdfvariable compresslevel0
\pdfvariable objcompresslevel0
\font\TestIMFe=file:IMFeENrm29C.otf at 10bp
{\TestIMFe Hello IMFeENrm29C}
\bye

$> mtxrun--script plain test-fell.tex
)

This relation between unitsPerEm and FontMatrix is enforced  in   CFF2 (the
new "font variations" ,
https://docs.microsoft.com/en-us/typography/opentype/spec/cff2):

"""
The Top DICT FontMatrix operator is required if the unitsPerEm value in the
'head' table is other than 1000.
If unitsPerEm is 1000, then the FontMatrix operator may be omitted.
When included, the FontMatrix operand array must be 1/unitsPerEm 0 0
1/unitsPerEm 0 0.
The default values shown above assume that unitsPerEm is 1000.
"""
where "default values shown above"   are 0.001 0 0 0.001 0 0 .

There are some limits:
1)  unitsPerEm:  Valid range is from 16 to 16384. This value should be a
power of 2 for
 fonts that have TrueType outlines.
2) the CFF has a  type2 charstring,  where the real values are signed
Q16.16
(signed 16bit integer with 16bit fraction,  range [-2^15,2^15-2^-1],
resolution 2^-16, encoded in 5 bytes)
and also  integer signed 16bit integer, encoded in 3 bytes. This unusual
encoding  is for
backward compatibility with the type1 charstring,
where   a 32-bit signed  integer is  encoded in 5 bytes, given a range
[-2^31,2^31-1] --- but a note says that
" Numbers with absolute values greater than 32,000 must be followed
 by a div operator such that the res

Re: [NTG-context] Unexpected space after hyphen in xml/html export

2018-10-11 Thread Rik Kabel

On 10/10/2018 15:11, Rik Kabel wrote:

On 10/10/2018 14:50, Rik Kabel wrote:

On 10/8/2018 18:32, Hans Hagen wrote:


Alas, it is fixed for that particular occurence, but it still 
occurs 29 times in the document (using today's beta).


A more extended search shows that there are also spaces afters 
en-dashes (in "Press|–|Citizen" and  in "Miniatur|–|Bibliothek der 
Deutschen Classiker"), but none after em-dashes. Unfortunately, my 
attempts to reproduce this in a smaller document have so far failed.

well, you know: no mwe, no solution
And here is the mwe. The culprit, it appears, is bidi. I have tried 
all documented options (but not all combinations) for 
\setupdirections, and the only one under which there is no problem is 
"off". With bidi active, there is a spurious space wherever a 
linebreak is introduced. As the example demonstrates, this is not a 
function of the compounds, but of hyphenation in general.


\setupbackend [export=yes]
\setupdirections  [bidi=on]
\starttext
abraca% adjust to cause hyphenation with your textwidth
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra|-|cadabra abra|-|cadabra abra|-|cadabra abra|-|cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
abra-cadabra abra-cadabra abra-cadabra abra-cadabra
\stoptext

(The problem appears in the export html/xml file, not in the pdf.)

Not a function of explicit compounds (||) but of hyphenation of 
compounds. Normal hyphenation does not bring about the problem.


I also note that \setupdirection with every option combination I have 
tried has no discernible effect on my export output, and can safely be 
removed from the export mode of my document, so for me this issue 
disappears.

I do not know if this is the general case.
--
Rik
___
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] Font installation help needed!

2018-09-30 Thread Schmitz Thomas A.


> On 30. Sep 2018, at 20:56, Geert Verhaag  wrote:
> 
> I'd like to use the Advent Pro font, so I downloaded the font and have 7 ttf 
> files available.
> 
> After looking around for some manual I found: "Integrating TrueType Fonts 
> into ConTEXt" by Thomas A. Schmitz.
> 
> Immediately I run into problems when trying to run the texfont command.
> 
> My Linux (ubuntu 14.04) says:
> 
> The program 'texfont' is currently not installed.
> 
> I did a standalone installation years ago of this version of ConTeXt, and 
> don't dare to upgrade because I might run into other issues, sorry!
> 
> Any hints on how to procede installing the Advent Pro font to this version of 
> ConTeXt are very much welcomed!

Ah, you like old systems! Ubuntu 14.04 and context 2013, what a wonderful 
combination, back in the days! texfont is still part of the distribution, but 
you will have to invoke it with its full path. I just tried (with a current 
standalone), and it still works as expected. I had to copy texnansi.enc into 
the working directory, and then I invoked

perl ~/context/tex/texmf-context/scripts/context/perl/texfont.pl —fontroot=<> 
—ve=<> —co=<> --en=texnansi

Try this (replacing the variables with your values, of course).

Thomas
___
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] open type feature "frac"

2018-09-28 Thread Hans Hagen

On 9/28/2018 10:56 PM, Ulrike Fischer wrote:

Due to a question on tex.sx
(https://tex.stackexchange.com/questions/452969/luatex-fontfeaturefractions-on-turns-first-digits-into-superscripts)
I looked again (see
https://www.mail-archive.com/ntg-context@ntg.nl/msg84822.html) at
the frac feature.

The output is still not really satisfactory. With mode=node numbers
with slash looks okay, but single numbers are rather odd: only the
last digit has the correct size:

\starttext

\font\test={file:linlibertine_r.otf:mode=node;script=latn;language=DFLT;+frac}
\test
787347 125


it all depends on the font and lookups i guess

the logic can be a combination of:

1 - replace digit when followed by digit or slash
2 - replace digit when preceded by slash
3 - replace digit when preceded by fract digit

so a last digit not preceded will not

in fact one can then as well replace all digits non contextual


1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100

\font\test={file:linlibertine_r.otf:mode=base;script=latn;language=DFLT;+frac}
\test
787347 125

1/7 1/2 3/4 5/6 7/8 9/10 11/12 31415/27182 1000/100


forget about base mode ... dependent on how the font does frac single 
substitutions will be applied (maybe ligs)



\stoptext



(It could be a font bug, the output with xetex isn't good either).

fonts probably have a limited set of lookups

(the 5 and 7 suggests some inconsistency in the lookups)

i must admit that i've seen so many bad frac implementations that i 
never use it (and it's definitely something that should be applied very 
selectively, not on a whole text stream)


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] future versions - synctex

2018-08-21 Thread Hans Hagen

On 8/21/2018 4:46 PM, Aditya Mahajan wrote:

Are the x and y values in pts (post script points or big points?) 
measured from the top-left corner?


afaik bottom up base points

the script will look into the synctex file and figure out where to go 
to. Basically all the viewer needs to do is react to a 
click/cursor/key combination and call mtxrun  with the page and 
positions (basepoints in pdf coordinate space)


How do I configure the editor command, e.g., with VIM, mtxrun will need 
to call:


`vim --servername=VIM --remote +{line_number} {filename}`

What should be the value of `editor` in this case?

vim

but we can of course make that configureable (easy in lua) .. see 
mtx-synctex.lua


-
  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] future versions - synctex

2018-08-21 Thread Aditya Mahajan

On Tue, 21 Aug 2018, Hans Hagen wrote:


On 8/21/2018 3:04 PM, Aditya Mahajan wrote:

On Tue, 21 Aug 2018, Hans Hagen wrote:

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).


Which of the existing viewers have this functionality? Last time I tried 
using synctex on linux, almost all viewers gave an error that they could 
not parse synctex file.


I think that is because the format of the synctex file changed.

Is there some documentation on what is the format of the synctex file 
written by ConTeXt and how the external program should be called with page 
and coordinates? With that we can try to raise an issue asking the pdf 
viewers to support that.


context outputs a bare minimum of synctex info: basically it identifies text 
and marks that, so we don't need the whole nested box mess that can confuse 
the parser (think of boxes that lap or are moved or lie about dimensions)


is you have a context synctex file you only see a few levels (basically words 
/ lines) marked


There is a script:

mtxrun --script synctex

basically all an editor has to do is call:

mtxrun --script synctex
 --page=123 --x=400 --y=500
 --editor=scite
 foo.synctex


Are the x and y values in pts (post script points or big points?) 
measured from the top-left corner?


the script will look into the synctex file and figure out where to go to. 
Basically all the viewer needs to do is react to a click/cursor/key 
combination and call mtxrun  with the page and positions (basepoints in 
pdf coordinate space)


How do I configure the editor command, e.g., with VIM, mtxrun will need to 
call:


`vim --servername=VIM --remote +{line_number} {filename}`

What should be the value of `editor` in this case?

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] future versions - synctex

2018-08-21 Thread Hans Hagen

On 8/21/2018 3:04 PM, Aditya Mahajan wrote:

On Tue, 21 Aug 2018, Hans Hagen wrote:

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).


Which of the existing viewers have this functionality? Last time I tried 
using synctex on linux, almost all viewers gave an error that they could 
not parse synctex file.


I think that is because the format of the synctex file changed.

Is there some documentation on what is the format of the synctex file 
written by ConTeXt and how the external program should be called with 
page and coordinates? With that we can try to raise an issue asking the 
pdf viewers to support that.


context outputs a bare minimum of synctex info: basically it identifies 
text and marks that, so we don't need the whole nested box mess that can 
confuse the parser (think of boxes that lap or are moved or lie about 
dimensions)


is you have a context synctex file you only see a few levels (basically 
words / lines) marked


There is a script:

mtxrun --script synctex

basically all an editor has to do is call:

mtxrun --script synctex
  --page=123 --x=400 --y=500
  --editor=scite
  foo.synctex

the script will look into the synctex file and figure out where to go 
to. Basically all the viewer needs to do is react to a click/cursor/key 
combination and call mtxrun  with the page and positions (basepoints 
in pdf coordinate space)


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] Issue with bibtex crossref in combination with {-}

2018-08-02 Thread Hans Hagen

On 8/1/2018 5:21 PM, Joshua Moerman wrote:

Hi ConTeXt people,

I found another issue with the crossref feature in ConTeXt. I get an error
when a {-} is used in a crossref. If it is used directly in the paper entry,
it works just fine. Replacing {-} by only - works, but the DBLP database
generates {-} and it would be nice to use that directly.

catched in next beta

-
  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] Issue with bibtex crossref in combination with {-}

2018-08-02 Thread Joshua Moerman
Hi ConTeXt people,

I found another issue with the crossref feature in ConTeXt. I get an error
when a {-} is used in a crossref. If it is used directly in the paper entry,
it works just fine. Replacing {-} by only - works, but the DBLP database
generates {-} and it would be nice to use that directly.

Example:
\usebtxdefinitions[apa]

\startbuffer[biblio]
@inproceedings{PAPER,
author= {First Last},
title = {PaperTitle},
booktitle = {Conference of BlaBla},
year  = {2017},
crossref  = {CONF},
}

@proceedings{CONF,
title = {Conference on BlaBla},
year  = {2017},
editor= {Jan{-}Willem Jansen},
publisher = {Springer},
}
\stopbuffer

\usebtxdataset[biblio.buffer]

\starttext
See \cite{PAPER}.
\blank
\placelistofpublications
\blank
\showbtxdatasetcompleteness
\stoptext

This gives the error:
tex error   > tex error on line 1 in file
C:/Users/joshua/Documents/PhD/Thesis/ConTeXtTests/biblio.tex: ! Extra }, or
forgotten \endgroup

But it should just work without errors (I think), since using extra {}
should work.
Thanks in advance.

Groetjes,
Joshua



___
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] Viewer layers (was: Question to covers)

2018-07-28 Thread Henning Hraban Ramm
Am 2018-07-28 um 12:30 schrieb Wolfgang Schuster 
:
>> AFAIK completely undocumented, I found them at 
>> http://source.contextgarden.net/tex/context/base/mkiv/attr-lay.mkiv
>> while tracking effects/properties (where these were implemented first).
>> 
>> While the example above works, I don’t get viewer layers in my current 
>> project, must investigate...
>> And then, if the combination of ConTeXt layers and viewer layers works 
>> (\setlayer within \start/stopviewerlayer?).
> 
> You have to put the viewerlayer command within the the \setlayer argument.

Thank you! I just found it in
http://source.contextgarden.net/tex/context/base/mkiv/meta-ini.mkiv?search=viewerlayer

Also created a wiki page: http://wiki.contextgarden.net/Viewer_Layers

I still don’t get layers working in my big project. Thought it might be 
"scope=global", but that didn’t help.
Are there any settings that might influence viewer layers?

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
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] Question to covers

2018-07-28 Thread Wolfgang Schuster



Henning Hraban Ramm schrieb am 28.07.18 um 12:01:

Am 2018-07-28 um 11:15 schrieb Henning Hraban Ramm :


Am 2018-07-28 um 10:12 schrieb Tomas Hala :

1. Is a ConTeXt layer accepted as a whole in commercial Acrobat, or is it
visible as a heap of small objects? Or is it "only" better for more
comfortable manipulation in ConTeXt?

I don’t understand the question.
A ConTeXt layer is not a PDF layer.
All the objects are manipulatable in Acrobat Pro (or another PDF editor),
there’s no grouping on the PDF level.

If you need PDF layers, there are "viewer layers" in ConTeXt:

\defineviewerlayer[Ebene]
\setupviewerlayer[Ebene][
   state=start,
   visible=no,
   title=Test,
]

\starttext

Text

\startviewerlayer[Ebene]
{\bfa TOP SECRET}
\stopviewerlayer

More Text

\stoptext

AFAIK completely undocumented, I found them at 
http://source.contextgarden.net/tex/context/base/mkiv/attr-lay.mkiv
while tracking effects/properties (where these were implemented first).

While the example above works, I don’t get viewer layers in my current project, 
must investigate...
And then, if the combination of ConTeXt layers and viewer layers works 
(\setlayer within \start/stopviewerlayer?).


You have to put the viewerlayer command within the the \setlayer argument.

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
___

Re: [NTG-context] Question to covers

2018-07-28 Thread Henning Hraban Ramm
Am 2018-07-28 um 11:15 schrieb Henning Hraban Ramm :

> Am 2018-07-28 um 10:12 schrieb Tomas Hala :
>> 1. Is a ConTeXt layer accepted as a whole in commercial Acrobat, or is it
>> visible as a heap of small objects? Or is it "only" better for more
>> comfortable manipulation in ConTeXt?
> 
> I don’t understand the question.
> A ConTeXt layer is not a PDF layer.
> All the objects are manipulatable in Acrobat Pro (or another PDF editor),
> there’s no grouping on the PDF level.

If you need PDF layers, there are "viewer layers" in ConTeXt:

\defineviewerlayer[Ebene]
\setupviewerlayer[Ebene][
  state=start,
  visible=no,
  title=Test,
]

\starttext

Text

\startviewerlayer[Ebene]
{\bfa TOP SECRET}
\stopviewerlayer

More Text

\stoptext

AFAIK completely undocumented, I found them at 
http://source.contextgarden.net/tex/context/base/mkiv/attr-lay.mkiv
while tracking effects/properties (where these were implemented first).

While the example above works, I don’t get viewer layers in my current project, 
must investigate...
And then, if the combination of ConTeXt layers and viewer layers works 
(\setlayer within \start/stopviewerlayer?).


Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
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] sort order in registers (indexes)

2018-06-10 Thread Henning Hraban Ramm
Am 2018-06-10 um 14:11 schrieb Henning Hraban Ramm :

> Am 2018-06-10 um 13:07 schrieb Henning Hraban Ramm :
> 
>>> I think this may achieve what you want:
>>> \setupregister[index][method={zm,zc}]
>>> I hope it helps,
>> 
>> Thank you very much!
>> 
>> I overlooked that there is indeed some documentation:
>> http://wiki.contextgarden.net/Command/keyword:method
> 
> But reading through that and the source I’m still confused.
> 
> I’d like to write a proper explanation for the wiki (and my book).
> 
> Is there anywhere documentation about the meaning/goal of the presets or 
> algorithms?
> 
> Are these codes translatable into something like "ignore diacritics", "ignore 
> upper/lowercase" etc.?

Ok, I think I got it...
For a proper sorting, you first apply a "mapping", then a "casing" and finally 
"unicode".

Presets:
default = upper like lowercase, diacritics separate
before  = upper before lower, diacritics ignored
after   = lower before upper, diacritics ignored
first   = lower before upper, diacritics separate
last= upper before lower, diacritics separate

* If you don’t set the sorting method, the preset "first" ist used (and not 
"default").

* There’s no preset for the (in my eyes most meaningful) combination "upper 
like lowercase, diacritics ignored" (zm,zc,uc).

* Aren’t language specific sorting rules possible at the current state? Or does 
"unicode" handle that?
E.g.
-- DIN 5007-1 (German default sorting) is like zm,zc,uc, but ß should be sorted 
like ss.
-- DIN 5007-2 (German phonebook sorting) would additionally require umlauts to 
be sorted as ä = ae etc.
-- Austrian phonebook sorting sorts umlauts after base vocals, i.e. a, ä, o, ö, 
u, ü, s, ß.
-- Danish and Norwegian: x, y, z, æ, ø, å
-- Finnish and Swedish: x, y = ü, z, æ, ä, ö, ø, å (until 2006 v = w)
-- etc.
(according to https://de.wikipedia.org/wiki/Alphabetische_Sortierung)

If nobody objects I’ll add this to the wiki.

Greetlings, Hraban
---
https://www.fiee.net
http://wiki.contextgarden.net
https://www.dreiviertelhaus.de
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] roadmap

2018-05-15 Thread MF

> > * References: see Massimiliano’s question, apparently there are
> > options missing for code before/after the list of pages
> 
> These hooks were added; adding a few more hooks is normally no big
> deal 
> ... the main problem with such additions is that they seldom get 
> documented (in fact that imo is also a it up to the one requesting
> such 
> features).
> 

Touché! I've added them to the wiki.

I was already updating that page of the wiki (\setupregister) on
Friday, but also realized that it was way behind the syntax you can
check with setup-en.pdf (the Commands manual).
It missed the brand new "pageleft" and "pageright" parameters, but even
much more than them. So i asked myself about the opportunity to
document a brand new feature without the missing ones that have been
already in place for a much longer time.
Anyway, that's the spirit of a wiki: everybody can add his 2 cents of
knowledge.

The table of the command parameters was also difficult to read and
modify in the wiki source, so i gave up for that moment and wondered
about a more general solution for command documentation.
Your messages today motivated me to update that page anyway.

The setup-en.pdf manual is a great source of documentation and it's
synchronized with every new version, because it's automatically
generated from sources.

It lets you know the commands, their parameters and their types.
I've looked a bit into the "i-" files in the "interface" directory of
the ConTeXt distribution, and i've seen that the commands are also
classified into categories.

What you miss in that manual is the parameters' meaning and some
example of usage.
I'm thinking about some companion files to the "i-" ones that carry the
information about the parameters' meaning and usage.
Some of those texts could be "recycled" from the current wiki pages.
Then we could generate some automatic, up to date wiki pages directly
from the combination of those files.

I'm not going to work on that before the meeting and i've already
promised more than i can achieve.
But we could discuss that at the meeting.

Greetings,
Massi
___
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] Font fallback scaling

2018-04-13 Thread Magnus J
Thanks, I could have sworn I had tested that. With my new setup, I
still have trouble with some characters in math mode. Specifically, I
don't see the \prime and \doubleprime characters in math mode, and I
can't use \wedge as a footnote symbol.

Consider this commented example, pdf result attached.

/MJO


% define the characters to use for Garamond in math mode
\definefontfamilypreset
[math:somesymbols]

[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
tf=style:regular,
offset=lowercasenormal,
]

\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=digitsnormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=lowercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=uppercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond
Pro][rscale=1.05,range=math:somesymbols]

\definefontfamily[mainface][serif][Adobe Garamond Pro]
\definefontfamily[mainface][math][TeX Gyre Termes Math][scale=0.9]

\setupbodyfont[mainface,11pt]

% footnotes
\defineconversion[avhset][\m{\wedge},\m{\prime}]
\setupnotation[footnote][way=bypage,numberconversion=avhset]

\enabletrackers[fonts.missing]

\starttext

$D\prime = 0.98$  % <-- no \prime in output

$D\doubleprime = 0.98$% <-- no \doubleprime in output

wedge\wedge\footnote{wedge}   % <-- lua stats  > unknown math
characters: ∧ (U+02227) (n=2)

prime\prime\footnote{prime}   % <--

\stoptext

> On 4/12/2018 6:17 PM, Magnus J wrote:
> > I use Adobe Garamond Pro in combination with Termes Math for math (the
> > latter for missing glyphs, Garamond is not very complete). How can I
> > scale size of Termes Math without decreasing the size of the Garamond
> > glyphs in math mode?
> >
> > /MJO
> >
> >
> >  % define the characters to use for Garamond in math mode
> >  \definefontfamilypreset
> >  [math:somesymbols]
> >
> >
[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0=
x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
> >   tf=style:regular,
> >   offset=lowercasenormal,
> >  ]
> >
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:digitsnormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercasenormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:lowercaseitalic]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercasenormal]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:uppercaseitalic]
> >  \definefallbackfamily[mainface][mm][Adobe Garamond
> > Pro][math:somesymbols]
> >
> >  \definefontfamily[mainface][rm][Adobe Garamond Pro]
> >  \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]
%
> > <-- scaling here...
> >
> >  \setupbodyfont[mainface,11pt]
> >
> >  \starttext
> >  100
> >
> >  $100$ % <-- leads to math mode that is smaller than text, even for
> > Garamond glyphs
> >  \stoptext
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=digitsnormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercasenormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=lowercaseitalic]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercasenormal]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=uppercaseitalic]
>  \definefallbackfamily[mainface][math][Adobe Garamond
> Pro][rscale=1.05,range=math:somesymbols]
>
>  \definefontfamily [mainface] [serif] [Adobe Garamond Pro]
>  \definefontfamily [mainface] [math]  [TeX Gyre Termes Math]
>
>  \setupbodyfont[mainface]
>
>
> -
>Hans Hagen | PRAGMA ADE
>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
> tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -


bla.pdf
Description: Adobe PDF document

Re: [NTG-context] Font fallback scaling

2018-04-12 Thread Hans Hagen

On 4/12/2018 6:17 PM, Magnus J wrote:
I use Adobe Garamond Pro in combination with Termes Math for math (the 
latter for missing glyphs, Garamond is not very complete). How can I 
scale size of Termes Math without decreasing the size of the Garamond 
glyphs in math mode?


/MJO


     % define the characters to use for Garamond in math mode
     \definefontfamilypreset
     [math:somesymbols]
 
[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},

  tf=style:regular,
  offset=lowercasenormal,
     ]

     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:digitsnormal]
     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:lowercasenormal]
     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:lowercaseitalic]
     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:uppercasenormal]
     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:uppercaseitalic]
     \definefallbackfamily[mainface][mm][Adobe Garamond 
Pro][math:somesymbols]


     \definefontfamily[mainface][rm][Adobe Garamond Pro]
     \definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]  % 
<-- scaling here...


     \setupbodyfont[mainface,11pt]

     \starttext
     100

     $100$ % <-- leads to math mode that is smaller than text, even for 
Garamond glyphs

     \stoptext
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=digitsnormal]
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=lowercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=lowercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=uppercasenormal]
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=uppercaseitalic]
\definefallbackfamily[mainface][math][Adobe Garamond 
Pro][rscale=1.05,range=math:somesymbols]


\definefontfamily [mainface] [serif] [Adobe Garamond Pro]
\definefontfamily [mainface] [math]  [TeX Gyre Termes Math]

\setupbodyfont[mainface]


-
  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] Font fallback scaling

2018-04-12 Thread Magnus J
I use Adobe Garamond Pro in combination with Termes Math for math (the
latter for missing glyphs, Garamond is not very complete). How can I scale
size of Termes Math without decreasing the size of the Garamond glyphs in
math mode?

/MJO


% define the characters to use for Garamond in math mode
\definefontfamilypreset
[math:somesymbols]

[range={0x0002A-0x0002E,0x000A7,0x000B6,0x000D7,0x000F7,0x02020-0x02021,0x02212,0x02219-0x02226,0x02228-0x02265,0x02012,0x0003C-0x0003E,0x0007C},
 tf=style:regular,
 offset=lowercasenormal,
]

\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:digitsnormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:lowercasenormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:lowercaseitalic]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:uppercasenormal]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:uppercaseitalic]
\definefallbackfamily[mainface][mm][Adobe Garamond
Pro][math:somesymbols]

\definefontfamily[mainface][rm][Adobe Garamond Pro]
\definefontfamily[mainface][mm][TeX Gyre Termes Math][scale=0.9]  % <--
scaling here...

\setupbodyfont[mainface,11pt]

\starttext
100

$100$ % <-- leads to math mode that is smaller than text, even for
Garamond glyphs
\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] decomposed u umlaut

2018-03-25 Thread Henning Hraban Ramm
Am 2018-03-25 um 22:36 schrieb Arthur Reutenauer 
<arthur.reutena...@normalesup.org>:

> On Thu, Mar 22, 2018 at 10:08:44AM +0100, Mojca Miklavec wrote:
>> On 20 March 2018 at 08:42, Henning Hraban Ramm wrote:
>>> I’ve one annoying problem with ConTeXt: all üs (small u umlauts) seem to be 
>>> encoded as decomposed unicode or something like that, at least every ü 
>>> breaks into u + garbage if I copy some text from a ConTeXt PDF to an app 
>>> that doesn’t really support Unicode.
>> 
>> You are on macOS, right?
>> In my experience it was usually Apple's technology to blame.
> 
>  I agree with you that Apple’s software has a tendency to decompose
> characters, but I wouldn’t blame them for that: it’s perfectly
> Unicode-compliant to do so, and by now software should support
> combining characters in at least a basic way.  It’s a real problem that
> the software from the Deutsche Post isn’t able to handle them correctly.

While DP shop should be able to handle more than Latin-1, the problem seems to 
be in the viewer or in a combination of viewer and OS:
- It doesn’t depend on the font, I tried Computer Modern and Alegreya (that is 
known to have some OpenType ligature issues).
- I checked with several viewers, and the Adobe apps (Acrobat Pro 9 and Reader 
DC) decompose just the ü, while my other viewers including Apple’s Preview 
decompose all the umlauts. (Just copied and pasted into an hex editor.)
- It also happens with PDFs from other sources.

So it’s not a ConTeXt bug. Sorry for the noise.

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] Google Search in ConTeXt Garden

2018-03-22 Thread Mojca Miklavec
Hi,

On 18 March 2018 at 13:13, Pablo Rodriguez wrote:
> Dear list,
>
> when I use Google to search the wiki, such as in:
>
>   http://wiki.contextgarden.net/google/new2.html?q=xmldoifelseempty
>
> I get the following error message:
>
>   Unauthorized access to internal API. Please refer to
>   https://support.google.com/customsearch/answer/4542055
>
> Can anyone confirm this?

I hope that Taco will be able to check this.

The token is correct, but apparently the API changed in the meantime.
Google offers some code to copy-paste that can be used directly, but
our wiki uses some strange combination of php, our own skin (written
by Siep), standalone javascript files, some html pages with results to
avoid ending up on google directly etc.

I'm lost in those files and I'm not too eager to spend too much time
learning all that stuff from scratch.

If there are any web technologies experts willing to take a look, I
can provide some source snippets offline.

Mojca
___
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] Fourier and utopia

2018-03-06 Thread Mikael P. Sundqvist
On Sat, Mar 3, 2018 at 7:17 PM, Mikael P. Sundqvist <mic...@gmail.com>
wrote:

> On Sat, Mar 3, 2018 at 3:46 PM, Mikael P. Sundqvist <mic...@gmail.com>
> wrote:
>
>> Dear Hans and dear list,
>>
>> I try to use the fourier/utopia combination in mkiv (I used that
>> combination for my PhD thesis in mkii 10 years ago).
>>
>> First of all, I have downloaded the fourier fonts from ctan at
>> https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by
>> mtxrun.
>>
>> I have one folder containing type-fourier.mkiv, fourier-math.lfg and
>> testfile.tex. Everything seems to be found by the system, so the problem is
>> probably in my files somewhere. The resulting pdf after compiling
>> testfile.text is attached.
>>
>> Any ideas of what I am missing?
>>
>> Additionally, the fourier fonts come with fourier-bb.tfm (probably with
>> blackboard bold), fourier-mcl (probably so that one can use mathcal). Any
>> ideas on how to use them in the fourier-math.lfg file?
>>
>> If more information is needed, then please tell me.
>>
>> /Mikael
>>
>> %%%
>> type-fourier.mkiv:
>> %%%
>> \starttypescriptcollection[fourier]
>> \starttypescript [serif] [fourier]
>> \definefontsynonym [Utopia-Regular] [file:putr8a.afm]
>> \definefontsynonym [Utopia-Italic]  [file:putri8a.afm]
>> \definefontsynonym [Utopia-Bold][file:putb8a.afm]
>> \definefontsynonym [Utopia-BoldItalic]  [file:putbi8a.afm]
>> \stoptypescript
>>
>> \starttypescript [serif] [fourier] [name]
>> \setups[font:fallback:serif]
>> \definefontsynonym [Serif][Utopia-Regular]
>> \definefontsynonym [SerifItalic]  [Utopia-Italic]
>> \definefontsynonym [SerifBold][Utopia-Bold]
>> \definefontsynonym [SerifBoldItalic]  [Utopia-BoldItalic]
>> \stoptypescript
>>
>> \starttypescript [math] [fourier] [all]
>> \loadfontgoodies[fourier-math]
>> \definefontsynonym [MathRoman] [fourierrm@fourier-rm]
>> \stoptypescript
>>
>> \starttypescript [fourier]
>> \definetypeface [\typescriptone] [rm] [serif] [fourier] [default]
>> \definetypeface [\typescriptone] [ss] [sans]  [modern]  [default]
>> \definetypeface [\typescriptone] [tt] [mono]  [modern]  [default]
>> \definetypeface [\typescriptone] [mm] [math]  [fourier] [default]
>> \quittypescriptscanning
>> \stoptypescript
>> \stoptypescriptcollection
>>
>>
>> %%%
>> fourier-math.lfg:
>> %%%
>> return {
>> name = "fourier-math",
>> version = "1.00",
>> comment = "Math font Fourier for Utopia.",
>> mathematics = {
>> mapfiles = {
>> "fourier.map",
>> "mkiv-base.map",
>> },
>> virtuals = {
>> ["fourier-rm"] = {
>> { name = "putr8a", features = "virtualmath", main = true
>> },
>> { name = "fourier-ml.tfm",  vector = "tex-mr",
>> skewchar=0x7F },
>> { name = "fourier-mlit.tfm", vector = "tex-mi",
>> skewchar=0x7F },
>> { name = "fourier-mlit.tfm", vector = "tex-it",
>> skewchar=0x7F },
>> { name = "fourier-mlb.tfm",  vector = "tex-bf",
>> skewchar=0x7F },
>> { name = "fourier-mlitb.tfm", vector = "tex-bi",
>> skewchar=0x7F },
>> { name = "fourier-ms.tfm",  vector = "tex-sy",
>> skewchar=0x30, parameters = true },
>> { name = "fourier-mex.tfm",  vector = "tex-ex", extension
>> = true },
>> msam,
>> msbm,
>> },
>> }
>> }
>> }
>>
>> %%%
>> testfile.tex:
>> %%%
>> \loadtypescriptfile[type-fourier]
>> \setupbodyfont[fourier,12pt]
>>
>> \starttext
>> \startTEXpage[offset=3bp]
>> Some math: $y''=(y')'$.
>> A displayed formula:
>> \startformula
>> f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt.
>> \stopformula
>> \stopTEXpage
>> \stoptext
>>
>>
> A small step in the right direction: Blackboard letters and calligraphic
> (script) letters seem to work when I add
>
>   

Re: [NTG-context] Fourier and utopia

2018-03-03 Thread Mikael P. Sundqvist
On Sat, Mar 3, 2018 at 3:46 PM, Mikael P. Sundqvist <mic...@gmail.com>
wrote:

> Dear Hans and dear list,
>
> I try to use the fourier/utopia combination in mkiv (I used that
> combination for my PhD thesis in mkii 10 years ago).
>
> First of all, I have downloaded the fourier fonts from ctan at
> https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by
> mtxrun.
>
> I have one folder containing type-fourier.mkiv, fourier-math.lfg and
> testfile.tex. Everything seems to be found by the system, so the problem is
> probably in my files somewhere. The resulting pdf after compiling
> testfile.text is attached.
>
> Any ideas of what I am missing?
>
> Additionally, the fourier fonts come with fourier-bb.tfm (probably with
> blackboard bold), fourier-mcl (probably so that one can use mathcal). Any
> ideas on how to use them in the fourier-math.lfg file?
>
> If more information is needed, then please tell me.
>
> /Mikael
>
> %%%
> type-fourier.mkiv:
> %%%
> \starttypescriptcollection[fourier]
> \starttypescript [serif] [fourier]
> \definefontsynonym [Utopia-Regular] [file:putr8a.afm]
> \definefontsynonym [Utopia-Italic]  [file:putri8a.afm]
> \definefontsynonym [Utopia-Bold][file:putb8a.afm]
> \definefontsynonym [Utopia-BoldItalic]  [file:putbi8a.afm]
> \stoptypescript
>
> \starttypescript [serif] [fourier] [name]
> \setups[font:fallback:serif]
> \definefontsynonym [Serif][Utopia-Regular]
> \definefontsynonym [SerifItalic]  [Utopia-Italic]
> \definefontsynonym [SerifBold][Utopia-Bold]
> \definefontsynonym [SerifBoldItalic]  [Utopia-BoldItalic]
> \stoptypescript
>
> \starttypescript [math] [fourier] [all]
> \loadfontgoodies[fourier-math]
> \definefontsynonym [MathRoman] [fourierrm@fourier-rm]
> \stoptypescript
>
> \starttypescript [fourier]
> \definetypeface [\typescriptone] [rm] [serif] [fourier] [default]
> \definetypeface [\typescriptone] [ss] [sans]  [modern]  [default]
> \definetypeface [\typescriptone] [tt] [mono]  [modern]  [default]
> \definetypeface [\typescriptone] [mm] [math]  [fourier] [default]
> \quittypescriptscanning
> \stoptypescript
> \stoptypescriptcollection
>
>
> %%%
> fourier-math.lfg:
> %%%
> return {
> name = "fourier-math",
> version = "1.00",
> comment = "Math font Fourier for Utopia.",
> mathematics = {
> mapfiles = {
> "fourier.map",
> "mkiv-base.map",
> },
> virtuals = {
> ["fourier-rm"] = {
> { name = "putr8a", features = "virtualmath", main = true },
> { name = "fourier-ml.tfm",  vector = "tex-mr",
> skewchar=0x7F },
> { name = "fourier-mlit.tfm", vector = "tex-mi",
> skewchar=0x7F },
> { name = "fourier-mlit.tfm", vector = "tex-it",
> skewchar=0x7F },
> { name = "fourier-mlb.tfm",  vector = "tex-bf",
> skewchar=0x7F },
> { name = "fourier-mlitb.tfm", vector = "tex-bi",
> skewchar=0x7F },
> { name = "fourier-ms.tfm",  vector = "tex-sy",
> skewchar=0x30, parameters = true },
> { name = "fourier-mex.tfm",  vector = "tex-ex", extension
> = true },
> msam,
> msbm,
> },
> }
> }
> }
>
> %%%
> testfile.tex:
> %%%
> \loadtypescriptfile[type-fourier]
> \setupbodyfont[fourier,12pt]
>
> \starttext
> \startTEXpage[offset=3bp]
> Some math: $y''=(y')'$.
> A displayed formula:
> \startformula
> f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt.
> \stopformula
> \stopTEXpage
> \stoptext
>
>
A small step in the right direction: Blackboard letters and calligraphic
(script) letters seem to work when I add

{ name = "fourier-bb.tfm",  vector = "tex-mb",
skewchar=0x7F },
{ name = "fourier-mcl.tfm",  vector = "tex-sy",
skewchar=0x7F },

to fourier-math.lfg.

/Mikael
___
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] Fourier and utopia

2018-03-03 Thread Mikael P. Sundqvist
Dear Hans and dear list,

I try to use the fourier/utopia combination in mkiv (I used that
combination for my PhD thesis in mkii 10 years ago).

First of all, I have downloaded the fourier fonts from ctan at
https://ctan.org/tex-archive/fonts/fourier-GUT . The fonts are found by
mtxrun.

I have one folder containing type-fourier.mkiv, fourier-math.lfg and
testfile.tex. Everything seems to be found by the system, so the problem is
probably in my files somewhere. The resulting pdf after compiling
testfile.text is attached.

Any ideas of what I am missing?

Additionally, the fourier fonts come with fourier-bb.tfm (probably with
blackboard bold), fourier-mcl (probably so that one can use mathcal). Any
ideas on how to use them in the fourier-math.lfg file?

If more information is needed, then please tell me.

/Mikael

%%%
type-fourier.mkiv:
%%%
\starttypescriptcollection[fourier]
\starttypescript [serif] [fourier]
\definefontsynonym [Utopia-Regular] [file:putr8a.afm]
\definefontsynonym [Utopia-Italic]  [file:putri8a.afm]
\definefontsynonym [Utopia-Bold][file:putb8a.afm]
\definefontsynonym [Utopia-BoldItalic]  [file:putbi8a.afm]
\stoptypescript

\starttypescript [serif] [fourier] [name]
\setups[font:fallback:serif]
\definefontsynonym [Serif][Utopia-Regular]
\definefontsynonym [SerifItalic]  [Utopia-Italic]
\definefontsynonym [SerifBold][Utopia-Bold]
\definefontsynonym [SerifBoldItalic]  [Utopia-BoldItalic]
\stoptypescript

\starttypescript [math] [fourier] [all]
\loadfontgoodies[fourier-math]
\definefontsynonym [MathRoman] [fourierrm@fourier-rm]
\stoptypescript

\starttypescript [fourier]
\definetypeface [\typescriptone] [rm] [serif] [fourier] [default]
\definetypeface [\typescriptone] [ss] [sans]  [modern]  [default]
\definetypeface [\typescriptone] [tt] [mono]  [modern]  [default]
\definetypeface [\typescriptone] [mm] [math]  [fourier] [default]
\quittypescriptscanning
\stoptypescript
\stoptypescriptcollection


%%%
fourier-math.lfg:
%%%
return {
name = "fourier-math",
version = "1.00",
comment = "Math font Fourier for Utopia.",
mathematics = {
mapfiles = {
"fourier.map",
"mkiv-base.map",
},
virtuals = {
["fourier-rm"] = {
{ name = "putr8a", features = "virtualmath", main = true },
{ name = "fourier-ml.tfm",  vector = "tex-mr",
skewchar=0x7F },
{ name = "fourier-mlit.tfm", vector = "tex-mi",
skewchar=0x7F },
{ name = "fourier-mlit.tfm", vector = "tex-it",
skewchar=0x7F },
{ name = "fourier-mlb.tfm",  vector = "tex-bf",
skewchar=0x7F },
{ name = "fourier-mlitb.tfm", vector = "tex-bi",
skewchar=0x7F },
{ name = "fourier-ms.tfm",  vector = "tex-sy",
skewchar=0x30, parameters = true },
{ name = "fourier-mex.tfm",  vector = "tex-ex", extension =
true },
msam,
msbm,
},
}
}
}

%%%
testfile.tex:
%%%
\loadtypescriptfile[type-fourier]
\setupbodyfont[fourier,12pt]

\starttext
\startTEXpage[offset=3bp]
Some math: $y''=(y')'$.
A displayed formula:
\startformula
f(x) = f(0)+\int_0^x \bigl(f'(t)\bigr)\,dt.
\stopformula
\stopTEXpage
\stoptext


testfile.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] italic correction after math

2018-02-14 Thread Hans Hagen

On 2/14/2018 5:30 PM, Alan Braslau wrote:

On Wed, 14 Feb 2018 10:12:22 +0100
Ulrike Fischer <ne...@nililand.de> wrote:


⟂ U+27C2 \perp, for example. This is a "show-stopper" for me.


Works ok for me on latex + windows:

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{Cambria Math}
\begin{document}\pagestyle{empty}
$ 27c2 blblb $
\end{document}

(the document only uses cambria.ttc, so the glyph must be from this
font).

The context code

\setupbodyfont[cambria]
\starttext
$\perp $
abc
\stoptext

works fine for me too.


As Hans points out, \perp is U+22A5 (UP TACK), not U+27C2
(PERPENDICULAR), and might differ (in weight) from U+2225 (PARALLEL) or
\parallel, although this may depend on the particular font design.
(UP/DOWN/RIGHT/LEFT TACK are a set)

Is the definition used in char-ent.lua the right choice?
char-ent.lua:["perp"] = "⊥", -- U+022A5

Perhaps the latex package unicode-math makes the substitution for you.

(Note that dejavu has U+27C2.)

MWE:

\setupbodyfont [cambria,20pt]
%\setupbodyfont [dejavu,20pt]
\startTEXpage
$⊥⟂∥$
\stopTEXpage
its no big deal to have some backup btu i don't want to cycle through 
preferences every few years so deal with it once (best in combination 
with other such things)


-
  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] italic correction after math

2018-02-13 Thread Hans Hagen

On 2/13/2018 12:12 PM, Ulrike Fischer wrote:

In the following example the calligraphic P bumps into the following
x.

After some searching in the archive I found some discussions from
2012 and had the impression that this either shouldn't happen or
that the behaviour could at least could be changed with
\setupmathematics[italics=n].

But in my examples \setupmathematics[italics=...] doesn't do
anything. Every line looks looks identical to me (the second example
is from the header of xits-math.lfg). Is this behaviour expected? If
yes, what should one do to get an italic correction is such cases?


\setupbodyfont[xits]

\starttext
x${\cal P}$x\par
\setupmathematics[italics=1]x${\cal P}$x\par
\setupmathematics[italics=2]x${\cal P}$x\par
\setupmathematics[italics=3]x${\cal P}$x\par
\setupmathematics[italics=4]x${\cal P}$x\par

\stoptext

\setupbodyfont[xits]
\starttext
test $a;b;a; b; f;$ test\par
  \setupmathematics[italics=1] test $a;b;a; b; f;$ test\par
%fontitalics
  \setupmathematics[italics=2] test $a;b;a; b; f;$ test\par
% fontdata
  \setupmathematics[italics=3] test $a;b;a; b; f;$ test\par
% quad based
  \setupmathematics[italics=4] test $a;b;a; b; f;$ test\par
% combination of 1 and 3

\stoptext


hm, seems that i messed up a pointer ... i'll fix it ...


(xetex inserts a kern of 2.45pt after the math in latex).


context inserts 2.938pt

(luatex uses the opentype route so it might be different than xetex and 
pdftex)


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] italic correction after math

2018-02-13 Thread Ulrike Fischer
In the following example the calligraphic P bumps into the following
x.

After some searching in the archive I found some discussions from
2012 and had the impression that this either shouldn't happen or
that the behaviour could at least could be changed with
\setupmathematics[italics=n]. 

But in my examples \setupmathematics[italics=...] doesn't do
anything. Every line looks looks identical to me (the second example
is from the header of xits-math.lfg). Is this behaviour expected? If
yes, what should one do to get an italic correction is such cases?


\setupbodyfont[xits]

\starttext
x${\cal P}$x\par
\setupmathematics[italics=1]x${\cal P}$x\par
\setupmathematics[italics=2]x${\cal P}$x\par
\setupmathematics[italics=3]x${\cal P}$x\par
\setupmathematics[italics=4]x${\cal P}$x\par

\stoptext

\setupbodyfont[xits]
\starttext
test $a;b;a; b; f;$ test\par
 \setupmathematics[italics=1] test $a;b;a; b; f;$ test\par
%fontitalics
 \setupmathematics[italics=2] test $a;b;a; b; f;$ test\par 
% fontdata
 \setupmathematics[italics=3] test $a;b;a; b; f;$ test\par 
% quad based
 \setupmathematics[italics=4] test $a;b;a; b; f;$ test\par 
% combination of 1 and 3

\stoptext

(xetex inserts a kern of 2.45pt after the math in latex).
  
-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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] avoiding space on top of a page

2018-02-11 Thread Wolfgang Schuster



Henning Hraban Ramm <mailto:te...@fiee.net>
11. Februar 2018 um 16:00
Ahoi,
I configured my section titles to have a line of space (\blank[big]) 
before and after the title.
But if the section starts on a new page, the title should start in the 
first line.

I couldn’t find the right combination of \blank options...

\setuplayout[grid=yes]
\setuphead[section][
page=no,
style={\bf},
before={\testpage[4]\startlinecorrection\blank[medium,back]},
after={\blank[small,max]\stoplinecorrection},
]


\setuphead
  [...]
  [before={\testpage[5]\blank[...]\startlinecorrection},
   after={\stoplinecorrection\blank[...]}]

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] avoiding space on top of a page

2018-02-11 Thread Henning Hraban Ramm
Ahoi,
I configured my section titles to have a line of space (\blank[big]) before and 
after the title.
But if the section starts on a new page, the title should start in the first 
line.
I couldn’t find the right combination of \blank options...

\setuplayout[grid=yes]
\setuphead[section][
page=no,
style={\bf},
before={\testpage[4]\startlinecorrection\blank[medium,back]},
after={\blank[small,max]\stoplinecorrection},
]

(Please find working example attached.)

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


sectiontest.tex
Description: Binary data
___
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 vocalised hebrew

2017-12-16 Thread Hans Hagen

On 12/15/2017 7:09 PM, Rik Kabel wrote:

On 2017-12-15 06:45, Lutz Haseloff wrote:

Hi all,
i would like to typeset hebrew with context.
My not fully working example:

\starttext
\definedfont[name:narkisim at 20pt]
\setupalign[r2l]
טְרוֹפוֹתִי
\stoptext

In the resulting pdf the vocalisations are on the left side of the 
glyph, instead of being centered.

I append the result of context and the result of Libreoffice.

Is there a way to typeset vocalised hebrew with context or am I doing 
something wrong?


Greetings Lutz
--
GPG Key ID 3C4F83BC


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


Depending on the font, correct niqqud placement requires some 
combination (sometimes all) of the following font features: lang, ccmp, 
and script. For Ezra SIL, I would use


\definefontfeature [hebrew] [oldstyle] [
   lang=heb,
   ccmp=yes,
   script=hebr,
]
\starttext
\definedfont[name:EzraSIL*hebrew at 72pt]
\setupalign[r2l]
טְרוֹפוֹתִי
\stoptext

while for David_CLM the script feature suffices:

\definefontfeature [hebrew] [oldstyle] [
% lang=heb,
% ccmp=yes,
   script=hebr,
]
\starttext
\definedfont[name:David_CLM-medium*hebrew at 72pt]
\setupalign[r2l]
טְרוֹפוֹתִי
\stoptext

You will have to find what works for narkisim.

There is a font feature hebrew already predefined

\definefontfeature [hebrewoldstyle] [oldstyle] [...]

if you have to set a language depends on the font (often dflt is ok).

This is the predefined set:

\definefontfeature
  [semitic-complete]
  [mode=node,analyze=yes,language=dflt,ccmp=yes,
   autoscript=position,autolanguage=position,
   init=yes,medi=yes,fina=yes,isol=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes,
   liga=yes,dlig=yes,rlig=yes,clig=yes,calt=yes]

\definefontfeature
  [semitic-simple]
  [mode=node,analyze=yes,language=dflt,ccmp=yes,
   autoscript=position,autolanguage=position,
   init=yes,medi=yes,fina=yes,isol=yes,
   mark=yes,mkmk=yes,kern=yes,curs=yes,
   rlig=yes,calt=yes]

\definefontfeature
  [arabic]
  [semitic-complete]
  [script=arab]

\definefontfeature
  [syriac]
  [arabic]
  [fin2=yes,fin3=yes,med2=yes]

\definefontfeature
  [hebrew]
  [semitic-complete]
  [script=hebr]

\definefontfeature
  [simplearabic]
  [semitic-simple]
  [script=arab]

\definefontfeature
  [simplehebrew]
  [semitic-simple]
  [script=hebr]

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] Problem with vocalised hebrew

2017-12-15 Thread Lutz Haseloff
Thank you very much Rik,
your settings for EzraSIL are working nicely for my favorite font Narkisim.
Thanks again
Lutz

Am 15. Dezember 2017 19:09:09 MEZ schrieb Rik Kabel 
<cont...@rik.users.panix.com>:
>On 2017-12-15 06:45, Lutz Haseloff wrote:
>> Hi all,
>> i would like to typeset hebrew with context.
>> My not fully working example:
>>
>> \starttext
>> \definedfont[name:narkisim at 20pt]
>> \setupalign[r2l]
>> טְרוֹפוֹתִי
>> \stoptext
>>
>> In the resulting pdf the vocalisations are on the left side of the 
>> glyph, instead of being centered.
>> I append the result of context and the result of Libreoffice.
>>
>> Is there a way to typeset vocalised hebrew with context or am I doing
>
>> something wrong?
>>
>> Greetings Lutz
>> -- 
>> GPG Key ID 3C4F83BC
>>
>>
>>
>___
>> 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
>>
>___
>
>Depending on the font, correct niqqud placement requires some 
>combination (sometimes all) of the following font features: lang, ccmp,
>
>and script. For Ezra SIL, I would use
>
>\definefontfeature [hebrew] [oldstyle] [
>   lang=heb,
>   ccmp=yes,
>   script=hebr,
>]
>\starttext
>\definedfont[name:EzraSIL*hebrew at 72pt]
>\setupalign[r2l]
>טְרוֹפוֹתִי
>\stoptext
>
>while for David_CLM the script feature suffices:
>
>\definefontfeature [hebrew] [oldstyle] [
>% lang=heb,
>% ccmp=yes,
>   script=hebr,
>]
>\starttext
>\definedfont[name:David_CLM-medium*hebrew at 72pt]
>\setupalign[r2l]
>טְרוֹפוֹתִי
>\stoptext
>
>You will have to find what works for narkisim.
>
>-- 
>Rik

-- 
GPG Key ID 3C4F83BC___
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 vocalised hebrew

2017-12-15 Thread Rik Kabel

On 2017-12-15 06:45, Lutz Haseloff wrote:

Hi all,
i would like to typeset hebrew with context.
My not fully working example:

\starttext
\definedfont[name:narkisim at 20pt]
\setupalign[r2l]
טְרוֹפוֹתִי
\stoptext

In the resulting pdf the vocalisations are on the left side of the 
glyph, instead of being centered.

I append the result of context and the result of Libreoffice.

Is there a way to typeset vocalised hebrew with context or am I doing 
something wrong?


Greetings Lutz
--
GPG Key ID 3C4F83BC


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


Depending on the font, correct niqqud placement requires some 
combination (sometimes all) of the following font features: lang, ccmp, 
and script. For Ezra SIL, I would use


   \definefontfeature [hebrew] [oldstyle] [
  lang=heb,
  ccmp=yes,
  script=hebr,
   ]
   \starttext
   \definedfont[name:EzraSIL*hebrew at 72pt]
   \setupalign[r2l]
   טְרוֹפוֹתִי
   \stoptext

while for David_CLM the script feature suffices:

   \definefontfeature [hebrew] [oldstyle] [
   % lang=heb,
   % ccmp=yes,
  script=hebr,
   ]
   \starttext
   \definedfont[name:David_CLM-medium*hebrew at 72pt]
   \setupalign[r2l]
   טְרוֹפוֹתִי
   \stoptext

You will have to find what works for narkisim.

--
Rik

___
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] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Wim Neimeijer
The thing here is, I am not an ConText expert just an user. I am working on
a manual (200+ pages) where including code snippets
is just a small part of the document and not something isolated. Not sure
what to do next as the wiki explains a lot
but not this.




On Tue, Dec 5, 2017 at 11:53 PM, Hans Hagen <pra...@wxs.nl> wrote:

> On 12/5/2017 11:10 PM, Wim Neimeijer wrote:
>
>> I wish it is that simple, but alas, I need to
>> to inform \typefile of the font as well,
>> possibly via setuptyping ?
>>
> if you mix scripts you need to either use font that has the glyphs or you
> have to create a bodyfint with a combination of fonts ... i'm pretty sure
> that the wiki explains this somewhere (fallbacks and such)
>
> Hans
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Nethe
> <https://maps.google.com/?q=Ridderstraat+27+%7C+8061+GH+Hasselt+%7C+The+Nethe=gmail=g>
> rlands
>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] Typefile with Chinese, Korean or Japanase text

2017-12-05 Thread Hans Hagen

On 12/5/2017 11:10 PM, Wim Neimeijer wrote:

I wish it is that simple, but alas, I need to
to inform \typefile of the font as well,
possibly via setuptyping ?
if you mix scripts you need to either use font that has the glyphs or 
you have to create a bodyfint with a combination of fonts ... i'm pretty 
sure that the wiki explains this somewhere (fallbacks and such)


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] getting metafun positions within (displayed) math mode

2017-11-16 Thread Nigel King
Wow. I learnt about Maxwell's Equation 48 years ago. I never understood it then 
nor on the intervening time despite sometimes helping design antennas. The 
picture and its annotation definitely helps creating clarity. For my twopenneth 
the effort is very worthwhile.

Thanks

---
Nigel King
Mob: +44 7917 803879
Work:+44 1364 655516


> On 16 Nov 2017, at 21:10, Sanjoy Mahajan <san...@olin.edu> wrote:
> 
> Dear ConTeXters,
> 
> For my sins, and to make students unhappy all over the world, I am
> writing another book: _A Student's Guide to Newton's Laws of Motion_
> (for Cambridge University Press, aka CUP).  As partial compensation, I
> convinced CUP that I may typeset it in ConTeXt and deliver them PDF.
> 
> Being hopefully a guide actually useful to students, it will annotate
> every symbol in important equations, a feature cribbed from the first
> book of the _Student's Guide_ series, Dan Fleisch's _A Student's Guide
> to Maxwell's Equations_.
> 
> I've attached an image of what such an annotated equation looks like
> (from page 2 of Fleisch's book).  It's like a labeled part diagram (say,
> for a laptop), where each part (here, each symbol) is connected with an
> line to its explanation.
> 
> I'm trying to do so with a combination of ConTeXt, MetaPost/MetaFun,
> TikZ, and whatever else might work.  But I am a bit stuck at the
> following spot.
> 
> My plan is to use MetaFun to get the coordinates of each symbol in a
> (displayed) equation and then, with MetaFun, connect those symbols to
> mini-paragraphs of explanation that surround the equation.
> 
> But I am stuck on how to use \hpos in math mode. I'd like to do
> something like:
> 
> \startformula
> \hpos{n1}{\sum}_{\hpos{n2}{0}}^{\hpos{n3}{1}}
> \stopformula
> 
> to get the locations of the nodes n1, n2, and n3 without interfering
> with the math typesetting -- e.g., the engine should still know that
> \sum is in display-math mode, so it should be large and have its sub-
> and super-scripts below and above it, rather than next to it.
> 
> However, the \hpos hides its argument in an \hbox, and thus hides it
> from the math layout.  Thus, I have to do something like this minimal
> example:
> 
> \starttext
> \startformula
>  \sum_0^1  % what it should look like
>  \quad
>  \hpos{n1}{$\displaystyle\sum$}_{\hpos{n2}{$0$}}^{\hpos{n3}{$1$}}
> \stopformula
> \stoptext
> 
> The hpos'ed version after the \quad looks different, even after the
> \displaystyle hack.
> 
> Is there a version of \hpos for math mode?  That would be the cleanest
> solution, because who knows what else would be needed for other cases,
> even if the limits can be placed correctly.
> 
> Or is there a better way to annotate equations?
> 
> (TikZ seems to have the same issue, in that it cannot see into equations.)
> 
> Regards,
> -- 
> -Sanjoy
> 
> <http://savelongwharfpark.org/>
> Save Long Wharf Park in Boston Harbor!
> 
> <http://streetfightingmath.com/>
> Six reasoning tools to make hard problems easy.
> 
> 
> ___
> 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] getting metafun positions within (displayed) math mode

2017-11-16 Thread Sanjoy Mahajan
Dear ConTeXters,

For my sins, and to make students unhappy all over the world, I am
writing another book: _A Student's Guide to Newton's Laws of Motion_
(for Cambridge University Press, aka CUP).  As partial compensation, I
convinced CUP that I may typeset it in ConTeXt and deliver them PDF.

Being hopefully a guide actually useful to students, it will annotate
every symbol in important equations, a feature cribbed from the first
book of the _Student's Guide_ series, Dan Fleisch's _A Student's Guide
to Maxwell's Equations_.

I've attached an image of what such an annotated equation looks like
(from page 2 of Fleisch's book).  It's like a labeled part diagram (say,
for a laptop), where each part (here, each symbol) is connected with an
line to its explanation.

I'm trying to do so with a combination of ConTeXt, MetaPost/MetaFun,
TikZ, and whatever else might work.  But I am a bit stuck at the
following spot.

My plan is to use MetaFun to get the coordinates of each symbol in a
(displayed) equation and then, with MetaFun, connect those symbols to
mini-paragraphs of explanation that surround the equation.

But I am stuck on how to use \hpos in math mode. I'd like to do
something like:

\startformula
\hpos{n1}{\sum}_{\hpos{n2}{0}}^{\hpos{n3}{1}}
\stopformula

to get the locations of the nodes n1, n2, and n3 without interfering
with the math typesetting -- e.g., the engine should still know that
\sum is in display-math mode, so it should be large and have its sub-
and super-scripts below and above it, rather than next to it.

However, the \hpos hides its argument in an \hbox, and thus hides it
from the math layout.  Thus, I have to do something like this minimal
example:

\starttext
\startformula
  \sum_0^1  % what it should look like
  \quad
  \hpos{n1}{$\displaystyle\sum$}_{\hpos{n2}{$0$}}^{\hpos{n3}{$1$}}
\stopformula
\stoptext

The hpos'ed version after the \quad looks different, even after the
\displaystyle hack.

Is there a version of \hpos for math mode?  That would be the cleanest
solution, because who knows what else would be needed for other cases,
even if the limits can be placed correctly.

Or is there a better way to annotate equations?

(TikZ seems to have the same issue, in that it cannot see into equations.)

Regards,
-- 
-Sanjoy

<http://savelongwharfpark.org/>
Save Long Wharf Park in Boston Harbor!

<http://streetfightingmath.com/>
Six reasoning tools to make hard problems easy.

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

2017-10-30 Thread Henri
Are there any implications for the LuaJIT support?

LuaJIT is quite a bit faster than Lua which is why I always typeset my 
documents using luajittex.

On Mon, 2017-10-30 at 17:26 +0100, Hans Hagen wrote:
> Hi,
> 
> Luigi and I are currently looking into Lua 5.3 in combination with 
> LuaTeX. We have an experimental setup and all seems to work well, which 
> given the new number model of Lua is good news. Depending on how we 
> compile the binaries we either gain some speed or in the worst case 
> loose half the performance but that will be sorted out one of these days 
> as we know where to look.
> 
> For most users the consequences will be minimal but for those who use a 
> lot of Lua it makes sense to keep an eye on the subtle differences 
> between 5.2 and 5.3 which is why I post this.
> 
> For TeXLive we don't expect the switch before 2019 (so 2018 will ship 
> two binaries with the 5.2 one the official one) but for the context 
> distribution we will make the switch earlier so that we can test in real 
> situations.
> 
> 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
> ___
___
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] luatex

2017-10-30 Thread massi

> Luigi and I are currently looking into Lua 5.3 in combination with 
> LuaTeX. We have an experimental setup and all seems to work well,
> which 
> given the new number model of Lua is good news. Depending on how we 
> compile the binaries we either gain some speed or in the worst case 
> loose half the performance but that will be sorted out one of these
> days 
> as we know where to look.
> 

Does the integer subtype give significant performance gains when you
can use integers instead of floats?

What are the main reasons for the switch?
___
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] luatex

2017-10-30 Thread Hans Hagen

Hi,

Luigi and I are currently looking into Lua 5.3 in combination with 
LuaTeX. We have an experimental setup and all seems to work well, which 
given the new number model of Lua is good news. Depending on how we 
compile the binaries we either gain some speed or in the worst case 
loose half the performance but that will be sorted out one of these days 
as we know where to look.


For most users the consequences will be minimal but for those who use a 
lot of Lua it makes sense to keep an eye on the subtle differences 
between 5.2 and 5.3 which is why I post this.


For TeXLive we don't expect the switch before 2019 (so 2018 will ship 
two binaries with the 5.2 one the official one) but for the context 
distribution we will make the switch earlier so that we can test in real 
situations.


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] Problem using nested \processcommalist and \startparagraphs columns

2017-10-25 Thread Rik Kabel
I am having a problem with the combination of nested \processcommalist 
and \startparagraphs columns and I do not see any obvious issues.


Run the example below with "--mode=unroll" and it works fine.

Run it without that mode, and it fails.

Remove the lines tagged "problematic" and run it without that mode and 
it completes, although without the columns.


    % macros=mkvi
    \defineparagraphs  [Col] [n=3]
    \setupparagraphs   [Col] [1] [width=.31\textwidth]
    \setupparagraphs   [Col] [2] [width=.31\textwidth]
    \setupparagraphs   [Col] [3] [width=.31\textwidth]
    \starttexdefinition doOuter #OUTERVALUE
    \define\Outer{#OUTERVALUE}
    \startparagraphs[Col]  %%% problematic
    \doifmodeelse{unroll}
    {\startparagraphscell
         \Outer XX
 \stopparagraphscell
 \startparagraphscell
         \Outer YY
 \stopparagraphscell
 \startparagraphscell
         \Outer ZZ
 \stopparagraphscell}
    {\processcommalist[XX,YY,ZZ]\doInner}
    \stopparagraphs    %%% problematic
    \stoptexdefinition
    \starttexdefinition doInner #INNERVALUE
 \startparagraphscell  %%% problematic
         \Outer #INNERVALUE \par
 \stopparagraphscell   %%% problematic
    \stoptexdefinition
  \starttext
  \startsubject[title={Nested processcommalist}]
  \processcommalist[aa,bb,cc,dd,ee]\doOuter
  \stopsubject
  \stoptext

Any assistance that can be provided would be much appreciated.

--
Rik


___
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] Caption location in floatcombination

2017-10-23 Thread Christoph Reller
On Tue, Oct 17, 2017 at 11:00 AM Christoph Reller <
christoph.rel...@gmail.com> wrote:

> On Mon, Sep 18, 2017 at 7:19 AM Christoph Reller <
> christoph.rel...@gmail.com> wrote:
>
>> On Sun, Sep 17, 2017 at 6:03 PM Hans Hagen <pra...@wxs.nl> wrote:
>>
>>> On 9/13/2017 8:30 AM, Christoph Reller wrote:
>>> > It seems to me that the location given to \setupcaptions is not honored
>>> > correctly in floatcombinations anymore. Consider the following MWE:
>>> >
>>> > \setupcaptions[location=top, number=no]
>>> > \starttext
>>> > \placetable[][]{One}{
>>> >\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>>> > \placefloat[][]{}{
>>> >\startfloatcombination
>>> >  \placetable[][]{Two}{
>>> >\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>> >\stopfloatcombination}
>>> > \stoptext
>>> >
>>> > In earlier versions of ConTeXt, both captions "One" and "Two" of both
>>> > tables are rendered above the respective table. In the currently latest
>>> > version, the caption "Two" is rendered below the table. Is this a bug
>>> or
>>> > do I have to setup caption location separately for floatcombinations?
>>> >
>>> > Any feedback is welcome.\setupcaptions[location=top,number=no]
>>>
>>> \starttext
>>>
>>> \placetable{TABLE}{\bTABLE \bTR \bTD First \eTD \eTR \eTABLE}
>>>
>>> \placefloat{FLOAT}{%
>>>\startfloatcombination
>>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>>  \placetable{Two}{\bTABLE \bTR \bTD Second \eTD \eTR \eTABLE}
>>>\stopfloatcombination}
>>> \stoptext
>>
>>
>> Thank you for your input, Hans!
>>
>> I see that the captions "TABLE" and "FLOAT" are placed on top while the
>> captions "Two" and "Two" are placed on the bottom. Is there a way to setup
>> the locations of the captions of floats within a floatcombination? In this
>> particular example, the goal is, that the captions "Two" and "Two" are
>> placed on top of the respective tables.
>>
>
>  Does anybody know a way to control the caption location in
> floatcombinations? Any hint would be greatly appreciated.
>
>
Dear List,

I have noticed that in normal combinations \setupcaption[location=...] is
not honored either. MWE:

\setupcaptions[location=top, number=no]
\starttext
\placefigure{Two Tables}{
  \startcombination
{\bTABLE\bTR\bTD First\eTD\eTR\eTABLE}{First}
{\bTABLE\bTR\bTD Second\eTD\eTR\eTABLE}{Second}
  \stopcombination}
\stoptext

The caption "Two Tables" is located above the combination. The captions
"First" and "Second" are, however, located below. How can I setup captions
such that "First" and "Second" are located also above? If this is not
supported then I would be glad to know.

By the way, I have noticed that \setupcaptions is missing from
i-context.pdf. Is this omission on purpose?

Kind regards,
Christoph
___
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] SciTE under GNU/Debian Linux - lpeg not loaded

2017-09-23 Thread Hans Hagen

On 9/23/2017 9:19 PM, mf wrote:

Il giorno sab, 23/09/2017 alle 10.47 +0200, Hans Hagen ha scritto:

On 9/22/2017 10:24 PM, mf wrote:

Hello list,
I'm trying to use SciTE under Debian GNU/Linux stable (64 bit) to
edit
my ConTeXt files.

I've installed scite 3.7.2 from the Debian repository.

Downloaded Scintillua and copied its "lexers" folder under
/usr/share/scite. Created a symbolic link from /etc/scite/lexers to
that folder:
/etc/scite/lexers -> /usr/share/scite/lexers

Copied the "context" folder from tex/texmf-
context/context/data/scite
and created a symbolic link to it in /etc/scite:
/etc/scite/context -> /usr/share/scite/context

Appended the following lines to /etc/scite/SciTEGlobal.properties:
import lexers/lpeg
import context/scite-context-user

Now I open Scite and can see the ConTeXt customization.
Shortcuts keys work, but syntax highlighting does not, because the
lpeg
library is not loaded.

There's a message in the side window: "warning: lpeg not loaded".
The message comes from the "scite-ctx.lua" file in the "context"
folder.

I've installed the package lua-lpeg from the Debian repository.

When I run "lua scite-ctx.lua" it manages to load the lpeg library,
because the warning does not appear. It's lua inside SciTE that
can't
load the lpeg library.

Any hints?


that message about lpeg is just there because the main scite binary
has
no lpeg

the lpeg lexing is using a library from scintillua which comes with
textadept (that also uses the scintilla editing component)

it's a bit annoying that this small lpeg lexing extension is not part
of
sciet itself nor that scite has lpeg on board (in which case i could
probably make the lexers use that)

in fact, even the scintillua code was a moving target that i redid
the
lua code to a large extend to suit my needs and another unfortunate
aspect is that there is no real connection with scite's other
propertie

so ... this is what i do (maybe i should ship a zip with all binaries
too):

- install scite on windows
- also install the scintillua lib
- copy context stuff over it
- adapt the global or user properties file

this is described in the manual in the distribution btw.

- on linux i just use wine with the above
- on osx we never manages to get the combination working

so ... when i have time (or motivation) i might look into a way to
enable/load lpeg in scite itself (should be doable i guess)

an alternative is to use textadept ... context comes with files that
can
be used for that (it simply replaces some text adept files and
creates a
context specific instance) .. on my windows:

start textadept -u c:\data\develop\context\textadept\data\context\

(running from the editor is then somewhat more clumsy)

on linux something

textadept -u /texmf-context/context/textadept/data/context/

should work (hans that textapdept didn't change much in the meantime)

Hans



Thank you Hans, I followed the manual but Scite under Linux seems to
ignore the Scintillua library, which should bring in the lpeg library.
I've installed it and added the import directive in the
SciTEGlobal.properties file, but it seems to have no effect.
Instead the customization files from the context distribution work,
because the interface is changed and the shortcut keys work.


i remember that there was something with the name (or maybe some path is 
hard coded in it)



Until now I used Geany or Texworks to edit my files, but I was curious
to try the editor you use, benefiting also from the customization you
made.


the advatage is that it is consistent in the tex, xml, lua, etc lexing 
and in tex mode also supports mixed mode lexing



I tried to run SciTE with wine, but it's 32 bit and my Debian is 64
bit; it's possible to install it anyway, adding the i386 architecture,
but it gives some problems with package dependencies.

Sure I will not urge you to enable lpeg inside Scite, I was simply
exploring new tools to edit my files.

I've downloaded textadept, put its dir in the PATH and started
/tex/texmf-context/context/data/textadept/context/textadept-
context.sh: it works!

Thanks again,
Massi
___
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

Re: [NTG-context] SciTE under GNU/Debian Linux - lpeg not loaded

2017-09-23 Thread mf
Il giorno sab, 23/09/2017 alle 10.47 +0200, Hans Hagen ha scritto:
> On 9/22/2017 10:24 PM, mf wrote:
> > Hello list,
> > I'm trying to use SciTE under Debian GNU/Linux stable (64 bit) to
> > edit
> > my ConTeXt files.
> > 
> > I've installed scite 3.7.2 from the Debian repository.
> > 
> > Downloaded Scintillua and copied its "lexers" folder under
> > /usr/share/scite. Created a symbolic link from /etc/scite/lexers to
> > that folder:
> > /etc/scite/lexers -> /usr/share/scite/lexers
> > 
> > Copied the "context" folder from tex/texmf-
> > context/context/data/scite
> > and created a symbolic link to it in /etc/scite:
> > /etc/scite/context -> /usr/share/scite/context
> > 
> > Appended the following lines to /etc/scite/SciTEGlobal.properties:
> > import lexers/lpeg
> > import context/scite-context-user
> > 
> > Now I open Scite and can see the ConTeXt customization.
> > Shortcuts keys work, but syntax highlighting does not, because the
> > lpeg
> > library is not loaded.
> > 
> > There's a message in the side window: "warning: lpeg not loaded".
> > The message comes from the "scite-ctx.lua" file in the "context"
> > folder.
> > 
> > I've installed the package lua-lpeg from the Debian repository.
> > 
> > When I run "lua scite-ctx.lua" it manages to load the lpeg library,
> > because the warning does not appear. It's lua inside SciTE that
> > can't
> > load the lpeg library.
> > 
> > Any hints?
> 
> that message about lpeg is just there because the main scite binary
> has 
> no lpeg
> 
> the lpeg lexing is using a library from scintillua which comes with 
> textadept (that also uses the scintilla editing component)
> 
> it's a bit annoying that this small lpeg lexing extension is not part
> of 
> sciet itself nor that scite has lpeg on board (in which case i could 
> probably make the lexers use that)
> 
> in fact, even the scintillua code was a moving target that i redid
> the 
> lua code to a large extend to suit my needs and another unfortunate 
> aspect is that there is no real connection with scite's other
> propertie
> 
> so ... this is what i do (maybe i should ship a zip with all binaries
> too):
> 
> - install scite on windows
> - also install the scintillua lib
> - copy context stuff over it
> - adapt the global or user properties file
> 
> this is described in the manual in the distribution btw.
> 
> - on linux i just use wine with the above
> - on osx we never manages to get the combination working
> 
> so ... when i have time (or motivation) i might look into a way to 
> enable/load lpeg in scite itself (should be doable i guess)
> 
> an alternative is to use textadept ... context comes with files that
> can 
> be used for that (it simply replaces some text adept files and
> creates a 
> context specific instance) .. on my windows:
> 
> start textadept -u c:\data\develop\context\textadept\data\context\
> 
> (running from the editor is then somewhat more clumsy)
> 
> on linux something
> 
> textadept -u /texmf-context/context/textadept/data/context/
> 
> should work (hans that textapdept didn't change much in the meantime)
> 
> Hans
> 

Thank you Hans, I followed the manual but Scite under Linux seems to
ignore the Scintillua library, which should bring in the lpeg library.
I've installed it and added the import directive in the
SciTEGlobal.properties file, but it seems to have no effect.
Instead the customization files from the context distribution work,
because the interface is changed and the shortcut keys work.

Until now I used Geany or Texworks to edit my files, but I was curious
to try the editor you use, benefiting also from the customization you
made.
I tried to run SciTE with wine, but it's 32 bit and my Debian is 64
bit; it's possible to install it anyway, adding the i386 architecture,
but it gives some problems with package dependencies.

Sure I will not urge you to enable lpeg inside Scite, I was simply
exploring new tools to edit my files.

I've downloaded textadept, put its dir in the PATH and started
/tex/texmf-context/context/data/textadept/context/textadept-
context.sh: it works!

Thanks again,
Massi
___
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] SciTE under GNU/Debian Linux - lpeg not loaded

2017-09-23 Thread Hans Hagen

On 9/22/2017 10:24 PM, mf wrote:

Hello list,
I'm trying to use SciTE under Debian GNU/Linux stable (64 bit) to edit
my ConTeXt files.

I've installed scite 3.7.2 from the Debian repository.

Downloaded Scintillua and copied its "lexers" folder under
/usr/share/scite. Created a symbolic link from /etc/scite/lexers to
that folder:
/etc/scite/lexers -> /usr/share/scite/lexers

Copied the "context" folder from tex/texmf-context/context/data/scite
and created a symbolic link to it in /etc/scite:
/etc/scite/context -> /usr/share/scite/context

Appended the following lines to /etc/scite/SciTEGlobal.properties:
import lexers/lpeg
import context/scite-context-user

Now I open Scite and can see the ConTeXt customization.
Shortcuts keys work, but syntax highlighting does not, because the lpeg
library is not loaded.

There's a message in the side window: "warning: lpeg not loaded".
The message comes from the "scite-ctx.lua" file in the "context"
folder.

I've installed the package lua-lpeg from the Debian repository.

When I run "lua scite-ctx.lua" it manages to load the lpeg library,
because the warning does not appear. It's lua inside SciTE that can't
load the lpeg library.

Any hints?
that message about lpeg is just there because the main scite binary has 
no lpeg


the lpeg lexing is using a library from scintillua which comes with 
textadept (that also uses the scintilla editing component)


it's a bit annoying that this small lpeg lexing extension is not part of 
sciet itself nor that scite has lpeg on board (in which case i could 
probably make the lexers use that)


in fact, even the scintillua code was a moving target that i redid the 
lua code to a large extend to suit my needs and another unfortunate 
aspect is that there is no real connection with scite's other propertie


so ... this is what i do (maybe i should ship a zip with all binaries too):

- install scite on windows
- also install the scintillua lib
- copy context stuff over it
- adapt the global or user properties file

this is described in the manual in the distribution btw.

- on linux i just use wine with the above
- on osx we never manages to get the combination working

so ... when i have time (or motivation) i might look into a way to 
enable/load lpeg in scite itself (should be doable i guess)


an alternative is to use textadept ... context comes with files that can 
be used for that (it simply replaces some text adept files and creates a 
context specific instance) .. on my windows:


start textadept -u c:\data\develop\context\textadept\data\context\

(running from the editor is then somewhat more clumsy)

on linux something

textadept -u /texmf-context/context/textadept/data/context/

should work (hans that textapdept didn't change much in the meantime)

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] sectionconversionset not working for table of contents

2017-09-18 Thread Stephens, Kenny
I am trying to number my bodymatter chapters differently than my appendix 
chapters but with little success.

My attempts include the following:

n  If I do not assign a 'sectionconversionset' then the bodypart chapters are 
numbered with numerals and the appendix chapters are numbered with characters. 
However, sections and subsections are numbered with numerals in each the 
bodypart and appendix --- I don't want that.

n  Assigning a 'sectionconversionset' for the bodypart and appendix results in 
all chapters being numbered with numerals. Sections/subsections are still 
numerals.

n  Assigning a 'sectionconversionset' separately for each head type produces no 
change compared to the previous method.

I obtained these results with the 2017 TeXLive version of ConTeXt 2017.05.15. 
The same result occurs with live.contextgarden.net. I've tried multiple 
variations, all with the same result.

Any ideas would be greatly appreciated.

Thanks.
Kenny

The rest of the message is a minimal example:

\startsectionblockenvironment [bodypart]
  \definestructureconversionset [bodyset] [I,N,KR,a,m] [N] % unusual 
combination for testing
  \setuphead [chapter,section,subsection] [sectionconversionset=bodyset]
  \setuphead [chapter][style={\rm\bf}]
  \setuphead [section][style={\ss\bf}]
  \setuphead [subsection] [style={\sl}]
\stopsectionblockenvironment
\startsectionblockenvironment [appendix]
  \definestructureconversionset [appendixset] [O,A,R,r,KA] [R]
  \setuphead [chapter,section,subsection] [sectionconversionset=appendixset]
  \setuphead [chapter][style={\rm\bf}]
  \setuphead [section][style={\sans}]
  \setuphead [subsection] [style={\sl}]
\stopsectionblockenvironment

\setupcombinedlist [content] [list={chapter,section,subsection}]
\setuplist [chapter]
   [style=\bigbodyfont\bold, alternative=b,]
\setuplist [section]
   [width=2.0em, margin=2.0em, alternative=c,]
\setuplist [subsection]
   [width=3.0em, margin=4.0em, style=slanted, alternative=c,]

\startdocument

\startfrontmatter
  \placecontent[criterium=all]
\stopfrontmatter

\startbodymatter
\startchapter[title={The First Numerals Chapter}]
  \startsection[title={The First Caps-Romannumerals Section}]
   \input knuth
  \startsubsection[title={The First characters Subsection}]
   \input knuth
  \stopsubsection
  \stopsection
  \startsection[title={The Second Caps-Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\startchapter[title={The Second Numerals Chapter}]
  \startsection[title={The First Caps-Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\stopbodymatter

\startappendices

\startchapter[title={The First Characters Appendix}]
  \startsection[title={The First Romannumerals Section}]
   \input knuth
  \stopsection
\stopchapter

\startchapter[title={The Second Appendix}]
  \input knuth
  \startsection[title={The First Romannumerals Section}]
   \startsubsection[title={The First romannumerals Subsection}]
\input knuth
   \stopsubsection
  \stopsection
\stopchapter

\stopappendices

\stopdocument
___
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] automatically splitting big images (calculation problem)

2017-09-10 Thread Henning Hraban Ramm
Am 2017-09-09 um 22:06 schrieb Aditya Mahajan <adit...@umich.edu>:

> On Sat, 9 Sep 2017, Henning Hraban Ramm wrote:
> 
>> Ahoi,
>> I got some long images that I’d like to split over several pages.
>> 
>> \def\clipfigure{\dodoubleempty\doClipFigure}
>> \def\doClipFigure[#1][#2]{
>> \dorecurse{#1}{%
>>  \clip[
>>height=\textheight,
>>voffset=\dimexpr((\recurselevel -1) * \textheight)
>>   ]{\externalfigure[#2][width=\textwidth]}\par
>> }
>> }
>> 
>> \clipfigure[3][verylongimage]
>> 
>> But "\dimexpr((\recurselevel -1) * \textheight)" for the vertical offset is 
>> wrong.
>> How can I do this calculation?
> 
> You are missing a comma at the end of the voffset line

Thank you, but that’s not the core problem.
I get "Illegal unit of measure (pt inserted)".


My current code actually looks like

% split in #1 page size parts
\def\clipfigure{\dodoubleempty\doClipFigure}
\def\doClipFigure[#1][#2]{
\ifsecondargument
  \dorecurse{#1}{%
  \tooltip{\clip[
height=\textheight,
voffset=\dimexpr((\recurselevel - 1)\textheight),]{%
\externalfigure[#2]}}{#2 (\recurselevel/#1)}\par}
\else
  \normalfigure[#1]
\fi
}


Another approach:

\def\ausschnitt{\dodoubleempty\doAusschnitt}
\def\doAusschnitt#1#2{\clip[height=\textheight,voffset=#1]{\externalfigure[#2][width=\textwidth]}\par}

This also doesn’t work; there I’m trying to set the y coordinate for the start 
like
\ausschnitt[15cm][verylongimage]

Here I get "Missing number, treated as zero".


I guess I need to employ the right combination of \the, expansion etc., but I 
don’t know how. This stuff is still over my head.


> but why not use
> \clip[nx= .., ny=.., x=, y=...] instead.
> http://wiki.contextgarden.net/Using_Graphics#Image_Clipping

Because I don’t want to split the picture in even slices, but cut in places 
where it makes sense. The page height is a simplification, until I get the 
calculations working.


BTW example picture:
http://www.balderdashcomic.com/comic/ibonus
i.e. http://www.balderdashcomic.com/comics/1416175460-bonus1.png


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] Problem with setup for fonts

2017-08-27 Thread Robert Blackstone

On 25 Aug 2017, at 17:34 , Hans Hagen <pra...@wxs.nl> wrote:
> To: ntg-context@ntg.nl
> 
> On 8/25/2017 12:21 PM, Robert Blackstone wrote:
>> On 08/24/2017 10:57 AM, Robert Blackstone wrote:
>>>>> [...]
>>>>> %++MWE+++
>>>>> \usemodule[simplefonts]
>>>>> \setmainfont[Verdana]
>>>>> \setupbodyfont[10pt]
>> does not work anymore in mkiv versions later than july 2016.
>> 
>> Pablo Rodriguez helped me out:
>>>> 
>>>> Robert,
>>>> 
>>>> those commands now read:
>>>> 
>>>>   \definefontfamily[mainface][rm][Verdana]
>>>>   \setupbodyfont[mainface, 10pt]
>>>>   \starttext
>>>>   \input zapf
>>>>   \stoptext
>>>> 
>>>> I hope it helps,
>>>> 
>>>> Pablo
>> 
>> It does help but for the Law of the Conservation of Trouble (or Misery)
>> 
>> Having properly changed my font setup  ConTeXt stumbles upon things like:
>> 
>> “ 7~$\xrightarrow[none]$~6 progression ”
>> 
>> The error message is:  " ! Ma error: parameter \Umathquad\textstyle is not 
>> set."
>> 
>> How and where can I remedy this?
> This means that you haven't defined a math font so you need something:
> 
> \definefontfamily[mainface][rm][Verdana]
> \definefontfamily[mainface][tt][Courier]
> \definefontfamily[mainface][mm][Cambria]
> 
> or so, depending on what combination you want

Hi Hans,
Thanks for your reaction. Unfortunately it has not helped me for I have no idea 
how to set the parameter \Umathquad\textstyle. Just loading the fonts, as I 
believed you suggest in your mail, does not change anything: the compilation 
with a 2017 mkiv still stops at  “ 7~$\xrightarrow[none]$~6 progression ”.
However, when I use the older font calls, 
 \usemodule[simplefonts]
\setmainfont[Verdana]  
it compiles correctly files containing arrows ( $\xrightarrow[none]$ )  with 
the pre-2017 mkiv's . With my 2017 mkiv it still compiles correctly albeit not 
with the specified font but with latinmodern-math.otf. (Btw, I found the same 
behaviour for other fonts, such as: dejavu, times, palatino, bonum, lucidanova, 
lucida, garamond, libertine, gentium, xits, courier, and cambria.)  

For me the simplest solution would be to keep working with pre-2017 standalones 
for documents that contain these arrows (for musical tone- or 
chord-progressions )
But it intrigues me why some process that worked perfectly in many generations 
of mkiv has suddenly stopped working in the recent mkiv's. 

Best regards,

Robert Blackstone








___
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 setup for fonts

2017-08-25 Thread Hans Hagen

On 8/25/2017 12:21 PM, Robert Blackstone wrote:

On 08/24/2017 10:57 AM, Robert Blackstone wrote:

[...]
%++MWE+++
\usemodule[simplefonts]
\setmainfont[Verdana]
\setupbodyfont[10pt]

does not work anymore in mkiv versions later than july 2016.

Pablo Rodriguez helped me out:


Robert,

those commands now read:

   \definefontfamily[mainface][rm][Verdana]
   \setupbodyfont[mainface, 10pt]
   \starttext
   \input zapf
   \stoptext

I hope it helps,

Pablo


It does help but for the Law of the Conservation of Trouble (or Misery)

Having properly changed my font setup  ConTeXt stumbles upon things like:

“ 7~$\xrightarrow[none]$~6 progression ”

The error message is:  " ! Ma error: parameter \Umathquad\textstyle is not set."

How and where can I remedy this?

This means that you haven't defined a math font so you need something:

\definefontfamily[mainface][rm][Verdana]
\definefontfamily[mainface][tt][Courier]
\definefontfamily[mainface][mm][Cambria]

or so, depending on what combination you want

-
  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] Bug in startcombination

2017-08-14 Thread Hans Hagen

On 8/14/2017 9:53 AM, Otared Kavian wrote:

Hi Hans,

It seems that in the latest ConTeXt beta a bug shows up when using 
\startcombination, or something has changed recently that I have overlooked.
The following example typesets correctly in mkii, and used to produce a correct 
output with mkiv. However, now, with ConTeXt  version 2016.05.17 19:20,  the 
typesetting stops with an error message saying:

[………] Missing { inserted


{

\cr
\pack_combinations_pickup_package_pair_c ->\cr
\pack_combinations_flush_capt...
l.20\stopcombination}
[………]

Here is the example:

%%% begin bug-combination.tex
\setupcolors[state=start]
\useMPlibrary[dum]

\starttext

This is our first picture.
\placefigure[none]{}{\externalfigure[dummy][width=6cm]}
\blank

This is a combination of 3 figures on two lines
\placefigure[none]{}
{
\midaligned{
\startcombination[1*2]
{\startcombination[2*1]
{\externalfigure[dummy][width=6cm]}{}
{\externalfigure[dummy][width=6cm]}{}
\stopcombination}
{\externalfigure[dummy][width=6cm]}{}


There is a {} too many in that line (or one missing)


\stopcombination}
}

\stoptext
%%% end bug-combination.tex

%%% end sloppy-combination.tex

\starttext

\startplacefigure[location=none]
\startcombination[1*2]
{\startcombination[2*1]
{1.1}{}
{1.2}{}
\stopcombination}
{2} % one {} too many
\stopcombination
\stopplacefigure

\startplacefigure[location=none]
\startcombination[1*2]
{\startcombination[2*1]
{1.1}{}
{1.2}{}
\stopcombination}{}
{2}{}
\stopcombination
\stopplacefigure

\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] Bug in startcombination

2017-08-14 Thread Otared Kavian
Hi Hans,

It seems that in the latest ConTeXt beta a bug shows up when using 
\startcombination, or something has changed recently that I have overlooked.
The following example typesets correctly in mkii, and used to produce a correct 
output with mkiv. However, now, with ConTeXt  version 2016.05.17 19:20,  the 
typesetting stops with an error message saying:

[………] Missing { inserted

 
{
 
\cr 
\pack_combinations_pickup_package_pair_c ->\cr 
   \pack_combinations_flush_capt...
l.20\stopcombination}
[………]

Here is the example:

%%% begin bug-combination.tex
\setupcolors[state=start]
\useMPlibrary[dum]

\starttext

This is our first picture.
\placefigure[none]{}{\externalfigure[dummy][width=6cm]}
\blank

This is a combination of 3 figures on two lines
\placefigure[none]{}
{
\midaligned{
\startcombination[1*2]
{\startcombination[2*1]
{\externalfigure[dummy][width=6cm]}{}
{\externalfigure[dummy][width=6cm]}{} 
\stopcombination}
{\externalfigure[dummy][width=6cm]}{}
\stopcombination}
}

\stoptext
%%% end bug-combination.tex

Thanks for your attention and best regards: OK
___
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] \setupcombinations and the after-key

2017-08-09 Thread Pablo Rodriguez
On 08/09/2017 11:31 PM, Mathias Schickel wrote:
> Hi Pablo,
> 
> thank you a lot! This was really helpful. Maybe the garden page should
> be altered then. If you have a look at
> 
> http://wiki.contextgarden.net/Command/setupcombinations
> 
> you get the impression that „after“ is the key I was looking for because
> the page says:
> 
>   * Suppressing both the horizontal and vertical gap between cells:
> 
> \setupcombinations[distance=0mm,after=]
> 
>   * a 10mm horizontal and vertical gap between cells:
> 
> \setupcombinations[distance=10mm,after={\blank[10mm]}]
Please, update the wiki, but first consider this:

\setupexternalfigures[location={local, default}]
\setupcombination
[distance=5em,
 inbetween={\blackrule[width=.5\textwidth, color=red, height=1em]},
 after={\blackrule[width=.5\textwidth, color=green, height=5em]}]
\starttext
\placefigure
[here]   % figure placement
[fig:combinations]       % figure reference
{An example of combination.} % figure caption
{\startcombination[3*2]  % contents of the figure: a combination
% first row
{\externalfigure[cow][height=1cm]}{a}   % subfigure and subcaption
{\externalfigure[cow][height=1cm]}{b}
{\externalfigure[cow][height=1cm]}{c}
% second row
{\externalfigure[cow][height=1cm]}{d}
{\externalfigure[cow][height=1cm]}{e}
{\externalfigure[cow][height=1cm]}{f}
 \stopcombination}
\stoptext

Probably adding a sample similar to this makes sense.

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] \setupcombinations and the after-key

2017-08-09 Thread Mathias Schickel

> Am 09.08.2017 um 21:18 schrieb Pablo Rodriguez <oi...@gmx.es>:
> 
> On 08/09/2017 07:50 PM, Mathias Schickel wrote:
>> Dear List,
>> 
>> it seems that the after key of the \setupcombinations-command is
> broken. I am not able to get zero space between the cells. I have
> attached a minimal example. Changing the after command does not have any
> effect at all.
> 
> Matthias,
> 
> inbetween is the key, after is relative to the combination, not to the
> individual frames (or combined elements).
> 
> BTW, A4 is the default. No need to set it up.
> 
> In this sense, I think there is no need to set width and height in the
> layout. Unless I miss something, the paper size sets both dimensions.
> 
>\setuplayout
>  [backspace=0pt,
>topspace=0pt,
>   width=middle,
>  height=middle,
>location=middle,
>  header=0pt,
>  footer=0pt]
>\setupcombinations[distance=0mm, inbetween=]
>\starttext
>\startcombination[2*2]%
>{{\framed[width=.5\textwidth,
>height=.5\textheight]{1}}}
>{{\framed[width=.5\textwidth,
>height=.5\textheight]{2}}}
>{{\framed[width=.5\textwidth,
>height=.5\textheight]{3}}}
>{{\framed[width=.5\textwidth,
>height=.5\textheight]{4}}}
>\stopcombination
>\stoptext
> 
> Just in case it helps,
> 

Hi Pablo,

thank you a lot! This was really helpful. Maybe the garden page should be 
altered then. If you have a look at

http://wiki.contextgarden.net/Command/setupcombinations 
<http://wiki.contextgarden.net/Command/setupcombinations>

you get the impression that „after“ is the key I was looking for because the 
page says:

Suppressing both the horizontal and vertical gap between cells:
\setupcombinations[distance=0mm,after=]
a 10mm horizontal and vertical gap between cells:
\setupcombinations[distance=10mm,after={\blank[10mm]}]

Best, and thanks again,
Mathias


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

___
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] \setupcombinations and the after-key

2017-08-09 Thread Pablo Rodriguez
On 08/09/2017 07:50 PM, Mathias Schickel wrote:
> Dear List,
> 
> it seems that the after key of the \setupcombinations-command is
broken. I am not able to get zero space between the cells. I have
attached a minimal example. Changing the after command does not have any
effect at all.

Matthias,

inbetween is the key, after is relative to the combination, not to the
individual frames (or combined elements).

BTW, A4 is the default. No need to set it up.

In this sense, I think there is no need to set width and height in the
layout. Unless I miss something, the paper size sets both dimensions.

\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\setupcombinations[distance=0mm, inbetween=]
\starttext
\startcombination[2*2]%
{{\framed[width=.5\textwidth,
height=.5\textheight]{1}}}
{{\framed[width=.5\textwidth,
height=.5\textheight]{2}}}
{{\framed[width=.5\textwidth,
height=.5\textheight]{3}}}
{{\framed[width=.5\textwidth,
height=.5\textheight]{4}}}
\stopcombination
\stoptext

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
___

<    1   2   3   4   5   6   7   8   9   10   >