Re: [NTG-context] Size of fences, factor key

2018-04-25 Thread Mikael P. Sundqvist
>
>
>>
> sort of unclear indeed
>
>
> these big things are tricky as in plain tex they depends on font
> dimensions and forced scaling but in context we have abit more control over
> these sizes
>
> you can add this to cont-new.mkiv
>
> \unprotect
>
> \unexpanded\def\math_fenced_fenced_indeed[#1]#2%
>   {\iffirstargument\setupcurrentmathfence[#1]\fi
>\math_fenced_fenced_common
>\edef\p_size{\mathfenceparameter\c!size}%
>\ifx\p_size\empty\else
>
> \attribute\mathsizeattribute\numexpr\bigmathdelimitervariant
> *\plushundred+\p_size\relax
>\fi
>\math_fenced_left
>#2%
>\math_fenced_right
>\stopusemathstyleparameter
>\endgroup
>\advance\c_math_fenced_nesting\minusone}
>
> \protect
>
> and then do
>
> \setupbodyfont[lucidaot]
>
> \definemathfence[Set][left="007B,right="007D,command=yes]
>
> \startTEXpage[offset=1ex]
> \startformula
> \Set{x\in\mathbb R~:~x^2=1}
> \stopformula
> \startformula
> \Set[size=2]{x\in\mathbb R~:~x^2=1}
> \stopformula
> \startformula
> \Set[size=3]{x\in\mathbb R~:~x^2=1}
> \stopformula
> \startformula
> \Set[size=4]{x\in\mathbb R~:~x^2=1}
> \stopformula
> \stopTEXpage
>


Many thanks for your answer, I appreciate it!

If you look at the example below (output attached), you see that the
version with \bigl and \bigr has a different size than the other ones.

So my question boils down to: Is it possible, by using fences, to have the
same size as the \big, \Big, \bigg etc would give?

If not, is it possible to implement? I think it would make the already very
nice fencing system even more usable. The reason is to be able to use this
instead of not using fences at all in the few cases where the size from the
fencing is not optimal.

/Mikael


\unprotect

\unexpanded\def\math_fenced_fenced_indeed[#1]#2%
  {\iffirstargument\setupcurrentmathfence[#1]\fi
   \math_fenced_fenced_common
   \edef\p_size{\mathfenceparameter\c!size}%
   \ifx\p_size\empty\else

\attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+\p_size\relax
   \fi
   \math_fenced_left
   #2%
   \math_fenced_right
   \stopusemathstyleparameter
   \endgroup
   \advance\c_math_fenced_nesting\minusone}

\protect

\setupbodyfont[lucidaot]

\definemathfence[Set][left="007B,right="007D,command=yes]

\startTEXpage[offset=1ex]
\startformula
\{x\in\mathbb R~:~x^2=1\}\quad\text{Here the braces are too small}
\stopformula
\startformula
\bigl\{x\in\mathbb R~:~x^2=1\bigr\}\quad\text{I like this size}
\stopformula
\startformula
\Set{x\in\mathbb R~:~x^2=1}\quad\text{Here the braces are too big}
\stopformula
\startformula
\Set[size=2]{x\in\mathbb R~:~x^2=1}\quad\text{Here the braces are
too big}
\stopformula
\stopTEXpage


ctx-example36.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] Size of fences, factor key

2018-04-25 Thread Hans Hagen

On 4/25/2018 7:29 AM, Mikael P. Sundqvist wrote:
On Sat, Apr 21, 2018 at 7:30 PM, Mikael P. Sundqvist > wrote:


Dear Hans and others,

I'm usually use the \big, \Big, \bigg etc to get the size of
parentheses, brackets and braces to be the size I want. I realize
that the fences machinery is probably a cleaner way of doing this.

I tried it a bit, and it usually gives the result I like. But
sometimes not, and it seems that the way to change the size of the
parentheses/brackets/braces is to use the factor key.

1) Are the different options none, auto NUMBER explained somehere?
2) Could one have, for exceptional cases where the default is not
satisfactory, a keyword like factor=big for example, to get the same
size as if one would have used \big?

I am a bit confused. See the example below, with output (from latest
standalone) attached.

/Mikael

PS: I would suggest to have
  italic       = { feature = 'ss01', value = 1, comment =
"Mathematical Alternative Lowercase Italic" },
set in lucida-opentype-math.lfg. In all books (on math) I have seen,
I think this is what is used.

%%% Example file:

\setupbodyfont[lucidaot]

\definemathfence[Set][left="007B,right="007D,command=yes]

\startbuffer
\startformula
\Set{x\in\mathbb R~:~x^2=1}
\stopformula
\stopbuffer


\startTEXpage[offset=3bp]

\startformula
\{x\in\mathbb R~:~ x^2=1\}%Too small
\stopformula

\startformula
\bigl\{x\in\mathbb R~:~ x^2=1\bigr\}%I like this one
\stopformula

\startformula
\Bigl\{x\in\mathbb R~:~ x^2=1\Bigr\}%Too big
\stopformula

\getbuffer

\setupmathfence[Set][factor=1]%I like this one
\getbuffer

\setupmathfence[Set][factor=auto]%Too big
\getbuffer

%\setupmathfence[Set][factor=big]%Perhaps this could work? Or
size=big or something
%\getbuffer
\stopTEXpage


I hate to do this, but a small *bump*

(If it is unclear what I'm asking for, I could try to clarify)


sort of unclear indeed


these big things are tricky as in plain tex they depends on font 
dimensions and forced scaling but in context we have abit more control 
over these sizes


you can add this to cont-new.mkiv

\unprotect

\unexpanded\def\math_fenced_fenced_indeed[#1]#2%
  {\iffirstargument\setupcurrentmathfence[#1]\fi
   \math_fenced_fenced_common
   \edef\p_size{\mathfenceparameter\c!size}%
   \ifx\p_size\empty\else

\attribute\mathsizeattribute\numexpr\bigmathdelimitervariant*\plushundred+\p_size\relax
   \fi
   \math_fenced_left
   #2%
   \math_fenced_right
   \stopusemathstyleparameter
   \endgroup
   \advance\c_math_fenced_nesting\minusone}

\protect

and then do

\setupbodyfont[lucidaot]

\definemathfence[Set][left="007B,right="007D,command=yes]

\startTEXpage[offset=1ex]
\startformula
\Set{x\in\mathbb R~:~x^2=1}
\stopformula
\startformula
\Set[size=2]{x\in\mathbb R~:~x^2=1}
\stopformula
\startformula
\Set[size=3]{x\in\mathbb R~:~x^2=1}
\stopformula
\startformula
\Set[size=4]{x\in\mathbb R~:~x^2=1}
\stopformula
\stopTEXpage




-
  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] path for luatex cache

2018-04-25 Thread Peter Münster
On Wed, Apr 25 2018, Hans Hagen wrote:

> the cache is created in the first writeable path found

Ah, thanks! I had /opt/context/tex/texmf-cache/luatex-cache writeable,
but even /opt/context/tex/texmf-cache must be writeable, then it works.

-- 
   Peter
___
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] path for luatex cache

2018-04-25 Thread Hans Hagen

On 4/25/2018 9:19 PM, Peter Münster wrote:

Hi,

What should I do please, to prevent ConTeXt from creating
$HOME/luatex-cache?

I tried:
- TEXMFCACHE=/opt/context/tex/texmf-cache
- TEXMFVAR=/opt/context/tex/texmf-cache
- LUATEX_CACHE=/opt/context/tex/texmf-cache/luatex-cache

but without success...

TIA for any help,

you can look at

contextcnf.lua


and put a file with patches to it in texmf-local or home ... anyway the 
cache is created in the first writeable path found


-
  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] Horizontal line after text in an environment

2018-04-25 Thread Hans Hagen

On 4/25/2018 4:59 PM, Fabrice Couvreur wrote:

Hello,
In this environment, when the text has sufficient height, the horizontal 
line is well below the figure. However when the height of text is not 
sufficient, the position of the line is not correct and I would like it 
also below the figure.


\flushsidefloats

Thanks
Fabrice


\setuptolerance[stretch,verytolerant]
\useMPlibrary[dum]


\define[1]\ProprieteHeadcommand
   {\textrule[top]{#1}}

\defineenumeration
   [propriete]
   [text=Propriété,
    title=yes,
    headstyle={bold},
    style=italic,
    headcommand=\ProprieteHeadcommand,
    numbercommand=\groupedcommand{}{\nbsp},
    after=\textrule]

\starttext

\startpropriete
\placefigure[right,none]{}{\externalfigure[dummy]}
\startitemize
\item \input ward

\item \input ward
\stopitemize
\stoppropriete
\startpropriete
\placefigure[right,none]{}{\externalfigure[dummy]}
\startitemize
\item First item

\item Second item
\stopitemize
\stoppropriete

\stoptext


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

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




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

[NTG-context] path for luatex cache

2018-04-25 Thread Peter Münster
Hi,

What should I do please, to prevent ConTeXt from creating
$HOME/luatex-cache?

I tried:
- TEXMFCACHE=/opt/context/tex/texmf-cache
- TEXMFVAR=/opt/context/tex/texmf-cache
- LUATEX_CACHE=/opt/context/tex/texmf-cache/luatex-cache

but without success...

TIA for any help,
-- 
   Peter
___
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] doiffile

2018-04-25 Thread Wolfgang Schuster

\doifelsepath{…}{…}{…}

Wolfgang

Hans van der Meer 
25. April 2018 um 20:24
The \doiffile macros recognize the existence of a file but, unless I 
am mistaken, not the existence of a directory.
Is there another macro, whose existence I have nof found yet, that 
offers this capability?
Or should this be a slight encouragement to expand the implementation 
in that direction?


dr. Hans van der Meer


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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context

webpage : http://www.pragma-ade.nl / http://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] doiffile

2018-04-25 Thread Hans van der Meer
The \doiffile macros recognize the existence of a file but, unless I am 
mistaken, not the existence of a directory. 
Is there another macro, whose existence I have nof found yet, that offers this 
capability?
Or should this be a slight encouragement to expand the implementation in that 
direction?

dr. Hans van der Meer


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

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

Re: [NTG-context] Question to sectioning

2018-04-25 Thread Pablo Rodriguez
On 04/24/2018 12:59 AM, Tomas Hala wrote:
> Hi Wolfgang,
> 
> some deep error appeared, unfortunately. I tested it on TL2014--17. Did you
> use TL2018? It seems similarly as any other error related with the change of
> dimensions maintanance betweeen TL2017 and 2018.

Hi Tomáš,

both issues (the one from this thread and the question with hanging
punctuation) are fixed in latest beta.

You may install the latest beta from the ConTeXt Suite (aka ConTeXt
Standalone [http://wiki.contextgarden.net/ConTeXt_Standalone]) besides
your TeX Live installation.

The ConTeXt Suite is portable, so it won’t interfere with TeX Live. In
fact, I keep previous versions and I have fifteen different betas on my
computer (I only use the latest one, but it is wise to keep old versions
just in case some relevant functionality is compromised in latest version).

In the past, I was also reluctant to use beta versions. But after a
reply to one question of mine in this list, I realized that I may use
the latest beta version, besides TeX Live or the latest stable from the
ConTeXt Suite.

Instead of invoking:

  contextjit document.tex

I had to invoke:

  source path-to-context-beta/tex/setuptex && contextjit document.tex

The minor difference (I guess you don’t type the command) allows you to
use the latest version of ConTeXt.

After all, I guess this is much easier that trying to fix ConTeXt from
TeX Live 2017.

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] trying out "plug mode" and the harfbuzz plugin

2018-04-25 Thread Ulrike Fischer
Am Sun, 22 Apr 2018 12:04:11 +0200 schrieb Hans Hagen:

>> I read the guitex article about ffi and luatex and wanted to try if
>> I could run tests with harfbuzz and the plug-mode.
>>
>> Looking in the newest context I found in onandon-ffi.tex a reference
>> to the module fonts-plugins. But this module loads a lua file which
>> isn't in context:
>> 
>> \registerctxluafile{font-phb}{} % harfbuzz plugin
> 
> which then indirectly loads some more code

> it's on my machine (and occasionally used when we test idris new fonts 

(It looks as if my first answer got lost so again) Can we (David and
me) have the code for tests? 


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

[NTG-context] Horizontal line after text in an environment

2018-04-25 Thread Fabrice Couvreur
Hello,
In this environment, when the text has sufficient height, the horizontal
line is well below the figure. However when the height of text is not
sufficient, the position of the line is not correct and I would like it
also below the figure.
Thanks
Fabrice


\setuptolerance[stretch,verytolerant]
\useMPlibrary[dum]


\define[1]\ProprieteHeadcommand
  {\textrule[top]{#1}}

\defineenumeration
  [propriete]
  [text=Propriété,
   title=yes,
   headstyle={bold},
   style=italic,
   headcommand=\ProprieteHeadcommand,
   numbercommand=\groupedcommand{}{\nbsp},
   after=\textrule]

\starttext

\startpropriete
\placefigure[right,none]{}{\externalfigure[dummy]}
\startitemize
\item \input ward

\item \input ward
\stopitemize
\stoppropriete
\startpropriete
\placefigure[right,none]{}{\externalfigure[dummy]}
\startitemize
\item First item

\item Second item
\stopitemize
\stoppropriete

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