Re: [NTG-context] footnote placement

2017-07-21 Thread Meer, Hans van der

> On 21 Jul 2017, at 07:00, Pablo Rodriguez  wrote:
> 
> On 07/20/2017 10:06 PM, Meer, Hans van der wrote:
>> I did use: \setupnotes[footnote][split=verystrict,scope=page] so I guess
>> there is not much hope here.
>> 
>> A related question: the numbering of endnotes is placed in the
>> leftmargin. Is there a parameter setting that forces them in the
>> textarea of the page?  I tried \setupnotes[endnote][location=text] but
>> without success.
> 
> Hans,
> 
> \setupnotation[endnote][alternative=serried] is what you need.

Does the trick. Thanks. I was afraid I had to make an ad hoc macro, but this is 
far better.

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] Unable to switch math fonts

2017-07-21 Thread Kumar Appaiah
On Thu, Jul 20, 2017 at 08:23:01PM +0200, Pablo Rodriguez wrote:
> Hi Kumar,
> 
> this seems to work with latest beta:
> 
> \definefontfamily [myfamily] [rm] [TeX Gyre Pagella]
> \definefontfamily [myfamily] [mm] [Neo Euler]
> \setupbodyfont[myfamily]
> 
> \starttext
> This is plain text.
> \startformula
> x + y = z
> \stopformula
> \stoptext
> 
> I hope it helps,

This worked for me. Thanks.

Kumar
-- 
Kumar Appaiah
___
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] Extensible arrows in ConTeXT

2017-07-21 Thread Mathias Schickel
> $\xrightarrow{}{}$

This throws errors. Any idea why?

> $\xrightoverleftarrow{}{33°C}$

This does work. Sadly it is not the arrow I want to have.

Mathias




> Am 14.07.2017 um 21:25 schrieb Alan Braslau :
> 
> On Fri, 14 Jul 2017 11:33:14 +0200
> Mathias Schickel  wrote:
> 
>> Dear list,
>> 
>> I want to typeset an extensible arrow as described in this document:
>> http://dl.contextgarden.net/myway/matharrows.pdf
>>  Sadly I get errors
>> if I use \xrightarrow (even this simple command does not work).
>> 
>> Do extensible arrows still exists in ConTeXT and how can I use them?
>> 
>> Best
>> Mathias
> 
> $\xrightarrow{}{}$
> $\xrightoverleftarrow{}{33°C}$
> etc.
> 
> 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] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
Hello ConTeXist.
Is there any way to evaluate of contents of two macros as I am showing in my 
minimal example?
I know, that problem is in expansion, but I dont know to resolve it.
My minimal example consist of piece lua code, because I am solving my problem 
in mixed codes (TeX & Lua)

Thanx for help.
Jaroslav Hajtmar


\starttext

\startluacode
interfaces.definecommand ("domymacro", {
arguments = { { "option", "string" }  },
macro = function (opt_1)
   if #opt_1>0 then
   context(opt_1)
   else
   context("123")
   end
end
   })
interfaces.definecommand("mymacro", {
macro = function ()
  context.dosingleempty()
  context["domymacro"]()
end
   })
\stopluacode

\def\myothermacro{123}

\hairline

\mymacro[123]

\mymacro

\myothermacro

\hairline

\doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}

\doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}


\hairline

\doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal content}

\doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal content}



\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] Unable to switch math fonts

2017-07-21 Thread Sebastian L.

Hi, I have trouble with Neo Euler font after playing around with those
options.

My code looks like this:

\definefontfamily [fontnew] [rm] [Chiller Regular]
\definefontfamily [fontnew] [mm] [Neo Euler]

\starttext
   \setupbodyfont[fontnew]
   
   \startformula

 x + y + {\it y} = z = {\bi x} - {\bf x} / (2 + x)
   \stopformula
   
\stoptext


But when I compile the document, then I don't get any italics anymore.
Neither \it nor \bi.
Please check the attached PDF and compare it with your compilation of
the code above.
This happens ever since I build some other math fonts as well, like:

\definefontfamily [fontnew] [rm] [Chiller Regular]
\definefontfamily [fontnew] [mm] [Neo Euler]
\definefontfamily [fontnewtwo] [rm] [Antykwa Torunska]
\definefontfamily [fontnewtwo] [mm] [Cambria Math]

I am pretty sure that before I started mixing the fonts in one single
document, Neo Euler was italic.

Does anybody have a clue what might have went wrong?
Thanks in advance, Sebastian


On 21/07/2017 14:33, Kumar Appaiah wrote:

On Thu, Jul 20, 2017 at 08:23:01PM +0200, Pablo Rodriguez wrote:

Hi Kumar,

this seems to work with latest beta:

 \definefontfamily [myfamily] [rm] [TeX Gyre Pagella]
 \definefontfamily [myfamily] [mm] [Neo Euler]
 \setupbodyfont[myfamily]

 \starttext
 This is plain text.
 \startformula
 x + y = z
 \stopformula
 \stoptext

I hope it helps,

This worked for me. Thanks.

Kumar




testing1.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] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Jaroslav Hajtmar
Thanks to Henri for the answer. To I admit, I thought it a bit technically that 
it would not be technically possible. At least I know why I was tearing my 
teeth while trying to test ... 
One more thanx.
Jaroslav Hajtmar


Dne 22.07.17 3:58, ntg-context za uživatele Henri  napsal(a):

On Fri, 2017-07-21 at 11:25 +, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> Is there any way to evaluate of contents of two macros as I am showing in 
my minimal example? 
> I know, that problem is in expansion, but I dont know to resolve it.
> My minimal example consist of piece lua code, because I am solving my 
problem in mixed codes (TeX
> & Lua)

Something similar has been asked before and it is not possible.  The 
interfaces.definecommand
function defines a new macro using \protected\def.  To compare as equal in 
a \doif context, both
operands have to _expand_ to the same thing (here 123).  Here \mymacro is 
not expandable and thus
only \doifelse{\mymacro}{\mymacro} will ever compare true.

Furthermore, scanning for optional arguments (i.e. [...]) is inherently 
non-expandable.  To get
something expandable you must at least switch to mandatory arguments (i.e. 
{...}).  Still, using
interfaces.definecommand will still not be possible.  I believe that 
scanning arguments is better
done on the macro level than in Lua, but that's just my opinion.

> Thanx for help.
> Jaroslav Hajtmar
>  
>  
> \starttext
>  
> \startluacode
> interfaces.definecommand ("domymacro", {
> arguments = { { "option", "string" }  },
> macro = function (opt_1)
>if #opt_1>0 then
>context(opt_1)
>else
>context("123")
>end
> end
>})
> interfaces.definecommand("mymacro", {
> macro = function ()
>   context.dosingleempty()
>   context["domymacro"]()
> end
>})
> \stopluacode
>  
> \def\myothermacro{123}
>  
> \hairline
>  
> \mymacro[123]
>  
> \mymacro
>  
> \myothermacro
>  
> \hairline
>  
> \doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
> \doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
> \doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal 
content}
>  
>  
> \hairline
>  
> \doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
> \doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
> \doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal 
content}
>  
>  
>  
> \stoptext
>  
>  
>  
> 
___
> If your question is of interest to others as well, please add an entry to 
the Wiki!
> 
> maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> 
___

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

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

___

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

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

Re: [NTG-context] Compare contents of macros via \doif etc. alternatives

2017-07-21 Thread Henri
On Fri, 2017-07-21 at 11:25 +, Jaroslav Hajtmar wrote:
> Hello ConTeXist.
> Is there any way to evaluate of contents of two macros as I am showing in my 
> minimal example? 
> I know, that problem is in expansion, but I dont know to resolve it.
> My minimal example consist of piece lua code, because I am solving my problem 
> in mixed codes (TeX
> & Lua)

Something similar has been asked before and it is not possible.  The 
interfaces.definecommand
function defines a new macro using \protected\def.  To compare as equal in a 
\doif context, both
operands have to _expand_ to the same thing (here 123).  Here \mymacro is not 
expandable and thus
only \doifelse{\mymacro}{\mymacro} will ever compare true.

Furthermore, scanning for optional arguments (i.e. [...]) is inherently 
non-expandable.  To get
something expandable you must at least switch to mandatory arguments (i.e. 
{...}).  Still, using
interfaces.definecommand will still not be possible.  I believe that scanning 
arguments is better
done on the macro level than in Lua, but that's just my opinion.

> Thanx for help.
> Jaroslav Hajtmar
>  
>  
> \starttext
>  
> \startluacode
>     interfaces.definecommand ("domymacro", {
>         arguments = { { "option", "string" }  },
>         macro = function (opt_1)
>        if #opt_1>0 then
>    context(opt_1)
>    else
>    context("123")
>    end
>         end
>    })
>     interfaces.definecommand("mymacro", {
>         macro = function ()
>       context.dosingleempty()
>       context["domymacro"]()
>         end
>    })
> \stopluacode
>  
> \def\myothermacro{123}
>  
> \hairline
>  
> \mymacro[123]
>  
> \mymacro
>  
> \myothermacro
>  
> \hairline
>  
> \doifelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
> \doifinstringelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
> \doifincsnameelse{\mymacro}{\mymacro[123]}{equal content}{not equal content}
>  
>  
> \hairline
>  
> \doifelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
> \doifsamestringelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
> \doifinstringelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
> \doifincsnameelse{\mymacro}{\myothermacro}{equal content}{not equal content}
>  
>  
>  
> \stoptext
>  
>  
>  
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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