Re: [NTG-context] Registers and getparameters

2018-01-22 Thread Otared Kavian
Hi Wolfgang,

Thank you very much for your reply and your wise advice to use the \setvariable 
mechanism. It is indeed much more convenient to use for what I intend to do.

The only remaining problem is that when several talks are included in my file 
(in the following example there three of them), then the entries to the 
register are correct but the associated pagenumbers are incorrect and are given 
the last pagenumber: in the following example all three talks are given the 
pagenumber 4 in the register. Is there something I am doing wrong?

Thanks agin for your time and attention: Otared K.
%%% begin register-talks.tex
\setupinteraction[state=start]
\defineregister[speakers]

\setupregister
  [speakers]
  [style=sansbold,
   n=2]

\startbuffer[pagetalk]
  \doflushatpar 
{\expanded{\speakers{\getvariable{talk}{speakername}}}%
 \expanded{\pagereference[talk:\getvariable{talk}{speakername}]}}%
  \starttabulate[|f{\bi}l|p|]
  \NC Speaker \EQ \getvariable{talk}{speakername} \NC\NR
  \NC Title   \EQ \getvariable{talk}{title}   \NC\NR
  \NC Time\EQ \getvariable{talk}{time}\NC\NR
  \NC Room\EQ \getvariable{talk}{room}\NC\NR
  \HL
  \stoptabulate
\stopbuffer

\setvariable{talk}{set}{\getbuffer[pagetalk]}

\showframe[text][text]

\starttext

\setvariables[talk]
[speakername={Gauss},
title={Remarks on Number Theory},
time={10:30},
room={A}]


\page

\setvariables[talk]
[speakername={Poincaré},
title={Remarks on Relativity},
time={16:30},
room={B}]

\page

\setvariables[talk]%
[speakername={Dirac},
title={Quaternions and the wave equation},
time={15:30},
room={B}]

\page

The talk about Gauss is on \at{page}[talk:Gauss].

\completeregister[speakers]

\stoptext
%%% end register-talks.tex

> On 22 Jan 2018, at 20:26, Wolfgang Schuster  <mailto:schuster.wolfg...@gmail.com>> wrote:
> 
> 
>> Otared Kavian <mailto:ota...@gmail.com> 22. Januar 2018 um 19:53
>> Hi all,
>> 
>> I have a list of speakers (and abstracts of their talk) in a rather long 
>> document, and the name of each speaker is written to a register named 
>> speakers. 
>> Then with the command \getparameters[Talk] I get the name of each speaker 
>> and try to write it to the register with
>> 
>> \speakers{\TalkSpeakerName}
> 
> You have to add \expanded, i.e. \expanded{\speakers{...}}.
> 
>> Indeed this does not work to obtain the result I am looking for: the sorting 
>> is indeed under the letter « t », and most importantly the register gets 
>> only the last name in the list instead of getting each speaker name.
>> 
>> The following is a (not so minimal…) example. Can anyone help me in this 
>> matter?
> 
> When you replace \getparameters with \setvariables you can set a command
> which is applied each time when you set new values.
> 
> 
> \defineregister[speakers]
> 
> \setupregister
>   [speakers]
>   [style=sansbold,
>n=2]
> 
> \startbuffer[pagetalk]
>   \doflushatpar 
> {\expanded{\speakers{\getvariable{talk}{speakername}}}%
>  \expanded{\pagereference[talk:\getvariable{talk}{speakername}]}}%
>   \starttabulate[|f{\bi}l|p|]
>   \NC Speaker \EQ \getvariable{talk}{speakername} \NC\NR
>   \NC Title   \EQ \getvariable{talk}{title}   \NC\NR
>   \NC Time\EQ \getvariable{talk}{time}\NC\NR
>   \NC Room\EQ \getvariable{talk}{room}\NC\NR
>   \HL
>   \stoptabulate
> \stopbuffer
> 
> \setvariable{talk}{set}{\getbuffer[pagetalk]}
> 
> \showframe[text][text]
> 
> \starttext
> 
> \setvariables
>   [talk]
>   [speakername={Gauss},
>title={Remarks on Number Theory},
>time={10:30},
>room={A}]
> 
> The talk about Gauss was on \at{page}[talk:Gauss].
> 
> \completeregister[speakers]
> 
> \stoptext
> 
> 
> Wolfgang
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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] Registers and getparameters

2018-01-22 Thread Otared Kavian
Hi all,

I have a list of speakers (and abstracts of their talk) in a rather long 
document, and the name of each speaker is written to a register named speakers. 
Then with the command \getparameters[Talk] I get the name of each speaker and 
try to write it to the register with

\speakers{\TalkSpeakerName}

Indeed this does not work to obtain the result I am looking for: the sorting is 
indeed under the letter « t », and most importantly the register gets only the 
last name in the list instead of getting each speaker name.

The following is a (not so minimal…) example. Can anyone help me in this matter?
Thanks in advance for your attention and time!
Best regards: OK

%%% begin register-speaker.tex
\defineregister[speakers]
\setupregister[speakers] [
style=sansbold,   %% headings
n=2,  %% columns
]

\define\MakePageTalk{%
\reference[ref:\TalkSpeakerName]{}
{\bi Speaker~:\/} \TalkSpeakerName \speakers{\TalkSpeakerName}.\crlf
{\bi Title :} \TalkTitle \crlf
{\bi Time:} \TalkTime \crlf
{\bi Room :} \TalkRoom\crlf 
\hairline\par}

\starttext 
\getparameters[Talk]%
[SpeakerName={Gauss},
Title={Remarks on Number Theory},
Time={10:30},
Room={A}]
\MakePageTalk

\page

\getparameters[Talk]%
[SpeakerName={Poincaré},
Title={Remarks on Relativity},
Time={16:30},
Room={B}]
\MakePageTalk

\page

\getparameters[Talk]%
[SpeakerName={Dirac},
Title={Quaternions and the wave equation},
Time={15:30},
Room={B}]
\MakePageTalk

\page

\completeregister[speakers]

\stoptext
%%% end register-speaker.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] Problem with \definemathmatrix

2018-01-18 Thread Otared Kavian
Hi Aditya,

Thanks for sharing this nice module, it is really useful, especially when 
making documents for students while using Matlab or Scilab.

There is also in the distribution the module m-matrix.mkiv written by Hans and 
Jeong Dalyoung, which allows to manipulate matrices. 
Maybe one should add the functionality of your module to the one in the 
distribution and somehow unify their environments.

Best regards: OK

> On 18 Jan 2018, at 04:53, Aditya Mahajan  wrote:
> […]
> 
> If you type a lot of such matrices, you might find the attached module 
> interesting. Using it you can use matlab-like syntax for writing matrices:
> 
> \usemodule[simplematrix]
> \definesimplematrix[MATRIX][fence=parenthesis, align=middle]
> 
> \starttext
> $\MATRIX{1,2,3,4;5,6,7,8;9,10,11,12}$
> \stoptext
> 
> 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
> ___

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

2018-01-17 Thread Otared Kavian
Hi Fabrice,

I think the problem comes from a blank line in your matrix (after your last 
line of entries in your matrix). The following works fine for me:

\definemathmatrix
  [pmatrix]
  [left={\left(\,},right={\,\right)}]
  
\starttext

\startformula
A = \startpmatrix
\NC 11 \NC 12 \NR
\NC 21 \NC 22 \NR
\stoppmatrix
\stopformula

\startformula
M^3 = \startpmatrix
   \NC 2 \NC 3 \NC 6  \NC 4 \NC 2 \NC 7  \NC 3  \NC 1 \NR 
   \NC 3 \NC 0 \NC 1  \NC 1 \NC 2 \NC 3  \NC 6  \NC 4 \NR  
   \NC 6 \NC 1 \NC 4  \NC 4 \NC 4 \NC 9  \NC 10 \NC 6 \NR  
   \NC 4 \NC 1 \NC 4  \NC 4 \NC 5 \NC 8  \NC 8  \NC 3 \NR  
   \NC 2 \NC 2 \NC 4  \NC 5 \NC 2 \NC 7  \NC 3  \NC 1 \NR  
   \NC 7 \NC 3 \NC 9  \NC 8 \NC 7 \NC 8  \NC 10 \NC 3 \NR  
   \NC 3 \NC 6 \NC 10 \NC 8 \NC 3 \NC 10 \NC 4  \NC 1 \NR  
   \NC 1 \NC 4 \NC 6  \NC 3 \NC 1 \NC 3  \NC 1  \NC 0 \NR  
\stoppmatrix
\stopformula

\stoptext

Best regards: OK


> On 17 Jan 2018, at 19:19, Fabrice Couvreur  
> wrote:
> 
> Hello,
> This macro that is not mine worked very well. I just tested the following 
> file and there is a problem.
> Thank you
> Fabrice
> 
> \definemathmatrix
>   [pmatrix]
>   [left={\left(\,},right={\,\right)}]
>   
> \starttext
> 
> \math{M^3=\startpmatrix
>\NC 2 \NC 3 \NC 6  \NC 4 \NC 2 \NC 7  \NC 3  \NC 1 \NR 
>\NC 3 \NC 0 \NC 1  \NC 1 \NC 2 \NC 3  \NC 6  \NC 4 \NR  
>\NC 6 \NC 1 \NC 4  \NC 4 \NC 4 \NC 9  \NC 10 \NC 6 \NR  
>\NC 4 \NC 1 \NC 4  \NC 4 \NC 5 \NC 8  \NC 8  \NC 3 \NR  
>\NC 2 \NC 2 \NC 4  \NC 5 \NC 2 \NC 7  \NC 3  \NC 1 \NR  
>\NC 7 \NC 3 \NC 9  \NC 8 \NC 7 \NC 8  \NC 10 \NC 3 \NR  
>\NC 3 \NC 6 \NC 10 \NC 8 \NC 3 \NC 10 \NC 4  \NC 1 \NR  
>\NC 1 \NC 4 \NC 6  \NC 3 \NC 1 \NC 3  \NC 1  \NC 0 \NR  
>
>  \stoppmatrix}  
>   
> \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
___

Re: [NTG-context] Bug? numberstopper in references

2018-01-16 Thread Otared Kavian
Oh I sent my previous message too quickly… 
I was just using the \at command for referring to captions, while you want to 
use the \in command: maybe this is the problem.

> On 16 Jan 2018, at 22:25, bbvo...@home.nl wrote:
> 
> Dear list,
> 
> When I use the numberstopper option in setupcaptions it appears
> unexpectedly in the references. The wiki states otherwise.
> Wiki and a working example are listed below.
> 
> Kind regards,
> 
> Bernard
> 
> 
> wiki: http://wiki.contextgarden.net/Command/setupcaptions:
> 
> numberstopper MKIV only. The numberstopper text follows the number 
> and,
> if present, the suffix, and precedes the caption text. It does not
> appear in references.
> 
> 
> Working example:
> 
> \setupcaptions[table][numberstopper={:}]
> 
> \starttext
> 
> \placetable[here][tab:ships]{Ships that moored at Hasselt.}{
> \starttable[|c|c|]
> \HL
> \NC \bf Year \NC \bf Number of ships \NC\SR
> \HL
> \NC 1645 \NC 450 \NC\FR
> \NC 1671 \NC 480 \NC\MR
> \NC 1676 \NC 500 \NC\MR
> \NC 1695 \NC 930 \NC\LR
> \HL
> \stoptable
> }
> ...
> 
> See \in{Table}[tab:ships] on \at{page}[tab:ships]
> \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
___

Re: [NTG-context] Bug? numberstopper in references

2018-01-16 Thread Otared Kavian
Hi Bernard,

Transposing your table to an example given by Wolfgang Schuster some time ago I 
obtain the correct behavior, but I don’t know where the problem in your example 
comes from…

Please see whether the following gives what you want and comapre with the PDF I 
get here with ConTeXt  version 2018.01.14 15:55.

Best regards: OK

 begin caption-numberstopper-0.tex
\setupexternalfigure[location=default]

\setupcaptions[numberstopper={:}]
\starttext

Take a look at \at{picture}[fig:cow] below.

\startplacefigure[reference=fig:cow,title=A dutch cow]
 \externalfigure[cow]
\stopplacefigure

\placefigure[here][photo]{This is a cow}{\externalfigure[cow][width=2in]}

Take a look at \at{table}[tab:1] below.

\placetable[here][tab:1]{This is a table}{
\starttable[|c|c|]
\HL
\NC \bf Year \NC \bf Number of ships \NC\SR
\HL
\NC 1645 \NC 450 \NC\FR
\NC 1671 \NC 480 \NC\MR
\NC 1676 \NC 500 \NC\MR
\NC 1695 \NC 930 \NC\LR
\HL
\stoptable}

\stoptext
 end caption-numberstopper-0.tex



caption-numberstopper-0.pdf
Description: Adobe PDF document


> On 16 Jan 2018, at 22:25, bbvo...@home.nl wrote:
> 
> Dear list,
> 
> When I use the numberstopper option in setupcaptions it appears
> unexpectedly in the references. The wiki states otherwise.
> Wiki and a working example are listed below.
> 
> Kind regards,
> 
> Bernard
> 
> 
> wiki: http://wiki.contextgarden.net/Command/setupcaptions:
> 
> numberstopper MKIV only. The numberstopper text follows the number 
> and,
> if present, the suffix, and precedes the caption text. It does not
> appear in references.
> 
> 
> Working example:
> 
> \setupcaptions[table][numberstopper={:}]
> 
> \starttext
> 
> \placetable[here][tab:ships]{Ships that moored at Hasselt.}{
> \starttable[|c|c|]
> \HL
> \NC \bf Year \NC \bf Number of ships \NC\SR
> \HL
> \NC 1645 \NC 450 \NC\FR
> \NC 1671 \NC 480 \NC\MR
> \NC 1676 \NC 500 \NC\MR
> \NC 1695 \NC 930 \NC\LR
> \HL
> \stoptable
> }
> ...
> 
> See \in{Table}[tab:ships] on \at{page}[tab:ships]
> \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
___

Re: [NTG-context] Context version 2018.01.04 17:37 does not produce output…

2018-01-05 Thread Otared Kavian


> On 5 Jan 2018, at 14:21, Hans Hagen  wrote:
>> […]
> hm, soon that will be 1.07 ... anyway, as a quick hack you can change it in 
> context.mkiv to 1.05


Many thanks for your quick answer.
I just did change 
\ifnum\luatexversion<106
into
\ifnum\luatexversion<105

and rebuilt the formats: everything works fine as far as I am concerned…

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
___

[NTG-context] Context version 2018.01.04 17:37 does not produce output…

2018-01-05 Thread Otared Kavian
Hi Hans,

I wish you and all the community a happy new year.

I wanted to report a problem with yesterday’s beta release, version 2018.01.04 
17:37, which is that no PDF ouput is produced when a file is typeset:

% begin test.tex
\starttext
Hello
\stoptext
%end test.tex

When issuing the command
context —make —all
the log file says :
Your luatex binary is too old, you need at least version 1.06! 

Indeed the version of Luatex in the standalone tree is version 1.05.

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] \listfigures in context..

2017-12-16 Thread Otared Kavian
Hi John,

You are maybe looking for

\placelist[figure]

Best regards: OK


> On 16 Dec 2017, at 18:13, John Culleton  wrote:
> 
>  
> Latex has a \llistfigures command. Does context have an equivalent command?
>  
> John Culleton
>  
> ___
> 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] synctex and TeXShop problem

2017-11-17 Thread Otared Kavian
Thanks Luigi for the link, but unfortunately the version 3.89 of TeXShop does 
not work for me (even with the magic line 
%!TEX useOldSyncParser
put at the begining of the source file), while version 3.77 does the sync stuff 
as expected, even by opening an \input source file.

I have put here


https://www.dropbox.com/sh/68gfmzci1g67y5d/AABxdQ9sZsCiR9k6se_4zX0ga?dl=0

example files which can be tested with various versions of TeXShop. I don’t 
have versions between 3.78 and 3.87, but my experience shows that the syncing 
works between the resulting PDF file of a source file typeset with ConTeXt 
version 2017.11.15 22:08 and TeXShop version 3.77, while the syncing does not 
work with versions 3.88 and 3.89.

Best regards: OK

> On 17 Nov 2017, at 14:31, luigi scarso  wrote:
> 
> On Fri, Nov 17, 2017 at 2:27 PM, Otared Kavian  wrote:
>> Hi Alan,
>> 
>> A few weeks ago Steffen Wolfrum and myself reported the issue to Richard
>> Koch who did some research and discovered the origin of the problem. He has
>> written again the part of the code related to synctex and ConTeXt and will
>> issue a new version where the problem is fixed.
>> 
>> In the meanwhile you can use a previous version of TeXShop (I use version 77
>> and I can send you a Dropbox link to download it, of you wish) where the
>> syncing between the PDF result and the ConTeXt source works fine.
>> 
>> Best regards: OK
>> 
> 
> 
> http://pages.uoregon.edu/koch/texshop/changes_3.html
> 
> 
> -- 
> 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
> ___

___
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] synctex and TeXShop problem

2017-11-17 Thread Otared Kavian
Hi Alan,

A few weeks ago Steffen Wolfrum and myself reported the issue to Richard Koch 
who did some research and discovered the origin of the problem. He has written 
again the part of the code related to synctex and ConTeXt and will issue a new 
version where the problem is fixed.

In the meanwhile you can use a previous version of TeXShop (I use version 77 
and I can send you a Dropbox link to download it, of you wish) where the 
syncing between the PDF result and the ConTeXt source works fine.

Best regards: OK

> On 17 Nov 2017, at 14:19, Alan Bowen  wrote:
> 
> With the latest betas, I see that with the TeXShop Engine
> 
> #!/bin/tcsh
> 
> # Before using this engine, you must run the following command once in 
> Terminal: luatools --generate
> 
> set path= ($path /usr/texbin 
> /Users/bowen1/Dropbox/ConTeXt/tex/texmf-osx-64/bin)
> mtxrun --script context --autogenerate --file-line-error "$1”
> 
> and
> \setupsynctex[state=start, method=max]
> in the source file, the requisite filename.synctex auxiliary file is produced 
> on processing.
> 
> But I am still not getting any linkage between the source file and the 
> preview file, that is, clicking on one does not have any effect on the other. 
> Is there something else that I need?
> 
> I am running ConTeXt  ver: 2017.11.15 with macOS 10.13.1.
> 
> 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
> ___

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

2017-11-13 Thread Otared Kavian
Dear Dalyoung,

Thank you for having tested my example.

Regarding what you are reporting in another thread about the weird behaviour of 
\overline in columns, I was traveling and could not test your file. Now I 
tested your example and I get the same result as you with the latest beta 
2017.11.08 22:45.
The strange fact is that if one puts 
\startitem $\overline{A} = A$ \stopitem
as the first item in your example (instead of the second), then ConTeXt creates 
three columns, with the first item the result of the above line, and then items 
2 and 3 in the second column and finally item 4 in the third column. Despite 
this the textwidth is divided into four…

I hope Hans will see your message and fix the issue.

Best regards: OK

> On 13 Nov 2017, at 03:12, Jeong Dal  wrote:
> 
> Dear Otared,
> 
> I run your code and found that they are not aligned properly as you want.
> But I don’t know how to do for the correct alignment.
> 
> Did you see the mail about the \overline problem in column environment which 
> I listed recently?
> It is a different problem from yours, but I’d like to know whether  you got 
> the same output as mine or not.
> Would you please check it in your computer?
> 
> Thank you.
> 
> Best regards,
> 
> Dalyoung
> ___
> 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] Problem with math alignment

2017-11-12 Thread Otared Kavian
Hi Matthias,

Thanks for your answer. I think that Hans has changed the way entries of 
mathmatrix are handled, that is they are now centered and this cannot be 
changed…
However I think now that my way of using mathmatrix in order to get aligned 
cases, should be changed into the following:

\definemathalignment[alignedcases]
[n=3,
align={right,left,left},
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]

Once this is done, the result is as expected since the math alignment 
environment accepts changing the alignment in each column. However the big 
problem is that one loses the left brace encompassing the displayed equations… 

I hope Hans will read this and help fix the issue…

Best regards: OK

%%% begin example-aligned-cases.tex
\definemathalignment[alignedcases]
[n=3,
align={right,left,left},
distance=3pt,
left={\left\{}, % this is not honoured…
right={\right.},
style=\displaystyle]
\starttext

\startformula
\startalignedcases
\NC \partial_{tt} u - \Delta u + q(x) u \NC = 0  \NC \quad\mbox{in 
}\;(0,T)\times\Omega \NR
\NC  u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
\NC  \partial_{t} u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
\NC {\partial u \over\partial{\bf n} } \NC = g(t,\sigma) \NC \quad \mbox{on }\; 
(0,T)\times\partial\Omega. \NR
\stopalignedcases
\stopformula


\startformula
\startalign[n=3,align={right,left,left}]
\NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\mbox{in }\; 
(0,T)\times\Omega \NR
\NC - \Delta v  \NC = q(x) \partial_{t}u \NC \quad\mbox{in }\; \Omega \NR
\stopalign
\stopformula

\startformula
\startalignedcases
\NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\mbox{in }\; 
(0,T)\times\Omega \NR
\NC - \Delta v  \NC = q(x) \partial_{t}u \NC \quad\mbox{in }\; \Omega \NR
\stopalignedcases
\stopformula
\stoptext
%%% end example-aligned-cases.tex

> On 12 Nov 2017, at 17:58, Weber, Matthias  wrote:
> 
> Same here. Curiously, the Garden version is ok, while the newest beta seems 
> to make all alignments centered.
> 
> 
> Minimal  Example:
> 
> 
> \starttext
> \startformula
> A=\startmathmatrix[align={right,right}]
> \NC1\NC-1\NR
> \NC-1\NC1\NR
> \stopmathmatrix
> \stopformula
> \stoptext
> 
> Matthias
> 
>> On Nov 12, 2017, at 11:37 AM, Otared Kavian  wrote:
>> 
>> Hi everybody,
>> 
>> Does anyone have noticed that the mathalignment has changed its behaviour 
>> recently? I think a bug has managed to enter the environment which handles 
>> the mathalignment, at least since a few weeks ago. I did not report it 
>> earlier because I was traveling and did not have a stable internet access.
>> 
>> Here is a minimal example where on can see in the first displayed formula 
>> that the first and third column are centered while the first one shoud be 
>> right-aligned and the third one left-aligned. (Actually it seems that all 
>> columns are centered…)
>> %%% begin pb-math-align.tex
>> \definemathmatrix[alignedcases]
>>  [align={right,left,left},
>>  distance=3pt,
>>  left={\left\{},
>>  right={\right.},
>>  style=\displaystyle]
>> 
>> 
>> \starttext
>> 
>> \startformula
>> \startalignedcases
>> \NC \partial_{tt} u - \Delta u + q(x) u \NC = 0  \NC \quad\mbox{in 
>> }\;(0,T)\times\Omega \NR
>> \NC  u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
>> \NC  \partial_{t} u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
>> \NC {\partial u \over\partial{\bf n} } \NC = g(t,\sigma) \NC \quad \mbox{on 
>> }\; (0,T)\times\partial\Omega. \NR
>> \stopalignedcases
>> \stopformula
>> 
>> 
>> \startformula
>> \startalignedcases
>> \NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\mbox{in }\; 
>> (0,T)\times\Omega \NR
>> \NC - \Delta v  \NC = q(x) \partial_{t}u \NC \quad\mbox{in }\; \Omega \NR
>> \stopalignedcases
>> \stopformula
>> 
>> \stoptext
>> %%% end pb-math-align.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
>> ___

[NTG-context] Problem with math alignment

2017-11-12 Thread Otared Kavian
Hi everybody,

Does anyone have noticed that the mathalignment has changed its behaviour 
recently? I think a bug has managed to enter the environment which handles the 
mathalignment, at least since a few weeks ago. I did not report it earlier 
because I was traveling and did not have a stable internet access.

Here is a minimal example where on can see in the first displayed formula that 
the first and third column are centered while the first one shoud be 
right-aligned and the third one left-aligned. (Actually it seems that all 
columns are centered…)
%%% begin pb-math-align.tex
\definemathmatrix[alignedcases]
[align={right,left,left},
distance=3pt,
left={\left\{},
right={\right.},
style=\displaystyle]


\starttext

\startformula
\startalignedcases
\NC \partial_{tt} u - \Delta u + q(x) u \NC = 0  \NC \quad\mbox{in 
}\;(0,T)\times\Omega \NR
\NC  u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
\NC  \partial_{t} u(0,x) \NC = 0 \NC \quad \mbox{in }\; \Omega \NR 
\NC {\partial u \over\partial{\bf n} } \NC = g(t,\sigma) \NC \quad \mbox{on }\; 
(0,T)\times\partial\Omega. \NR
\stopalignedcases
\stopformula


\startformula
\startalignedcases
\NC \partial_{tt} u - \Delta u + q(x) u \NC = 0 \NC \quad\mbox{in }\; 
(0,T)\times\Omega \NR
\NC - \Delta v  \NC = q(x) \partial_{t}u \NC \quad\mbox{in }\; \Omega \NR
\stopalignedcases
\stopformula

\stoptext
%%% end pb-math-align.tex



pb-align-math.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] Arbitrary tag of displayed formula

2017-11-08 Thread Otared Kavian
Hi Mikael,

I learned the following from Aditya some time ago, on his website Random 
Determinism: maybe you can adapt it to your needs.

\defineconversion[myset][\star,{\star\star},{\star\star\star}]
\defineformula[star][numberconversion=myset]

\starttext
\placeformula
\startstarformula
a^4 + b^4 = c^4.
\stopstarformula

\placeformula
\startstarformula
a^5 + b^5 = c^5.
\stopstarformula

\placeformula
\startstarformula
a^6 + b^6 = c^6.
\stopstarformula

\stoptext

Best regrads: OK

> On 8 Nov 2017, at 07:43, Mikael P. Sundqvist  wrote:
> 
> Hi!
> 
> Is there a way to tag a displayed formula with arbitrary text?
> 
> As far as I can remember it was possible to use \eqno before, but that does 
> not seem to be the case anymore.
> 
> For my use case I do not need the possibility to cite the equation, if that 
> helps.
> 
> I asked the same question at stackexchange (see 
> https://tex.stackexchange.com/questions/400257/tag-equation-in-context-with-arbitrary-text
>  
> ),
>  but was redirected here.
> 
> I'm thinking of a minimal non-working example like:
> 
> \startTEXpage[offset=2bp]
> \startformula
> 1+1=2\eqno{A}
> \stopformula
> \stopTEXpage
> 
> /MIkael
> 
> PS I use this when constructing exams. Then it is good to be able to put the 
> points to the right. And sometimes this is done in displayed formulas. For an 
> example of what I mean, made with LaTeX, see 
> http://www.ctr.maths.lu.se/media/exams/funkteori/exam_2017-03-13.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
> ___

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

2017-09-30 Thread Otared Kavian
Hi Hraban,

If you want to change the way the footnote number in the text is shown 
something like a variation of the following might help you (copying this from a 
solution given by Wolfgang S. a few years ago…):

\define[1]\MyFootnotenoteCommand{\high{\bf{(#1)}}}
\setupnote[textcommand=\MyFootnotenoteCommand]
\setupnotation[footnote][left={(},right={)}]


\starttext
Hi there!\footnote{I’m a footnote.}
\stoptext

Best regards: OK

> On 29 Sep 2017, at 13:34, Henning Hraban Ramm  wrote:
> 
> Ahoi,
> 
> in my current book there are some quotations typeset in a smaller type (via 
> \switchtobodyfont in a defined startstop).
> 
> Now the author insists that their footnote numbers should have the same size 
> as in the body text.
> Since the footnotes are mostly source annotations at the end, it makes some 
> sense.
> 
> What would be the best way to achieve this?
> 
> Here’s my setup:
> 
> \setupbodyfont[alegreya,rm,11pt] % usual font size
> 
> \startsetups[myQuotation]
>  \setupwhitespace[none]
>  \setupnarrower[left=2em,right=2em]
>  \switchtobodyfont[rm,10pt]
> % I guess I should change the footnote number font size here?
> \stopsetups
> 
> \definestartstop[myQuotation][
>setups=myQuotation,
>before={
>  \testpage[2]
>  \startnarrower[left,right]
>  \noindent},
>after={\stopnarrower
>  \indenting[next]}]
> 
> 
> 
> 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
> ___

___
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] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian
Hi Hans,

Thanks for the hint. Indeed every input file has got a reference in synctex 
file produced by ConTeXt. 
(I noticed also that during the typesetting ConTeXt creates another file with a 
suffix syncctx which is wiped out at the end of the processinng).

On the other hand after reading your hint I tried the same files with another 
application, TeXWorks, and there the syncing works perfectly. 
Therefore it seems that this is a problem with TeXShop and I am going to report 
a bug with Richard Koch.

Best regards: OK



> On 28 Sep 2017, at 22:44, Hans Hagen  wrote:
> 
> On 9/28/2017 9:30 PM, Otared Kavian wrote:
>>> On 28 Sep 2017, at 19:12, Hans Hagen mailto:pra...@wxs.nl>> 
>>> wrote:
>>>> […]
>>> files in the tex tree (styles and such) are not accessible (protected) as 
>>> you don't want them to get messed up
>> Sure, but my problem is that I have a document with five or six chapters. 
>> Each chapter is included in files which are named for instance
>> chapter-1.tex
>> chapter-2.tex
>> and so on.  Then my file main.tex contains the lines
>> \input chapter-1.tex
>> \input chapter-2.tex
>> and so on, in order to typeset the whole document. But now I don’t know how 
>> to sync the PDF file with the source files chapter-1.tex, chapter-2.tex, 
>> etc., in order to correct mistakes or mistypings when I discover them in the 
>> PDF file.
>> Clearly, the main file and these files are residing in the same directory.
>> Is there a way to tell context to look into the directory where the main 
>> file and my chapter files are?
> 
> it works here .. you can look in the synctex file to see if the files get 
> references
> 
> 
> -
>  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] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian


> On 28 Sep 2017, at 19:12, Hans Hagen  wrote:
>> […]
> files in the tex tree (styles and such) are not accessible (protected) as you 
> don't want them to get messed up

Sure, but my problem is that I have a document with five or six chapters. Each 
chapter is included in files which are named for instance
chapter-1.tex
chapter-2.tex
and so on.  Then my file main.tex contains the lines 
\input chapter-1.tex
\input chapter-2.tex
and so on, in order to typeset the whole document. But now I don’t know how to 
sync the PDF file with the source files chapter-1.tex, chapter-2.tex, etc., in 
order to correct mistakes or mistypings when I discover them in the PDF file.
Clearly, the main file and these files are residing in the same directory.

Is there a way to tell context to look into the directory where the main file 
and my chapter files are?

Thanks a lot for your attention.
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
___

[NTG-context] synctex, TeXShop and \input files

2017-09-28 Thread Otared Kavian
Hi all,

Some time ago Hans added a new synctex command which seemed to work quite well: 
on a Mac running MacOS and TeXShop I could for instance click on a sentence in 
the PDF file produced by ConTeXt and the sentence was highlighted in the source 
file, even it were part of an \input file. For instance after typesetting the 
file:

%%% begin synctex-example.tex
\setupsynctex[state=start,method=max]
\starttext
\input knuth.tex
\hairline
\input ward.tex
\stoptext
%%% end synctex-example.tex

I could click on the sentence « The separation of any of these » in the PDF 
file and the file knuth.tex was opened and those words highlighted.

In the recent versions of ConTeXt (the latest being ConTeXt  version 2017.09.25 
19:19 MKIV) this does not seem to work anymore. As a matter of fact even when 
the source file is not an \input file, the syncing between the PDF and the 
source does not work anymore.

So my questions are the following (the « or » below is a mathematical one…): 

1) Has the \setupsynctex command changed recently? 
2) Or am I having troubles with the latest version of TeXShop (version 3.88).
3) Or is there an issue with the MacOS I am using (version 10.13 Beta).

Thanks in advance for any kind of help.

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
___

[NTG-context] \definemathfence commands

2017-09-10 Thread Otared Kavian
Hi everyone,

With the command \definemathfence it is possible to define for instance the 
following command

\definemathfence[duality][angle][command=yes,factor=auto]

so that $\duality{T,\phi}$ results in $\langle T,\phi \rangle$ and the \langle 
and \rangle are appropriately scaled when necessary.
How can one create a command called \bracparenth in order to get a left bracket 
on the left and a right parenthesis on the right, that is

$\bracparenth{a,b} = [a,b)$

and so that when necessary it scales automatically.

Below is the example for \duality.

Thanks in advance: OK

%%% begin mathfence-example.tex
\definemathfence[duality][angle][command=yes,factor=auto]
\definemathfence[parenth][parenthesis][command=yes,factor=auto]

\starttext

The action of $T$ on a smooth function $\phi$ is denoted by 
\startformula
\duality{T,\phi}
\stopformula
while the scalar product of two functions $f$ and $g$ is denoted 
$\parenth{f|g}$.

\stoptext
%%% end mathfence-example.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] mathalignment vs mathmatrix

2017-09-08 Thread Otared Kavian
Hi Henri,

I think your code has a problem: the first one is that the definition of \Up 
and \Down is not understood when I compile your example, and then you introduce 
an empty mathmatrix which creates a difficulty too.
Once I remove the definitions of \Up and \Dn  the code is typeset (ConTeXt  
ver: 2017.09.05 15:10 MKIV beta).
Can you please give a more detailed example where you see the problem?

Best regards: OK

> On 8 Sep 2017, at 06:51, Henri  wrote:
> 
> \define\Up{\mathord\Uparrow}
> \define\Dn{\mathord\Downarrow}
> 
> \starttext
> 
> \placeformula
> \startformula
>   \startmathalignment
> \NC \psi_{+,\Up} ...
> \startmathmatrix
> \stopmathmatrix
> \NR
> \NC \psi_{+,\Dn} ...
> \NR
>   \stopmathalignment
> \stopformula
> 
> \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] Dangerous bend sign in mkiv

2017-08-31 Thread Otared Kavian
Thanks Hans! That’s great indeed!

I put on the wiki your code 

http://wiki.contextgarden.net/symbolset

but could not explain where to find the information which tells us that the 
desired characters are
\resolvedglyphdirect{bends}{n:char_7e} and 
\resolvedglyphdirect{bends}{n:char_7f}.

Best regrads: OK

> On 31 Aug 2017, at 21:12, Hans Hagen  wrote:
> 
> On 8/31/2017 4:02 PM, Otared Kavian wrote:
>> Hi,
>> Is there a way to get the dangerous bend sign (which exists in the Donald 
>> Knuth’s manfnt) in mkiv?
>> The following (given by one of our gurus and dating back to sevral years) 
>> works fine in mkii, but I don’t know how to translate it in mkiv…
>> %%% begin dangerous-bend.tex
>> \loadmapfile [manfnt.map]
>> \definefontsynonym [bends] [manfnt]
>> \def\GetSym#1{\getglyph{bends}{\char#1}}
>> \startsymbolset [Dangerous Bends]
>> \definesymbol [dbend]   [\GetSym{127}]
>> \definesymbol [lhdbend] [\GetSym{126}]
>> \stopsymbolset
>> \setupsymbolset [Dangerous Bends]
>> \setupbodyfont[manfnt]
>> \starttext
>> \symbol{dbend}
>> \blank[big]
>> \symbol{lhdbend}
>> \stoptext
>> %%% end dangerous-bend.tex
>> Thanks in advance: OK
> \definefontsynonym [bends] [file:manfnt.afm]
> 
> \startsymbolset [Dangerous Bends]
>\definesymbol [dbend]   [\resolvedglyphdirect{bends}{n:char_7e}]
>\definesymbol [lhdbend] [\resolvedglyphdirect{bends}{n:char_7f}]
> \stopsymbolset
> 
> \setupsymbolset [Dangerous Bends]
> 
> \starttext
>\symbol{dbend}\quad \symbol{lhdbend}
> \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
> ___

___
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] Dangerous bend sign in mkiv

2017-08-31 Thread Otared Kavian
Hi,

Is there a way to get the dangerous bend sign (which exists in the Donald 
Knuth’s manfnt) in mkiv?
The following (given by one of our gurus and dating back to sevral years) works 
fine in mkii, but I don’t know how to translate it in mkiv…

%%% begin dangerous-bend.tex
\loadmapfile [manfnt.map]
\definefontsynonym [bends] [manfnt]

\def\GetSym#1{\getglyph{bends}{\char#1}}

\startsymbolset [Dangerous Bends]
\definesymbol [dbend]   [\GetSym{127}]
\definesymbol [lhdbend] [\GetSym{126}]
\stopsymbolset

\setupsymbolset [Dangerous Bends]

\setupbodyfont[manfnt]

\starttext
\symbol{dbend}
\blank[big]

\symbol{lhdbend}
\stoptext
%%% end dangerous-bend.tex

Thanks in advance: 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] How to put a circle on top of a character

2017-08-30 Thread Otared Kavian
Hi Hans,

Regarding what you have added on line 1327 of math-stc.mkvi, that line should be

\definemathover[\v!symbol][interiorset]["2218]

(instead of "2217).

I added also a wiki page for mathstackers:

http://wiki.contextgarden.net/mathstackers

Best regards: OK

> On 29 Aug 2017, at 23:28, Hans Hagen  wrote:
> 
> On 8/29/2017 9:56 PM, Otared Kavian wrote:
>> Hi Hans,
>> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki.
>> However, before doing so, I would like to ask how is it possible to get the 
>> command act entirely in math mode, that is respecting the distances and the 
>> math fonts. Please see the attached output.
>> %%% begin interior-of-a-set.tex
>> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
>> \definemathover[symbol][interiorset]["2218]
>> \starttext
>> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq 
>> \interiorset{K}$
>> \stoptext
>> %%% end interior-of-a-set.tex
> 
> I'll add an offset
> 
> \definemathstackers
>  [\v!symbol]
>  [\c!voffset=-.3\mathexheight,
>   \c!hoffset=\zeropoint,
>   \c!mathclass=ord,
>   \c!topoffset=.4\mathemwidth, % poor man's italic correction
>   \c!middlecommand=\mathematics]
> 
> but keep in mind, this is not really meant for accented math, more for 
> special cases
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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 put a circle on top of a character

2017-08-30 Thread Otared Kavian
Hi Hans,

Thanks for your attention.
Indeed I understand that the stackers structures are for putting things such as 
a circle or a star on top of another character or constructs. 

In fact, in terms of readability, the result of your new command 
\interiorset{K} is better than that of \mathring{K}, but the « K » coming out 
with \interiorset is set in Roman, while it should be math italic (or whatever 
font is used in math mode).
Also the white space around it is not yet correct. I’ll test what you will have 
added in the next beta and then put an entry on the wiki about mathstackers.

Thanks again: OK

> On 29 Aug 2017, at 23:28, Hans Hagen  wrote:
> 
> On 8/29/2017 9:56 PM, Otared Kavian wrote:
>> Hi Hans,
>> That’s wonderful! Indeed this is very handy and I’ll add it to the wiki.
>> However, before doing so, I would like to ask how is it possible to get the 
>> command act entirely in math mode, that is respecting the distances and the 
>> math fonts. Please see the attached output.
>> %%% begin interior-of-a-set.tex
>> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
>> \definemathover[symbol][interiorset]["2218]
>> \starttext
>> Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq 
>> \interiorset{K}$
>> \stoptext
>> %%% end interior-of-a-set.tex
> 
> I'll add an offset
> 
> \definemathstackers
>  [\v!symbol]
>  [\c!voffset=-.3\mathexheight,
>   \c!hoffset=\zeropoint,
>   \c!mathclass=ord,
>   \c!topoffset=.4\mathemwidth, % poor man's italic correction
>   \c!middlecommand=\mathematics]
> 
> but keep in mind, this is not really meant for accented math, more for 
> special cases
> 
> Hans
> 
> -
>  Hans Hagen | PRAGMA ADE
>  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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 put a circle on top of a character

2017-08-29 Thread Otared Kavian
Hi Hans,

That’s wonderful! Indeed this is very handy and I’ll add it to the wiki.

However, before doing so, I would like to ask how is it possible to get the 
command act entirely in math mode, that is respecting the distances and the 
math fonts. Please see the attached output. 

%%% begin interior-of-a-set.tex
\definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint]
\definemathover[symbol][interiorset]["2218]
\starttext

Here is the new command \type{\interiorset{K}}: $\mathring{K} \neq 
\interiorset{K}$

\stoptext
%%% end interior-of-a-set.tex

Best regards: OK



interior-of-a-set.pdf
Description: Adobe PDF document


> On 29 Aug 2017, at 19:23, Hans Hagen  wrote:
> 
> On 8/29/2017 4:24 PM, Otared Kavian wrote:
>> Thanks Aditya,
>> Indeed the solution is already there in luatex-math.tex…
>> one can just use $\mathring{A}$ out of the box!
>> I see why I love ConTeXt :-)
> I checked one of the stacker sub-mechanisms and fixed / extended something:
> 
> \starttext
> 
> \definemathstackers[symbol][voffset=-.30\mathexheight,hoffset=\zeropoint,color=red]
> 
> \definemathover[symbol][interiorset]["2217]
> 
> \startformula
>\mathover  [symbol]{"2217}   {A}
>\mathover  [symbol]{"2218}   {A}
>\mathover  [symbol]{"2219}   {A}
>\mathunder [symbol]   {"2217}{A}
>\mathunder [symbol]   {"2218}{A}
>\mathunder [symbol]   {"2219}{A}
> 
>\mathdouble[symbol]{"2217}{"2217}{A}
>\mathdouble[symbol]{"2218}{"2218}{A}
>\mathdouble[symbol]{"2219}{"2219}{A}
> 
>\mathring{A}
>\interiorset{A}^{\interiorset{A}^{\interiorset{A}}}
> \stopformula
> 
> \stoptext
> 
> Maybe it comes in handy for weird cases.
> 
> (not yet uploaded)
> 
> 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] How to put a circle on top of a character

2017-08-29 Thread Otared Kavian
Thanks Aditya,

Indeed the solution is already there in luatex-math.tex… 
one can just use $\mathring{A}$ out of the box!

I see why I love ConTeXt :-)

Best regards: OK


> On 29 Aug 2017, at 15:34, Aditya Mahajan  wrote:
> 
> On Tue, 29 Aug 2017, Otared Kavian wrote:
> 
>> Hi,
>> 
>> How can I put a small circle on top of a character in math mode (for the 
>> curious this is needed when one defines the interior of a set…).
>> 
>> I tried the following, but the small circle is too far away from the 
>> character A. I am sure I had an ugly solution for this in plain TeX some 
>> years ago but I woul dlike to have an elegant solution in ConTeXt.
> 
> The proper solution in LaTeX is to use the \mathring accent (I think that 
> amssym package defines that). The accent should also be available in ConTeXt 
> (sorry cannot check right now, but a simple grep of char-def.lua should 
> confirm that).
> 
> 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
> ___

___
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 put a circle on top of a character

2017-08-29 Thread Otared Kavian
Hi,

How can I put a small circle on top of a character in math mode (for the 
curious this is needed when one defines the interior of a set…).

I tried the following, but the small circle is too far away from the character 
A. I am sure I had an ugly solution for this in plain TeX some years ago but I 
woul dlike to have an elegant solution in ConTeXt.

%%% begin interior-of-a-set.tex
\showgrid
\starttext

\mathtriplet{A}{\circ}{}

\startformula
\mathtriplet{A}{\circ}{}
\stopformula

\stoptext
%%% end interior-of-a-set.tex

Thanks for your help: 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] About \setupheadertexts : simplify a code

2017-08-18 Thread Otared Kavian
Hi Aditya,

Thanks for having sent the example file: indeed with your file I can typeset 
the example and see the expected result.
I don’t know what happened when I copied and pasted the example from the e-mail…
I think the command
% macros = mkvi
was not set correctly written at the first line, that is I had a space before 
the percent sign « % ». In fact 
%macros=mkvi
or
%macros = mkvi
work as well.

By the way, wouldn’t be more user friendly, and more in the spirit of ConTeXt, 
if we had a command saying
\enablemode[mkvi]
in order to tell ConTeXt that we are using %macros = mkvi ?

Best regards: OK

> On 18 Aug 2017, at 17:54, Aditya Mahajan  wrote:
> 
> On Fri, 18 Aug 2017, Otared Kavian wrote:
> 
>> Hi Aditya,
>> 
>> I tried to typeset your example, but got an error: whether or not the command
>>  % macros=mkvi
>> is present on the fist line, then ConTeXt complains saying that
>>  ! Illegal parameter number in definition of \MyHeader
>> and stops typesetting pointing to the command \stoptexdefinition.
> 
> I am attaching the file. It runs fine here with ConTeXt  ver: 2017.08.14 
> 23:57.
> 
> 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
> ___

___
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] About \setupheadertexts : simplify a code

2017-08-18 Thread Otared Kavian
Hi Aditya,

I tried to typeset your example, but got an error: whether or not the command
% macros=mkvi
is present on the fist line, then ConTeXt complains saying that
! Illegal parameter number in definition of \MyHeader
and stops typesetting pointing to the command \stoptexdefinition.

What am I missing here?
Thanks for your attention: OK

> On 18 Aug 2017, at 06:25, Aditya Mahajan  wrote:
> 
> On Fri, 18 Aug 2017, Henri wrote:
> 
>> On Thu, 2017-08-17 at 15:25 +0200, Fabrice Couvreur wrote:
>>> Hello,
>>> To get the alignment, I had to create three \vbox. Can we simplify this 
>>> code a bit ?
>>> Thank you
>>> Fabrice
>> 
>> Use the optional argument of the new framed you defined.
> 
> In addition to that, you can also simplify other things as well. This is how 
> I would have done it:
> 
> % macros=mkvi
> \showframe
> 
> \setuplayout
>   [header=3\lineheight,
>headerdistance=\lineheight]
> 
> \setupbackgrounds
>  [header]
>  [text]
>  [
>frame=off,
>bottomframe=on,
>framecolor=darkgray,
>rulethickness=2pt,
>  ]
> 
> \defineframed[headerframed]
> [
>   frame=off, % For visualization set this to on
>   height=fit,
>   width=fit,
>   location=bottom,
>   boffset=\lineheight,
> ]
> 
> \starttexdefinition MyHeader #where #day #month #year #title #number #time
> 
>\setupheadertexts
>  [{\headerframed[align=middle, foregroundstyle=bold, foregroundcolor=red]
>{#title n\high{o}\,#number}}]
> 
>\setupheadertexts
>  [{\headerframed[align=flushleft, foregroundstyle=\ssx]
>  {Lycée JANSON DE SAILLY \\ \date[d=#day,m=#month,y=#year]}}]
>  [{\headerframed[align=flushright, foregroundstyle=\ssx]
>  {#where \\ {#time}}}]
> 
> \stoptexdefinition
> 
> \MyHeader{Seconde}{17}{08}{2017}{Devoir surveillé}{1}{1h\,30m}
> 
> \starttext
> \input knuth
> \stoptext
> 
> An added benefit is that you get correct interlinespace for the left and 
> right header.
> 
> 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
> ___

___
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] How can I add “page # of ##” on my document ?

2017-08-10 Thread Otared Kavian
I forgot to add that you can also use

\setupfootertexts[Page \pagenumber\ sur\ \totalnumberofpages][] 

Best regards: OK

> On 10 Aug 2017, at 11:43, Otared Kavian  wrote:
> 
> Hi Fabrice,
> 
> The following gives the desired result, as Hans pointed ou:
> 
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> \starttext
> 
> \dorecurse{5}{\input knuth.tex \page}
> 
> \stoptext
> 
> Best regards: OK
> 
>> On 10 Aug 2017, at 11:28, Fabrice Couvreur > <mailto:fabrice1.couvr...@gmail.com>> wrote:
>> 
>> Hi Hans and Pablo,
>> 
>> \setuppagenumbering[alternative=]
>> 
>> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>> 
>> The behavior is not that expected:
>> 
>> Page 1 sur 0
>> Page 2 sur 0
>> Page 3 sur 0 
>> 
>> Thanks
>> Fabrice
>> 
>> 2017-08-10 9:57 GMT+02:00 Hans Hagen mailto:pra...@wxs.nl>>:
>> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
>> Hello,
>> With Latex, I did this :
>> 
>> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
>> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
>> 
>> 
>> With Context, I tried this unsuccessfully ;
>> 
>> \setupinteraction
>>  [state=start,
>>   style=,
>>   color=\darkred,
>>   contrastcolor=]
>> 
>>   \setuppagenumbering
>>  [alternative=,
>>   location={footer,right},
>>   command={Page\,\pagenumber\,sur\,\lastpage } ]
>> \setuppagenumbering[alternative=]
>> 
>> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
>> 
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
>> www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <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] How can I add “page # of ##” on my document ?

2017-08-10 Thread Otared Kavian
Hi Fabrice,

The following gives the desired result, as Hans pointed ou:

\setuppagenumbering[alternative=]

\setupfootertexts[Page \pagenumber\ sur\ \lastpage][]

\starttext

\dorecurse{5}{\input knuth.tex \page}

\stoptext

Best regards: OK

> On 10 Aug 2017, at 11:28, Fabrice Couvreur  
> wrote:
> 
> Hi Hans and Pablo,
> 
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> The behavior is not that expected:
> 
> Page 1 sur 0
> Page 2 sur 0
> Page 3 sur 0 
> 
> Thanks
> Fabrice
> 
> 2017-08-10 9:57 GMT+02:00 Hans Hagen mailto:pra...@wxs.nl>>:
> On 8/9/2017 11:42 PM, Fabrice Couvreur wrote:
> Hello,
> With Latex, I did this :
> 
> \usepackage[colorlinks=true,pdfstartview=FitV,linkcolor=blue,citecolor=blue,urlcolor=blue]{hyperref}
> \rfoot{\scriptsize{\textsf{Page~\thepage{}~sur~\pageref{LastPage
> 
> 
> With Context, I tried this unsuccessfully ;
> 
> \setupinteraction
>  [state=start,
>   style=,
>   color=\darkred,
>   contrastcolor=]
> 
>   \setuppagenumbering
>  [alternative=,
>   location={footer,right},
>   command={Page\,\pagenumber\,sur\,\lastpage } ]
> \setuppagenumbering[alternative=]
> 
> \setupfootertexts[Page \pagenumber\ sur\ \lastpage][]
> 
> -
>   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
> ___

___
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] mathradical defaults to "normal", should it perhaps be "default"?

2017-06-07 Thread Otared Kavian
Hi,

Indeed using \frac yields a weird result in the example sent by Mikael.
Compare the output of the three formulas below, with or without 
\setupmathradical[sqrt][alternative=default].

The results are correct using \over in both cases, while the first one is weird 
when using \frac and \setupmathradical[sqrt][alternative=default].

Best regards: OK
%%% start of test file
\starttext
\startbuffer[math]
\startformula
\sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2}
\stopformula

\startformula
1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2
\stopformula

\startformula
\sqrt{1+\Bigl({f(x_k)-f(x_{k-1}) \over x_k - x_{k-1}}\Bigr)^2}
\stopformula
\stopbuffer

\getbuffer[math]
\hairline

\setupmathradical[sqrt][alternative=default]

\getbuffer[math]

\stoptext
%%% end of test file


> On 7 Jun 2017, at 16:50, Mikael P. Sundqvist  wrote:
>> […]
> 
> Hans,
> 
> maybe the \setupmathradical[sqrt][alternative=default] was not so
> successful after all. Or maybe this is a bug:
> 
> %%% start of test file
> \setupmathradical[sqrt][alternative=default]
> 
> \starttext
> \startformula
> \sqrt{1+\Bigl(\frac{f(x_k)-f(x_{k-1})}{x_k-x_{k-1}}\Bigr)^2}
> \stopformula
> \stoptext
> %%% stop of test file
> 
> The numerator looks too small in my opinion. Compiled with 2017.06.06 13:22.
> 
> /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
> ___

___
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] Position of prime for derivatives

2017-06-04 Thread Otared Kavian
Hi Mikael,

Indeed your observation is correct, but using \over instead of \frac yields the 
correct behavior. Please try the following sample:

%%% begin derivatives-prime-4.tex
\setupbodyfont[lucidaot]

\starttext

Compare the position of the prime sign in $f'/g$ in these two expressions: the 
first one using \type{{... \over ...}}
\startformula
\left({f \over g}\right)' = {f' \over g} - {f \over g^2}g'
\stopformula
(which yields a correct position of the prime for $f'$ in $f'/g$), and the 
second using \type{\frac{...}{...}}
\startformula
\left(\frac{f}{g} \right)' = \frac{f'}{g} - \frac{f}{g^2} g'
\stopformula
which yields a prime sign for $f'$ a little bit lower.

\stoptext
%%% end derivatives-prime-4.tex




derivatives-prime-4.pdf
Description: Adobe PDF document



> On 4 Jun 2017, at 19:42, Mikael P. Sundqvist  wrote:

> […]
> 
> I hate to bring this up again, but look at the attached output of
> 
> %%%
> %\setupbodyfont[lucidaot]
> 
> \starttext
> \startformula
> f'(0)=2\frac{f'(0)}{2}
> \stopformula
> \stoptext
> %%%
> 
> The prime in the fraction is in my opinion too low (it is more clear
> in the example with lucida).
> 
> /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
> ___

___
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] Typescript/fallbacks problem

2017-05-27 Thread Otared Kavian
Hi Mohammad Hossein,

Your report is beyond my knowledge, but I would like to ask you a question 
about the setup of fallback fonts: why are you referring to « dejavudef » in 
the commands such as

 \definefontsynonym [SahelBd]   
[SahelBold][features={arabic,tlig},fallbacks=dejavudef]

while you have defined before « dejavudefault » (and not « dejavudef ») in:

\definefontfallback[dejavudefault][dejavusans] 
[range=generalpunctuation,check=yes,force=no]

Best regards: Otared K.

> On 26 May 2017, at 05:52, Mohammad Hossein Bateni  > wrote:
> 
> The following email had large attachments (more than 100K).  I uploaded 
> everything here:
> http://mhbateni.com/context/bug-04/ 
> 
> On Thu, May 25, 2017 at 11:40 PM, Mohammad Hossein Bateni  > wrote:
> Hello Hans,
> 
> I'm going to explain a strange problem which came about, as far as I can 
> tell, in beta 2017.04.27 01:00.  The same beta had introduced some other 
> issues with fallbacks, which you fixed already.  Thanks a lot for that!
> 
> I am now using the latest beta, version 2017.05.25 12:50.  Unfortunately I 
> don't know what is going on precisely.  Here is a sort-of-minimal non-working 
> example.
> 
> 
> %
> \definefontfeature[slanted][slant=.4]
> 
> \starttypescript [serif][sahel][name]
>   \resetfontfallback [dejavudefault]
>   \definefontfallback[dejavudefault][dejavusans] 
> [range=generalpunctuation,check=yes,force=no]
> %
>   \definefontsynonym [SahelReg]
> [Sahel][features={arabic,tlig},fallbacks=dejavudef]
> %% NOTE 1
> %  \definefontsynonym [SahelReg] [Sahel][features={arabic,tlig}]
>   \definefontsynonym [SahelBd]   
> [SahelBold][features={arabic,tlig},fallbacks=dejavudef]
>   \definefontsynonym [SahelIt] 
> [Sahel][features={arabic,tlig,slanted},fallbacks=dejavudef]
>   \definefontsynonym [SahelBdIt] 
> [SahelBold][features={arabic,tlig,slanted},fallbacks=dejavudef]
> %
>   \definefontsynonym [Serif] [SahelReg]
>   \definefontsynonym [SerifBold] [SahelBd]
>   \definefontsynonym [SerifItalic] [SahelIt]
>   \definefontsynonym [SerifBoldItalic] [SahelBdIt]
> \stoptypescript
> 
> \starttypescript [math] [modern] [name]
> \definefontsynonym [MathRoman] [name:modern] [features=math\mathsizesuffix]
> \stoptypescript
> 
> \starttypescript [myfont]
> \definetypeface [myfont][rm] [serif][sahel] [default]
> %% NOTE 2
> \definetypeface [myfont][mm] [math] [modern][default]
> \stoptypescript
> 
> \setupbodyfont[myfont,rm]
> %% NOTE 3
> %\definedfont[Serif]
> 
> \def\Sample{{\lefttoright Salam} {\righttoleft سلام} }
> 
> \starttext
> rm:\Sample
> {\bf bf:\Sample}
> {\it it:\Sample}
> {\bi bi:\Sample}
> 
> %% NOTE 4
> \definedfont[SahelReg]\Sample
> \definedfont[Serif]\Sample
> 
> \stoptext
> %
> 
> 
> Background: 
> 
> Commenting/uncommenting some of the lines produces three outputs, only one of 
> which seems correct to me.  I have attached the three.  Betas before 4/27 
> always produced the correct solution.
> 
> I am using a free open-source Farsi font, whose English glyphs come from Open 
> Sans font.  I am attaching the specific versions of the Farsi font to 
> reproduce the same results.
> [https://github.com/rastikerdar/sahel-font 
> ]
> [https://github.com/google/fonts/tree/master/apache/opensans 
> ]
> 
> 
> Explanation:
> 
> Compiling the MWE above produces wrong-1.pdf in recent betas.  The serif font 
> has not been set up properly on the first line of output.  Instead the 
> default Latin Modern has been used, which looks different and misses the 
> Farsi glyphs.
> 
> Strangely there is nothing wrong with the second line of text, which shows 
> Serif and SahelReg fonts are both set up just fine.  See "NOTE 4" in the MWE.
> 
> Replacing the line above "NOTE 1" with the line below it—i.e., if I remove 
> the fallbacks for definition of SahelReg—generates correct.pdf as output.  I 
> get the same correct output if uncomment the line below "NOTE 3," which 
> should be a no-op in my opinion.  Notice that setting the fallback for bold, 
> italic and bold italic has not caused any issues.  It's only the serif itself 
> that's acting up weirdly.
> 
> Finally when I comment the math definition below "NOTE 2," I get wrong-2.pdf 
> as output.  Here everything seems okay except that the serif on the first 
> line—but strangely not on the second line—misses the Arabic features: the 
> letters are not joined.
> 
> 
> I spent quite some time investigating the changes to the GitHub repository on 
> 4/27, to pinpoint what might have caused this issue, but my efforts didn't go 
> anywhere.  I hope you can spot the issue.
> 
> 
> Thanks a lot for your attention!
> —MHB
> 
> 
> 
> ___
> If your question is

Re: [NTG-context] Position of prime for derivatives

2017-05-22 Thread Otared Kavian
Hi Mikael,

You are correct, the position of \prime depends on whether there is a next 
character or not after it, and it seems that this has an effect on its position 
for characters having a subscript as in
$f_{1}''(x) \neq f''_{1}(x)$ 
$f'f''f'’'$
Best regards: OK

> On 22 May 2017, at 08:51, Mikael P. Sundqvist  wrote:
> 
> On Sun, May 21, 2017 at 10:29 PM, Otared Kavian  wrote:
>> Hi Mikael,
>> 
>> I agree with what you are reporting: the current behavior of the \prime 
>> operator is not completely satisfying when using ConTeXt mkiv, while in mkii 
>> it is the most satisfying (in my opinion…).
>> 
>> The turn around consisting in using $f^{‘’}$ or  $f^{\prime\prime}$, or even 
>> $f^{{}^{\prime\prime}}$, is not really satisfying either.
>> 
>> But I think (or I hope that) at some point Hans will fix it in mkiv.
>> 
>> Best regards: OK
>> 
>>> On 21 May 2017, at 08:14, Mikael P. Sundqvist  wrote:
>>> […]
>>> 
>>> And just for reference, the document below gives the attached pdf,
>>> compiled with lualatex. I think the location of the primes there look
>>> better. Sorry for spamming about this issue, but I think it is
>>> important for all people writing math with ConTeXt.
>>> 
>>> /Mikael
>>> 
>>> \RequirePackage{luatex85}
>>> \documentclass[border=2pt]{standalone}
>>> 
>>> \usepackage{unicode-math}
>>> \setmainfont{LucidaBrightOT}
>>> \setmathfont{LucidaBrightMathOT}
>>> 
>>> \begin{document}
>>> $f'f''$
>>> \end{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
>>> ___
>> 
>> ___
>> 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
>> ___
> 
> Otared, thank you for confirmation. I also hope there will be a fix soon.
> 
> In the meantime, I put yet another test file. The location of the
> primes depends on the next character (I use, at the moment current
> version: 2017.05.15 21:48)
> 
> /Mikael
> 
> \definefontfamily[myface][rm][Lucida Bright OT]
> \definefontfamily[myface][mm][Lucida Bright Math OT]
> \setupbodyfont[myface,10pt]
> \starttext
> \startTEXpage[offset=2pt]
> $f'(x)f''(x)f'f''$
> \stopTEXpage
> \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
___

Re: [NTG-context] Position of prime for derivatives

2017-05-21 Thread Otared Kavian
Hi Mikael,

I agree with what you are reporting: the current behavior of the \prime 
operator is not completely satisfying when using ConTeXt mkiv, while in mkii it 
is the most satisfying (in my opinion…). 

The turn around consisting in using $f^{‘’}$ or  $f^{\prime\prime}$, or even 
$f^{{}^{\prime\prime}}$, is not really satisfying either.

But I think (or I hope that) at some point Hans will fix it in mkiv.

Best regards: OK

> On 21 May 2017, at 08:14, Mikael P. Sundqvist  wrote:
> […]
> 
> And just for reference, the document below gives the attached pdf,
> compiled with lualatex. I think the location of the primes there look
> better. Sorry for spamming about this issue, but I think it is
> important for all people writing math with ConTeXt.
> 
> /Mikael
> 
> \RequirePackage{luatex85}
> \documentclass[border=2pt]{standalone}
> 
> \usepackage{unicode-math}
> \setmainfont{LucidaBrightOT}
> \setmathfont{LucidaBrightMathOT}
> 
> \begin{document}
> $f'f''$
> \end{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
> ___

___
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] Position of prime for derivatives

2017-05-18 Thread Otared Kavian
Hi Hans,

Thanks for your explanations. 
When using constructions such as $f’’_2(x)$, I will adapt my input  in order to 
get what seems correct.

Best regards: OK

> On 17 May 2017, at 17:17, Hans Hagen  wrote:
> 
> On 5/17/2017 8:35 AM, Otared Kavian wrote:
>> Hi Hans,
>> 
>> Thanks for having fixed the behavior of the prime in the latest beta release 
>> (ConTeXt  version 2017.05.15 21:48).
>> However, as you may see in the two attached PDF files, the result is still 
>> incorrect when one types for example $f_2’’(x)$, which should give the same 
>> result as $f’’_2(x)$.
>> The correct behaviour is that obtained with mkii. Indeed one can circumvent 
>> the behaviour of the latest beta release of mkiv by using tricks such as the 
>> ones in the example code below, but this should be avoided in my opinion.
> 
> well, it depends on how one sees this '' mess
> 
> the problem with primes is that in macro packages they are messy entities 
> that should collapse or not (active char mess) and the more clever a macro 
> packages becomes the harder it becomes to makes it robust and/or to fight 
> against such heuristics
> 
> add to that the fact that the symbol itself is a funny positioned something 
> already raised in a font or not i.e. sometimes in need of superscript and 
> sometimes explicitly not
> 
> for unicode we need to turn two '' into a double and ''' into a and triple 
> such
> 
> that said, in context these thingies are at some point intercepted and their 
> current state is looked at: superscript? multipel in a row? one ebing the 
> nucleus of another ... etc .. the current (working again) behavior is what we 
> support and i don't look forward to more heuristics
> 
> 
>> The following PDF have been obtained with mkii and mkiv with the following 
>> example code.
>> Best regards: OK
>> 
>> %%% begin derivatives-prime.tex
>> \starttext
>> 
>> \startformula
>> f''_{2}(x) = f_{2}''(x) = f^{''}_{2}(x) = f_{2}^{''}(x) % = 
>> f^{{}^{''}}_{2}(x)
>> \stopformula
>> As one may see the result of \type{f_{2}''(x) = } $f_{2}''(x)$ is not 
>> correct in \type{mkiv}.
>> 
>> The following positions of the superscripts \type{(3)} are correct both in 
>> \type{mkii} and in \type{mkiv}.
>> \startformula
>> f^{(3)}_{2}(x) = f_{2}^{(3)}(x)
>> \stopformula
>> 
>> \stoptext
>> %%% end derivatives-prime.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
>> ___
>> 
> 
> 
> -- 
> 
> -
>  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
___

[NTG-context] Position of prime for derivatives

2017-05-17 Thread Otared Kavian
Hi Hans,

Thanks for having fixed the behavior of the prime in the latest beta release 
(ConTeXt  version 2017.05.15 21:48).
However, as you may see in the two attached PDF files, the result is still 
incorrect when one types for example $f_2’’(x)$, which should give the same 
result as $f’’_2(x)$.
The correct behaviour is that obtained with mkii. Indeed one can circumvent the 
behaviour of the latest beta release of mkiv by using tricks such as the ones 
in the example code below, but this should be avoided in my opinion.

The following PDF have been obtained with mkii and mkiv with the following 
example code.
Best regards: OK

%%% begin derivatives-prime.tex
\starttext

\startformula
f''_{2}(x) = f_{2}''(x) = f^{''}_{2}(x) = f_{2}^{''}(x) % = f^{{}^{''}}_{2}(x)
\stopformula
As one may see the result of \type{f_{2}''(x) = } $f_{2}''(x)$ is not correct 
in \type{mkiv}. 

The following positions of the superscripts \type{(3)} are correct both in 
\type{mkii} and in \type{mkiv}.
\startformula
f^{(3)}_{2}(x) = f_{2}^{(3)}(x)
\stopformula

\stoptext
%%% end derivatives-prime.tex



derivatives-prime-mkii.pdf
Description: Adobe PDF document


derivatives-prime-mkiv.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] mathdigits no longer works

2017-05-15 Thread Otared Kavian
Dear Mohammad Hossein,

The small modification I was talking about has nothing to do with the 
definition of fonts. In any case here is the file I used to typeset your 
example (I think you had \startttext instead of \starttext, and also you used 
\switchtobodyfont instead of \setupbodyfont: however I am not sure whether this 
is important or not) :

 begin

\definefontfamily [minionmath] [rm] [Minion Pro]
\definefallbackfamily [minionmath] [mm] [dejavusansmono] 
[range=digitsextendedarabicindic,offset=digitsnormal]
\definefallbackfamily [minionmath] [mm] [dejavusansmono] 
[range=digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
\definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]

%\switchtobodyfont[minionmath]
\setupbodyfont[minionmath]
\starttext

\startformula
{\tf xyz} xyz {\bf xyz} {\bi xyz}, 
\stopformula

\startformula
2+3+4+5+6+7+8+9+10 = {\bf 2+3+4+5+6+7+8+9+10}
\stopformula

\stoptext

 end

Best regrads: Otared K.

> On 15 May 2017, at 11:00, Mohammad Hossein Bateni  wrote:
> 
> Dear Otared, what is the small modification you mentioned?  Could you share 
> the code you shared to get this output in the latest beta?
> 
> On Mon, May 15, 2017 at 3:27 AM, Otared Kavian  <mailto:ota...@gmail.com>> wrote:
> Hi Mohammad Hossein,
> 
> I don’t get what you expected to obtain in your message, but typesetting your 
> example code (with a small modification) I get the attached PDF file, which 
> seems correct to me.
> I am using ConTeXt  version 2017.05.12 22 :40 MKIV beta, 
> with LuaTeX version 1.0.4 on MacOS 10.12.5.
> 
> Best regards: Otared K.
> 
> 
> 
> 
> 
> 
> > On 15 May 2017, at 05:37, Mohammad Hossein Bateni  > <mailto:bat...@gmail.com>> wrote:
> >
> > The version in 
> > tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv is a 
> > typescript.  Here is a simpler version using defintfontfamily and 
> > definefallbackfamily, which doesn't work in the recent beta (but worked 
> > well back in January).
> >
> >
> > \definefontfamily [minionmath] [rm] [Minion Pro]
> > \definefallbackfamily [minionmath] [mm] [dejavusansmono] 
> > [range=digitsextendedarabicindic,offset=digitsnormal]
> > \definefallbackfamily [minionmath] [mm] [dejavusansmono] 
> > [range=digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
> > \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
> >
> > \startttext
> >
> > \switchtobodyfont[minionmath]
> >
> > \startformula
> > {\tf xyz} xyz {\bf xyz} {\bi xyz}, 2+3, {\bf 2+3}
> > \stopformula
> >
> > \stoptext
> >
> >
> > With beta version 2017.01.17 17 :37 it used to work 
> > and change the digits to Indic inside math.  With beta version 2017.04.27 
> > 01 :00, the digits do not change to Indic.  However, 
> > everything in math changes to dejavusansmono (bold, because that was the 
> > last fallback definition?).
> >
> > On Fri, May 12, 2017 at 7:34 PM, Mohammad Hossein Bateni  > <mailto:bat...@gmail.com>> wrote:
> > Hi,
> >
> > The example for replacing Arabic numerals by Indic digits inside math used 
> > to work (at least) until version 2017.01.17 17 :37.
> >
> > tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
> >
> > Now in version 2017.04.27 01 :00, this does not 
> > produce the desired output: it's all "Latin" digits.
> >
> > Has something changed regarding fontfallback definitions?
> >
> > Thanks,
> > MHB
> >
> > ___
> > If your question is of interest to others as well, please add an entry to 
> > the Wiki!
> >
> > maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> > http://www.ntg.nl/mailman/listinfo/ntg-context 
> > <http://www.ntg.nl/mailman/listinfo/ntg-context>
> > webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> > http://context.aanhet.net <http://context.aanhet.net/>
> > archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> > <https://bitbucket.org/phg/context-mirror/commits/>
> > wiki : http://contextgarden.net <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 <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-

Re: [NTG-context] mathdigits no longer works

2017-05-15 Thread Otared Kavian
Hi Mohammad Hossein,

I don’t get what you expected to obtain in your message, but typesetting your 
example code (with a small modification) I get the attached PDF file, which 
seems correct to me.
I am using ConTeXt  version 2017.05.12 22:40 MKIV beta, with LuaTeX version 
1.0.4 on MacOS 10.12.5.

Best regards: Otared K.






mathdigits.pdf
Description: Adobe PDF document

> On 15 May 2017, at 05:37, Mohammad Hossein Bateni  wrote:
> 
> The version in 
> tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv is a 
> typescript.  Here is a simpler version using defintfontfamily and 
> definefallbackfamily, which doesn't work in the recent beta (but worked well 
> back in January).
> 
> 
> \definefontfamily [minionmath] [rm] [Minion Pro]
> \definefallbackfamily [minionmath] [mm] [dejavusansmono] 
> [range=digitsextendedarabicindic,offset=digitsnormal]
> \definefallbackfamily [minionmath] [mm] [dejavusansmono] 
> [range=digitsextendedarabicindic,offset=digitsbold,tf=style:bold]
> \definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]
> 
> \startttext
> 
> \switchtobodyfont[minionmath]
> 
> \startformula
> {\tf xyz} xyz {\bf xyz} {\bi xyz}, 2+3, {\bf 2+3}
> \stopformula
> 
> \stoptext
> 
> 
> With beta version 2017.01.17 17:37 it used to work and change the digits to 
> Indic inside math.  With beta version 2017.04.27 01:00, the digits do not 
> change to Indic.  However, everything in math changes to dejavusansmono 
> (bold, because that was the last fallback definition?).
> 
> On Fri, May 12, 2017 at 7:34 PM, Mohammad Hossein Bateni  
> wrote:
> Hi,
> 
> The example for replacing Arabic numerals by Indic digits inside math used to 
> work (at least) until version 2017.01.17 17:37.
> 
> tex/texmf-context/tex/context/fonts/mkiv/type-imp-mathdigits.mkiv
> 
> Now in version 2017.04.27 01:00, this does not produce the desired output: 
> it's all "Latin" digits.
> 
> Has something changed regarding fontfallback definitions?
> 
> Thanks,
> MHB
> 
> ___
> 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] eqalignno failing

2017-04-26 Thread Otared Kavian
Hi Hans,

Since a few weeks (or months?…) ago the use of \eqno and \eqalignno has been 
changed in mkiv. 
It is better to use the construction such as:

\placeformula
\startformula
\startalign
\NC H(I,J) \NC = H(I) + H(J|I) \NR[eq:equivoc]
\NC W(I,J) \NC = H(J) - H(J|I) \NR[eq:wedinfo]
\stopalign
\stopformula

Best regards: OK
 

> On 26 Apr 2017, at 15:39, Meer, Hans van der  wrote:
> 
> This code now fails where before contextbeta had no problems:
> 
> tex error   > tex error on line 101 in file Info/waarneming.tex: ! 
> Misplaced alignment tab character &
> 
>  &
>  
> l.101 H(I,J) &
>  = H(I) + H(J|I)\qquad&\hbox{\ineq[eq:equivoc]}\cr
> 
>   99 \placeformula\startformula
> 100 \eqalignno{
> 101 >>  H(I,J) &= H(I) + H(J|I)\qquad&\hbox{\ineq[eq:equivoc]}\cr
> 102 W(I,J) &= H(J) - H(J|I)\qquad&\hbox{\ineq[eq:wedinfo]}\cr
> 103 }
> 104 \stopformula
>  
> This happens in ConTeXt  ver: 2017.04.16 12:32 MKIV beta  fmt: 2017.4.16  
> int: english/english
> I am not sure when this started to happen, but for sure after 2016-02-12.
> 
> Here is a minimal example to run:
> 
> \starttext
> \placeformula\startformula
> \eqalignno{
> 3x - 4y &= 5   \cr
> x  +  7 &= -2y \cr
> z &= 2
> }
> \stopformula
> \stoptext
> 
> 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
___

Re: [NTG-context] Real number with Lua

2017-04-19 Thread Otared Kavian
Hi Fabrice,

You can use a construction such as:

\starttext
\ctxlua{x = math.floor(10^3*math.pi)/10^3; context(x)}
\stoptext

Best regards: OK

> On 19 Apr 2017, at 15:25, Fabrice Couvreur  
> wrote:
> 
> Hello,
> I do not know Lua but I'll learn later. How to display only 3 digits after 
> the decimal point ?
> thank you,
> Fabrice
> 
> \starttext
> \startlinecorrection[blank]
>   \startmidaligned
> \bTABLE[width=2cm,offset=0.8ex,align={lohi,middle}]
> \bTR
> \bTD \math{P} \eTD
> \bTD \math{m} \eTD
> \bTD \math{g_M} \eTD
> \eTR
> \bTR
> \bTD \math{1.6} \eTD
> \bTD \math{0.4} \eTD
> \bTD \startluacode context(1.6/0.4)\stopluacode \eTD
> \eTR
> \bTR
> \bTD \math{3.1} \eTD
> \bTD \math{0.8} \eTD
> \bTD \startluacode context(3.1/0.8)\stopluacode \eTD
> \eTR
> \bTR
> \bTD \math{4.3} \eTD
> \bTD \math{1.2} \eTD
> \bTD \startluacode 
> context(4.3/1.2)
>   \stopluacode
> \eTD
> \eTR
> \bTR
> \bTD \math{5.8} \eTD
> \bTD \math{1.6} \eTD
> \bTD \startluacode context(5.8/1.6)\stopluacode \eTD
> \eTR
> \bTR
> \bTD \math{7.5} \eTD
> \bTD \math{2} \eTD
> \bTD \startluacode context(7.5/2)\stopluacode \eTD
> \eTR
> \eTABLE
>   \stopmidaligned
> \stoplinecorrection
> \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
___

Re: [NTG-context] A question about Lucida fonts

2017-03-30 Thread Otared Kavian

> On 30 Mar 2017, at 13:52, Hans Hagen  wrote:
> 
> opentype of course .. more complete, features and easier to use ... also most 
> value for money

Thanks Hans for your quick reply! 
I guess the file type-imp-lucida-opentype.mkiv is there to take care of 
everything when using the font: so once I have the fonts, and ConTeXt knows 
where they are,
can I use them just by saying
\setupbodyfont[lucida]
or are there other commands to issue?

Many thanks for your precious help: 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
___

[NTG-context] A question about Lucida fonts

2017-03-30 Thread Otared Kavian
Hi,

I would like to buy the set of Lucida fonts from TUG
https://www.tug.org/store/lucida/index.html 

but I am wondering which flavor, Open Type or Type 1, is supposed to work 
smoothly (and easily…) with ConTeXt mkiv. Actually a very long time ago I 
bought those fonts from yandy.com , but those were designed 
to work only on a Mac OS 9 (yes I am so that old… :-).

Since I am sure some people on the mailing list have an experience and good 
advices to share, I would appreciate having their opinion.

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] Manually scaling math fences

2017-03-24 Thread Otared Kavian
Sorry for the noise… it does work fine indeed with ConTeXt 2017.03.23 17:20 
MKIV beta (I tried last night with a previous version…).

Thank you so much Hans!

> On 24 Mar 2017, at 10:56, Otared Kavian  wrote:
> 
> 
>> On 24 Mar 2017, at 08:24, Aditya Mahajan  wrote:
>>> […]
>> 
>> Thanks.
>> 
>> If I understand the code correctly (sorry, haven't tested it yet),
> 
> Hi Aditya and Hans,
> 
> Thank you Hans for the new feature.
> I did test the code sent by Hans, but it seems that the feature is not yet in 
> the latest ConTeXt 2017.03.23 17:20 MKIV beta.
> 
> 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] Manually scaling math fences

2017-03-24 Thread Otared Kavian

> On 24 Mar 2017, at 08:24, Aditya Mahajan  wrote:
>> […]
> 
> Thanks.
> 
> If I understand the code correctly (sorry, haven't tested it yet),

Hi Aditya and Hans,

Thank you Hans for the new feature.
I did test the code sent by Hans, but it seems that the feature is not yet in 
the latest ConTeXt 2017.03.23 17:20 MKIV beta.

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] closesymbol on same line as displayed formula

2017-03-20 Thread Otared Kavian

> On 20 Mar 2017, at 23:46, Aditya Mahajan  wrote:
> 
>> […]
> 
> What is the expected output when the last formula has an equation number?
> 
> Aditya

Hi Aditya,

That is a good point: if the equation numbers are on the right, there would be 
an ugly effect with the closesympbol near the number, but not if the equation 
numbers are on the left.

Personnaly I avoid finishing a displayed formula with a closymbol (since one 
uses sometimes the square for the D’Alembertien operator), but sometimes it it 
comes handy to have the possibility to add such a closesymbol.

I don’t know what has changed in recent ConTeXt mkiv which makes the solution 
cooked up by Wolfgang to not work anymore.

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] closesymbol on same line as displayed formula

2017-03-20 Thread Otared Kavian
Hi Mikael,

Some time ago, Wolfgang gave a solution which used to work, but I experimented 
it again when I read your message, and now it does not work anymore… PLease 
have a look to the files attached (I recovered them from a TimeMachine backup).

Unfortnately the same file typeset with the latest beta, and even with the 
current version from TeXLIve 2016 does not give anymore the same result.

Best regards: OK


closesymbol-1 (original).pdf
Description: Adobe PDF document



closesymbol-1 (original).tex
Description: Binary data


> On 20 Mar 2017, at 14:59, Mikael P. Sundqvist  wrote:
> 
> On Tue, Mar 14, 2017 at 7:23 PM, Mikael P. Sundqvist  wrote:
>> Hi,
>> 
>> I'm bringing up an old question on placing the qedsymbol, or
>> closesymbol as it is also called. This was previously discussed in
>> https://mailman.ntg.nl/pipermail/ntg-context/2014/079807.html and the
>> purpose of this post is to ask if there is any solution to the problem
>> now. Looking at the file below (output is attached), when the proof
>> ends with a displayed formula, the closesymbol is located one row
>> down. I want it to be (flushright) on the same line as the displayed
>> formula.
>> 
>> If I use \placeclosesymbol the closesymbol is indeed put on the
>> correct line, but not flushright.
>> 
>> Any ideas? I'm willing to use some command like \placeclosesymbol in
>> the occations when the proof ends with a displayed formula.
>> 
>> /Mikael
>> 
>> \defineenumeration[proof][
>> number=no,
>> text=Proof,
>> headstyle={\it},
>> alternative=serried,
>> width=fit,
>> closesymbol={$\square$},
>> ]
>> 
>> \starttext
>> 
>> \startproof
>> This is a short proof.
>> \stopproof
>> 
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.
>> \stopformula
>> \stopproof
>> 
>> \startproof
>> This is another short proof, ending with the formula
>> \startformula
>> 1+1=2.\placeclosesymbol
>> \stopformula
>> \stopproof
>> 
>> 
>> 
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\NR
>> \stopalign
>> \stopformula
>> \stopproof
>> 
>> \startproof
>> This is a rather advanced proof, ending with formulas
>> \startformula
>> \startalign
>> \NC 1+1 \NC = 2,\NR
>> \NC 2+2 \NC = 4.\placeclosesymbol\NR
>> \stopalign
>> \stopformula
>> \stopproof
>> 
>> \stoptext
> 
> Partly shameful bump.
> 
> Is it even possible? (It is using LaTeX and the \qedhere command)
> 
> Could I provide more information?
> 
> /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
> ___

___
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 use tex.print in ctxlua

2017-03-19 Thread Otared Kavian
Hi Wolfgang,

Thanks for letting me know the command string.formatters[….]. It allows to 
avoid the concatenation, which is to avoid as Thomas points out.

Now that I have solved the issue with the spurious space, I have one more 
question: how could one print the values (vecteuX[i],vecteurY[i]) in a 
tabulated environment so that when for instance one has 15 such values, one 
gets 3 lines with 5 values on each line?

Best regards: OK

> On 19 Mar 2017, at 17:56, Wolfgang Schuster  
> wrote:
> 
> 
>> Otared Kavian 19. März 2017 um 17:46 via Postbox
>> Hi Aditya,
>> 
>> Thanks, as Thomas, Pablo and you mentioned the right way is to use context() 
>> instead of tex.print()
>> Actually I just saw that one can also concatenate with context() as in:
>> 
>> context("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")
>> 
>> which is equivalent to
>> tex.print("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")
> You can use the string.formatters function for this.
> 
> \starttext
> 
> \startluacode
> 
> local string_a = "12"
> local string_b = "23"
> 
> context(string.formatters["(%s,%s)"](string_a,string_b))
> 
> \stopluacode
> 
> \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
> ___

___
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 use tex.print in ctxlua

2017-03-19 Thread Otared Kavian
Hi Aditya,

Thanks, as Thomas, Pablo and you mentioned the right way is to use context() 
instead of tex.print()
Actually I just saw that one can also concatenate with context() as in:

context("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")

which is equivalent to
tex.print("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")

Best regards: OK

> On 19 Mar 2017, at 17:37, Aditya Mahajan  wrote:
> 
> On Sun, 19 Mar 2017, Otared Kavian wrote:
> 
>> Hi,
>> 
>> I would like to print in a text the values of a array computed in a  
>> \startluacode …. \stopluacode combination.
>> How can I do it properly? Please have a look at the example below and its 
>> output, which is not satisfactory because the right parenthesis is separated 
>> from the number by a space. How can I suppress this unwanted space?
>> For instance I get (1, 103 ) instead of (1, 103).
> 
> use context() to print instead of tex.print(...).
> 
> 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
> ___

___
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 use tex.print in ctxlua

2017-03-19 Thread Otared Kavian
Hi Pablo,

Thanks for your answer: actually I did not know that it is possible to 
concatenate so easily in lua… Your solution is indeed simpler than what I did 
and solves also the problem of the spurious space before the closing 
parenthesis.

Best regards: OK

> On 19 Mar 2017, at 16:56, Pablo Rodriguez  wrote:
> 
> On 03/19/2017 04:30 PM, Otared Kavian wrote:
>> Hi,
>> 
>> I would like to print in a text the values of a array computed in a
>> \startluacode …. \stopluacode combination.
>> How can I do it properly? Please have a look at the example below
>> and its output, which is not satisfactory because the right parenthesis is
>> separated from the number by a space. How can I suppress this unwanted
>> space?
>> For instance I get (1, 103 ) instead of (1, 103).
> 
> Hi Otared,
> 
> is there any reason not to use the following instead of your way below?
> 
>  for i = 1,n do
>tex.print("(" .. vecteurX[i] .. ", " .. vecteurY[i] .. ")\\par")
>  end
> 
>>  for i = 1,n do
>>  context("(") 
>>  tex.print(vecteurX[i]) 
>>  context(", ") 
>>  tex.print(vecteurY[i])
>>  tex.print(")")
>>  context.par()
>>  end
> 
> I think this is shorter and clearer (to me, at least).
> 
> 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
> ___

___
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 use tex.print in ctxlua

2017-03-19 Thread Otared Kavian
Hi Thomas,

Thanks for your answer.
Indeed I did not know that I could use directly 
context(vecteurY[i])
Now this solves my problem!

Best regards: OK

> On 19 Mar 2017, at 16:51, Thomas A. Schmitz  
> wrote:
> 
> On 19.03.2017 16:30, Otared Kavian wrote:
>> I would like to print in a text the values of a array computed in a  
>> \startluacode …. \stopluacode combination.
>> How can I do it properly? Please have a look at the example below and its 
>> output, which is not satisfactory because the right parenthesis is separated 
>> from the number by a space. How can I suppress this unwanted space?
>> For instance I get (1, 103 ) instead of (1, 103).
> 
> Otared,
> 
> is there a reason why you don't use context(vecteurY[i]) and 
> context(vecteurX[i])? This gets rid of the spurious space for me (and makes 
> your code more consistent). But I assume you must have tried it because you 
> use the "context" command in other places of your lua code.
> 
> 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
> ___

___
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 use tex.print in ctxlua

2017-03-19 Thread Otared Kavian
Hi,

I would like to print in a text the values of a array computed in a  
\startluacode …. \stopluacode combination.
How can I do it properly? Please have a look at the example below and its 
output, which is not satisfactory because the right parenthesis is separated 
from the number by a space. How can I suppress this unwanted space? 
For instance I get (1, 103 ) instead of (1, 103).

Thanks in advance for any help,
Best regards: OK

%%% begin ctxlua-print.tex
\starttext
\startluacode
n = 6 ;
vecteurX = {} ;
for i = 1,n do
vecteurX[i] = i ;
end
vecteurY = {} ;
for i = 1,n do
vecteurY[i] = 3*vecteurX[i] + 100 ;
end
for i = 1,n do
context("(") 
tex.print(vecteurX[i]) 
context(", ") 
tex.print(vecteurY[i])
tex.print(")")
context.par()
end
\stopluacode
\stoptext
%%% begin ctxlua-print.tex



ctxlua-print.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] Manually scaling math fences

2017-03-06 Thread Otared Kavian
Hi Aditya,

I agree totally with you and support your suggestion…
Maybe instead of the « delimiter » keyword, one could introduce a keyword such 
as « size »:


\MEAN[size=auto] expands to \left\langle .. \right\langle
\MEAN[size=] expands to \langle .. \rangle
\MEAN[size=big]  expands to \big\langle  ... \big\rangle
\MEAN[size=Big]  expands to \Big\langle  ... \Big\rangle
\MEAN[size=bigg] expands to \bigg\langle ... \bigg\rangle
\MEAN[size=Bigg] expands to \Bigg\langle ... \Bigg\rangle

Best regards: OK

> On 6 Mar 2017, at 20:57, Aditya Mahajan  wrote:
> 
> Hi Hans,
> 
> There are instances where the automatic scaling provided by \left and \right 
> is not ideal and one has to use manual scaling. For example:
> 
> \starttext
> \startTEXpage \startformula
>  \left\langle \sum_{i=1}^n A_i x_i \right\rangle
>  \hbox{ vs. }
>  \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle
> \stopformula \stopTEXpage
> \stoptext
> 
> Currently, math fences always default to using \left and \right, which can 
> lead to undesirable results. For example:
> 
> \definemathfence [MEAN] [angle] [command=yes, color=blue]
> 
> \starttext
> \startTEXpage \startformula
>  \MEAN{ \sum_{i = 1}^n A_i x_i }
>  \hbox{ vs. }
>  \bigg\langle \sum_{i=1}^n A_i x_i \bigg\rangle
> \stopformula \stopTEXpage
> \stoptext
> 
> Could we add an option to \definefence that allows the user to select the 
> delimiter scaling using a key (say, `delimiter`) so that
> 
> \MEAN[delimiter=auto] expands to \left\langle .. \right\langle
> \MEAN[delimiter=] expands to \langle .. \rangle
> \MEAN[delimiter=big]  expands to \big\langle  ... \big\rangle
> \MEAN[delimiter=Big]  expands to \Big\langle  ... \Big\rangle
> \MEAN[delimiter=bigg] expands to \bigg\langle ... \bigg\rangle
> \MEAN[delimiter=Bigg] expands to \Bigg\langle ... \Bigg\rangle
> 
> I am not sure whether `delimiter` is the best key. I think that `scale` may 
> be better, but using `scale` for specifying the scaling of math delimiters 
> will be inconsistent with how `scale` is used everywhere else. Another option 
> is to use `alternative` key.
> 
> Thanks,
> 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
> ___

___
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] description renders unintended results

2017-03-04 Thread Otared Kavian
Hi Floris,Since you specify	align=leftin the setup of your description, I don’t see why the output would be unexpected. With the following version of your example code I get the attached PDF output.%%% begin \setuppapersize[A5]\definedescription[descr][	headstyle=bold,	style=normal,%	align=flushright,	location=hanging,	width=broad,	margin=1cm	]\starttext\startdescr{Para}	This is a shorter item label, and some text that talks about it.	The text is wrapped into a paragraph, with successive lines indented.	This is another paragraph under the "Para" item.	\startdescr{Sub Item}  		This is a description of an item which is within the "Para" item.  	\stopdescr	\startdescr{Sub Item} 		Another Sub Item   	\stopdescr\stopdescr\startdescr{Short}	A short item that's not part of that really long "Para" item.\stopdescr\stoptext%%% end

description-indentation.pdf
Description: Adobe PDF document
On 3 Mar 2017, at 09:59, Floris van Manen  wrote:The documentation on pagehttp://wiki.contextgarden.net/Descriptionprovides sample code to stack multiple levels of description such as:\setuppapersize[A5]\definedescription[descr][  headstyle=bold, style=normal, align=left, location=hanging,   width=broad, margin=1cm]\starttext\startdescr{Para}  This is a shorter item label, and some text that talks about it.  The text is wrapped into a paragraph, with successive lines indented.  This is another paragraph under the "Para" item.  \startdescr{Sub Item}      This is a description of an item which is within the "Para" item.  \stopdescr\startdescr{Sub Item}     Another Sub Item   \stopdescr\stopdescr\startdescr{Short}  A short item that's not part of that really long "Para" item.\stopdescr\stoptextwhich should generate the included rendering.But reality is somewhat more diverse …My current context / luatex, as well as the online context engine come up with a different renderingEven when you correct for the right/left alignment, the itemising does not properly stack up:It there a work around ?$ context --versionmtx-context     | ConTeXt Process Management 0.63mtx-context     |mtx-context     | main context file: /Applications/ConTeXt/tex/texmf-context/tex/context/base/mkiv/context.mkivmtx-context     | current version: 2016.09.24 12:40$ luatex --versionThis is LuaTeX, Version 1.0.0 (TeX Live 2017/dev)Thanks.Floris van Manen___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-contextwebpage  : http://www.pragma-ade.nl / http://context.aanhet.netarchive  : 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] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Otared Kavian
Dear Mohammad Hossein,

Thank you for sharing this rawsteps-mkiv code: it works very smoothly and 
nicely: I haven’t done yet a real life presentation with it, but on your 
examples and a few other simple ones, your code works very well.

Best regards: OK

> On 27 Feb 2017, at 19:28, Mohammad Hossein Bateni  wrote:
> 
> I once ported RawSteps to MkIV but have not touched it in a while (and 
> probably won't have time to anytime soon).  Ten months ago, it used to work 
> almost fine.
> 
> https://github.com/bateni/rawsteps-mkiv 
> <https://github.com/bateni/rawsteps-mkiv>
> 
> On Mon, Feb 27, 2017 at 12:00 PM, Otared Kavian  <mailto:ota...@gmail.com>> wrote:
> Hi,
> 
> If you use mkii you can still use RawSteps, but in mkiv it does not work 
> properly and should be rewritten. 
> However, as Hans indicates, one can use \startsetp and friends, as shown in 
> the example presentations found in your directory
>   texmf/doc/context/presentations
> 
> Best regrads: OK
> 
>> On 27 Feb 2017, at 15:53, kaddour kardio > <mailto:kaddourkar...@gmail.com>> wrote:
>> 
>> http://wiki.contextgarden.net/RawSteps 
>> <http://wiki.contextgarden.net/RawSteps> is it still relevant dear Hans ?
>> 
>> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen > <mailto:pra...@wxs.nl>> wrote:
>> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr 
>> <mailto:dam...@thiriet.web4me.fr> wrote:
>> Hello,
>> 
>> 
>> I have been switching to conTEXt to prepare some of my teaching stuff. I 
>> have read the context ref manual, the wiki and browsed the web, but couldn't 
>> find anything related to so-called overlays in beamer (I justed greped mail 
>> archives for 2015–2017).
>> What would be the conTEXt way to have a list or whatever else displayed in a 
>> slide in such a way that point 2 is hidden until you press space, and so on.
>> In beamer, you would make it this way
>> 
>> \begin{frame}
>>\begin{itemize}
>>   \item 1
>>   \pause
>>   \item 2
>>   \pause
>>  \item 3
>> \end{frame}
>> 
>> Or even better,
>> 
>> \begin{frame}
>>\begin{itemize}[<+->]
>>   \item 1
>>   \item 2
>>  \item 3
>> \end{frame}
>> 
>> I read about \starthiding and \stophiding in the manual, but as far as I 
>> understand, this is not exactly what I am looking for.
>> I don't think postponing would help either.
>> 
>> Any suggestion will be welcome. I am using texlive 2015 version (nothing 
>> newer is available yet in OpenBSD).
>> Have a nice day,
>> 
>> texmf/doc/context/presentations
>> 
>> has examples ... you can have steps (pre-stepwise)
>> 
>> Hans
>> 
>> 
>> -
>>   Hans Hagen | PRAGMA ADE
>>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>tel: 038 477 53 69 | www.pragma-ade.nl <http://www.pragma-ade.nl/> | 
>> www.pragma-pod.nl <http://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 <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://context.aanhet.net/>
>> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
>> <https://bitbucket.org/phg/context-mirror/commits/>
>> wiki : http://contextgarden.net <http://contextgarden.net/>
>> ___
>> 
>> 
>> 
>> -- 
>> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>> 
>> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context 
>> <http://www.ntg.nl/mailman/listinfo/ntg-context>
>> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
>> http://context.aanhet.net <http://c

Re: [NTG-context] which command would give the same effect as \pause in beamer ?

2017-02-27 Thread Otared Kavian
Hi,

If you use mkii you can still use RawSteps, but in mkiv it does not work 
properly and should be rewritten. 
However, as Hans indicates, one can use \startsetp and friends, as shown in the 
example presentations found in your directory
texmf/doc/context/presentations

Best regrads: OK

> On 27 Feb 2017, at 15:53, kaddour kardio  wrote:
> 
> http://wiki.contextgarden.net/RawSteps 
>  is it still relevant dear Hans ?
> 
> On Mon, Feb 27, 2017 at 3:37 PM, Hans Hagen  > wrote:
> On 2/27/2017 1:16 PM, dam...@thiriet.web4me.fr 
>  wrote:
> Hello,
> 
> 
> I have been switching to conTEXt to prepare some of my teaching stuff. I have 
> read the context ref manual, the wiki and browsed the web, but couldn't find 
> anything related to so-called overlays in beamer (I justed greped mail 
> archives for 2015–2017).
> What would be the conTEXt way to have a list or whatever else displayed in a 
> slide in such a way that point 2 is hidden until you press space, and so on.
> In beamer, you would make it this way
> 
> \begin{frame}
>\begin{itemize}
>   \item 1
>   \pause
>   \item 2
>   \pause
>  \item 3
> \end{frame}
> 
> Or even better,
> 
> \begin{frame}
>\begin{itemize}[<+->]
>   \item 1
>   \item 2
>  \item 3
> \end{frame}
> 
> I read about \starthiding and \stophiding in the manual, but as far as I 
> understand, this is not exactly what I am looking for.
> I don't think postponing would help either.
> 
> Any suggestion will be welcome. I am using texlive 2015 version (nothing 
> newer is available yet in OpenBSD).
> Have a nice day,
> 
> texmf/doc/context/presentations
> 
> has examples ... you can have steps (pre-stepwise)
> 
> 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 
> ___
> 
> 
> 
> -- 
> Dr YAHYAOUI Mohamed Kaddour, cardiologue.Clinique EL ABRAR.
> ___
> 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] issue with linenotes and luatex-1.0.3

2017-02-25 Thread Otared Kavian
Dear Pablo,

For your information, I tested your file hefes.tex, and the only pages without 
the issue are pages 3 and 5, with LuaTeX, Version 1.0.3 and ConTeXt  version 
2017.02.23 18:37 (I am running MacOS 10.12).

However with LuaTeX, Version 0.95.0 and ConTeXt  version 2016.05.17 19:20 (from 
TeXLive 2016), the result is as expected.

Best regards: OK

> On 25 Feb 2017, at 13:09, Pablo Rodriguez  wrote:
> 
> Dear list,
> 
> I have a text with two kinds of linenotes (http://www.ousia.tk/hefes.tex).
> 
> If I compile with latest beta (2017.02.23 18:37), I get wrong separation
> from body in many pages (http://www.ousia.tk/hefes.pdf). Only page 5
> might be be right in this point.
> 
> But if I use beta from 2017.01.27 14:39 (which comes with luatex-1.0.0
> [at least in Linux 32bit]), linenote separation from body is much better
> (http://www.ousia.tk/hefes-nospacebefore.pdf).
> 
> The spacebefore option from \setupnotes was intended to improve the
> situation. No matter whether \setupnotes is used or not, luatex-1.0.3
> gets wrong results.
> 
> Could anyone confirm the bug or tell me what I’m doing wrong?
> 
> Many thanks for your help,
> 
> Pablo
> -- 
> http://www.ousia.tk
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

___
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] LineSpacing Issue in Arabic Fonts

2017-02-19 Thread Otared Kavian
Hello Ibn Saeed,

I tried your example file and obtained the same result as you with 
LuaTeX Version 1.0.3 and the latest beta version 2017.02.19 17:14.

However the result is as expected with the version from TeXLIve, that is 
LuaTeX Version 0.95.0 (TeX Live 2016) and ConTeXt  ver: 2016.05.17 
19:20.

So there seems that, as Hans warned us a few days ago, there are still some 
problems with LuaTeX and the latest version of ConTeXt.

Best regards: OK


> On 20 Feb 2017, at 06:46, Ibn Saeed  wrote:
> 
> Hello
> 
> I installed ConteXt standalone version.
> 
> Here is the version details:
> 
> ===
> mtx-context | ConTeXt Process Management 1.00
> mtx-context |
> mtx-context | main context file: 
> C:/context/tex/texmf-context/tex/context/base/mkiv/context.mkiv
> mtx-context | current version: 2017.02.19 17:14
> ===
> 
> I am trying to use the following context document which used to work fine 
> before.
> 
> I have upgraded my complete computer so had to install everything again.
> 
> When i ran the same file, it gave all kinds of linespacing issue, that is 
> what i think the issue might be.
> 
> here is the code :
> 
> ===
> \showgrid
> \mainlanguage[arabic]
> \setupalign[r2l]
> \righttoleft
> \definefontfeature
> [arabic]
> [mode=node,language=dflt,script=arab,
> init=yes,
> medi=yes,
> fina=yes,
> isol=yes,
> liga=yes,
> dlig=yes,
> rlig=yes,
> tlig=yes,
> calt=yes,
> trep=yes,
> clig=yes,
> mark=yes,
> mkmk=yes,
> kern=yes,
> curs=yes,
> mset=yes
> ]
> 
> \starttypescript [serif] [arabic]
> \setups[font:fallback:serif]
> \definefontsynonym [Arabic-Regular] [file:arabtype.ttf] [features=arabic]
> \definefontsynonym [Arabic-Bold] [file:Scheherazade-Bold.ttf] 
> [features=arabic]
> \stoptypescript
> 
> \starttypescript [serif] [arabic] [name]
> \definefontsynonym [Serif][Arabic-Regular] [features=arabic]
> \definefontsynonym [SerifBold][Arabic-Bold][features=arabic]
> \stoptypescript
> 
> \starttypescript [Arabic]
> \definetypeface [Arabic] [rm] [serif] [arabic] [default]
> \stoptypescript
> 
> \setuppapersize[A4]
> \setuplayout[
> grid=min,
> backspace=46.666mm, width=140.00mm,
> topspace=33.000mm, height=198.000mm,
> header=12.9mm, footer=9mm,
> location=middle,
> ]
> 
> 
> \setupbodyfont[Arabic,20pt]
> \setupinterlinespace[line=32pt]
> \setupwhitespace[line]
> 
> 
> 
> \def\TextBig{\switchtobodyfont[Arabic-Regular, rm, 62pt]}
> \def\TextNormal{\switchtobodyfont[Arabic-Regular, rm, 24pt]}
> \def\TextSmall{\switchtobodyfont[Arabic-Regular, rm, 18pt]}
> \def\TextSmaller{\switchtobodyfont[Arabic-Regular, rm, 14pt]}
> \def\TextSmallSans{\switchtobodyfont[Arabic-Regular, ss, 12pt]}
> 
> 
> \setuphead[chapter][
> header=empty,
> alternative=middle,
> page=right,
> grid=max,
> number=no,
> numbercommand=\groupedcommand{}{\blank[2*big]},
> after={\blank[2*medium]},
> ]
> 
> 
> 
> 
> \starttext
> \startfrontmatter
> 
> \startstandardmakeup[
> align=r2l,
> doublesided=no,
> headerstate=none]
> 
> \startalignment[middle]
> \blank[11*small]
> {\switchtobodyfont[62pt] فتح القوي المتين}\par
> \blank[7*small]
> {\switchtobodyfont[24pt] في شرح الأربعين وتتمَّة الخمسين}\par
> {\switchtobodyfont[18pt] النووي وابن رجب}
> \vfill
> 
> {\TextSmall تأليف}\par
> {\TextSmall عبد المحسن بن حمد العباد البدر}
> \stopalignment
> 
> \stopstandardmakeup
> 
> 
> 
> 
> \completecontent
> 
> 
> \stopfrontmatter
> 
> 
> \startbodymatter
> 
> 
> \startchapter[
> title={مقدمة}]
> \stopchapter
> 
> 
>   الحمد لله مجزل العَطاء ومسبغ النِّعم، وأشهد أن لا إله إلاَّ الله وحده لا 
> شريك له ذو الفضل والإحسان والجود والكرم، وأشهد أنَّ محمداً عبده ورسوله سيِّد 
> العرب والعجم، المخصوص من ربِّه بجوامع الكلم، اللَّهمَّ صلِّ وسلِّم وبارك عليه 
> وعلى آله أهل المكارم والشِّيَم، وعلى أصحابه مصابيح الدُّجَى والظُّلَم، الذين 
> أكرمهم الله فجعلهم خير أمَّة هي خير الأمم، وعلى كل مَن جاء بعدهم مقتفياً 
> آثارهم، وقد خلا قلبُه من الغلِّ للمؤمنين وسلِم.\par
> 
> 
> أمَّا بعد، فإنَّ من الموضوعات التي ألَّف فيها العلماء في حديث رسول الله 
> أحاديث الأربعين، وهي جمع أربعين حديثاً من أحاديث رسول الله ؛ لحديث ورد في فضل 
> حفظ أربعين حديثاً من أحاديث رسول الله ، ذكر النووي في مقدمة الأربعين له وروده 
> عن تسعة من أصحاب رسول الله سمَّاهم، وقال: (( واتَّفق الحفاظ على أنَّه حديث 
> ضعيف وإن كثُرت طرقُه ))، وذكر أنَّ اعتمادَه في تأليف الأربعين ليس عليه، بل 
> على أحاديث أخرى، مثل قوله : (( ليبلِّغ الشاهد منكم الغائب ))، وقوله: (( نضَّر 
> الله امرءاً سمع مقالتي فوعاها )) الحديث، وذكر ثلاثة عشر من العلماء ألَّفوا في 
> الأربعين، أولهم عبد الله بن المبارك، وآخرهم أبو بكر البيهقي، وقال بعد ذكرهم: 
> (( وخلائق لا يُحصون من المتقدِّمين والمتأخرين ))، وقال: (( ثم مِن العلماء مَن 
> جمع الأربعين في أصول الدِّين، وبعضهم في الفروع، وبعضهم في الجهاد، وبعضهم في 
> الزهد، وبعضهم في الآداب، وبعضهم في الخطب، وكلُّها مقاصد صالحة رضي الله تعالى 
> عن قاصديها، وقد رأيتُ جمع أربعين أهم من هذا كلِّه، وهي أربعون حديثاً مشتملة 
> على جميع ذلك، وكلُّ حديث منها قاعدة عظيمة من قواعد الدِّين، قد وصفه العلماء 
> بأنَّ مدارَ الإسلام عليه، أو هو نصف الإسلام أو 

Re: [NTG-context] Dot fills shifted down

2017-01-31 Thread Otared Kavian
Hi Lukas,

Maybe you can use

symbol=\lower.25em\hbox{.},

instead of what you set in your \definefiller definition is what you need?

Best regards: OK

> On 31 Jan 2017, at 12:33, Procházka Lukáš Ing.  wrote:
> 
> Hello,
> 
> the following code:
> 
> 
>  \definefiller
>   [DotFill]
>   [alternative=symbol,
>   symbol=.,
>   width=.5em,
>   style=\txx]
> 
> Fill here: \filler[DotFill]{}
> 
> 
> produces filler with dots on the baseline.
> 
> Is there a way to shift the dots a bit lower, bellow the baseline, e.g. to 
> 0.25em bellow?
> 
> Best regards,
> 
> Lukas
> 
> 
> -- 
> Ing. Lukáš Procházka | mailto:l...@pontex.cz
> Pontex s. r. o.  | mailto:pon...@pontex.cz | http://www.pontex.cz | 
> IDDS:nrpt3sn
> Bezová 1658
> 147 14 Praha 4
> 
> Tel: +420 241 096 751 (+420 720 951 172)
> Fax: +420 244 461 038
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://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] Basic question

2017-01-30 Thread Otared Kavian
Hi John,

If you have updated your ConTeXt tree, you should issue the following command 
(only once…)

texexec --make —all

in order to create again the mkii format. Then you can say

texexec myfile.tex

in order to typeset the file myfile.tex

Best regards: OK

> On 30 Jan 2017, at 17:55, John Culleton  wrote:
> 
> I have a bunch of old files that were probably created for Mark II. What
> is the current command for running Mark II instead of Mark IV?
> -- 
> John Culleton
> Wexfordpress
> Book design and indexing.
> 
> 
> ___
> 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] Title without the parentheses

2017-01-30 Thread Otared Kavian
Hi Fabrice,

In order to have the box aligned with the text, it is enough to use the  \lower 
command as in the exmaple below.
Best regards: Otared K.

%% begin
\startuniqueMPgraphic{MyShape}
path p ; 
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic
\setuplayout[grid=yes]
\defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}]

\define[1]\MyExoCommand{%
\lower\strutdepth\hbox{\startframed
[background=MyBackgroundLayer,
frame=off,
%   width=3cm,
align=flushleft,
backgroundcolor=darkred]
{\white Exercice #1}
\stopframed}
}
\defineenumeration[ex]
[text=,
title=yes,
titleleft=,
titleright=,
width=fit,
alternative=top,
number=yes,
numbercommand=\MyExoCommand]


\showgrid
\starttext

\startex{Pour tous les candidats \hfill 5 points}
  \input ward
\stopex

\stoptext
%% end

> On 29 Jan 2017, at 23:04, Fabrice Couvreur  
> wrote:
> 
> Hello Kavian,
> Thank you for your answer, it's good for the parentheses. For the command, I 
> found only this which does not exactly answer what I want to do.
> Fabrice
> 
> \defineenumeration
>   [ex]
>   [text={Exercice},
>headcommand=\EXFRAME,
>titleleft=,
>titleright=,
>title=yes,
>width=fit,
>numberconversionset=ACCONVERSION,
>alternative=top,
>number=yes]
> 
> 2017-01-29 12:02 GMT+01:00 Otared Kavian  <mailto:ota...@gmail.com>>:
> Hi Fabrice,
> 
> To suppress the parentheses in the title, you can use the keys titleleft and 
> titleright as in the following:
> 
> \defineenumeration
>   [ex]
>   [text=Exercice,
>title=yes,
>titleleft=,
>titleright=,
>width=fit,
>numberconversionset=ACCONVERSION,
>alternative=top,
>number=yes]
> 
> In order to put the word « Exercice » in the frame you should define a 
> special command, for instance \MyTextCommand and the say text = \MyTextCommand
> 
> Best regrads: OK
> 
>> On 29 Jan 2017, at 09:07, Fabrice Couvreur > <mailto:fabrice1.couvr...@gmail.com>> wrote:
>> 
>> Hello,
>> I would like a title without the parentheses and the text "Exercice" in the 
>> frame with the number.
>> Thank you.
>> Fabrice
>> 
>> \defineframed
>>   [EXFRAME]
>>   [frame=off,
>>offset=0pt,
>>location=low,
>>width=\struttotal,
>>background=color,
>>backgroundcolor=darkred,
>>foregroundcolor=white,
>>forgroundstyle=bold]
>> 
>> \defineprocessor[ACPROCESSOR][command=\EXFRAME]
>> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
>> 
>> \defineenumeration
>>   [ex]
>>   [text=Exercice,
>>title=yes,
>>width=fit,
>>numberconversionset=ACCONVERSION,
>>alternative=top,
>>number=yes]
>> 
>> \starttext
>> 
>> \startex{Pour tous les candidats \hfill 5 points}
>>   \input ward
>> \stopex
>> 
>> \stoptext
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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] Title without the parentheses

2017-01-30 Thread Otared Kavian
Hi Fabrice,

Below you have an example which may help you to achieve what you want, but in 
the example I am sending there is an issue with the alignment of the title.
I could not solve the issue, sorry…

Best regards: Otared K.

%% begin example boxed-title.tex
\startuniqueMPgraphic{MyShape}
path p ; 
p := unitsquare xscaled \overlaywidth yscaled \overlayheight ;
pickup pencircle scaled \overlaylinewidth ;
fill p withcolor \MPcolor{\overlaycolor} ;
draw p withcolor \MPcolor{\overlaylinecolor} ;
\stopuniqueMPgraphic

\defineoverlay[MyBackgroundLayer][\uniqueMPgraphic{MyShape}]

\define[1]\MyExoCommand{%
\startframed
[background=MyBackgroundLayer,
frame=off,
width=3cm,
backgroundcolor=darkred]
{\white Exercice #1}
\stopframed
}
\defineenumeration[ex]
[text=,
title=yes,
titleleft=,
titleright=,
width=fit,
alternative=top,
number=yes,
numbercommand=\MyExoCommand]


\showgrid
\starttext

\startex{Pour tous les candidats \hfill 5 points}
  \input ward
\stopex

\stoptext
%% end example boxed-title.tex


> On 29 Jan 2017, at 23:04, Fabrice Couvreur  
> wrote:
> 
> Hello Kavian,
> Thank you for your answer, it's good for the parentheses. For the command, I 
> found only this which does not exactly answer what I want to do.
> Fabrice
> 
> \defineenumeration
>   [ex]
>   [text={Exercice},
>headcommand=\EXFRAME,
>titleleft=,
>titleright=,
>title=yes,
>width=fit,
>numberconversionset=ACCONVERSION,
>alternative=top,
>number=yes]
> 
> 2017-01-29 12:02 GMT+01:00 Otared Kavian  <mailto:ota...@gmail.com>>:
> Hi Fabrice,
> 
> To suppress the parentheses in the title, you can use the keys titleleft and 
> titleright as in the following:
> 
> \defineenumeration
>   [ex]
>   [text=Exercice,
>title=yes,
>titleleft=,
>titleright=,
>width=fit,
>numberconversionset=ACCONVERSION,
>alternative=top,
>number=yes]
> 
> In order to put the word « Exercice » in the frame you should define a 
> special command, for instance \MyTextCommand and the say text = \MyTextCommand
> 
> Best regrads: OK
> 
>> On 29 Jan 2017, at 09:07, Fabrice Couvreur > <mailto:fabrice1.couvr...@gmail.com>> wrote:
>> 
>> Hello,
>> I would like a title without the parentheses and the text "Exercice" in the 
>> frame with the number.
>> Thank you.
>> Fabrice
>> 
>> \defineframed
>>   [EXFRAME]
>>   [frame=off,
>>offset=0pt,
>>location=low,
>>width=\struttotal,
>>background=color,
>>backgroundcolor=darkred,
>>foregroundcolor=white,
>>forgroundstyle=bold]
>> 
>> \defineprocessor[ACPROCESSOR][command=\EXFRAME]
>> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
>> 
>> \defineenumeration
>>   [ex]
>>   [text=Exercice,
>>title=yes,
>>width=fit,
>>numberconversionset=ACCONVERSION,
>>alternative=top,
>>number=yes]
>> 
>> \starttext
>> 
>> \startex{Pour tous les candidats \hfill 5 points}
>>   \input ward
>> \stopex
>> 
>> \stoptext
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl <mailto:ntg-context@ntg.nl> / 
> http://www.ntg.nl/mailman/listinfo/ntg-context 
> <http://www.ntg.nl/mailman/listinfo/ntg-context>
> webpage  : http://www.pragma-ade.nl <http://www.pragma-ade.nl/> / 
> http://context.aanhet.net <http://context.aanhet.net/>
> archive  : https://bitbucket.org/phg/context-mirror/commits/ 
> <https://bitbucket.org/phg/context-mirror/commits/>
> wiki : http://contextgarden.net <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] Title without the parentheses

2017-01-29 Thread Otared Kavian
Hi Fabrice,

To suppress the parentheses in the title, you can use the keys titleleft and 
titleright as in the following:

\defineenumeration
  [ex]
  [text=Exercice,
   title=yes,
   titleleft=,
   titleright=,
   width=fit,
   numberconversionset=ACCONVERSION,
   alternative=top,
   number=yes]

In order to put the word « Exercice » in the frame you should define a special 
command, for instance \MyTextCommand and the say text = \MyTextCommand

Best regrads: OK

> On 29 Jan 2017, at 09:07, Fabrice Couvreur  
> wrote:
> 
> Hello,
> I would like a title without the parentheses and the text "Exercice" in the 
> frame with the number.
> Thank you.
> Fabrice
> 
> \defineframed
>   [EXFRAME]
>   [frame=off,
>offset=0pt,
>location=low,
>width=\struttotal,
>background=color,
>backgroundcolor=darkred,
>foregroundcolor=white,
>forgroundstyle=bold]
> 
> \defineprocessor[ACPROCESSOR][command=\EXFRAME]
> \defineconversionset[ACCONVERSION][][ACPROCESSOR->n]
> 
> \defineenumeration
>   [ex]
>   [text=Exercice,
>title=yes,
>width=fit,
>numberconversionset=ACCONVERSION,
>alternative=top,
>number=yes]
> 
> \starttext
> 
> \startex{Pour tous les candidats \hfill 5 points}
>   \input ward
> \stopex
> 
> \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] dorecurse problem

2017-01-20 Thread Otared Kavian

> On 20 Jan 2017, at 18:00, Rik Kabel  wrote:
> […]
> 
> Otared,
> 
> I am not sure what you are doing, but if you are using only the code snippet 
> that Hans posted, you will get a blank page. You have to define the layer and 
> page background in addition to Hans' snippet.

Oh yes… sorry, I am ashamed :-(
I just put the code sent by Hans below your’s, and then commented out your 
code, including the definition of layers and backgounds…

Indeed everything works as expected with a buffer.

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] dorecurse problem

2017-01-20 Thread Otared Kavian
Hi Hans,

Unfortunately your workaround with \getbuffer does not produce the correct 
page: it gives only a blank page.

Thanks for your attention: OK

> On 20 Jan 2017, at 10:08, Hans Hagen  wrote:
> 
> On 1/20/2017 8:59 AM, Aditya Mahajan wrote:
>> On Thu, 19 Jan 2017, Rik Kabel wrote:
>> 
>>> ConTeXters,
>>> 
>>> When \dorecurse is active in the following MWE, the lines of text are
>>> overprinted. At least, this is the case for me, please confirm it for
>>> yourself. When \dorecurse is disabled, the lines print as they should,
>>> separately. Please tell me what I am doing wrong with this, if
>>> anything, and how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37
>>> MKIV beta fmt: 2017.1.19 on Win10 x64. There are no errors in the log.)
>> 
>> This has nothing to do with \dorecurse, but due to the fact that the
>> argument of \dorecurse or any macro is parsed before the catcode changes
>> introduced by \startlines come into effect. Here is a simpler example
>> demonstrating similar behavior:
>> 
>> \def\test#1{#1}
>> 
>> \starttext
>> \test{Something
>> \startlines
>> Line one
>> Line two
>> \stoplines}
>> \stoptext
>> 
>> Depending on what you want to do, it should be possible to come up with
>> a workaround.
> 
> \startbuffer
>  \startstandardmakeup
>\setlayerframed
>  [blocks]
>  [preset=lefttop,
>   frame=off,
>   align=right]{
>  \startlines
>Line one on the left
>Line two on the left
>  \stoplines
>}
>\setlayerframed
>  [blocks]
>  [preset=righttop,
>   frame=off,
>   align=flushright]{
>  \startlines
>thgir eht no eno eniL
>thgir eht no owt eniL
>  \stoplines
>}
>  \stopstandardmakeup
> \stopbuffer
> 
>\dorecurse{1}{
>\getbuffer
>}
> 
> -
>  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] dorecurse problem

2017-01-19 Thread Otared Kavian
Hi Rik,

I can confirm the behaviour you are reporting (even without 
\startstandardmakeup—\stopstandardmakeup, but adding a line of text in the 
document in order to have an output).
It seems that \dorecurse suppresses the passage to another line, since if one 
says \dorecurse{10} the texts in the framed layer are typeset ten times on the 
same line, as if the command \startlines were not there.

Best regards: OK

> On 20 Jan 2017, at 04:34, Rik Kabel  wrote:
> 
> ConTeXters,
> 
> When \dorecurse is active in the following MWE, the lines of text are 
> overprinted. At least, this is the case for me, please confirm it for 
> yourself. When \dorecurse is disabled, the lines print as they should, 
> separately. Please tell me what I am doing wrong with this, if anything, and 
> how to fix it. (Running ConTeXt  ver: 2017.01.17 17:37 MKIV beta  fmt: 
> 2017.1.19 on Win10 x64. There are no errors in the log.)
> 
>   \definelayer
> [blocks]
> [width=\textwidth,
>  height=\textheight]
> 
>   \setupbackgrounds
> [page]
> [background=blocks]
> 
>   \starttext
> \dorecurse{1}{  % comment to clear error
>   \startstandardmakeup
> \setlayerframed
>   [blocks]
>   [preset=lefttop,
>frame=off,
>align=right]{
>   \startlines
> Line one on the left
> Line two on the left
>   \stoplines
> }
> \setlayerframed
>   [blocks]
>   [preset=righttop,
>frame=off,
>align=flushright]{
>   \startlines
> thgir eht no eno eniL
> thgir eht no owt eniL
>   \stoplines
> }
>   \stopstandardmakeup
> }   % comment to clear error
>   \stoptext
> 
> -- 
> 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] Vertical space around displayed formulas

2017-01-18 Thread Otared Kavian
Hi Hans,

Thanks for your attention which fixed most of the difficulties with vertical 
distances around math formulas.
However, after typesetting a long document, I noticed that there are still some 
incorrect behaviours. The following minimal example, extracted from that long 
document, shows what is wrong: please have a look at the second formula in the 
attached PDF. (The output with the older version from TeXLIve 2016 is correct).

%% begin vertical-space-bug.tex
\starttext

\input knuth.tex
\startformula
a \leq a_{n+1} \leq a_{n} \leq b_{n+1} \leq b_{n} \leq b, \qquad\mbox{et}\qquad 
0 \leq b_{n} - a_{n} \leq 2^{-n}(b_{0} - a_{0}).
\stopformula
\input ward.tex
\startformula
g(x_{*}) = \lim_{n\to\infty} g(a_{n}) \leq 0 \leq \lim_{n\to\infty} g(b_{n}) = 
g(x_{*}),
\stopformula
\input knuth.tex

\stoptext
%% end vertical-space-bug.tex



vertical-space-bug-2017-01-17.pdf
Description: Adobe PDF document


> On 18 Jan 2017, at 19:15, Hans Hagen  wrote:
> 
> On 1/18/2017 6:23 PM, Nicola wrote:
>> On 18/01/2017 17:53, Otared Kavian wrote:
>>> Hi Nicola,
>>> 
>>> In fact, if you are in a hurry and don’t use subtle things
>>> introduced  since May 2016, you can use the stable version of ConTeXt
>>> from TeXLive
>>> 2016 (the bug noticed by Mikael, and you, is absent from that version
>>> of ConTeXt).
>> 
>> Thanks, that's what I am doing now. Strangely enough, it fixes the
>> layout for all the slides, *except* the one I have posted before. But
>> that one I can easily fix.
> 
> the current (yesterdays) beta should be ok .. (the midpar flushing of a 
> formula)
> 
> a while ago i reimplemented spacing around display math and as a side effect 
> there might be slightly different spacing (in which case probably the old 
> situation was wrong
> 
> it relates to the fact that tex (traditionally) has some assumptions and does 
> some spacing that interferes with the way we want to control spacing (e.g. it 
> always forces baselineskips while we don't always want them) and it was close 
> to impossible to identify such cases robustly
> 
> (think of preceding lines with different depths)
> 
> recent luatex has ways to disable that so i could finally come up with 
> cleaner spacing models for display math
> 
> so, apart from bugs the current model is the one that will stay (or course 
> more control can be added)
> 
> 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] Vertical space around displayed formulas

2017-01-18 Thread Otared Kavian
Hi Nicola,

In fact, if you are in a hurry and don’t use subtle things introduced since May 
2016, you can use the stable version of ConTeXt from TeXLive 2016 (the bug 
noticed by Mikael, and you, is absent from that version of ConTeXt).

Best regards: OK

> On 18 Jan 2017, at 17:26, Nicola  wrote:
> 
> On 18/01/2017 16:53, Otared Kavian wrote:
>> Hi Nicola,
>> 
>> Indeed there is a recent bug, reported by Mikael Sundqvist a few days ago, 
>> and Hans is aware of this.
>> Hans said in the next release of ConTeXt beta the issue will be fixed.
> 
> Sorry, I hadn't noticed the other thread. I'll wait for the next beta then.
> 
> Thanks!
> Nicola
> 
> 
> ___
> 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] Vertical space around displayed formulas

2017-01-18 Thread Otared Kavian
Hi Nicola,

Indeed there is a recent bug, reported by Mikael Sundqvist a few days ago, and 
Hans is aware of this. 
Hans said in the next release of ConTeXt beta the issue will be fixed.

Best regards: OK

> On 18 Jan 2017, at 16:00, Nicola  wrote:
> 
> Hello,
> has something been changed in the last few months in the vertical
> spacing of displayed formulas, frames or other environments?
> 
> I am re-typesetting some presentations using the latest beta and the
> content of slides (especially those containing formulas) now tends to
> flow to the next page, while before it used to fit in one page.
> 
> I paste below an example, if that helps. I am using a system font,
> so you may not be able to reproduce my problem without it.
> 
> Is there something I should change in my documents?
> 
> Nicola
> 
> %%
> \setuppapersize[S6][S6]
> 
> \setuplayout[
>  width=middle,
>  height=middle,
>  topspace=2mm,
>  header=0mm,
>  headerdistance=0mm,
>  location=singlesided,
>  backspace=5mm,
>  margin=0mm,
>  edgedistance=0mm,
>  margindistance=0mm
> ]
> 
> \setupalign[nothyphenated,flushleft]
> 
> % Ocean Sunset (color.adobe.com)
> \definecolor[colorone][r=0.251, g=0.349, b=0.322]
> \definecolor[colortwo][r=0.612, g=0.608, b=0.478]
> \definecolor[colorthree]  [r=1.0,   g=0.827, b=0.576]
> \definecolor[colorfour]   [r=1.0,   g=0.592, b=0.310]
> \definecolor[colorfive]   [r=0.960, g=0.310, b=0.161] %t=0.8 , a=multiply]
> \definecolor[nearlywhite] [s=0.996]
> 
> % Fonts
> \definefontfamily[slidesfont][serif][Avenir] [
>  tf=name:Avenir Light,
>  it=name:Avenir Light Oblique,
>  bf=name:Avenir Heavy,
>  bi=name:Avenir Heavy Oblique
> ]
> \definefontfamily[slidesfont][sans][Avenir] [
>  tf=name:Avenir Light,
>  it=name:Avenir Light Oblique,
>  bf=name:Avenir Heavy,
>  bi=name:Avenir Heavy Oblique
> ]
> \definefallbackfamily[slidesfont][mono][Xits][range={"0222A,"02229,"02205}] % 
> ∪, ∩, ∅
> \definefontfamily[slidesfont][mono][Latin Modern Mono Light][features=none]
> \definefallbackfamily[slidesfont][math][Xits][range={"025C7,"27D5}] % WHITE 
> DIAMOND, left-join, WHITE RIGHT-POINTING TRIANGLE
> \definefontfamily[slidesfont][math][TeX Gyre Pagella Math]
> 
> \setupbodyfont[slidesfont]
> 
> % Foreground/background color
> \setupcolors[textcolor=colorone]
> \setupbackgrounds[page][background=color, backgroundcolor=nearlywhite]
> 
> % Header
> \startreusableMPgraphic{header:background}
>  fill OverlayBox
>leftenlarged BackSpace
>rightenlarged CutSpace
>topenlarged TopSpace
>withcolor OverlayColor ;
>  setbounds currentpicture to OverlayBox
>enlarged max(BackSpace,CutSpace) ;
> \stopreusableMPgraphic
> 
> \defineoverlay[header:background][\reuseMPgraphic{header:background}]
> 
> \define[2]\MySlide{\framed[
>  frame=off,
>  background=header:background,
>  backgroundcolor=colorfive,
>  width=\textwidth,
>  align=flushleft
> ]{#2}}
> 
> \definehead[slide][subject]
> \setuphead[slide][
>  style=\ssb,
>  command=\MySlide,
>  color=nearlywhite,
>  insidesection=\doifnot{\structureuservariable{align}}{top}\vfill,
>  aftersection=\doifnot{\structureuservariable{align}}{top}\vfill,
>  page=yes,
> ]
> 
> % Footer
> \setuppagenumbering[location=]
> \setupfooter[style=small, color=colortwo]
> \setupfootertexts[][\userpagenumber/\lastuserpage]
> 
> % Lists
> \startuseMPgraphic{itemize:main}
>  save p; path p;
>  p := fullcircle scaled 1.5ExHeight;
>  fill p withcolor \MPcolor{colorfive};
> \stopuseMPgraphic
> 
> \startuseMPgraphic{itemize:nested}
>  save p; path p;
>  p := ((0,-0.5)--(0,0.5)--(0.866,0)--cycle) scaled 1.5ExHeight;
>  fill p withcolor \MPcolor{colorfive};
> \stopuseMPgraphic
> 
> \definesymbol[itemize:main][\useMPgraphic{itemize:main}]
> \definesymbol[itemize:nested][\useMPgraphic{itemize:nested}]
> 
> \setupitemize[1][symbol=itemize:main]
> \setupitemize[2][symbol=itemize:nested, width=1.5ex]
> \setupitemize[2][nowhite]
> 
> \setupitemize[
>  headstyle=\ssa,
>  headcolor=colorfive,
>  afterhead={\blank[none]},
>  inbetween={\blank[big]},
>  leftmargin=1em,
>  rightmargin=1em,
> ]
> 
> % Tables
> \setuptables[rulethickness=0.06em]
> 
> \setupinteraction[state=start,  % make hyperlinks active, etc.
>  style=\tf,
>  color=colortwo,
>  title={What Do You Mean, “Null”?},
>  author={Nicola Vitacolonna},
>  keyword={null}]
> 
> % \usebtxdataset[main.bib]
> % \usebtxdefinitions[apa]
> \setupcombinations[distance=3cm,location=top]
> \defineframedcontent[tablebackground][frame=off,background=color,backgroundcolor=colorthree]
> \setuptables[rulethickness=0.06em,frame=tablebackground]
> 
> \setupalign[nothyphenated,flushleft]
> 
> \defineparagraphs[twocol][n=2]
> \setupparagraphs[twocol][1][width=.7\textwidth]
> 
> 
> \starttext
> \switchtobodyfont[17.3pt]
> 
> \startslide[title={Which Nulls?}][align=top]
>  All of the above may be abstracted into three categories:
> 
>  \startitemize[packed]
>\item
>Exists, but unknown ({\bf missing value})
>  

Re: [NTG-context] Displayed formula inside paragraph change vertical space before the paragraph

2017-01-16 Thread Otared Kavian
Hi Mikael,

Thanks for making it clear to me: I was looking for the changes in vertical 
spacing around the formula… Now it is clear that there is a bug in the vertical 
spacing: when I typeset your example with mkii or mkiv ConTeXt Version 
2016.05.17 from TeXLive, the issue is not present, as one may see from the 
attached output.

Maybe you should open a new thread with a title like « Bug in vertical spacing 
of paragraphs » so that Hans may see it more easily.

Best regards: OK



formula-vertical-distance-2016-05-17.pdf
Description: Adobe PDF document




formula-vertical-distance-2016-12-28.pdf
Description: Adobe PDF document


> On 16 Jan 2017, at 11:12, Mikael P. Sundqvist  wrote:
> 
> On Mon, Jan 16, 2017 at 10:51 AM, Otared Kavian  wrote:
>> Hi Mikael,
>> 
>> To make sure we are talking about the same issue, here are the outputs 
>> obtained with and without blank lines around \startformula…\stopformula: Can 
>> you please send me too your outputs so I can compare with mines?
>> 
>> Best regards: OK
>> 
>> 
>> 
>> 
>>> On 15 Jan 2017, at 19:29, Mikael P. Sundqvist  wrote:
>>> 
>>> On Sat, Jan 14, 2017 at 8:32 AM, Mikael P. Sundqvist  
>>> wrote:
>>>> On Sat, Jan 14, 2017 at 1:00 AM, Otared Kavian  wrote:
>>>>> Hi Mikael,
>>>>> 
>>>>> I tested your example but I see no difference in the outputs, with, or 
>>>>> without a blank line between the text and the displayed formula.
>>>>> I am using ConteXt 2016.12.28 17:55 MKIV beta.
>>>>> 
>>>>> Best regards: OK
>>>>> 
>>>>>> On 13 Jan 2017, at 14:13, Mikael P. Sundqvist  wrote:
>>>>>> 
>>>>>> Dear list,
>>>>>> 
>>>>>> please have a look at the output (ctx-example13.pdf) of the somewhat
>>>>>> ugly example below. The vertical space before the paragraph with the
>>>>>> displayed formula is almost none. If I remove the % signs before and
>>>>>> after the formula, the space before the paragraph looks ok.
>>>>>> 
>>>>>> Do I have to enter those empty lines? Is this a bug or feature?
>>>>>> 
>>>>>> (I use a recently updated standalone)
>>>>>> 
>>>>>> /Mikael
>>>>>> 
>>>>>> \starttext
>>>>>> 
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> 
>>>>>> 
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> 
>>>>>> 
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> %
>>>>>> \startformula
>>>>>> k>1000\implies |1/k-0|=1/k<1/1000=0.001.
>>>>>> \stopformula
>>>>>> %
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> Bla bla bla bla bla bla bla bla bla
>>>>>> 
>>>>>> 
>>>>>> \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
>>>>>>

Re: [NTG-context] Displayed formula inside paragraph change vertical space before the paragraph

2017-01-16 Thread Otared Kavian
Hi Mikael,

To make sure we are talking about the same issue, here are the outputs obtained 
with and without blank lines around \startformula…\stopformula: Can you please 
send me too your outputs so I can compare with mines?

Best regards: OK


formula-vertical-distance-with.pdf
Description: Adobe PDF document



formula-vertical-distance-without.pdf
Description: Adobe PDF document

> On 15 Jan 2017, at 19:29, Mikael P. Sundqvist  wrote:
> 
> On Sat, Jan 14, 2017 at 8:32 AM, Mikael P. Sundqvist  wrote:
>> On Sat, Jan 14, 2017 at 1:00 AM, Otared Kavian  wrote:
>>> Hi Mikael,
>>> 
>>> I tested your example but I see no difference in the outputs, with, or 
>>> without a blank line between the text and the displayed formula.
>>> I am using ConteXt 2016.12.28 17:55 MKIV beta.
>>> 
>>> Best regards: OK
>>> 
>>>> On 13 Jan 2017, at 14:13, Mikael P. Sundqvist  wrote:
>>>> 
>>>> Dear list,
>>>> 
>>>> please have a look at the output (ctx-example13.pdf) of the somewhat
>>>> ugly example below. The vertical space before the paragraph with the
>>>> displayed formula is almost none. If I remove the % signs before and
>>>> after the formula, the space before the paragraph looks ok.
>>>> 
>>>> Do I have to enter those empty lines? Is this a bug or feature?
>>>> 
>>>> (I use a recently updated standalone)
>>>> 
>>>> /Mikael
>>>> 
>>>> \starttext
>>>> 
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> 
>>>> 
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> 
>>>> 
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> %
>>>> \startformula
>>>> k>1000\implies |1/k-0|=1/k<1/1000=0.001.
>>>> \stopformula
>>>> %
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> Bla bla bla bla bla bla bla bla bla
>>>> 
>>>> 
>>>> \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
>>> ___
>> 
>> Thank you for testing, Otared.
>> 
>> I still have the same problem with a freshly installed
>> 
>> ConTeXt  ver: 2016.12.28 17:55 MKIV beta  fmt: 2017.1.14  int: 
>> english/english
>> 
>> /Mikael
> 
> Am I the only one affected by this? Can someone confirm that they see
> the same problem?
> 
> Thanks,
> 
> 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
> ___

___
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] Displayed formula inside paragraph change vertical space before the paragraph

2017-01-13 Thread Otared Kavian
Hi Mikael,

I tested your example but I see no difference in the outputs, with, or without 
a blank line between the text and the displayed formula.
I am using ConteXt 2016.12.28 17:55 MKIV beta.

Best regards: OK

> On 13 Jan 2017, at 14:13, Mikael P. Sundqvist  wrote:
> 
> Dear list,
> 
> please have a look at the output (ctx-example13.pdf) of the somewhat
> ugly example below. The vertical space before the paragraph with the
> displayed formula is almost none. If I remove the % signs before and
> after the formula, the space before the paragraph looks ok.
> 
> Do I have to enter those empty lines? Is this a bug or feature?
> 
> (I use a recently updated standalone)
> 
> /Mikael
> 
> \starttext
> 
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> 
> 
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> 
> 
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> %
> \startformula
> k>1000\implies |1/k-0|=1/k<1/1000=0.001.
> \stopformula
> %
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> Bla bla bla bla bla bla bla bla bla
> 
> 
> \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
___

Re: [NTG-context] Strange spurious character

2016-11-19 Thread Otared Kavian
Hi Wolfgang,

Thanks for your remark: indeed after issuing the command

mtxrun --script cache --fonts —erase

the result is correct with palatino as the choice of font. 
I notice that the luatex-cache increases during the time: is there any reason 
for which the luatex-cache is not erased when updating? 

Best regards: OK

> On 19 Nov 2016, at 20:22, Wolfgang Schuster  
> wrote:
> 
>> Hans Hagen  18. November 2016 um 23:08
>> 
>> 
>> I don't know, 
>> 
>> \definefallbackfamily[mainface][serif][texgyrepagella] 
>> \definefontfamily[mainface][sans][texgyrepagella] 
>> \setupbodyfont[mainface] 
>> 
>> \starttext 
>> 
>> Why is the text in bold italic? 
>> 
>> \stoptext 
>> 
>> works ok here so you need to check what palatino gets selected (maybe you 
>> need to be more specific) 
> I can reproduce with the palatino on my system which comes in ttc-format.
> 
> The problem is that context adds only a single font from a ttc-font to the 
> database
> which results in weird results.
> 
> Clearing the font cache with "mtxrun --script cache --fonts --erase" helps 
> sometimes
> but the problem can appear when the font cache is updated.
> 
> 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
> ___

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

2016-11-19 Thread Otared Kavian
Hi Hans,

Indeed with your solution, that is saying

\definefallbackfamily[mainface][serif][texgyrepagella]
\definefontfamily[mainface][sans][texgyrepagella]
\setupbodyfont[mainface]

or more simply saying

\setupbodyfont[palatino,12pt]

there is no problem. It seems that the issue comes from the use of

\definefontfamily[mainface][sans][palatino]

in the example I sent.
So I am going to use your way of defining the fontfamily.

Thanks again and best regards: OK


> \starttext
> 
> Why is the text in bold italic?
> 
> \stoptext
> On 18 Nov 2016, at 23:08, Hans Hagen  wrote:
> 
> On 11/18/2016 10:50 PM, Otared Kavian wrote:
>> Hi Hans,
>> 
>> Thanks for the quick fix.
>> Indeed the spurious character does not show up anymore, but in the minimal 
>> example below the default body font seems to be set to bold italic, please 
>> see the attached PDF (I did not observe this in my real documents, but 
>> curiously it shows up in this minimal example): it may be that I am using a 
>> wrong font definition here.
>> The version of ConTeXt is  2016.11.18 22:20 MKIV beta  fmt: 2016.11.18.
>> 
>>  begin bug-beta.tex
>> \definefallbackfamily[mainface][serif][palatino]
>> \definefontfamily[mainface][sans][palatino]
>> \setupbodyfont[mainface]
>> 
>> \starttext
>> 
>> Why is the text in bold italic?
>> 
>> \stoptext
> 
> I don't know,
> 
> \definefallbackfamily[mainface][serif][texgyrepagella]
> \definefontfamily[mainface][sans][texgyrepagella]
> \setupbodyfont[mainface]
> 
> \starttext
> 
> Why is the text in bold italic?
> 
> \stoptext
> 
> works ok here so you need to check what palatino gets selected (maybe you 
> need to be more specific)
> 
> 
> 
> -
>  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] Strange spurious character

2016-11-18 Thread Otared Kavian
Hi Hans,

Thanks for the quick fix.
Indeed the spurious character does not show up anymore, but in the minimal 
example below the default body font seems to be set to bold italic, please see 
the attached PDF (I did not observe this in my real documents, but curiously it 
shows up in this minimal example): it may be that I am using a wrong font 
definition here. 
The version of ConTeXt is  2016.11.18 22:20 MKIV beta  fmt: 2016.11.18.

 begin bug-beta.tex
\definefallbackfamily[mainface][serif][palatino]
\definefontfamily[mainface][sans][palatino] 
\setupbodyfont[mainface]

\starttext

Why is the text in bold italic?

\stoptext
 end bug-beta.tex

Best regards: OK


bug-beta.pdf
Description: Adobe PDF document



> On 18 Nov 2016, at 22:30, Hans Hagen  wrote:
> 
> On 11/18/2016 9:03 PM, Otared Kavian wrote:
>> Hi Hans,
>> 
>> After having updated my installation of ConTeXt, I noticed the presence of a 
>> spurious « ß » character at the top of every document, or sometimes in the 
>> footer, or in the header.
>> Also in the example below the text is typeset with bold italic, even though 
>> there is no request for it.
>> 
>> Here is a minimal example:
>>  begin bug-beta.tex
>> \definefallbackfamily[mainface][serif][palatino]
>> \definefontfamily[mainface][sans][palatino]
>> \setupbodyfont[mainface]
>> 
>> \starttext
>> 
>> Why is there a « ß » LATIN SMALL LETTER SHARP S  above?
>> 
>> Why is the text in bold italic?
>> 
>> \stoptext
>>  end bug-beta.tex
> 
> fixed
> 
> -
>  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
___

[NTG-context] Strange spurious character

2016-11-18 Thread Otared Kavian
Hi Hans,

After having updated my installation of ConTeXt, I noticed the presence of a 
spurious « ß » character at the top of every document, or sometimes in the 
footer, or in the header.
Also in the example below the text is typeset with bold italic, even though 
there is no request for it.

Here is a minimal example:
 begin bug-beta.tex
\definefallbackfamily[mainface][serif][palatino]
\definefontfamily[mainface][sans][palatino] 
\setupbodyfont[mainface]

\starttext

Why is there a « ß » LATIN SMALL LETTER SHARP S  above?

Why is the text in bold italic?

\stoptext
 end bug-beta.tex

Best regards: OK


bug-beta.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] Clickable question/answer numbers

2016-11-07 Thread Otared Kavian
Hi Dalyoung,

Yes I see what your problem might had been. Recently ConTeXt creates a fine 
named FILENAME.tuc when one typesets FILENAME.tex. This *.tuc file creates 
difficulties when the typesetting is stopped for some reason or another, 
because then at times it is impossible to typeset again the same file even if 
the error has been fixed.

Maybe we have to ask Hans whether this behavior is intended or not: in any case 
one has to remove that *.tuc file manually in order to typeset again.

Best regards: OK

> On 7 Nov 2016, at 13:19, Jeong Dal  wrote:
> 
> Dear Otared,
> 
> It is not the problem of your code. 
> Strangely, the code you just sent to me is stopped by the same reason during 
> the compilation
> even though it does not contain the word “myanswer”.
> After removing *.tmc file, the error disappear.  
> I still don’t know why such an error occurred.
> 
> Anyway, I got a nice sample which is very useful.
> 
> Thank you.
> 
> Best regards,
> 
> Dalyoung
> ___
> 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] Clickable question/answer numbers (Otared Kavian)

2016-11-06 Thread Otared Kavian
Dear Dalyoung,

I guess you are typesetting the wrong file, or you have put the last code I 
sent into a file which contains something of the previous codes…
Indeed in the last file I sent (which I am sending again at the end of this 
reply) does not contain the command \myanswer… which appears in your error 
message.

Please test the code below and let me know if you encunter a problem.

Best regards: OK
 begin interactive-question-answer.tex
 Here, following Wolfgang Schuster's ideas, 
 we define some macros allowing to couple
 Questions and Answers in an automatic way
 Upon clicking on an interactive title for Question or Answer
 one goes to the corresponding Answer or Question

\setupinteraction[state=start]

% We define two counters which follow the numbers
% appearing in Question and Answer

\newcounter\QuestionCounter
\newcounter\AnswerCounter

% We create two commands to be used in the
% enumeration environments
% Note that the check for trial typestting 
% \doifnotmode{*trialtypesetting}
% is necessary in order to avoid unwanted incrementation
\define[1]\QuestionTextCommand
  {\doifnotmode{*trialtypesetting}
 {\doglobal\increment\QuestionCounter
  \pagereference[question:\QuestionCounter]}%
   \doifreferencefoundelse{answer:\QuestionCounter}
 {\goto{#1}[answer:\QuestionCounter]}
 {#1}}

\define[1]\AnswerTextCommand
  {\doifnotmode{*trialtypesetting}
 {\doglobal\increment\AnswerCounter
  \pagereference[answer:\AnswerCounter]}%
   \doifreferencefoundelse{question:\AnswerCounter}
 {\goto{#1}[question:\AnswerCounter]}
 {#1}}

% We define here two enumeration environments for
% Questions and Answers
\defineenumeration[question]
[text=Question,
headcommand=\QuestionTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=answer]

\defineenumeration[answer]
[text=Answer,
headcommand=\AnswerTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=question]

% Each question is followed immediately by its answer.
% The answers are put in a block which will be used later
\defineblock[answer]
\hideblocks[answer]

% We define a command used after a  
% Question for which no Answer is provided
% Since the block commands 
% \beginanswer ... \endanswer
% cannot be used directly in a macro definition
% we use a trick...
% In the buffer the two counters associated to Answer
% are incremented...
\startbuffer[noanswer]
\beginanswer
\doglobal\increment\AnswerCounter
\incrementcounter[answer]
\endanswer
\stopbuffer

% ...and then the above buffer is invoked
\define\noanswer
  {\getbuffer[noanswer]}

% example of use:
\starttext
\startchapter[title=Questions]

\startquestion[q:1]
Prove that ${\rm e}\sim 2.73$ is irrational.

This is the first question, with its own reference, for later use.
\stopquestion

\beginanswer
\startanswer
This is the answer to the first question (to \in{Question}[q:1]).
\stopanswer
\endanswer

\startquestion 
This is the second question, without its own reference.
\stopquestion

\beginanswer
\startanswer[a:Test]
This is the answer to the second question. 

(Note that this answer has a reference named \type{a:Test}).
\stopanswer
\endanswer

\startquestion[q:Obvious]
This is the third question, an easy one, without a given solution.
\stopquestion

% we increment here the counters for Answer
\noanswer

\startquestion[q:2]
This is the fourth question with its own reference.
\stopquestion

\beginanswer
\startanswer
This is the answer to the fourth question: use the result of \in{Question}[q:1].
\stopanswer
\endanswer

\startquestion 
This is the fifth question, without its own reference. 

({\it Hint:} look again at \in{Question}[q:Obvious]).
\stopquestion

\beginanswer
\startanswer
This is the answer to the fifth question. Read again \in{Answer}[a:Test].
\stopanswer
\endanswer  

\stopchapter

% Here we say ownnumber=1, in order to match the prefix 
% of numbers associated to Answer
\startchapter[ownnumber=1,title=Answers and solutions]
\useblocks[answer]
\stopchapter

\stoptext
 end interactive-question-answer.tex




> On 6 Nov 2016, at 23:43, Jeong Dal  wrote:
> 
> Dear Otared,
> 
> Hi,
> I run the given  code and got an error message as following.
> 
> tex error   > tex error on line 1 in file virtual://block.answer.2: 
>  ! Undefined control sequence
> 
> l.1 \myanswer
>[Q:test]
> 
> 
> 
> Would you please tell me how to avoid such an error?
> It seems to me that you don’t have an error.
> 
> I am running minimal(beta) in OSX.
> 
> Thank you.
> 
> Best regards,
> 
> Dalyoung
> ___
> 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 /

Re: [NTG-context] Clickable question/answer numbers

2016-11-06 Thread Otared Kavian
Hi Wolfgang, Hi Mikael,

Thanks Wolfgang! I didn’t know that \beginBLOCKNAME \endBLOCKNAME cannot be 
used in other macros… There is some mystery in this for me.

Now with 
\doifnotmode{*trialtypesetting}
everything works as expected. 

Since I don’t know whether, nor where on the wiki, this can be wikified, for 
the archives and for other possible users, I copy below the entire example 
which allows to have interactive Questions and Answers. One can also easily add 
a chapter for Hints, if necessary.

Best regrads: OK

 begin interactive-question-answer.tex
 Here, following Wolfgang Schuster's ideas, 
 we define some macros allowing to couple
 Questions and Answers in an automatic way
 Upon clicking on an interactive title for Question or Answer
 one goes to the corresponding Answer or Question

\setupinteraction[state=start]

% We define two counters which follow the numbers
% appearing in Question and Answer

\newcounter\QuestionCounter
\newcounter\AnswerCounter

% We create two commands to be used in the
% enumeration environments
% Note that the check for trial typestting 
% \doifnotmode{*trialtypesetting}
% is necessary in order to avoid unwanted incrementation
\define[1]\QuestionTextCommand
  {\doifnotmode{*trialtypesetting}
 {\doglobal\increment\QuestionCounter
  \pagereference[question:\QuestionCounter]}%
   \doifreferencefoundelse{answer:\QuestionCounter}
 {\goto{#1}[answer:\QuestionCounter]}
 {#1}}

\define[1]\AnswerTextCommand
  {\doifnotmode{*trialtypesetting}
 {\doglobal\increment\AnswerCounter
  \pagereference[answer:\AnswerCounter]}%
   \doifreferencefoundelse{question:\AnswerCounter}
 {\goto{#1}[question:\AnswerCounter]}
 {#1}}

% We define here two enumeration environments for
% Questions and Answers
\defineenumeration[question]
[text=Question,
headcommand=\QuestionTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=answer]

\defineenumeration[answer]
[text=Answer,
headcommand=\AnswerTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=question]

% Each question is followed immediately by its answer.
% The answers are put in a block which will be used later
\defineblock[answer]
\hideblocks[answer]

% We define a command used after a  
% Question for which no Answer is provided
% Since the block commands 
% \beginanswer ... \endanswer
% cannot be used directly in a macro definition
% we use a trick...
% In the buffer the two counters associated to Answer
% are incremented...
\startbuffer[noanswer]
\beginanswer
\doglobal\increment\AnswerCounter
\incrementcounter[answer]
\endanswer
\stopbuffer

% ...and then the above buffer is invoked
\define\noanswer
  {\getbuffer[noanswer]}

% example of use:
\starttext
\startchapter[title=Questions]

\startquestion[q:1]
Prove that ${\rm e}\sim 2.73$ is irrational.

This is the first question, with its own reference, for later use.
\stopquestion

\beginanswer
\startanswer
This is the answer to the first question (to \in{Question}[q:1]).
\stopanswer
\endanswer

\startquestion 
This is the second question, without its own reference.
\stopquestion

\beginanswer
\startanswer[a:Test]
This is the answer to the second question. 

(Note that this answer has a reference named \type{a:Test}).
\stopanswer
\endanswer

\startquestion[q:Obvious]
This is the third question, an easy one, without a given solution.
\stopquestion

% we increment here the counters for Answer
\noanswer

\startquestion[q:2]
This is the fourth question with its own reference.
\stopquestion

\beginanswer
\startanswer
This is the answer to the fourth question: use the result of \in{question}[q:1].
\stopanswer
\endanswer

\startquestion 
This is the fifth question, without its own reference. 

({\it Hint:} look again at \in{Question}[q:Obvious]).
\stopquestion

\beginanswer
\startanswer
This is the answer to the fifth question. Read again \in{Answer}[a:Test].
\stopanswer
\endanswer  

\stopchapter

% Here we say ownnumber=1, in order to match the prefix 
% of numbers associated to Answer
\startchapter[ownnumber=1,title=Answers and solutions]
\useblocks[answer]
\stopchapter

\stoptext
 end interactive-question-answer.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] Clickable question/answer numbers

2016-11-06 Thread Otared Kavian
Hi Wolfgang,

Thanks for the solution you sent yesterday.
Your solutions solves the problem I was fighting with, but when I try to apply 
it to my real document there is an issue when some questions don’t have 
answers. This prevents the synchronization of Questions and Answers if one 
doesn't issue the commands
 
\beginanswer
\incrementcounter[answer]
\endanswer

right after a question without an answer. And when the above commands are 
issued, the last Question does not show the link to its corresponding Answer.

Below is your modified example where one can see the problem (please see the 
fifth Question in the source below).

Best regards: OK
 begin example-ws.tex

\setupinteraction[state=start]

\newcounter\QuestionCounter
\newcounter\AnswerCounter

\define[1]\QuestionTextCommand
  {\doglobal\increment\QuestionCounter
   \pagereference[question:\QuestionCounter]%
   \doifreferencefoundelse{answer:\QuestionCounter}
 {\goto{#1}[answer:\QuestionCounter]}
 {#1}}

\define[1]\AnswerTextCommand
  {\doglobal\increment\AnswerCounter
   \pagereference[answer:\AnswerCounter]%
   \doifreferencefoundelse{question:\AnswerCounter}
 {\goto{#1}[question:\AnswerCounter]}
 {#1}}

\defineenumeration[question]
[text=Question,
headcommand=\QuestionTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=answer]

\defineenumeration[answer]
[text=Answer,
headcommand=\AnswerTextCommand,
number=yes,
prefix=yes,
prefixsegments=chapter,
coupling=question]

\defineblock[answer]

%% Why this command generates an erreor?
\define\noanswer{%
\beginanswer
\incrementcounter[answer]
\endanswer}

\define\PrintCounterValues{Here \type{\QuestionCounter = }\QuestionCounter.\par
Here \type{\AnswerCounter = }\AnswerCounter.\par
Here \type{\rawcountervalue[question] = }\rawcountervalue[question].\par
Here \type{\rawcountervalue[answer] = }\rawcountervalue[answer].
}


\starttext
\startchapter[title=Questions]

\startquestion[q:1]
Prove that ${\rm e}\sim 2.73$ is irrational.

This is the first question, with its own reference, for later use.

\PrintCounterValues
\stopquestion

\beginanswer
\startanswer
This is the answer to the first question (to \in{Question}[q:1]).

\PrintCounterValues
\stopanswer
\endanswer

\startquestion 
This is the second question, without its own reference.

\PrintCounterValues
\stopquestion

\beginanswer
\startanswer[a:2]
This is the answer to the second question.

\PrintCounterValues
\stopanswer
\endanswer

\startquestion
This is the third question, an easy one, without a given solution.

\PrintCounterValues
\stopquestion

%\noanswer\ % this generates an error…
\beginanswer
%\increment\AnswerCounter
%\incrementcounter[AnswerCounter]
%\increment\QuestionCounter
%\incrementcounter[QuestionCounter]
\incrementcounter[answer]
%\incrementcounter[question]
\endanswer

\startquestion[q:2]
This is the fourth question with its own reference.

\PrintCounterValues
\stopquestion

\beginanswer
\startanswer
This is the answer to the fourth question: use the result of \in{question}[q:1].

\PrintCounterValues
\stopanswer
\endanswer

\startquestion 
This is the fifth question, without its own reference. (This Question is not 
linked to its Answer).

\PrintCounterValues
\stopquestion

\beginanswer
\startanswer
This is the answer to the fifth question. Read again \in{Answer}[a:2].

\PrintCounterValues
\stopanswer
\endanswer  

\page

\stopchapter

\startchapter[ownnumber=1,title=Answers and solutions]
\useblocks[answer]
\stopchapter

\stoptext
 end example

> On 5 Nov 2016, at 19:14, Wolfgang Schuster  
> wrote:
> 
>> Otared Kavian <mailto:ota...@gmail.com> 5. November 2016 um 18:34
>> Hi Wolfgang, Hi Mikael,
>> 
>> Thank you both for your great inputs!
>> 
>> I tried to modify the code each of you sent yesterday in order to « couple » 
>> automatically each question with its answer, using the keyword « coupling=… 
>> », but somehow I am unable to create automatic references by extracting the 
>> number of each question or that of each answer, for example by using 
>> \rawcountervalue,
>> or \currentconstructionnumber. Strangely the latter gives the name of the 
>> construction and not a number: is it on purpose?
> The \currentconstructionnumber command contains the name of the counter but 
> getting the counter value won’t help because it comes too late.
>> The solution Wolfgang proposes today, using the new keyword referenceprefix, 
>> is almost perfect: however would it possible to create a version of
>> « currentconstructionreference » which creates a reference named for instance
>> answer:NumberOfCurentConstruction
> The referenceprefix key is only usefull when you set the reference by hand.
&g

Re: [NTG-context] Clickable question/answer numbers

2016-11-05 Thread Otared Kavian
Hi Wolfgang, Hi Mikael,

Thank you both for your great inputs!

I tried to modify the code each of you sent yesterday in order to « couple » 
automatically each question with its answer, using the keyword « coupling=… », 
but somehow I am unable to create automatic references by extracting the number 
of each question or that of each answer, for example by using \rawcountervalue,
or \currentconstructionnumber. Strangely the latter gives the name of the 
construction and not a number: is it on purpose?

The solution Wolfgang proposes today, using the new keyword referenceprefix, is 
almost perfect: however would it possible to create a version of
« currentconstructionreference » which creates a reference named for instance
answer:NumberOfCurentConstruction

The reason for which I need such a construction is that in a document with 
hundreds or more exercise —> hint —> solution, it would be handy to avoid 
creating each time a manual reference, and then one would navigate from a 
Question to its Hint and then  back to the Question or go to its Answer.

Best regards: OK


> On 5 Nov 2016, at 13:38, Wolfgang Schuster  
> wrote:
> 
>> Mikael P. Sundqvist  4. November 2016 um 16:33
>> Thank you very much Wolfgang!
>> 
>> Now I can get exactly what I need, see the example below (also tested
>> with my larger document, available at
>> http://www.maths.lth.se/matematiklth/personal/mickep/analysB2ht16/analys-context.pdf
>>  
>> ).
>> 
>> I'm very happy about this solution. Also, thanks to Hans for giving us
>> this very nice tool (I usually only write to the list when I have
>> problems, sorry)!
> With the new beta you can set a default prefix for enumeration references,
> i.e. you can write \startquestion[knuth] in your document without the need
> to add a question or answer prefix.
> 
> \setupinteraction[state=start]
> 
> \define[1]\QuestionTextCommand
>   {\doifreferencefoundelse{answer:\currentconstructionreference}
>  {\goto{#1}[answer:\currentconstructionreference]}
>  {#1}}
> 
> \define[1]\AnswerTextCommand
>   {\doifreferencefoundelse{question:\currentconstructionreference}
>  {\goto{#1}[question:\currentconstructionreference]}
>  {#1}}
> 
> \defineenumeration
>   [question]
>   [text=Question,
>headcommand=\QuestionTextCommand,
>referenceprefix=question]
> 
> \defineenumeration
>   [answer]
>   [text=Answer,
>headcommand=\AnswerTextCommand,
>referenceprefix=answer]
> 
> \starttext
> 
> \startquestion[knuth]
> \input knuth
> \stopquestion
> 
> \page
> 
> \startanswer[knuth]
> \input knuth
> \stopanswer
> 
> \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
> ___

___
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] Clickable question/answer numbers

2016-11-04 Thread Otared Kavian
Hi Mikael,

Thank you for sharing the solution you found!

Your definitions suit me too, but in any case I’ll play with your code to see 
whether using the concept of « coupling » between each exercise and its 
solution (or hint, if one adds them) could allow the creation of an automatic 
interaction link between them, so that one can remove the necessity of adding 
manually a reference to each exercise and each solution.

Best regards: OK


> On 3 Nov 2016, at 16:14, Mikael P. Sundqvist  wrote:
> 
> Dear Otared (and others),
> 
> while waiting for Hans reply on the \namedenumerationparameter and
> \enumerationparameter, this is the best I could do. Now, only
> "Question" is clickable and not the number, but I think I could live
> with that if no other solution show up.
> 
> Best regards, Mikael
> 
> \usemodule[references-show]
> 
> \setupinteraction[state=start,color=,contrastcolor=,style=]
> 
> \defineblock[answer]
> \hideblocks[answer]
> 
> \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
> 
> 
> \defineenumeration[exercise][
> text=Question,
> title=yes,
> titlestyle=,
> titlecolor=black,
> headstyle={\sc},
> headcolor=darkred,
> style=,
> number=yes,
> ]
> 
> 
> 
> \def\startquestion{\dodoubleempty\dostartquestion}
> 
> \long\def\dostartquestion[#1][#2]#3\stopquestion{%
>  \iffirstargument
>\setupenumeration[exercise][text={\goto{Question}[A:#1]}]
>\ifsecondargument
>  \startexercise[#1]{#2}
>\else
>  \startexercise[#1]
>\fi
>  \else
>\setupenumeration[exercise][text=Question]
>\startexercise
>  \fi
>  #3
> }
> 
> \def\stopquestion{\stopexercise}
> 
> 
> \starttext
> 
> \section{A section with questions}
> 
> \startquestion[Q:test][This is a title]
> This is a question with title.
> \stopquestion
> 
> \beginanswer
> \myanswer[Q:test]
> This is an answer
> \endanswer
> 
> \startquestion[Q:test2]
> This is a question without title.
> \startformula
> (a+b)^2=a^2+ab+ba+b^2.
> \stopformula
> \stopquestion
> 
> \beginanswer
> \myanswer[Q:test2]
> This is an answer.
> \endanswer
> 
> 
> \startquestion
> This is a question without reference. It cannot have any answer.
> \stopquestion
> 
> 
> \page[yes]
> 
> \subject{Answers}
> 
> \useblocks[answer]
> 
> \stoptext
> 
> On Thu, Nov 3, 2016 at 12:58 PM, Mikael P. Sundqvist  wrote:
>> Dear Hans,
>> 
>> This seems to be exactly what I need, but I cannot get it to work.
>> With the example below nothing comes from those
>> commands (I just updated my standalone to the latest one). On the
>> other hand, with text instead of reference it works.
>> 
>> Best regards, Mikael
>> 
>> \defineenumeration[question][
>> text=Question,
>> ]
>> 
>> \starttext
>> \startquestion[test]
>> This question has reference
>> \namedenumerationparameter{question}{reference} which could also
>> be achieved via \enumerationparameter{reference}. On the other hand,
>> \namedenumerationparameter{question}{text}
>> gives Question as assumed.
>> \stopquestion
>> 
>> \startquestion[reference=test2]
>> This question has reference
>> \namedenumerationparameter{question}{reference} which could also
>> be achieved via \enumerationparameter{reference}. On the other hand,
>> \namedenumerationparameter{question}{text}
>> gives Question as assumed.
>> \stopquestion
>> \stoptext
>> 
>> On Thu, Nov 3, 2016 at 10:34 AM, Hans Hagen  wrote:
>>> On 11/2/2016 9:58 PM, Mikael P. Sundqvist wrote:
>>>> 
>>>> Dear Otared,
>>>> 
>>>> thank you again. This is somehow a proof that it should work. In my
>>>> real document I use the title to name some exercises (after old
>>>> exams), and I don't see how that can be combined with your solution.
>>>> 
>>>> If someone else reads this: I think the question boils down to the
>>>> following:
>>>> 
>>>> \startquestion[Q:test]
>>>> How can I here automatically get access to to the string "Q:test"?
>>>> \stopquestion
>>> 
>>> 
>>> it depends what automatically means
>>> 
>>> \enumerationparameter{reference}
>>> 
>>> or
>>> 
>>> \namedenumerationparameter{question}{reference}
>>> 
>>> 
>>>> Best regards, Mikael
>>>> 
>>>> On Wed, Nov 2, 2016 at 9:04 PM, Otared Kavian  wrote:
>>>>> 
>>>>> Hi Mikael,
>>>>>

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Otared Kavian
Hi Mikael,

A partial solution to the feature we are discussing is contained in the example 
below, but somone more aware of ConTeXtish coding might improve it.
It is not satisfactory in that one has to define twice \startquestion and 
\StartQuestion, \beginanswer and \BeginAnswer, and more importantly one cannot 
generate automatically the references (I tried \getnumber[question] and such to 
append to Q:\getnumber[question] for instance, but something does not work…).

Le me know if you find a satisfactory solution…

Best regards: OK
%%% begin interactive-question-answer.tex
\setupinteraction[state=start,color=,contrastcolor=,style=]

\defineblock[answer]
\hideblocks[answer]

\def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}

\define[1]\AnswerToQuestion{Question \goto{(see Solution)}[A:Q:#1]}

\define[1]\StartQuestion{\startquestion[reference=Q:#1,title={\AnswerToQuestion{#1}}]}

\define[1]\BeginAnswer{\beginanswer\myanswer[Q:#1]}

\defineenumeration[question][
text=, %Question,
headcolor=darkred,
title=yes,
titleleft=,
titleright={.},
width=fit,
number=yes,
prefix=yes,
prefixsegments=section,
]

\starttext

\section{A section with questions}

\StartQuestion{test}

Prove that $(a +b)^2 = a^2 + 2ab + b^2$ for all $a,b\in{\Bbb R}$.

\BeginAnswer{test}

Indeed $(a+b)^2 = (a+b)(a+b) = a^2 + ab + ba +b^2 = a^2 + 2ab +b^2$ since 
$ba=ba$.
\endanswer

\stopquestion

\page[yes]

\startsection[title={Answers to all questions}]

\useblocks[answer]

\stopsection
\stoptext
%%% end interactive-question-answer.tex

> On 2 Nov 2016, at 16:16, Mikael P. Sundqvist  wrote:
> 
> Dear Otared (and list),
> 
> thank you for your reply and support.
> 
> The links from the answers to the questions work as wanted with my
> solution, it is the links from the questions to the answers that do
> not.
> 
> I guess I need something like
> 
> headcommand={\in{Question}[A:###]},
> 
> where ### is the reference tag I set. But I don't know what to change
> the ### into (or if that would work).
> 
> Best regards, Mikael
> 
> On Wed, Nov 2, 2016 at 1:52 PM, Otared Kavian  wrote:
>> Hi Mikael,
>> 
>> I had a similar question some time ago, but I wanted to add a sort of 
>> automatic referencing of questions and answers (and interaction going from 
>> questions to answers and back).
>> 
>> If you accept the hurdle of adding manual references, in your case you can 
>> add (for instance…)
>> 
>>\goto{:-)}[Q:test]
>> 
>> to the end of your answer to go back to the respective question. But when 
>> you have several dozens of such references to add manually, it is not a good 
>> idea.
>> 
>> However I could not find a way to code the items (that is the questions) in 
>> such a way that each adds automatically a unique reference, and so I am 
>> interested too in the solution of the problem you mention.
>> 
>> Best regards: OK
>> 
>> 
>>> On 2 Nov 2016, at 12:43, Mikael P. Sundqvist  wrote:
>>> 
>>> Dear list,
>>> 
>>> I have a pretty large text with a lot of questions and answers, and
>>> want the user(students) to be able to click in the pdf to go from a
>>> certain exercise to its answer, and back. I have a solution (see
>>> below) to go from answers to questions, but not the other way around.
>>> I simply have no idea on how to make the red text (in the head) in the
>>> example question clickable with the answer on the next page as target.
>>> As you can see, the answer has a tag A:Q:test (I want to set these
>>> automatically in that manner), and clicking the green text I get to
>>> the correct place. I just don't see how to make the "Question 1.1"
>>> clickable with that target.
>>> 
>>> I hope I make myself clear. If it matters, in the solution one could
>>> assume that the optional tag of the \startquestion \stopquestion is
>>> given for all questions.
>>> 
>>> Best regards, Mikael
>>> 
>>> %% qa.tex
>>> \setupinteraction[state=start,color=,contrastcolor=,style=]
>>> 
>>> \defineblock[answer]
>>> \hideblocks[answer]
>>> 
>>> \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
>>> 
>>> \defineenumeration[question][
>>> text=Question,
>>> headcolor=darkred,
>>> width=fit,
>>> number=yes,
>>> prefix=yes,
>>> prefixsegments=section,
>>> ]
>>> 
>>> \starttext
>>> 
>>> \section{A section with questions}
>>> 
>>> \startquestion[Q:test]
>>

Re: [NTG-context] Clickable question/answer numbers

2016-11-02 Thread Otared Kavian
Hi Mikael,

I had a similar question some time ago, but I wanted to add a sort of automatic 
referencing of questions and answers (and interaction going from questions to 
answers and back). 

If you accept the hurdle of adding manual references, in your case you can add 
(for instance…)

\goto{:-)}[Q:test]

to the end of your answer to go back to the respective question. But when you 
have several dozens of such references to add manually, it is not a good idea.

However I could not find a way to code the items (that is the questions) in 
such a way that each adds automatically a unique reference, and so I am 
interested too in the solution of the problem you mention.

Best regards: OK


> On 2 Nov 2016, at 12:43, Mikael P. Sundqvist  wrote:
> 
> Dear list,
> 
> I have a pretty large text with a lot of questions and answers, and
> want the user(students) to be able to click in the pdf to go from a
> certain exercise to its answer, and back. I have a solution (see
> below) to go from answers to questions, but not the other way around.
> I simply have no idea on how to make the red text (in the head) in the
> example question clickable with the answer on the next page as target.
> As you can see, the answer has a tag A:Q:test (I want to set these
> automatically in that manner), and clicking the green text I get to
> the correct place. I just don't see how to make the "Question 1.1"
> clickable with that target.
> 
> I hope I make myself clear. If it matters, in the solution one could
> assume that the optional tag of the \startquestion \stopquestion is
> given for all questions.
> 
> Best regards, Mikael
> 
> %% qa.tex
> \setupinteraction[state=start,color=,contrastcolor=,style=]
> 
> \defineblock[answer]
> \hideblocks[answer]
> 
> \def\myanswer[#1]{\inleft{\in[#1]\reference[A:#1]{\in[#1]}}}
> 
> \defineenumeration[question][
> text=Question,
> headcolor=darkred,
> width=fit,
> number=yes,
> prefix=yes,
> prefixsegments=section,
> ]
> 
> \starttext
> 
> \section{A section with questions}
> 
> \startquestion[Q:test]
> Solve this question!
> \stopquestion
> 
> We could, however, click \color[darkyellow]{\in{Answer}[A:Q:test]}.
> 
> \beginanswer
> \myanswer[Q:test]
> What question? The answer is \quotation{do it yourself}!
> \endanswer
> 
> \page[yes]
> 
> \subject{Answers}
> 
> \useblocks[answer]
> 
> \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
___

Re: [NTG-context] avoid newline after definestartstop

2016-10-24 Thread Otared Kavian
Hi Michael,

Maybe what Wolfgang meant by « putting the marks by hand » is something like: 
you define \StartCitation and \StopCitation in the following way:

% begin quotation-note.tex

\define\StartCitation{\startnarrower[left,right]«~}
\define[1]\StopCitation{~»\footnote{#1}\stopnarrower}

\starttext
\input tufte
\StartCitation
 \input knuth
\StopCitation{This is a Quote of Donald Knuth}
\stoptext
% end quotation-note.tex

Indeed instead of the quotation marks « and » you can put whatever you wish.
If you have quotations without footnotes, then you may define another 
start-stop.

Best regards: OK

> On 24 Oct 2016, at 12:42, Michael Eidenbenz  wrote:
> 
> hello,
> 
> I found this old mail below, that is related to my problem.
> is there still no workaround for this problem?
> putting a (foot)note after a quotation mark is quite common and I don't want 
> to put the marks by hand.
> 
> i was looking at spac-hor.mkiv and tried setupnarrower[after=]. 
> but this did not work.
> 
> any help is appreciated
> 
> thanks michael
> 
> 
>> Am 21.08.2014 um 23:42 schrieb Gerben Wierda > >:
>> 
>>> Is it possible to use \startquotation..\stopquotation and have an endnote 
>>> number follow the closing ''? If the \endnote is before \stopquotation, it 
>>> ends up inside the '' character at the end. If it is after \stopquotation, 
>>> it 
>>> becomes the beginning of the next paragraph.
>> 
>> 
>> AFAIK this is only possible when you place the quotation marks by hand.
>> 
>> Wolfgang
> 
> 
> 
>> 
>> On 20 Oct 2016, at 11:13, Michael Eidenbenz > > wrote:
>> 
>> hello,
>> 
>> how can I put the footnote number right after the quotationmarks without 
>> having a newline?
>> dontleavehmode does not work.
>> 
>> thanks michael
>> 
>> 
>> 
>> 
>> \definestartstop[Citation]
>>[before={\startnarrower[left,right]\startquotation},
>> after={\stopquotation\stopnarrower\dontleavehmode}]
>> 
>> \starttext
>> \input tufte
>> \startCitation
>>  \input knuth
>> \stopCitation
>> \footnote{This is a Quote of Donald Knuth}
>> \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] Footnotes in footnotes

2016-10-16 Thread Otared Kavian
Hi Jose Luis,

Indeed the example you sent does not work as expected, but as far as I remember 
for nested footnotes one can use the following construction (I found this 
exmaple in my archives…):

 begin nested-footnotes.tex
\starttext

This\footnote{Or that\note[footB], if you prefer.}%
\footnotetext[footB]{Or possibly even the other\note[footC].}%
\footnotetext[footC]{It could be something entirely different.}
is a sentence with nested footnotes.

\stoptext
 end nested-footnotes.tex

Best regards: OK

> On 31 Aug 2016, at 22:39, Jose Luis Arellano  wrote:
> 
> Dear list,
> I want to report a possible bug (I think), when one try to put a footnote 
> into another footnote, here is MWE (from wiki):
> 
> \starttext
> This\footnote{Or that\footnote{Or possibly even the other.}, if you prefer.} 
> is a sentence with a footnote.
> \stoptext
> 
> As you can see, the second footnote is not placed in the page.
> 
> Thanks.
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] position of linenumbering

2016-10-12 Thread Otared Kavian
Hi Thomas,

It seems that if you use \setuplinenumbering the issue is fixed: please have a 
look here:

\setuppapersize [A6]
\setuplinenumbering[location=text,distance=0.5cm]
\starttext

\startlinenumbering 

\dorecurse{2}{\input tufte}

\stoplinenumbering

dummy

\stoptext

Best regards: OK


> On 12 Oct 2016, at 15:38, Thomas A. Schmitz  
> wrote:
> 
> Hi all,
> 
> consider this example:
> 
> \setuppapersize [A6]
> 
> \starttext
> 
> \startlinenumbering [location=text,distance=0.5cm]
> 
> \dorecurse{2}{\input tufte}
> 
> \stoplinenumbering
> 
> dummy
> 
> \stoptext
> 
> on the second page, the position of the linenumbering changes and does not 
> follow the "distance" setting. Can this be fixed? And if yes, how?
> 
> Thanks and best wishes
> 
> 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  : http://foundry.supelec.fr/projects/contextrev/
> 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Paranormal bug in TL 2016

2016-10-11 Thread Otared Kavian
On 11 Oct 2016, at 15:58, Henri Menke  wrote:
>> […]
> 
> I have to correct myself, it just looked like it worked.  It didn't generate 
> the PDF due to
> 
> Fatal Error > Your format does not match the base files!
> 
> The search continues.

Hi Henri,

The error is indeed extremely bizarre, and maybe funny, but if you want just to 
find a temporary solution in order to finish your project, it seems that adding 
a special word (or maybe something else…) allows the typesetting of your file. 

I tried the following modification of your sample with ConTeXt  ver: 2016.05.17 
19:20 (and LuaTeX Version 0.95.0) from TeX Live 2016.
The file name is bizarre-error.tex (if there no hyphen in the file name 
everything is allright).
It compiles both with the latest beta in standalone ConTeXt, as well as with 
the stable one from TeXLive 2016.

It is important to have a blank line before the line containing «  
\phantom{Junior} ».
If I remove the line «  \phantom{Junior} » then the file does not compile with 
the version of ConTeXt from TeXLive… (but it does with the latest beta)
If I replace it with the word « Junior », again it compiles fine. 
However if I replace that line with «  \phantom{Bizarre} » or even the word « 
Bizarre », the file does not compile :-)
But if your replace it with « Bizarre \phantom{Junior} » or with « 
\phantom{Bizarre} \phantom{Junior} » it compiles again…

All this seems funny to me, but I understand that it might stress you!

Best regards: OK

% begin bizarre-error.tex
\version[temporary]

\setbreakpoints[compound]

\setuppagenumbering[alternative=doublesided]

\starttext

\startstandardmakeup
\stopstandardmakeup

{\em Detailtypografie} by Friedrich Frossman 

\phantom{Junior}

\stoptext
% end bizarre-error.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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Underlining formulas and units

2016-10-06 Thread Otared Kavian
Hi,

Maybe you should use rather

$\underbar{F_C=\unit{1e2 newton}}$ or \underbar{\unit{1e2 newton}}

since otherwise \underbar considers each character in the math formula as a 
word, which should be underlined separately.

Best regards: OK


> On 5 Oct 2016, at 22:01, Florian Leupold  wrote:
> 
> Dear list,
> 
> underbar behaves weirdly when it comes to indexes, exponents, and units:
> 
> \starttext
> \underbar{$F_C=\unit{1e2 newton}$} or \underbar{\unit{1e2 newton}}
> \stoptext
> 
> Am I doing something wrong? Is there maybe a setting to correct for this?
> 
> Thanks,
> Florian
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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

Re: [NTG-context] Recommendations on presentations

2016-10-05 Thread Otared Kavian
Hi,

I use also MacOS and all my presentations are made with ConTeXt. The easiest 
thing to do is to take examples from simpleslides, or from the examples by Hans 
in the folder

tex/texmf-context/tex/context/modules/common

of the standalone tree, and then adapt them to your needs and your taste.

Best regards: OK

> On 5 Oct 2016, at 07:58, Jan U. Hasecke  wrote:
> 
> Hi all,
> 
> Keynote is the only software that ties me to MacOS X. I would like to
> copy some of its presentations styles to ConTeXt (MKIV).
> 
> What is the best way to do this?
> 
> I read about simpleslides and looked into the code but I am unsure
> whether I start from a simpleslides example.
> 
> Is it better to simply define the layout from scratch?
> 
> juh
> 
> 
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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

Re: [NTG-context] prevent indent after usage of defined itemgroup

2016-10-03 Thread Otared Kavian
Hi Mikael,

I didn’t know the difference between \noindent and \noindentation… It reminds 
me of the subtle difference between \quote and \quotation, but I cannot tell 
you why there is such a difference.

Regarding the issue with the integral sign being too close to the line of text, 
since you are using \displaystyle in an inline math formula, I think the 
easiest solution is to add \blank[big] at the lines where such issues appear, 
or to change the amout of \blank in the « after= » key by saying for instance

after={\blank[2*medium]\noindentation},

Best regards: OK

> On 3 Oct 2016, at 17:01, Mikael P. Sundqvist  wrote:
> 
> On Mon, Oct 3, 2016 at 2:45 PM, Mikael P. Sundqvist  wrote:
>> On Mon, Oct 3, 2016 at 2:40 PM, Otared Kavian  wrote:
>>> Hi Mikael,
>>> 
>>> I don’t feel you ask weird questions at all… As far as I am concerned, when 
>>> I cannot help answer a question I don’t reply, but usually I test what you 
>>> send.
>>> 
>>> Regarding what you are mentionning, it seems that the following works fine 
>>> to achieve what you want, but I don’t know why the indentnext keyword does 
>>> have any effect.
>>> 
>>> Best regards: OK
>>>  Test file
>>> \setupindenting[yes,medium]
>>> 
>>> \defineitemgroup[abc]
>>> \setupitemgroup[abc][each][a,columns,three]
>>>[stopper=,
>>>right=),
>>>margin=0pt,
>>>before={\blank[big]},
>>>after={\blank[big]\noindent}, % here is the change
>>>inbetween={\blank[medium]}]
>>> 
>>> \starttext
>>> \input knuth.tex
>>> \startabc
>>> \startitem First \stopitem
>>> \startitem Second \stopitem
>>> \startitem Third \stopitem
>>> \stopabc
>>> This text should not be indented. \input ward.tex
>>> 
>>> 
>>> \stoptext
>>> %%% End test file
>>> 
>>>> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist  wrote:
>>>> 
>>>> Dear list,
>>>> 
>>>> I don't know if I ask weird questions or if people are just occupied.
>>>> If I break some rule, please tell me... Anyways, here is another one:
>>>> 
>>>> It seems that the indentnext is ignored below. The resulting pdf is
>>>> attached. I use a rather updated ConTeXt standalone.
>>>> 
>>>> %%% Test file
>>>> \setupindenting[yes,medium]
>>>> 
>>>> \defineitemgroup[abc]
>>>> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
>>>> 
>>>> \starttext
>>>> \startabc
>>>> \startitem First \stopitem
>>>> \startitem Second \stopitem
>>>> \startitem Third \stopitem
>>>> \stopabc
>>>> This text should not be indented.
>>>> \stoptext
>>>> %%% End test file
>>>> 
>>>> /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://tex.aanhet.net
>>>> archive  : http://foundry.supelec.fr/projects/contextrev/
>>>> 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://tex.aanhet.net
>>> archive  : http://foundry.supelec.fr/projects/contextrev/
>>> wiki : http://contextgarden.net
>>> ___
>> 
>> Many thanks, Otared. Your solution indeed works.
>> 
>> Best regards, Mikael
> 
> just a note and a small follow-up question. The \noindent implied a
> problem if the \startabc \stopabc was inside another itemize (which it
> usually is, since it is a) b) c) exercises), since then the space
> specified in after= in both environments added up. The solution was 

Re: [NTG-context] prevent indent after usage of defined itemgroup

2016-10-03 Thread Otared Kavian
Hi Mikael,

I don’t feel you ask weird questions at all… As far as I am concerned, when I 
cannot help answer a question I don’t reply, but usually I test what you send.

Regarding what you are mentionning, it seems that the following works fine to 
achieve what you want, but I don’t know why the indentnext keyword does have 
any effect.

Best regards: OK
 Test file
\setupindenting[yes,medium]

\defineitemgroup[abc]
\setupitemgroup[abc][each][a,columns,three]
[stopper=,
right=),
margin=0pt,
before={\blank[big]},
after={\blank[big]\noindent}, % here is the change
inbetween={\blank[medium]}]

\starttext
\input knuth.tex
\startabc
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\stopabc
This text should not be indented. \input ward.tex


\stoptext
%%% End test file

> On 3 Oct 2016, at 14:18, Mikael P. Sundqvist  wrote:
> 
> Dear list,
> 
> I don't know if I ask weird questions or if people are just occupied.
> If I break some rule, please tell me... Anyways, here is another one:
> 
> It seems that the indentnext is ignored below. The resulting pdf is
> attached. I use a rather updated ConTeXt standalone.
> 
> %%% Test file
> \setupindenting[yes,medium]
> 
> \defineitemgroup[abc]
> \setupitemgroup[abc][each][a,columns,three][stopper=,right=),margin=0pt,before={\blank[big]},after={\blank[big]},inbetween={\blank[medium]},indentnext=no]
> 
> \starttext
> \startabc
> \startitem First \stopitem
> \startitem Second \stopitem
> \startitem Third \stopitem
> \stopabc
> This text should not be indented.
> \stoptext
> %%% End test file
> 
> /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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Columnset and footnotes

2016-09-21 Thread Otared Kavian
Hi,

Indeed it seems that there is a bug with \columnset. However the separation 
rule for the footnotes is shown if one uses \startcolumns, as can be seen with 
the following example.

Best regards: OK
%%% begin column-footnote.tex
\definecolumnset[n2][n=2,balance=yes]
\setupfootnotes[location=page]
\starttext
\startcolumnset[n2]
Footnote \footnote[foo]{This is a footnote.} \input linden
\stopcolumnset

\page 
\startcolumns[n=2,rule=on]
\input knuth.tex
\par
\input knuth.tex
This is a footnote\footnote {\input ward}
\stopcolumns
\stoptext
%%% end column-footnote.tex

> On 22 Sep 2016, at 05:22, Jose Luis Arellano  wrote:
> 
> Dear list.
> When i write a footnote in my document (two columns), ConTeXt do not
> draw the hrule above the footnote.
> What is the problem?
> 
> \definecolumnset[n2][n=2,balance=yes]
> \starttext
> \startcolumnset[n2]
> Footnote \footnote[foo]{This is a footnote.} \input linden
> \stopcolumnset
> \stoptext
> 
> Thanks
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

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

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

Re: [NTG-context] Nested itemize horizontal/column problem

2016-09-19 Thread Otared Kavian
Hi Mikael,

The explanation and the solution given by Henri works fine here. The code below 
gives the attached PDF (with ConTeXt 2016.09.12 18:27 MKIV beta). The point is 
that an empty \item does not allow to begin a new level of itemization. 

Best regards: OK
%%% begin
\starttext
\startitemize[n]
\item \blank[-line]
\startitemize[a,horizontal,two]
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\startitem Fourth \stopitem
\stopitemize
\item % Here with a blank line
\blank[small]
\startitemize[a,horizontal,two]
\startitem First \stopitem
\startitem Second \stopitem
\startitem Third \stopitem
\startitem Fourth \stopitem
\stopitemize
\item On the outer level

\stopitemize
\stoptext
%%% end



itemize-horizontal.pdf
Description: Adobe PDF document


> On 19 Sep 2016, at 13:27, Mikael P. Sundqvist  wrote:
> 
> On Sun, Sep 18, 2016 at 9:56 PM, Henri Menke  wrote:
>> You can start itemize only in vertical mode.  To switch to vertical mode use 
>> \blank.  To kill the empty line which is inserted use \blank[-line].
>> 
>> \starttext
>> \startitemize[n]
>> \item \blank[-line]
>> \startitemize[a,horizontal,three]
>> \startitem First \stopitem
>> \startitem Second \stopitem
>> \startitem Third \stopitem
>> \startitem Fourth \stopitem
>> \stopitemize
>> \item On the outer level
>> \stopitemize
>> \stoptext
>> 
>> On 09/18/2016 10:54 AM, Mikael P. Sundqvist wrote:
>>> Hi
>>> 
>>> 1) the following code
>>> 
>>> \starttext
>>> \startitemize[n]
>>> \item
>>> \startitemize[a,horizontal,three]
>>> \startitem First \stopitem
>>> \startitem Second \stopitem
>>> \startitem Third \stopitem
>>> \startitem Fourth \stopitem
>>> \stopitemize
>>> \item On the outer level
>>> \stopitemize
>>> \stoptext
>>> 
>>> generates the error
>>> 
>>> tex error   > tex error on line 9 in file
>>> /home/mickep/tmp/ctx-listexample14.tex: ! You can't use `\prevdepth'
>>> in restricted horizontal mode
>>> 
>>> Isn't it possible to have nested itemize with key horizontal?
>>> 
>>> 2) If I change the horizontal key to columns, then there is an extra
>>> line (the extra line in nested itemization has been discussed before,
>>> but not with these keys given, as far as I could see). I.e. the file
>>> 
>>> \starttext
>>> \startitemize[n]
>>> \item
>>> \startitemize[a,columns,three]
>>> \startitem First \stopitem
>>> \startitem Second \stopitem
>>> \startitem Third \stopitem
>>> \startitem Fourth \stopitem
>>> \stopitemize
>>> \item On the outer level
>>> \stopitemize
>>> \stoptext
>>> 
>>> gives the attached pdf file, where I would have exptected the first a.
>>> in the inner itemize to be on the same line as the 1. in the outer
>>> itemize.
>>> 
>>> Anyone has an idea on what is going on here?
>>> 
>>> Best regards, 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://tex.aanhet.net
>>> archive  : http://foundry.supelec.fr/projects/contextrev/
>>> 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://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
> 
> 
> Thank you Henri, that works, and I can live with adding \blank[-line]
> in these cases.
> 
> I still wonder if there is an automatic way, since it seems to only
> happen when one has the inner itemize in columns. For example, with
> 
> \starttext
> \startitemize[n]
> \item
> \startitemize[a]
> \startitem First \stopitem
> \startitem Second \stopitem
> \startitem Third \stopitem
> \startitem Fourth \stopitem
> \stopitemize
> \item On the outer level
> \stopitemize
> \stoptext
> 
> there is no extra line (result is attached).
> 
> /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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___

___
If your question is of

Re: [NTG-context] Simpleslides presentation: list of topics

2016-09-15 Thread Otared Kavian
Hi Thomas,

A topic for me is just the title of a section (or chapter): in a presentation 
it happens that one has a few of them, and in my case certainly less than ten. 
It is useful to be able to go back to the list of these topics and jump to one 
of them. But you are right, usually a presentation is in principle linear.

Actually what I wanted to do was just to put a list of my topics on one page 
(and this can be done easily), and then what is lacking at the moment is a link 
to jump to that page from any other slide.
For the latter aspect, I think I can cook up a (non optimal) solution for now.

I understand that what I am looking for, may not be justified in most cases, 
and thus I do not at all suggest that you should modify anything in the 
simpleslides module… The idea of your module is to remain simple, and simple is 
beautiful!


Thanks again for your attention and your remarks.
Best regards: OK

> On 15 Sep 2016, at 22:30, Thomas A. Schmitz  
> wrote:
> 
> On 15.09.2016 12:11, Otared Kavian wrote:
>> Hi Thomas,
>> 
>> Thanks for your quick answer. Actually, mistakenly, I thought you had gave 
>> up the simplesildes module, not Aditya… And I included Wolfgang because he 
>> follows everything and has insight for everything…
>> 
>> Anyhow, thank you for sharing this nice module. Actually sometimes it is 
>> useful to have the interaction and some links working in a presentation, at 
>> least in maths. Imagine a case in which you introduce an equation and later 
>> on you refer to it and someone asks to show it again.
>> Also it is handy to have a list of topics because this way one can go back 
>> easily to the page where the list is and go quickly to such and such topic. 
>> Moreover it happens that one can prepare a topic but not show it unless 
>> there is a specific demand.
>> 
>> Now, from an esthetic point of view for the swoosh, it is not obvious where 
>> to put the list, but when there are only a few topics (as is usually the 
>> case) then one can find an appropriate setting of the list.
>> Another solution would be to have the nice visual counter to be interactive 
>> and so clicking on a certain number would go to the wanted topic.
>> 
>> In any case thanks again!
>> Best regards: OK
> 
> Hi Otared,
> 
> I think you're best off following Aditya's suggestion. Excuse me for saying 
> that I still don't find your use case quite compelling and would be very 
> reluctant to introduce a change in design which rests on so many ifs (if 
> there are only few topics and if interaction is desired...). Moreover, I'm 
> not quite certain what you're looking for: a special slide that will hold 
> some sort of TOC? Or a list of topics that will be displayed on every slide 
> (as in s-pre-19, provided in the distribution)? What is a "topic": every 
> slide title? Or a sort of section that will encompass several slides?
> 
> As for the counter: that may be possible, but is far beyond my coding 
> ability. There is an interactionmenu which is part of the distribution (see 
> scrn-but.mkvi); maybe it would be easier if you used this rather than the 
> counters provided by simpleslides.
> 
> All best
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Simpleslides presentation: list of topics

2016-09-15 Thread Otared Kavian
Hi Aditya,

I’ll have a look at the examples you are mentionning: thanks for sharing.

As I said in another message, for now I can use the simpleslides module, which 
is already full of features for me.

Best regards: OK

> On 15 Sep 2016, at 17:05, Aditya Mahajan  wrote:
> 
> On Thu, 15 Sep 2016, Otared Kavian wrote:
> 
>> Hi Thomas,
>> 
>> Thanks for your quick answer. Actually, mistakenly, I thought you had gave 
>> up the simplesildes module, not Aditya… And I included Wolfgang because he 
>> follows everything and has insight for everything…
>> 
>> Anyhow, thank you for sharing this nice module. Actually sometimes it is 
>> useful to have the interaction and some links working in a presentation, at 
>> least in maths. Imagine a case in which you introduce an equation and later 
>> on you refer to it and someone asks to show it again. Also it is handy to 
>> have a list of topics because this way one can go back easily to the page 
>> where the list is and go quickly to such and such topic. Moreover it happens 
>> that one can prepare a topic but not show it unless there is a specific 
>> demand.
>> 
>> Now, from an esthetic point of view for the swoosh, it is not obvious where 
>> to put the list, but when there are only a few topics (as is usually the 
>> case) then one can find an appropriate setting of the list.
>> Another solution would be to have the nice visual counter to be interactive 
>> and so clicking on a certain number would go to the wanted topic.
> 
> I use my unreleased overview module to place a visual ToC at the end:
> https://randomdeterminism.wordpress.com/2014/01/01/announcing-the-overview-module/
> 
> There have been some changes in the module since that blog post; the most 
> up-to-date code is at github: https://github.com/adityam/context-overviewpage
> 
> I use this in two ways: Either in the conclusions as in the 2nd last slide at 
> http://www.ece.mcgill.ca/~amahaj1/projects/real-time/slides/2016-wiopt.pdf
> 
> or as a visual ToC as in the last slide at
> http://www.ece.mcgill.ca/~amahaj1/talks/rutgers-2015.pdf
> 
> There is very little documentation, but if you are interested I can write 
> some notes on how to use the module.
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Simpleslides presentation: list of topics

2016-09-15 Thread Otared Kavian
Hi Aditya and Thomas,

Thanks to both of your for your attention to my bizarre request.
Actually it is quite easy to have a page a list of the topics on a page, as one 
can see in the following example (please see below). Tne only thing I am 
lacking write now, is a trick to go the list of topics from any page, without 
adding manually a link to that page on each slide.

Another question: I am not at all familiar with the code you have written for 
the nice visual counter used in simpleslides module. Would it be possible to 
add interactivity to each portion of that visual counter, in such that upon 
clicking on that portion one jumps to the corresponding page?

Best regards: OK
%%% begin example-swoosh-topics.tex
\usemodule[simpleslides]
[style=swoosh]

\setupinteraction[state=start]

\definelist[ListOfTopics]
\setuplist[ListOfTopics][alternative=f]

\define[1]\Topic{%
\SlideTitle{#1}
\unexpanded\define\TopicTitle{#1}
\writetolist[ListOfTopics]{}{#1}
}
\define\Slide{\SlideTitle{\TopicTitle}}

\define[1]\placeListOfTopics{%
\SlideTitle{#1}
\startalignment[middle]
\completelist[ListOfTopics]
\stopalignment}

\setupTitle
  [ title={Title of the presentation},
   author={Name of authors},
 date={Date of presentation},
  ]

\starttext
\placeTitle

\placeListOfTopics{Today's talk}

\Topic{First topic}
We introduce here our first topic: to find a solution to\dots

\Slide

The first slide.

Write whatever you want.

\Slide

The second slide.

Continue writing.

\Topic{Second topic}
We introduce here our second topic: to find another solution to\dots

\Slide

The first slide.

Write whatever you want.

\Slide

The second slide.

Continue writing.

\stoptext
%%% end example-swoosh-topics.tex

> On 15 Sep 2016, at 17:05, Aditya Mahajan  wrote:
> 
> On Thu, 15 Sep 2016, Otared Kavian wrote:
> 
>> Hi Thomas,
>> 
>> Thanks for your quick answer. Actually, mistakenly, I thought you had gave 
>> up the simplesildes module, not Aditya… And I included Wolfgang because he 
>> follows everything and has insight for everything…
>> 
>> Anyhow, thank you for sharing this nice module. Actually sometimes it is 
>> useful to have the interaction and some links working in a presentation, at 
>> least in maths. Imagine a case in which you introduce an equation and later 
>> on you refer to it and someone asks to show it again. Also it is handy to 
>> have a list of topics because this way one can go back easily to the page 
>> where the list is and go quickly to such and such topic. Moreover it happens 
>> that one can prepare a topic but not show it unless there is a specific 
>> demand.
>> 
>> Now, from an esthetic point of view for the swoosh, it is not obvious where 
>> to put the list, but when there are only a few topics (as is usually the 
>> case) then one can find an appropriate setting of the list.
>> Another solution would be to have the nice visual counter to be interactive 
>> and so clicking on a certain number would go to the wanted topic.
> 
> I use my unreleased overview module to place a visual ToC at the end:
> https://randomdeterminism.wordpress.com/2014/01/01/announcing-the-overview-module/
> 
> There have been some changes in the module since that blog post; the most 
> up-to-date code is at github: https://github.com/adityam/context-overviewpage
> 
> I use this in two ways: Either in the conclusions as in the 2nd last slide at 
> http://www.ece.mcgill.ca/~amahaj1/projects/real-time/slides/2016-wiopt.pdf
> 
> or as a visual ToC as in the last slide at
> http://www.ece.mcgill.ca/~amahaj1/talks/rutgers-2015.pdf
> 
> There is very little documentation, but if you are interested I can write 
> some notes on how to use the module.
> 
> 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://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> 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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

<    1   2   3   4   5   6   7   8   9   10   >