Re: [NTG-context] Converting from LaTeX for PDF accessibility tagging?

2020-06-28 Thread Aditya Mahajan

On Sun, 28 Jun 2020, Alasdair McAndrew wrote:


I tried ConTeXt a few years ago, then gave up on it because of its
wordiness and verbosity.  The 2006 article on creating AMSTeX output in
ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: the
LaTeX commands are small and neat; the ConTeXt commands are not.


As explained in the last paragraph, there are pre-built shortcuts for the main 
alignments and you can define your own to match amsmath style, if you wish.

If you are worried about typing, look into tab completion for your editor of choice. For 
example, in vim, I can do `for` which expands to `\startformula ... 
\stopformula` and `fora` expands to `\startformula \startalign ... \stopalign 
\stopformula`.


However, I need now to use ConTeXt for accessibility tagging, so I'm
prepared to give it another try.  And this means converting some LaTeX
documents into ConTeXt.  Is there a better way than using pandoc?  I ran a
LaTeX document through pandoc, but the result is certainly not fully
"ConTeXt compliant", and generates errors instead of compiling.


AFAIK, pandoc is not aware of context math. When I convert latex to context, I 
find it simpler to do it some hand written regex which translate commands 
according to my writing style.


I can get easily lost on the ConTeXt site: the documentation is there in
plenty, but seems hard to search.  The main problem for me is mathematics
and alignment: not just for equations, but for matrices and arrays.  What
I'd love - if it exists - is a document showing how to rewrite LaTeX into
ConTeXt.  Something like the above document, which is now 14 years old.


The user-interface is still the same.


Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and
dealing with mathematics.  Any pointers would be gratefully received!


Can you post an example of LaTeX math that you are having difficulty in 
converting? It is hard to answer this in the abstract.

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
___


[NTG-context] Converting from LaTeX for PDF accessibility tagging?

2020-06-28 Thread Alasdair McAndrew
Hello,

I tried ConTeXt a few years ago, then gave up on it because of its
wordiness and verbosity.  The 2006 article on creating AMSTeX output in
ConTeXt at https://www.ntg.nl/maps/34/06.pdf shows exactly what I mean: the
LaTeX commands are small and neat; the ConTeXt commands are not.

However, I need now to use ConTeXt for accessibility tagging, so I'm
prepared to give it another try.  And this means converting some LaTeX
documents into ConTeXt.  Is there a better way than using pandoc?  I ran a
LaTeX document through pandoc, but the result is certainly not fully
"ConTeXt compliant", and generates errors instead of compiling.

I can get easily lost on the ConTeXt site: the documentation is there in
plenty, but seems hard to search.  The main problem for me is mathematics
and alignment: not just for equations, but for matrices and arrays.  What
I'd love - if it exists - is a document showing how to rewrite LaTeX into
ConTeXt.  Something like the above document, which is now 14 years old.

I also notice that much of the contextgarden wiki is outdated.  For
example, on the use of ConTeXt in MikTeX, we read "As of end of June 2011
MikTeX is still (or again) non-functional."  I'm aware that all of this is
the work of dedicated and unpaid volunteers, so this is not a complaint!
Just an observation.

Anyway, as I say, my main issues are converting LaTeX into ConTeXt. and
dealing with mathematics.  Any pointers would be gratefully received!

Thanks,
Alasdair
-- 
https://numbersandshapes.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] Unexpected symbol with Enumeration

2019-10-17 Thread Otared Kavian
Hi Aditya,Thanks for your hint: I didn't know that subtelty about Lucida OT (and I don't know how to set it up when using Lucida OT).That being said, actually what I would like to use is the kind of script font which is the attached document (those script fonts were widely used in higher mathematics textbooks in France). So when I use mkiv the result is the one I like and is attached to this message (test-scriptfonts-mkiv.pdf). However, thanks to your message I went to check, and noticed that lmtx does not give the same math script fonts, and I don't know what has changed between mkiv and lmtx regarding Asana Math, or the way in which fallback fonts are managed (please see the attached file test-scriptfonts-lmtx.pdf).Thanks for your help: OtaredPS: this the the file test-scriptfonts.tex: Some Font Definitions\definefallbackfamily[myfont][math][Asana Math]	[range={uppercasescript,lowercasescript}]% lucida font\definefontfamily[myfont][serif][Lucida Bright OT]\definefontfamily[myfont][math][LucidaBrightMathOT]\definefontfamily[myfont][sans][LucidaSansOT]\definefontfamily[myfont][mono][LucidaSansTypewriterOT]%\setupbodyfont[myfont,10pt]%% End of Font Definitions%%\starttext\startbuffer[test]Testing script fonts in maths\startformulax^2 + y^2 = z^2, \quad \sin(a)^2 + \cos(b)^2 = 1.\stopformula\startformula\cal{A}, \quad \cal{B}, \quad \cal{C}, \quad \cal{D},\quad \cal{E},\quad \cal{F},\quad \cal{G},\quad \cal{H},\quad \cal{K},\quad \cal{L},\quad \cal{M},\quad \cal{P},\quad \cal{S},\quad \cal{T}\stopformula\hairline\stopbuffer\switchtobodyfont[lucidaot]{\bf Lucida OT: }\getbuffer[test]\switchtobodyfont[myfont]{\bf Lucida OT with Asana Math: }\getbuffer[test]\stoptext

test-scriptfonts-mkiv.pdf
Description: Adobe PDF document


test-scriptfonts-lmtx.pdf
Description: Adobe PDF document
On 17 Oct 2019, at 08:00, Aditya Mahajan <adit...@umich.edu> wrote:On Wed, 16 Oct 2019, Otared Kavian wrote:I use Lucida OT fonts for all my documents, but since I prefer the script fonts from another font I have the following setups for my font:OT: Do you use this to get a less cursive script font?Lucida (like many opentype math fonts) comes with two stylistic variants for script letters. The default is the cursive variant, but you can get the less cursive variant using ss04 stylistic set. See page 8 ofhttps://tug.org/store/lucida/lucidaot.pdfAditya___If your question is of 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
___


[NTG-context] mathring circle above a letter

2019-09-14 Thread Otared Kavian
Hi all,

The \mathring command puts a small circle above a letter, but in some fonts 
(namely Lucida OT) that circle is too small. So thanks to a hint by Hans and 
Wolfgang some years ago I use the following definition which works fine when 
used alone. But in maths, one needs sometimes to use it with the command 
\overline (or \overbar) and the result is not nice.

Can someone tell me please whether it is possible to modify the \mathring 
command so that th ecircle is a little bit larger, or the one I define below as 
\interior in order to have a correct result (more clearly said: I would like 
the small circle to be put above the bar which is itself above the A in 
$\interior{\overline{A}}$).

Thanks for any help: OK

%%% begin mathring-interior.tex
\setuppapersize[A5][A5]
\definemathstackers[MySymbol]
[voffset=-1.2\mathexheight,
hoffset=\zeropoint,
mathclass=ord,
topoffset=.3\mathemwidth, % poor man's italic correction
middlecommand=\mathematics]
%\define[1]\interior{\mathover[MySymbol]{"2218}{#1}} %2218 U+00B0
\define[1]\interior{\mathover[MySymbol]{176}{#1}} %2218 U+00B0

\starttext
The interior of a set $A$ is denoted by $\interior{A}$.

The interior of a set $A$ is denoted by $\mathring{A}$.

The closure of the interior is $\overline{\interior{A}}$.

Beware $\overline{\interior{A}} \neq \interior{\overline{A}}$. (This is not 
nice\dots).

Beware $\overline{\mathring{A}} \neq \mathring{\overline{A}}$
\stoptext

%%% end mathring-interior.tex



mathring-interior.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
___


[NTG-context] Typesetting Markdown – Part 7: Mathematics

2019-08-06 Thread Thangalin
https://dave.autonoma.ca/blog/2019/08/06/typesetting-markdown-part-7/

This installment tackles a cost-benefit analysis problem comparing
electric to gasoline-powered vehicles, calls into R for amortization,
typesets math and a repayment schedule, continues to explore the
separation of content from presentation, and expands on the shell
scripts from previous parts.

Feedback is welcome, especially about the ConTeXt-related items (see
Style and Math near the bottom).

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Typesetting Markdown

2019-05-25 Thread Pablo Rodriguez
On 5/24/19 5:37 AM, Thangalin wrote:
> Hi Gour,
>
> I added an abstract, an overview section with the plan, and an RSS feed:
>
> https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/
>
> One of the reasons I chose Pandoc's Markdown is for its support of
> classes and annotations. I looked into the pandoc-xhtml link and it
> looked both incomplete and lacking support for typesetting mathematics.

Hi Dave,

pandoc-xhtml is only a poor example about handling XML as input source.
I only use Markdown and pandoc, because they provide a limited way of
XML code easily.

The real thing is that you can feed ConTeXt with XML sources to typeset
what you want.

My use of XML typesetting is basic when compared to that of Hans, Taco,
Thomas Schmitz and Hans van der Meer.

Of course, other approaches are perfectly fine. My comment was only
about not focusing on pandoc-xhtml (which I should rewrite from scratch
when I find time for that), but on what makes it thick.

Just in case it helps,

Pablo
--
http://www.ousia.tk
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Typesetting Markdown

2019-05-24 Thread Saša Janiška
Thangalin  writes:

> I added an abstract, an overview section with the plan, and an RSS
> feed:

Thanks a lot - now it's much better seeing what is ahead of us. ;)

> One of the reasons I chose Pandoc's Markdown is for its support of
> classes and annotations.

I was not using Pandoc's markdown, so will have to check the docs in
regard.

> I looked into the pandoc-xhtml link and it looked both incomplete and
> lacking support for typesetting mathematics.

For Markdown --> ConTeXt usage, math is not my primary concern, but
wonder what do you think about the Pandoc's "cons" as stated on
pandoc-xhtml site, iow:

* Main document language information.

* Markup for language in text portions.

*  Any  or  elements markup.

> Have a read and let me know what you think!

See above. ;)


Sincerely,
Gour

-- 
You have a right to perform your prescribed duty, but you
are not entitled to the fruits of action. Never consider
yourself the cause of the results of your activities,
and never be attached to not doing your duty.

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Typesetting Markdown

2019-05-23 Thread Thangalin
Hi Gour,

I added an abstract, an overview section with the plan, and an RSS feed:

https://dave.autonoma.ca/blog/2019/05/22/typesetting-markdown-part-1/

One of the reasons I chose Pandoc's Markdown is for its support of classes
and annotations. I looked into the pandoc-xhtml link and it looked both
incomplete and lacking support for typesetting mathematics.

Have a read and let me know what you think!

Thank you for the feedback.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] Unicode mathematics in ConTeXt

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

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

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

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

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

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

Thanks again.

Best wishes
Idris

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

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


Re: [NTG-context] Unicode mathematics in ConTeXt

2019-05-04 Thread Wolfgang Schuster

Hi Idris,

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

Wolfgang


Hamid,Idris schrieb am 03.05.2019 um 21:40:

Dear gang,

Ok, I've made some progress:

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

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

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

3. New example:

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

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

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

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

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

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

퓒 ⁿ
t

Why does this happen? Is this a bug?

5. Here is what we want: 퓒 ⁿᵗ

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

Thank you in advance.

Best wishes
Idris

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


Dear gang,

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

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

\CATCA
\stoptext

Issues:

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

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

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

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

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

Best wishes
Idris




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

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


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

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


Re: [NTG-context] Unicode mathematics in ConTeXt

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

Ok, I've made some progress:

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

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

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

3. New example:

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

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

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

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

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

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

퓒 ⁿ
t

Why does this happen? Is this a bug?

5. Here is what we want: 퓒 ⁿᵗ

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

Thank you in advance.

Best wishes
Idris

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

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


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

scratch.pdf
Description: scratch.pdf


scratch.tex
Description: scratch.tex
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


[NTG-context] Unicode mathematics in ConTeXt

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

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

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

\CATCA
\stoptext

Issues:

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

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

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

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

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

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

scratch.pdf
Description: scratch.pdf


scratch.tex
Description: scratch.tex
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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


Re: [NTG-context] \mathematics might be missing \everymathematics

2019-02-25 Thread Hans Hagen

On 2/25/2019 9:47 PM, Henri Menke wrote:

Bump


i'll catch it (no uploads today)



On 19/02/19 10:02 PM, Henri Menke wrote:

Dear Hans,

In the following example I want to locally set lcgreek=normal but it is
not picked up because the attribute is not propagated.  When I enter
\everymathematics manually it works fine.  Is this by design or is this
a bug?  MWE below.

Cheers, Henri

---

\starttext

The greek letter should be upright here

\m[lcgreek=normal]{\varphi}

\m[lcgreek=normal]{\the\everymathematics\varphi}

\stoptext



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

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




--

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

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


Re: [NTG-context] \mathematics might be missing \everymathematics

2019-02-25 Thread Henri Menke
Bump

On 19/02/19 10:02 PM, Henri Menke wrote:
> Dear Hans,
> 
> In the following example I want to locally set lcgreek=normal but it is
> not picked up because the attribute is not propagated.  When I enter
> \everymathematics manually it works fine.  Is this by design or is this
> a bug?  MWE below.
> 
> Cheers, Henri
> 
> ---
> 
> \starttext
> 
> The greek letter should be upright here
> 
> \m[lcgreek=normal]{\varphi}
> 
> \m[lcgreek=normal]{\the\everymathematics\varphi}
> 
> \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
___


[NTG-context] \mathematics might be missing \everymathematics

2019-02-19 Thread Henri Menke
Dear Hans,

In the following example I want to locally set lcgreek=normal but it is
not picked up because the attribute is not propagated.  When I enter
\everymathematics manually it works fine.  Is this by design or is this
a bug?  MWE below.

Cheers, Henri

---

\starttext

The greek letter should be upright here

\m[lcgreek=normal]{\varphi}

\m[lcgreek=normal]{\the\everymathematics\varphi}

\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] two different outputs.

2019-01-01 Thread Wolfgang Schuster

Jeong Dal schrieb am 01.01.19 um 23:28:

Dear Wolfgang,

Thank you for the solution at the new year’s day.

Your sample works very well. It is what I want.

I copied it into my file and run it, then I got a strange output.
Everything is OK except outer effect text is written twice.
I don’t know what makes it write twice.


I can’t reproduce the effect with your included example.

What I guess is that one of your setuos still contain the line

  \setuphead[title][textcommand=\TitlePage]

and you apply the effect twice because when you take a closer look
at the image you can see even the inner effect appears two times.


I have two more questions.
1. I’d like to put a title only in a page using the following. How to 
put a title as center aligned?


\setuphead[title][align=middle]


%
\page[yes]
\dontleavehmode\blank[5cm]

\title{Why, Math?}
\blank[big]
\midaligned{\fancy Why do we learn mathematics?}
\vfill
\midaligned{\tfb Institution}
\blank[2cm]
\page


2. Is there a way to remove a pagenumber from the title page?


\startstandardmakeup[align=middle]
\blank[5cm]
\title{Why, Math?}
\blank
{\fancy Why do we learn mathematics?}
\vfill
{\tfb Institution}
\blank[2cm]
\stopstandardmakeup

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

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

Re: [NTG-context] two different outputs.

2019-01-01 Thread Jeong Dal
Dear Wolfgang,

Thank you for the solution at the new year’s day.

Your sample works very well. It is what I want.

I copied it into my file and run it, then I got a strange output.
Everything is OK except outer effect text is written twice.
I don’t know what makes it write twice.
I have two more questions.
1. I’d like to put a title only in a page using the following. How to put a 
title as center aligned?
%
\page[yes]
\dontleavehmode\blank[5cm]

\title{Why, Math?}
\blank[big]
\midaligned{\fancy Why do we learn mathematics?}
\vfill
\midaligned{\tfb Institution}
\blank[2cm]
\page


2. Is there a way to remove a pagenumber from the title page?

Thank you again.
Best regards,

Dalyoung


Here is the simplified code:


%\startMPenvironment
%\stopMPenvironment

%\environment defCommon
%\environment defBook
%\usemodule[m-matrix]
%\startluacode
%mtx = moduledata.matrix
%\stopluacode

\setuplanguage[kr][patterns=us]
\mainlanguage[kr]
\setscript[hangul]

%\usetypescriptfile[type-hcrlvt]
%\usetypescript[HcrFont] % As set in your typescript file
%\definefontfamily [Myface] [mm][Neo Euler]

\definefont[fancy][Zapfino at 24pt]
\definefont[GreekA][MinionPro-MediumIt Regular]

\definefontfeature[kr][script=hang,language=kor,mode=node,analyze=yes]
%\setupbodyfont[Myface, rm, 11pt]
\setupbodyfont[pagella]
%\setuppagenumbering[state=stop]
\setupexternalfigures[directory={./figures, ./funmath/WhyMath/whyMathSlide,}]
\setupindenting[medium, yes]

\definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4]
\definecolor [BigColorOne] [r=.86,g=.850,b=.54]
\define[1]\TitlePage
 {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1%
  \effect[inner]{#1}}
\setuphead
 [title]
 [deeptextcommand=\TitlePage,
  color=BigColorOne,
  style=BigFontOne,
  incrementnumber=list]

\startproduct Danggok

\definestructureconversionset[frontpart:pagenumber][][romannumerals]
\definestructureconversionset[bodypart:pagenumber][][numbers]
\definestructureconversionset[backpart:pagenumber][][numbers]

\startsectionblockenvironment[frontpart]
\setupuserpagenumber[numberconversion=romannumerals]
\setuppagenumber[alternative=singlesided,number=]
\stopsectionblockenvironment

\startsectionblockenvironment[bodypart]
\setuppagenumber[number=2]
\setuppagenumbering[alternative=singlesided]
\stopsectionblockenvironment

%\startsectionblockenvironment[backpart]
%\setupuserpagenumber[numberconversion=romannumerals]
%\setuppagenumbering[alternative=doublesided]
%\setuppagenumber[number=1]
%\stopsectionblockenvironment

\setupcombinedlist[content][list={title,chapter}]%,section,subsection}]
\setuplist[chapter, title][width=5mm, style=,textstyle={\ss\bf 
}]%,after={\blank[preference]}]
\setuplist[section][width=10mm, style=,textstyle=\ss,after={\blank[preference]}]
\setuplist[subsection][style=,textstyle={\ss}]
%
\startfrontmatter
\title{Contents}
\placelist[chapter,title]
\stopfrontmatter

\startbodymatter
\title{First}
\page
\title{Second}
\page
%   \component ./funmath/whyMath/whyMathH
%   \component ./Mathematics/TopicsInMath/Crypto/CryptoH
%   \component ./funmath/algorithm/algorithmH
%   \component ./funmath/Problems/squareH
%   \component ./funmath/Tiling/tilingH
\stopbodymatter

%\startbackmatter
%\stopbackmatter

\stopproduct
 

> 2019. 1. 2. 오전 5:13, Wolfgang Schuster  작성:
> 
> Jeong Dal schrieb am 01.01.19 um 01:33:
>> Dear all,
>> First, Happy new year!
>> I tried to make a style of title as following. The first code creates the 
>> title as I wanted, but the second which uses “\title” creates the title 
>> strange. they are almost same code.
>> To include it in the list of contents, I use “\title”.
> 
> \setuphead [title] [incrementnumber=list]
> 
>> Is there a way to make output as the first one and include it in the list of 
>> contents?
> 
> You have to apply your command to the deeptextcommand key.
> 
>  begin example
> 
> % \definefontfamily [mainface] [ss] [Noto Sans CJK KR]
> %
> % \setupbodyfont [mainface]
> %
> % \definefont [BigFontOne]   [SansBold sa 4]
> 
> \definefontfamily [notosanscjkkr] [ss] [Noto Sans CJK KR]
> 
> %\definefont [BigFontOne] [file:notosanscjkkrbold*default sa 4]
> \definefont [BigFontOne] [\classfont{notosanscjkkr}{Bold} sa 4]
> 
> \setupbodyfont [pagella]
> 
> \definecolor [BigColorOne] [r=.86,g=.850,b=.54]
> 
> \define[1]\TitlePage
>  {\rlap{\offset[x=2pt,y=2pt]{\color[blue]{\effect[outer]{#1%
>   \effect[inner]{#1}}
> 
> \setuphead
>  [title]
>  [deeptextcommand=\TitlePage,
>   color=BigColorOne,
>   style=BigFontOne,
>   incrementnumber=list]
> 
> \starttext
> 
> \title{Contents}
> 
> \placelist[chapter,title]
> 
> \title{Title}
> 
> \title{타이틀}
> 
> \stoptext
> 
>  end example
> 
> Wolfgang
> 

Re: [NTG-context] Framed mathematics

2018-12-07 Thread Wolfgang Schuster

Mathias Schickel schrieb am 07.12.18 um 12:09:

Dear list,

it seems that \mframed does not align properly. Compare the example 
fount at https://www.contextgarden.net/Framed#Location_parameter to 
the compiled example attached.


What can I do to get a correctly aligned framed formula?

\inmframed{...}

Wolfgang

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

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

[NTG-context] Framed mathematics

2018-12-07 Thread Mathias Schickel
Dear list,it seems that \mframed does not align properly. Compare the example fount at https://www.contextgarden.net/Framed#Location_parameter to the compiled example attached.What can I do to get a correctly aligned framed formula?Many thanks for you help,Mathias

mframed.tex
Description: TeX document


mframed.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] ConTeXt mathematics macros

2018-10-16 Thread Wolfgang Schuster

The content of all mentioned modules has moved to the core years ago
and there is no need to load another code although a few goodies like
fancy arrow styles etc. (which use metapost graphics) have to loaded.

To get a proper answer to your problems you should provide a example
which shows what you try to achieve.

Wolfgang


Shuxian Wang schrieb am 14.10.18 um 04:16:

Hello list,

As a new user of ConTeXt, I have some trouble on trying out various 
mathematics modules.


I tried to use the nath module by directly including 
`\usemodule[nath]` in my source file. It seems that the module is not 
loaded. I read through the wiki page and found that nath is not 
included in the TeX Live distribution, but I failed to find a way to 
install it. Also, when I hunted through the wiki articles, it stated 
that the newmat module is included by default, but I never find it in 
my TeX Live 2018. Am I missing something or is the wiki outdated?


By the way, I am looking for a "battery included" math module, which 
provides predefined macros like the absolute value symbol, derivative, 
and partial derivative. Any recommendation or advice on this?


Thanks!

Shuxian Wang
___ 

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/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] ConTeXt mathematics macros

2018-10-14 Thread Shuxian Wang

Hello list,

As a new user of ConTeXt, I have some trouble on trying out various 
mathematics modules.


I tried to use the nath module by directly including `\usemodule[nath]` 
in my source file. It seems that the module is not loaded. I read 
through the wiki page and found that nath is not included in the TeX 
Live distribution, but I failed to find a way to install it. Also, when 
I hunted through the wiki articles, it stated that the newmat module is 
included by default, but I never find it in my TeX Live 2018. Am I 
missing something or is the wiki outdated?


By the way, I am looking for a "battery included" math module, which 
provides predefined macros like the absolute value symbol, derivative, 
and partial derivative. Any recommendation or advice on this?


Thanks!

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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

2018-08-28 Thread Jeong Dal
Dear Aditya,

Thank you for the reply.

>> \startproof
>> \startitemize[n]
>> \item first line.
>> \item second line
> 
> Add: \placeclosesymbol here
> 
>> \stopitemize
>> \stopproof
>> 
>> \stoptext
> 

It works in many cases that item content ends with words. But it is not working 
if the item contents end with \stopformula. If I put \placeclosesymbol before 
\stopformula, then it is shown just after the last word.
Anyway, it works in most cases.

Thank you again.

Best regards,

Dalyoung

%
\defineenumeration[proof][text=Proof.]

\setupenumeration[proof]
[number=no,
closesymbol=\mathematics{\square},
closecommand=\ifmmode\eqno\else\wordright\fi]


\starttext
\startproof
This is a simple proof.
\startformula
1+1=2.
\stopformula
\placeclosesymbol
\stopproof

\startproof
This is another simple proof that ends with a formula
\startformula
1+1=2.
\placeclosesymbol
\stopformula
\stopproof

\startproof
\startitemize[n]
\item first line.
\item Here is an example.
\startformula \cosh x + \sinh x = e^x,~~\cosh x - \sinh x = e^{-x}  
\stopformula
The next formula is following: 
\startformula\startalign
\NC\sinh (x + y) \NC= \frac{e^{x+y} - e^{-(x+y)}}{2} \NR
\NC \NC = \frac{e^x e^y - e^{-x}e^{-y}}{2}  \NR%$
\NC \NC = \frac{(\cosh x + \sinh x)(\cosh y + \sinh y) - (\cosh x - \sinh 
x)(\cosh y - \sinh y)}{2} \NR
\NC \NC = \sinh x \cosh y + \cosh x \sinh y \NR
\stopalign \stopformula
\placeclosesymbol
\stopitemize
\stopproof

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

2018-08-27 Thread Aditya Mahajan

On Mon, 27 Aug 2018, Jeong Dal wrote:



Hi,

The same thing happens after the itemization as in the following MWE.

\defineenumeration[proof][text=Proof.]

\setupenumeration[proof]
[number=no,
closesymbol=\mathematics{\square},
closecommand=\ifmmode\eqno\else\wordright\fi]


\starttext
\startproof
This is a simple proof.
\stopproof

\startproof
This is another simple proof that ends with a formula
\startformula
1+1=2.
\stopformula
\stopproof
\startproof
\startitemize[n]
\item first line.
\item second line


Add: \placeclosesymbol here


\stopitemize
\stopproof

\stoptext


For display equations, there is not easy solution. (What should happen if 
there is an equation number; what should happen if the display equation 
overflows hsize, etc.). The latex package `ntheorem` implements a two pass 
solution (measures where the equation number box gets placed, and then add 
the close symbol below it). I am not sure how easy it is to implement such 
an approach in ConTeXt.


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

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

Re: [NTG-context] closesymbol on same line as displayed formula

2018-08-26 Thread Jeong Dal

Hi, 

I am sorry to bring up old topic “Re: closesymbol on same line as displayed 
formula” again.
(ntg-context Digest, Vol 153, Issue 40)
Is there any progress after that?
It seems to me that there is no more discussions about it.

The same thing happens after the itemization as in the following MWE.

Thank you for reading.

Best regards,

Dalyoung


\defineenumeration[proof][text=Proof.]

\setupenumeration[proof]
[number=no,
closesymbol=\mathematics{\square},
closecommand=\ifmmode\eqno\else\wordright\fi]

  
\starttext
\startproof
This is a simple proof.
\stopproof

\startproof
This is another simple proof that ends with a formula
\startformula
1+1=2.
\stopformula
\stopproof
\startproof
\startitemize[n]
\item first line.
\item second line
\stopitemize
\stopproof

\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] xrightarrow is not straight

2018-08-08 Thread Joshua Moerman
Dear Alan,

Thanks for the reply! Using \definemathstackers I can set the voffset to adjust 
the vertical spacing. This is exactly what I needed, thanks!

However, I couldn't use the ahlength variable. I tried different values, but it 
doesn't seem to change anything (and the current arrowhead is tiny). (Using 
startMPcode and drawarrow gives a big arrowhead.)
Also I noticed that the content of \rightarrow{...} was not in mathmode, so I 
tried using middlecommand=\mathermatics (I found this on the wiki and in the 
docs). But that doesn't change anything. Is this a bug?

Example:

\useMPlibrary[mat]
\definemathstackers [mp]
[alternative=mp, voffset=-.3\mathexheight, middlecommand=\mathematics]
\definemathextensible [mp] [rightarrow] ["2192]

\startMPinitializations
  ahlength  := EmWidth ; % Does not work?
  ahangle   := 30 ;
  ahvariant := 1 ;
  ahdimple  := 4/5 ;
\stopMPinitializations

\setuppapersize[A7]

\starttext
$A \rightarrow{$\neq f$ and $\neq g$} B$

$A \rightarrow{\neq f \text{ and } \neq g} B$ % Is not typeset in mathmode
\stoptext


Thanks in advance,
Kind regards,
Joshua

-Original Message-
From: Alan Braslau  
Sent: 07 August 2018 17:01
To: Joshua Moerman 
Cc: mailing list for ConTeXt users 
Subject: Re: [NTG-context] xrightarrow is not straight

On Tue, 7 Aug 2018 10:42:01 +0200
"Joshua Moerman"  wrote:

> Hi ConTeXt mailing list,
> 
> I am using the extensible arrows and I am not really satisfied with 
> the looks of it.
> 
> The most important issue I have is that the vertical spacing is too 
> much. You can see this in the attached picture: the left arrow is 
> using \xrightarrow{\neq a} and the right arrow is using \stackrel{\neq 
> a}{\longrightarrow}. I think the right one (with stackrel) looks more 
> natural. Is there a way to setup the vertical spacing?
> 
> Another thing I noticed is that the line is not very consistent. This 
> might be a font issue (I am using Euler). Luckily, the inconsistent 
> overlap is barely visible when printed.
> 
> Thanks again!
> 
> Groetjes,
> Joshua
> 

Hello,

You can also use MetaPost to render math stackers, rather than relying on TeX 
constructs and any particular font.

For example:


\useMPlibrary[mat]

\definemathstackers
   [mp]
   [alternative=mp]

\definemathextensible [mp] [leftarrow]  ["2190]
\definemathextensible [mp] [rightarrow] ["2192]
\definemathextensible [mp] [leftrightarrow] ["2194]
\definemathextensible [mp] [longleftrightarrow] ["27F7] \definemathextensible 
[mp] [rightoverleftarrow] ["21C4]
\definemathextensible [mp] [underbrace] ["FE3DF]

\setupbodyfont [dejavu-condensed,12pt]

\starttext
$\rightarrow{≠a}$
\stoptext



Furthermore, the MP arrow can be tuned

\startMPinitializations

ahlength := .5EmWidth ;
ahvariant := 1 ; % dimpled straight

\stopMPinitializations

as can line widths, etc.

Alan

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

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

Re: [NTG-context] general suggestion for ConTeXt documentation

2018-08-08 Thread Alan Braslau
On Wed, 8 Aug 2018 17:54:34 +0200
Hans Hagen  wrote:

> On 8/8/2018 3:30 PM, Robert Zydenbos wrote:
> 
> > profile = NAME
> > empty = yes no
> > …
> > 
> > and similar questions arise: “what kind of profile?”, “what is empty or 
> > not?” etc.  
> 
> it's pretty safe to ignore keys like 'profile' (if you grep the 
> documentation tree  it's just an example of a potential optimization 
> of the rendering which in practice no one will use because in the end it 
> makes no sense  more fun feature i guess)

The philosophy has been to use keys that are generally pretty self-explanatory, 
such as title=, color=, style=, etc.

Secondly, the commands try to use existing key names if they are relevant 
rather than adding new keys, and this sometimes leads to key names that at 
first sight might seem slightly awkward (where a synonym or close synonym might 
be slightly better). Also, sometimes the context requires a new key, such as 
foregroundcolor= and backgroundcolor=, when color= for example would be 
ambiguous.

Thirdly, many keys are inherited and passed-on to an included command.

Finally, unknown or unused keys are simply ignored.


This has the advantage that often, just trying the obvious simply works. 

To quote Poincaré:
\startquotation
Mathematics is the art of giving the same name to different things. It is 
enough that these things, though differing in matter, should be similar in 
form, to permit their being, so to speak, cast in the same mould. When the 
language has been carefully chosen, one is surprised to discover that all 
proofs developed for a given object, can be immediately applied to many new 
objects; there is nothing to be changed, not even the words, since all the 
names have become the same.
\stopquotation


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

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

Re: [NTG-context] about the defining itemized columns.

2018-07-26 Thread Hans Hagen

On 7/26/2018 9:06 AM, Jeong Dal wrote:

Dear all,

In mathematics, there are many occasions to make exercise problems in columns, 
and I did that using “tabulate” as following.Thanks Hans for this method!
%%%
\define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]}
\define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]}
\define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]}

\starttext
\startitemize[n]
\iTwo
\NC \itemtag \NC test1
\NC \itemtag \NC test2 \NC\NR
\NC \itemtag \NC test3
\NC \itemtag \NC test4 \NC\NR
\NC \itemtag \NC test5
\NC \itemtag \NC test6 \NC\NR
\stoptabulate
\stopitemize
\stoptext

%%%
It works well.
Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I 
want to combine those definitions in one form.
Is it possible to define a one definition which can be set by argument as 
following.

\define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]}

When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a 
problem.
I tried \ctxlua for division, but it didn’t work either.
Is there a nice way to define them in one definition?
It may be my greedy hope.

\define[1]\iCol
  {\starttabulate[|*{#1}{|lw(\dimexpr.84\makeupwidth/#1\relax)|}]}


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

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

[NTG-context] about the defining itemized columns.

2018-07-26 Thread Jeong Dal
Dear all,

In mathematics, there are many occasions to make exercise problems in columns, 
and I did that using “tabulate” as following.Thanks Hans for this method!
%%%
\define\iTwo{\starttabulate[||w(.42\makeupwidth)||lw(.42\makeupwidth)|]}
\define\iThree{\starttabulate[||lw(.28\makeupwidth)||lw(.28\makeupwidth)||lw(.28\makeupwidth)|]}
\define\iFour{\starttabulate[||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)||lw(.21\makeupwidth)|]}

\starttext
\startitemize[n]
\iTwo
\NC \itemtag \NC test1 
\NC \itemtag \NC test2 \NC\NR
\NC \itemtag \NC test3 
\NC \itemtag \NC test4 \NC\NR
\NC \itemtag \NC test5 
\NC \itemtag \NC test6 \NC\NR
\stoptabulate
\stopitemize
\stoptext

%%%
It works well. 
Since the numbers in the definitions are calculated by .84/2, .84/3, .84/4, I 
want to combine those definitions in one form.
Is it possible to define a one definition which can be set by argument as 
following.

\define[1]\iCol{\starttabulate[|*{#1}{|lw(.84/#1)\makeupwidth|}]}

When I call it \iCol{2}, the first *{#1} is working, but the second #1 is a 
problem.
I tried \ctxlua for division, but it didn’t work either.
Is there a nice way to define them in one definition?
It may be my greedy hope.

Thanks for reading.

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
___

Re: [NTG-context] text in mathematics

2018-07-10 Thread Hans Åberg

> On 9 Jul 2018, at 21:27, Hans Åberg  wrote:
> 
>> On 9 Jul 2018, at 17:48, Aditya Mahajan  wrote:
>> 
>> On Mon, 9 Jul 2018, Hans Åberg wrote:
>> 
>>> On 8 Jul 2018, at 23:00, Otared Kavian  wrote:
 The advantage being that if the above formula appears in an environment 
 such as a Theorem (where the text is typeset in italic, or slanted) the 
 text in the above \mbox will be also in italic or slanted.
>>> 
>>> Math displayed formula text inheriting the style of the text appears in two 
>>> books from first published in 1966 and 1980 that I checked.
>>> 
>>> So a math text command should probably support that style.
>> 
>> IIRC, that is also the case for the \text command in amsmath.
> 
> There might be two commands, one that inherits the text environment style, 
> and one that keeps it in normal.

Also math and code (verbatim) might appear nested in Hoare logic and such.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-09 Thread Hans Åberg

> On 9 Jul 2018, at 17:48, Aditya Mahajan  wrote:
> 
> On Mon, 9 Jul 2018, Hans Åberg wrote:
> 
>> On 8 Jul 2018, at 23:00, Otared Kavian  wrote:
>>> The advantage being that if the above formula appears in an environment 
>>> such as a Theorem (where the text is typeset in italic, or slanted) the 
>>> text in the above \mbox will be also in italic or slanted.
>> 
>> Math displayed formula text inheriting the style of the text appears in two 
>> books from first published in 1966 and 1980 that I checked.
>> 
>> So a math text command should probably support that style.
> 
> IIRC, that is also the case for the \text command in amsmath.

There might be two commands, one that inherits the text environment style, and 
one that keeps it in normal.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-09 Thread Aditya Mahajan

On Mon, 9 Jul 2018, Hans Åberg wrote:




On 8 Jul 2018, at 23:00, Otared Kavian  wrote:

The advantage being that if the above formula appears in an environment such as 
a Theorem (where the text is typeset in italic, or slanted) the text in the 
above \mbox will be also in italic or slanted.


Math displayed formula text inheriting the style of the text appears in two 
books from first published in 1966 and 1980 that I checked.

So a math text command should probably support that style.


IIRC, that is also the case for the \text command in amsmath.

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

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

Re: [NTG-context] text in mathematics

2018-07-09 Thread Hans Hagen

On 7/9/2018 11:39 AM, Wolfgang Schuster wrote:

Hi Alan,

you should at least limit the scope of the command to math mode

\appendtoks
     \let\t\mathtext
     \let\w\mathword
\to \everymathematics

something

\ifdefined\t \else \unexpanded\def\t{\mathortext\text\mathtext} \fi
\ifdefined\w \else \unexpanded\def\w{\mathortext\word\mathword} \fi

\appendtoks
\let\t\mathtext
\let\w\mathword
\to \everymathematics

because sometimes a \t or \w is part of an expansion so we need it to be 
defined then (for instance, Alan loves to put lots of complex math in 
textext)


Hans


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

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

Re: [NTG-context] text in mathematics

2018-07-09 Thread Hans Åberg

> On 8 Jul 2018, at 23:00, Otared Kavian  wrote:
> 
> The advantage being that if the above formula appears in an environment such 
> as a Theorem (where the text is typeset in italic, or slanted) the text in 
> the above \mbox will be also in italic or slanted.

Math displayed formula text inheriting the style of the text appears in two 
books from first published in 1966 and 1980 that I checked.

So a math text command should probably support that style.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-09 Thread Wolfgang Schuster

Hi Alan,

you should at least limit the scope of the command to math mode

\appendtoks
\let\t\mathtext
\let\w\mathword
\to \everymathematics

Wolfgang

Alan Braslau <mailto:braslau.l...@comcast.net>
8. Juli 2018 um 23:11
In many "less-rigorous" uses of equations, there is an abundant need
to include words (text) in mathematics, and using \mathtext{} or \mbox{}
or whatever is unwieldy.

Readable subscripts, self-explanatory variable names, etc. might be
text and not symbols. These situations can be very common. This is why I
asked (1) what is the right method, and (2) what do others think about
the shorthand \t{}, similar to the shorthand \m{}?

Alan


On Sun, 8 Jul 2018 23:00:00 +0200

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


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-08 Thread Alan Braslau
In many "less-rigorous" uses of equations, there is an abundant need
to include words (text) in mathematics, and using \mathtext{} or \mbox{}
or whatever is unwieldy.

Readable subscripts, self-explanatory variable names, etc. might be
text and not symbols. These situations can be very common. This is why I
asked (1) what is the right method, and (2) what do others think about
the shorthand \t{}, similar to the shorthand \m{}?

Alan


On Sun, 8 Jul 2018 23:00:00 +0200
Otared Kavian  wrote:

> Hi Alan, Wolfgang and Hans Åberg,
> 
> As far as I am concerned, when I have to add a text to a math formula
> I use \mbox, as in the example
> 
> \startformula
> A := \left\{f : {\Bbb R}^2 \longrightarrow {\Bbb R} \; ; \; f
> \mbox{ is measurable and }  \int_{{\Bbb R}^2}|f(x)|dx < \infty
> \right\}. \stopformula
> 
> The advantage being that if the above formula appears in an
> environment such as a Theorem (where the text is typeset in italic,
> or slanted) the text in the above \mbox will be also in italic or
> slanted.
> 
> I don't think it would be a good idea to add new commands to treat
> text in a math formula: the existing possiblities are more than
> satisfactory, and moreover situations where one has to add text to a
> formula are not that common. So using a command like \mbox, or \text,
> or \mathtext, or whatever, is not that time consuming.
> 
> Best regards: OK
> 
> 
> > On 8 Jul 2018, at 21:21, Wolfgang Schuster
> >  wrote:
> > 
> > Hi Alan,
> > 
> > 1. The correct way to use \mathrm is {\mathrm ...} because it is a
> > switch like \rm for text mode.
> > 
> > 2. \mathrm is the wrong method to write text in formulas because
> > the command changes only the math alphabet. This means no
> > ligatures, kerning or other characters like umlauts.
> > 
> > 3. The correct way to write text in math mode is \mathtext (which
> > has the synonym \text) or \mathword. To change the style of the
> > text you can use \mathtext{\it …} or \mathtextit{…}.
> > 
> > Wolfgang  
> >> Alan Braslau <mailto:braslau.l...@comcast.net> 7. Juli 2018 um
> >> 16:04 Hello ConTeXt users,
> >> 
> >> Does it drive you crazy to see TeX users write $t = time$?
> >> (I see this all of the time by LaTeX users in Beamer
> >> presentations.)
> >> 
> >> One can do better writing $t = {\rm time}$ (maybe)
> >> or in ConTeXt $t = \mathrm{time}$.
> >> Sometimes, too, I might write $t = \text{time}$.
> >> 
> >> We also have the commands \mathematics{} that can be used in place
> >> of the TeX shorthand $...$, and this also has the shortcut \m{...}.
> >> 
> >> I thought that it might be useful to have an equivalent escape, to
> >> be used as $t = \t{time}$. What do other users think?
> >> 
> >> OK, \m{t = \t{time}} might be a bit funky... 
> >> 
> >> 
> >> Alan
> >> 
> >> 
> >> P.S. I proposed doing this via
> >> \let\t\mathrm
> >> but Hans tells me that this is not good, as \mathrm{} does not give
> >> proper font processing, so implementation of \t{} would be
> >> something different...
> >> ___
> >> 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] text in mathematics

2018-07-08 Thread Otared Kavian
Hi Alan, Wolfgang and Hans Åberg,

As far as I am concerned, when I have to add a text to a math formula I use 
\mbox, as in the example

\startformula
A := \left\{f : {\Bbb R}^2 \longrightarrow {\Bbb R} \; ; \; f \mbox{ is 
measurable and }  \int_{{\Bbb R}^2}|f(x)|dx < \infty \right\}.
\stopformula

The advantage being that if the above formula appears in an environment such as 
a Theorem (where the text is typeset in italic, or slanted) the text in the 
above \mbox will be also in italic or slanted.

I don't think it would be a good idea to add new commands to treat text in a 
math formula: the existing possiblities are more than satisfactory, and 
moreover situations where one has to add text to a formula are not that common. 
So using a command like \mbox, or \text, or \mathtext, or whatever, is not that 
time consuming.

Best regards: OK


> On 8 Jul 2018, at 21:21, Wolfgang Schuster  
> wrote:
> 
> Hi Alan,
> 
> 1. The correct way to use \mathrm is {\mathrm ...} because it is a switch 
> like \rm for text mode.
> 
> 2. \mathrm is the wrong method to write text in formulas because the command 
> changes only the math alphabet. This means no ligatures, kerning or other 
> characters like umlauts.
> 
> 3. The correct way to write text in math mode is \mathtext (which has the 
> synonym \text) or \mathword. To change the style of the text you can use 
> \mathtext{\it …} or \mathtextit{…}.
> 
> Wolfgang
>> Alan Braslau <mailto:braslau.l...@comcast.net> 7. Juli 2018 um 16:04
>> Hello ConTeXt users,
>> 
>> Does it drive you crazy to see TeX users write $t = time$?
>> (I see this all of the time by LaTeX users in Beamer presentations.)
>> 
>> One can do better writing $t = {\rm time}$ (maybe)
>> or in ConTeXt $t = \mathrm{time}$.
>> Sometimes, too, I might write $t = \text{time}$.
>> 
>> We also have the commands \mathematics{} that can be used in place of
>> the TeX shorthand $...$, and this also has the shortcut \m{...}.
>> 
>> I thought that it might be useful to have an equivalent escape, to be
>> used as $t = \t{time}$. What do other users think?
>> 
>> OK, \m{t = \t{time}} might be a bit funky... 
>> 
>> 
>> Alan
>> 
>> 
>> P.S. I proposed doing this via
>> \let\t\mathrm
>> but Hans tells me that this is not good, as \mathrm{} does not give
>> proper font processing, so implementation of \t{} would be something
>> different...
>> ___
>> 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] text in mathematics

2018-07-08 Thread Wolfgang Schuster

Hi Alan,

1. The correct way to use \mathrm is {\mathrm ...} because it is a 
switch like \rm for text mode.


2. \mathrm is the wrong method to write text in formulas because the 
command changes only the math alphabet. This means no ligatures, kerning 
or other characters like umlauts.


3. The correct way to write text in math mode is \mathtext (which has 
the synonym \text) or \mathword. To change the style of the text you can 
use \mathtext{\it …} or \mathtextit{…}.


Wolfgang

Alan Braslau <mailto:braslau.l...@comcast.net>
7. Juli 2018 um 16:04
Hello ConTeXt users,

Does it drive you crazy to see TeX users write $t = time$?
(I see this all of the time by LaTeX users in Beamer presentations.)

One can do better writing $t = {\rm time}$ (maybe)
or in ConTeXt $t = \mathrm{time}$.
Sometimes, too, I might write $t = \text{time}$.

We also have the commands \mathematics{} that can be used in place of
the TeX shorthand $...$, and this also has the shortcut \m{...}.

I thought that it might be useful to have an equivalent escape, to be
used as $t = \t{time}$. What do other users think?

OK, \m{t = \t{time}} might be a bit funky...


Alan


P.S. I proposed doing this via
\let\t\mathrm
but Hans tells me that this is not good, as \mathrm{} does not give
proper font processing, so implementation of \t{} would be something
different...
___
If your question is of interest to others as well, please add an entry 
to the Wiki!


maillist : ntg-context@ntg.nl / 
http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-07 Thread Hans Åberg

> On 7 Jul 2018, at 16:04, Alan Braslau  wrote:

> Does it drive you crazy to see TeX users write $t = time$?
> (I see this all of the time by LaTeX users in Beamer presentations.)
> 
> One can do better writing $t = {\rm time}$ (maybe)
> or in ConTeXt $t = \mathrm{time}$.
> Sometimes, too, I might write $t = \text{time}$.

The last would be easiest to remember when using it less often. Strictly, it is 
different, because it could mean italics, as may be used in formulas. The 
upright letters are called normal here:
  https://en.wikipedia.org/wiki/Mathematical_Alphanumeric_Symbols

> We also have the commands \mathematics{} that can be used in place of
> the TeX shorthand $...$, and this also has the shortcut \m{...}.
> 
> I thought that it might be useful to have an equivalent escape, to be
> used as $t = \t{time}$. What do other users think?
> 
> OK, \m{t = \t{time}} might be a bit funky... 

If one is using italics for text in math formulas, that would be logical.


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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] text in mathematics

2018-07-07 Thread Alan Braslau
Hello ConTeXt users,

Does it drive you crazy to see TeX users write $t = time$?
(I see this all of the time by LaTeX users in Beamer presentations.)

One can do better writing $t = {\rm time}$ (maybe)
or in ConTeXt $t = \mathrm{time}$.
Sometimes, too, I might write $t = \text{time}$.

We also have the commands \mathematics{} that can be used in place of
the TeX shorthand $...$, and this also has the shortcut \m{...}.

I thought that it might be useful to have an equivalent escape, to be
used as $t = \t{time}$. What do other users think?

OK, \m{t = \t{time}} might be a bit funky... 


Alan


P.S. I proposed doing this via
\let\t\mathrm
but Hans tells me that this is not good, as \mathrm{} does not give
proper font processing, so implementation of \t{} would be something
different...
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] latest beta and \seeindex

2018-06-25 Thread Alan Braslau
"Mathematics is the art of giving the same name to different things. It
is enough that these things, though differing in matter, should be
similar in form, to permit their being, so to speak, cast in the same
mold. When the language has been carefully chosen, one is surprised to
discover that all proofs developed for a given object, can be
immediately applied to many new objects; there is nothing to be
changed, not even the words, since all the names have become the same."

(my translation)

;-)


On Mon, 25 Jun 2018 07:21:43 -0400
Alan Bowen  wrote:

> I should add too that in this particular volume our contributors
> sometimes mention different terms for the same thing as in “This is
> called p or q”. Indexing both terms (p and q) separately and the
> adding  x-ref is one way to go but indexing the more commonly used
> term and adding a mere x-ref for the other is more efficient.
> 
> Alan
> 
> On Sun, Jun 24, 2018 at 4:08 PM Henning Hraban Ramm 
> wrote:
> 
> > Am 2018-06-24 um 21:57 schrieb Hans Hagen :
> >  
> > > On 6/23/2018 5:10 PM, Alan Bowen wrote:  
> > >> The latest beta (ConTeXtver: 2018.06.23 12:12 MKIV betafmt:
> > >> 2018.6.23)  
> > processes without a hitch but \seeindex is still not working as
> > expected.  
> > >> In
> > >> \starttext
> > >> \index{sample}
> > >> \index{fun+games}\index{fun+stuff}
> > >> %\index{fun}
> > >> \seeindex{fun}{sample}% now with heading (as it should be)
> > >> \seeindex{fun}{blah}% not shown
> > >> \seeindex{fun}{humbug}% not shown
> > >> \seeindex{fun}{bug}% not shown
> > >> \seeindex{fun+games}{entertainment}% not shown
> > >> \placeindex[n=1]
> > >> \stoptext
> > >> When I generate the indices for my book, \seeindex{A}{B} works
> > >> only if  
> > it is a unique x-ref and A is a heading. Multiple x-refs to the same
> > heading fail as do x-refs to subheadings.  
> > > sure,
> > >
> > > \seeindex{fun}{blah}% not shown
> > > \seeindex{fun}{humbug}  % not shown
> > > \seeindex{fun}{bug} % not shown
> > >
> > > as there is no index entry blah, humbug or bug ... so you would
> > > be  
> > fooling your reader
> >
> > I understand the rationale, and it could be a nice feature, but we
> > need to refer to entries in a different register, e.g. from an
> > index of topics to an index of persons, e.g.
> > \seeindex{Pragma}{Hagen, Hans} or to subentries like
> > \seeindex{fun+games}{bah+humbug}. Since the latter doesn’t work (or
> > does it now?), we use \seeindex{fun+games}{bah/humbug}.
> >
> >
> > Greetlings, Hraban
> > ---
> > https://www.fiee.net
> > http://wiki.contextgarden.net
> > https://www.dreiviertelhaus.de
> > GPG Key ID 1C9B22FD
> >
> >
> > ___
> > If your question is of interest to others as well, please add an
> > entry to the Wiki!
> >
> > maillist : ntg-context@ntg.nl /
> > http://www.ntg.nl/mailman/listinfo/ntg-context
> > webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
> > archive  : https://bitbucket.org/phg/context-mirror/commits/
> > wiki : http://contextgarden.net
> >
> > ___
> >   

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Fonts and equations

2018-05-18 Thread Lance Larsen
Henri,

Thanks for the suggestion. I tried to add the additional fonts, but this
did not seem to make a difference. The math equations render fine, but a
search performed for terms in an equation still does not work when I
specify the font. When I remove the font specification, it works fine.
There must be some difference in the font that is used even if I don't
specify a math font. Any other thoughts about why the math font changes or
how to get a math font that is searchable, or get back to the default math
font?

-Lance


--
>
> Message: 4
> Date: Fri, 18 May 2018 18:55:14 +1200
> From: Henri Menke <henrime...@gmail.com>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Fonts and equations
> Message-ID: <12743277-ebd0-67c7-2393-fe33e97bf...@gmail.com>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
>
>
> On 17/05/18 23:19, Lance Larsen wrote:
> > I have a context document with several equations. One really nice
> > feature with equations is that by default you can search for variable
> > names in equation in a PDF reader like acrobat. However, I needed to
> > configure the document to use arial for the text. Once I do this, the
> > equations are no longer searchable. I assume something happened to the
> > mathematics font. How to I change the font for the document text, but
> > keep the math equations searchable? Is there a way to change the
> > document font, but not affect the math font? Here is a sample of how I
> > configured the font. The equations are no longer searchable.
> >
> > % Load the Arial font values for regular, italics, bold, etc.
> > \starttypescript [serif] [arial]
> >\definefontsynonym [Serif]   [name:arial]
> >\definefontsynonym [SerifBold]   [name:arialbold]
> >\definefontsynonym [SerifItalic] [name:arialitalic]
> >\definefontsynonym [SerifSlanted][name:arialitalic]
> >\definefontsynonym [SerifBoldItalic] [name:arialbolditalic]
> >\definefontsynonym [SerifBoldSlanted][name:arialbolditalic]
> >\definefontsynonym [SerifCaps]   [name:arial]
> > \stoptypescript
> >
> > % Now we define the 'arial' font as an available option
> > \definetypeface [arial][rm] [serif] [arial]
>
> The typeface "arial" you defined has no math font (and no sans and no
> mono font).  Add those and you should be fine:
>
> \definetypeface [arial] [rm] [serif] [arial]
> \definetypeface [arial] [ss] [sans]  [modern]
> \definetypeface [arial] [tt] [mono]  [modern]
> \definetypeface [arial] [mm] [math]  [modern]
>
> >
> > % Set 'arial' 10pt as the default font for the document
> > \setupbodyfont [arial,rm,10pt]
> >
> > \starttext
> >
> > $z_1 = x_1 + y_1$
> >
> > $a = b + c$
> >
> > \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] Fonts and equations

2018-05-18 Thread Henri Menke



On 17/05/18 23:19, Lance Larsen wrote:
I have a context document with several equations. One really nice 
feature with equations is that by default you can search for variable 
names in equation in a PDF reader like acrobat. However, I needed to 
configure the document to use arial for the text. Once I do this, the 
equations are no longer searchable. I assume something happened to the 
mathematics font. How to I change the font for the document text, but 
keep the math equations searchable? Is there a way to change the 
document font, but not affect the math font? Here is a sample of how I 
configured the font. The equations are no longer searchable.


% Load the Arial font values for regular, italics, bold, etc.
\starttypescript [serif] [arial]
   \definefontsynonym [Serif]               [name:arial]
   \definefontsynonym [SerifBold]           [name:arialbold]
   \definefontsynonym [SerifItalic]         [name:arialitalic]
   \definefontsynonym [SerifSlanted]        [name:arialitalic]
   \definefontsynonym [SerifBoldItalic]     [name:arialbolditalic]
   \definefontsynonym [SerifBoldSlanted]    [name:arialbolditalic]
   \definefontsynonym [SerifCaps]           [name:arial]
\stoptypescript

% Now we define the 'arial' font as an available option
\definetypeface [arial]    [rm] [serif] [arial]


The typeface "arial" you defined has no math font (and no sans and no 
mono font).  Add those and you should be fine:


\definetypeface [arial] [rm] [serif] [arial]
\definetypeface [arial] [ss] [sans]  [modern]
\definetypeface [arial] [tt] [mono]  [modern]
\definetypeface [arial] [mm] [math]  [modern]



% Set 'arial' 10pt as the default font for the document
\setupbodyfont [arial,rm,10pt]

\starttext

$z_1 = x_1 + y_1$

$a = b + c$

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

[NTG-context] Fonts and equations

2018-05-18 Thread Lance Larsen
I have a context document with several equations. One really nice feature
with equations is that by default you can search for variable names in
equation in a PDF reader like acrobat. However, I needed to configure the
document to use arial for the text. Once I do this, the equations are no
longer searchable. I assume something happened to the mathematics font. How
to I change the font for the document text, but keep the math equations
searchable? Is there a way to change the document font, but not affect the
math font? Here is a sample of how I configured the font. The equations are
no longer searchable.

% Load the Arial font values for regular, italics, bold, etc.
\starttypescript [serif] [arial]
  \definefontsynonym [Serif]   [name:arial]
  \definefontsynonym [SerifBold]   [name:arialbold]
  \definefontsynonym [SerifItalic] [name:arialitalic]
  \definefontsynonym [SerifSlanted][name:arialitalic]
  \definefontsynonym [SerifBoldItalic] [name:arialbolditalic]
  \definefontsynonym [SerifBoldSlanted][name:arialbolditalic]
  \definefontsynonym [SerifCaps]   [name:arial]
\stoptypescript

% Now we define the 'arial' font as an available option
\definetypeface [arial][rm] [serif] [arial]

% Set 'arial' 10pt as the default font for the document
\setupbodyfont [arial,rm,10pt]

\starttext

$z_1 = x_1 + y_1$

$a = b + c$

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

[NTG-context] blank line at the beginning of the theorem or proof

2018-05-12 Thread Jeong Dal
Dear all,

placing a figure at the right or left of the text using 
\placefigure[right][]{}{} insert at the begining of the paragraph under the 
enumerations while there is no blank line if we comment out \placefigure. See 
the below sample.

Is there a way to make text begin from the same line of “Theorem 1” with the 
figure at the right?

Thank you.

Best regards,

Dalyoung

 \defineenumeration[Theorem]
   [text={\translate[en=Theorem, kr=정리]},
style=,
title=yes,
prefix=yes,
prefixsegments=chapter,
way=bychapter,
number=yes,
before={\blank[big]},
after=\blank]

\defineenumeration[Proof]
  [text={\translate[en=Proof, kr=증명]},
%  headstyle=bold,
  alternative=hanging,
  titlestyle=,
  style=normal,
  number=no,
  closesymbol=\mathematics{\blacksquare},]
 
 \startbuffer[circleA]
 draw fullcircle scaled 2cm;
 \stopbuffer
  
\starttext

\startTheorem
%\placefigure[right][]{}{\processMPbuffer[circleA]}
This is a test for placing a figure in the theorem or in the proof. 
\tex{placefigure[right][]{}{\processMPbuffer[circleA]}}
insert a blank line at the beginning of the paragraph while there is no blank 
line without a figure.
%\placefigure[right][]{}{\processMPbuffer[circleA]}
\stopTheorem
\startProof
%\placefigure[right][]{}{\processMPbuffer[circleA]}
\input knuth
\stopProof
\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
___

[NTG-context] Space between lines with mathematical writings

2018-03-17 Thread Fabrice Couvreur
Hello,
When I write text with mathematics, I find that the space between two lines
is not enough because the formulas overflow one over the other.
How to correct this ?
Thank you
Fabrice

\switchtobodyfont[asana,12pt]

\definemixedcolumns
  [Mycolumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=,
grid=strut,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMycolumns
  \startitemize[n]
  \item Le taux d'évolution du prix du menu entre l'été 2012 et l'été 2015
est égal à \math{t_g=\frac{13,80-9,80}{9,80}\approx 0,4082}.

On a alors \math{(1+t_m)^3=(1+t_g)}, soit \math{(1+t_m)^3 \approx
1,4082}.

On en déduit que \math{1+t_m \approx 1,4082^{\frac{1}{3}}}.

Finalement, \math{t_m\approx 1,4082^{\frac{1}{3}}-1\approx 0,1209}. Le
taux d'évolution annuel moyen, arrondi à 0,01\,\%, du prix du menu entre
l'été 2012 et l'été 2015 est 12,09\,\%.
  \item \math{13,80 \times 1,1209^2\approx 17,34}. Le prix en 2017 sera
approximativement de 17,34 euros.
  \stopitemize
\column
\input knuth
\stopMycolumns
\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] Fourier and utopia

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

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

Re: [NTG-context] Fourier and utopia

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

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

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

to fourier-math.lfg.

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

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

[NTG-context] Fourier and utopia

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

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

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

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

Any ideas of what I am missing?

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

If more information is needed, then please tell me.

/Mikael

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

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

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

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


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

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

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


testfile.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Learning how to use \setupbtxrendering

2018-02-19 Thread Otared Kavian
Hi Alan, and all the Gurus on the list,

Many thanks for your help and comments. I am sending again this message which, 
by mistake, was sent only to Alan, in order to get some help.

The manual mkiv-publications.pdf contains indeed many explanations, but 
probably the informations there are too vast for the elementary use I am going 
to need. So many thanks to Alan and Hans for this extensive manual!

Now, this being said, I am neither able, nor do I need, to use the full blown 
power of this environment. In particular I am not familiar with the style apa 
(or aps, which seems to exist too…) or other official specifications. That is 
why I would like to learn by examples, beginning with the one included on page 
4 of the above mentioned manual and then modify things to see what can be done…
However, when I use the modifications which Alan suggested (for the style apa, 
but I dropped the apa: prefix…) I do not get what is desired (please see below 
the code and the attached test.bib file). And if I give explicitely the 
specification apa, then many other things are not satisfactory for my needs…

For now, what I get without changing many things in the first example given in 
the manual, is quite close to what I would like to obtain, except that the 
title of articles is in roman and the name of the journal is in italic, and the 
title of books are in italic (and the modifications suggest by Alan do not 
change this, at least when I am not using apa).

So my first question is: how can one define one's own « specification », when 
modifying built-in specifications is not satisfactory for one's needs, or does 
not give the expected result? 

The second question is: how can one write a file containing only the references 
which are used in a document, so that that file can be in some way included 
into the main document (this is somewhat analogous to the .bbl file created by 
BibTeX, which allows to include a series of \bibitem into an article written 
with LaTeX: this is necessary to do when one submits a paper to a mathematical 
journal).

Thanks again for your help: OK

%% begin test-bibliography.tex
\setupinteraction[state=start]

\usebtxdataset[test.bib]

%% these four setupbtx suggested by Alan have no effects
\setupbtx[list:volume][style={bold}]
\setupbtx[list:title] [style={\it}]
%(the default for apa)
\setupbtx [list:title:book] [style={\ss\it}]
\setupbtx[list:volume][,style=bold]
%(apa default is italic)

%% this has the correct effect...
\setupbtx[
interaction=start,
specification=default,
left={[},
right={]},
]

\starttext
\startbodymatter

See the book by K. Yosida \cite[YosidaK]
and the article by I. Ekeland \cite{EkelandILemme}.

\stopbodymatter

\startbackmatter 

\startchapter[title=Bibliography]

\placelistofpublications
[method=dataset,
sorttype=authoryear,
numbering=yes,
]
\stopchapter

\stopbackmatter

\stoptext
%% end test-bibliography.tex

%% begin content of the file text.bib

@article{FabesEBStrook,
Author = {E.B. Fabes and D.W. Strook},
Journal = {Archives for Rational Mechanics and Analysis},
Pages = {327--338},
Title = {A new proof of Moser's parabolic Harnack inequality via the 
old ideas of Nash},
Volume = {96},
Year = {1986}
}

@book{EvansLC,
Address = {Providence, RI},
Author = {Lawrence C. Evans},
Publisher = {American Mathematical Society},
Series = {Conference Board of the Mathematical Sciences Regional 
Conference Series in Mathematics},
Title = {Weak convergence methods for nonlinear partial differential 
equations},
Volume = {74},
Year = {1990}
}

@book{EkelandITemam,
Address = {Paris},
Author = {Ivar Ekeland and Roger Temam},
Publisher = {Dunod-Gauthiers-Villars},
Title = {Analyse Convexe et Problèmes Variationnels},
Year = {1974}
}

@article{EkelandILemme,
Author = {Ivar Ekeland},
Journal = {Journal of Mathematical Analysis and Applications},
Pages = {324--353},
Title = {On the variational principle},
Volume = {47},
Year = {1974}
}

@book{DieudonneJ,
Address = {Paris},
Author = {Jean Dieudonné},
Publisher = {Gauthiers-Villars},
Title = {Éléments d'Analyse},
Volume = {1},
Year = {1969}
}

@book{YosidaK,
Address = {New York},
Author = {Kôsaku Yosida},
Publisher = {Springer-Verlag},
Series = {Die Grundlehren der Mathematischen Wissenschaften},
Title = {Functional Analysis},
Volume = {123},
Year = {1974}
}

%% end content of the file test.bib



test.bib
Description: Binary data



> On 17 Feb 2018, at 20:29, Alan Braslau <braslau.l...@comcast.net> wrote:
> 
> HANS: there is one specific comment for you, below.
> 
> On Sat, 17 Feb 2018 15:27:03 

Re: [NTG-context] Learning how to use \setupbtxrendering

2018-02-18 Thread Alan Braslau
On Sun, 18 Feb 2018 19:23:25 +0100
Hans Hagen <pra...@wxs.nl> wrote:

> On 2/18/2018 7:07 PM, Rik Kabel wrote:
> > On 2018-02-18 12:23, Thomas A. Schmitz wrote:
> >> On 02/18/2018 06:07 PM, Alan Braslau wrote:
> >>> title={The Cambridge Companion to {\em Ulysses}},
> >>
> >> Alan, I think this was Rik Kabel's point: for some scenarios, you 
> >> cannot avoid to have some sort of context commands in your bibtex 
> >> file. For a while, I also used biblatex from time to time, so I
> >> tried to have a bibtex file that would be as clean as possible and
> >> work with both systems, but your example shows that this is not
> >> always possible. Well, nothing that some well-written perl
> >> couldn't get rid of...
> >>
> >> All best
> >>
> >> Thomas
> > 
> > Indeed, that was my point. Even without the mathematics components
> > that were cited, I cannot imagine how markup could be excluded from
> > the BibTeX file, and for that matter, from any other
> > bibliographical database I have seen, if we have to comply with
> > arbitrary formatting standards. The statement that one should not
> > put any such formatting into the file is perhaps aspirational, but
> > not really useful.
> If you code clean it's no problem as we can map commands
> (\btxcommand) but most (large) bibtex databases we've seen so far are
> quite inconsistent (not only in usage of commands, also in author
> names).
> 
> (And of course Thomas meant Lua and not Perl.)

The message was meant to be "don't abuse" markup in data;
Don't attempt bibtex/latex hackery.

As Hans mentions, \btxcommand was introduced to handle some formatting
in bibtex entries that might be inconsistent or in conflict with
standard ConTeXt commands. When no \btxcommand definition is found,
the system falls-back on standard ConTeXt (or luatex) syntax. Sloppy
bibtex files should be cleaned up, but the aim is to allow files to be
shared with bibtex/latex (minus any hackery, which could/should be
fixed in the bibtex style files, but usually is not).

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

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

Re: [NTG-context] Learning how to use \setupbtxrendering

2018-02-18 Thread Hans Hagen

On 2/18/2018 7:07 PM, Rik Kabel wrote:

On 2018-02-18 12:23, Thomas A. Schmitz wrote:

On 02/18/2018 06:07 PM, Alan Braslau wrote:

title={The Cambridge Companion to {\em Ulysses}},


Alan, I think this was Rik Kabel's point: for some scenarios, you 
cannot avoid to have some sort of context commands in your bibtex 
file. For a while, I also used biblatex from time to time, so I tried 
to have a bibtex file that would be as clean as possible and work with 
both systems, but your example shows that this is not always possible. 
Well, nothing that some well-written perl couldn't get rid of...


All best

Thomas


Indeed, that was my point. Even without the mathematics components that 
were cited, I cannot imagine how markup could be excluded from the 
BibTeX file, and for that matter, from any other bibliographical 
database I have seen, if we have to comply with arbitrary formatting 
standards. The statement that one should not put any such formatting 
into the file is perhaps aspirational, but not really useful.
If you code clean it's no problem as we can map commands (\btxcommand) 
but most (large) bibtex databases we've seen so far are quite 
inconsistent (not only in usage of commands, also in author names).


(And of course Thomas meant Lua and not Perl.)

Hans

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

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

Re: [NTG-context] Learning how to use \setupbtxrendering

2018-02-18 Thread Rik Kabel

On 2018-02-18 12:23, Thomas A. Schmitz wrote:

On 02/18/2018 06:07 PM, Alan Braslau wrote:

title={The Cambridge Companion to {\em Ulysses}},


Alan, I think this was Rik Kabel's point: for some scenarios, you 
cannot avoid to have some sort of context commands in your bibtex 
file. For a while, I also used biblatex from time to time, so I tried 
to have a bibtex file that would be as clean as possible and work with 
both systems, but your example shows that this is not always possible. 
Well, nothing that some well-written perl couldn't get rid of...


All best

Thomas


Indeed, that was my point. Even without the mathematics components that 
were cited, I cannot imagine how markup could be excluded from the 
BibTeX file, and for that matter, from any other bibliographical 
database I have seen, if we have to comply with arbitrary formatting 
standards. The statement that one should not put any such formatting 
into the file is perhaps aspirational, but not really useful.


--
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] \vec{} arrow length?

2017-12-27 Thread Henri
On Wed, 2017-12-27 at 15:44 -0700, Alan Braslau wrote:
> On Wed, 27 Dec 2017 22:44:50 +0100
> Hans Hagen <pra...@wxs.nl> wrote:
> 
> > 
> > On 12/27/2017 7:01 PM, Alan Braslau wrote:
> > > 
> > > Why is the \vec{} arrow too short in some cases?
> > > Compare $\vec{X}$ to $\vec{Y}$.
> > > 
> > > The MWE below looks wrong in the default font
> > > and is even uglier when pagella is used.
> > > 
> > > Alan
> > > 
> > > 
> > > %\setupbodyfont [pagella]
> > > 
> > > \starttext
> > > $\vec{X}$ vs. $\vec{Y}$
> > > \stoptext
> > As this is has been the logic in tex font design for more than 3 
> > decades, there's not much that we can do about it apart from patching 
> > the font (doable but somewhat nasty and boring as we then need to
> > patch specific elements of (each) hvariant and it falls in the
> > category "hard to motivate myself for").
> > 
> > \showglyphs
> > 
> > \starttext
> >  \start
> >  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
> >  \stop
> >  \blank
> >  \start
> >  \switchtobodyfont [pagella]
> >  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
> >  \stop
> >  \blank
> >  \start
> >  \switchtobodyfont [cambria]
> >  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
> >  \stop
> > \stoptext
> > 
> > Shows that it's a font design issue: the extensible has a threshold 
> > related to the middle part and it should (1) have at least one more 
> > fixed size, or (2) have one fixed size and for the rest be extensible 
> > but that would be somewhat inefficient ion most cases, so (3) here we 
> > have a trade-off.
> > 
> > Just blame the font ... cambria is (of course) ok.
> > 
> > Hans
> Even Computer Modern!
> 
> Do you mean to tell me that the TeX Gyre fonts are all "broken"?
> And that the *only* correctly working font is ... Cambria?
> 
> So following up on the font discussion at the last ConTeXt meeting,
> must we conclude that *all* of the fonts that we distribute with the
> Standalone are to be avoided, and that one must pilfer the MicroSoft
> font in order to typeset mathematics correctly?

Lucida OpenType looks okay (if you have it).

\setupbodyfont[lucidaot]
\starttext
$\vec{X}$ vs. $\vec{Y}$
\stoptext

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

test.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] \vec{} arrow length?

2017-12-27 Thread Alan Braslau
On Wed, 27 Dec 2017 22:44:50 +0100
Hans Hagen <pra...@wxs.nl> wrote:

> On 12/27/2017 7:01 PM, Alan Braslau wrote:
> > Why is the \vec{} arrow too short in some cases?
> > Compare $\vec{X}$ to $\vec{Y}$.
> > 
> > The MWE below looks wrong in the default font
> > and is even uglier when pagella is used.
> > 
> > Alan
> > 
> > 
> > %\setupbodyfont [pagella]
> > 
> > \starttext
> > $\vec{X}$ vs. $\vec{Y}$
> > \stoptext
> As this is has been the logic in tex font design for more than 3 
> decades, there's not much that we can do about it apart from patching 
> the font (doable but somewhat nasty and boring as we then need to
> patch specific elements of (each) hvariant and it falls in the
> category "hard to motivate myself for").
> 
> \showglyphs
> 
> \starttext
>  \start
>  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
>  \stop
>  \blank
>  \start
>  \switchtobodyfont [pagella]
>  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
>  \stop
>  \blank
>  \start
>  \switchtobodyfont [cambria]
>  \dorecurse{50}{$\vec{\blackrule[width=#1pt]}$\space}\unskip\par
>  \stop
> \stoptext
> 
> Shows that it's a font design issue: the extensible has a threshold 
> related to the middle part and it should (1) have at least one more 
> fixed size, or (2) have one fixed size and for the rest be extensible 
> but that would be somewhat inefficient ion most cases, so (3) here we 
> have a trade-off.
> 
> Just blame the font ... cambria is (of course) ok.
> 
> Hans

Even Computer Modern!

Do you mean to tell me that the TeX Gyre fonts are all "broken"?
And that the *only* correctly working font is ... Cambria?

So following up on the font discussion at the last ConTeXt meeting,
must we conclude that *all* of the fonts that we distribute with the
Standalone are to be avoided, and that one must pilfer the MicroSoft
font in order to typeset mathematics correctly?

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

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

Re: [NTG-context] Page printed upside down

2017-10-23 Thread Fabrice Couvreur
Hi Pablo,
Thank you for the links and for your help. I'm going to look at Metafun for
the vertical line.
Fabrice

2017-10-22 9:48 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 10/21/2017 11:45 PM, Fabrice Couvreur wrote:
> > Hi Pablo,
> > Sorry for the late response. I did some tests before answering to
> > understand your explanations.
>
> Hi Fabrice,
>
> the basic idea is the paper orientation matches the printing option (if
> any).
>
> > - With the command \setupinteractionscreen [option = landscape] and
> > without selecting anything in Acrobat, I get a document in double-sided
> > portrait mode but the back side is upside down
>
> \setupinteractionscreen[option=portrait] would be the right option here.
> It is double-sided (duplex) printing for portrait orientation.
>
> Consider that ConTeXt has \setuppapersize[A4, portrait] as default.
>
> > - With the command \setuppapersize [A4, landscape] and without
> > selecting anything in Acrobat, I get two documents in landscape mode in
> > the same direction
>
> You got two printed sheets instead of one. To get only one, you need to
> specify duplex printing (as explained above). Otherwise, your printer
> would print as its default properties specify.
>
> There is even a \setupinteractionscreen[option=page] option, which
> enables single-sided (or simplex) printing. This is required for
> printers that are configured to print doublesided per default.
>
> > I think it's clear now, thank you.
>
> I hope it may be clearer after my explanation.
>
> > I did a try to get a booklet but the result is not correct because the
> > text or formulas of mathematics are overflowing in the colums
>
> Sorry, but overflowing is normal here, the formula has too many data to
> fit in that column width.
>
> I would discourage the use of columns to create the booklet.
>
> My advice would be to compose the standard text and then impose the pages:
>
> \starttext
>   \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}}
>   \section{\TeX}\input knuth\par
> \section{Zapf}\input zapf\par
> \section{Math}
> \startformula
> \startmathalignment[n=2,align={left,left}]
> \NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 +
> 400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR
> \NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
> \NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
> \stopmathalignment
> \stopformula}
> \stoptext
>
> And then use the following code with the output PDF document from the
> code above:
>
> \setuppapersize [A5][A4,landscape]
> \setupexternalfigures[interaction=all]
> \enabledirectives[references.border]
> \setuparranging [2UP]
> \setuplayout
>   [backspace=0pt,
> topspace=0pt,
>width=middle,
>   height=middle,
> location=middle,
>   header=0pt,
>   footer=0pt]
> \setupinteraction[state=start]
> \setupinteractionscreen[option={landscape, fixed, paper}]
> \starttext
> \insertpages[document.pdf][width=0pt]
> \stoptext
>
> You should get something similar to the attached booklet.
>
> Of course, you may have to increase font size in the original document.
> But to know which increase in size the font needs, you have to check it
> in the printed version of the final booklet.
>
> With an already released booklet,
> https://github.com/ousia/from-pandoc-to-context/blob/master/
> doc/from-pandoc-to-context_A4.pdf
> is the basis to be imposed in the final booklet
> https://github.com/ousia/from-pandoc-to-context/blob/master/
> doc/from-pandoc-to-context_A4-booklet.pdf.
>
> The approach I’m suggesting is simpler and easier to implement.
>
> 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] Page printed upside down

2017-10-22 Thread Pablo Rodriguez
On 10/21/2017 11:45 PM, Fabrice Couvreur wrote:
> Hi Pablo,
> Sorry for the late response. I did some tests before answering to
> understand your explanations.

Hi Fabrice,

the basic idea is the paper orientation matches the printing option (if
any).

> - With the command \setupinteractionscreen [option = landscape] and
> without selecting anything in Acrobat, I get a document in double-sided
> portrait mode but the back side is upside down

\setupinteractionscreen[option=portrait] would be the right option here.
It is double-sided (duplex) printing for portrait orientation.

Consider that ConTeXt has \setuppapersize[A4, portrait] as default.

> - With the command \setuppapersize [A4, landscape] and without
> selecting anything in Acrobat, I get two documents in landscape mode in
> the same direction

You got two printed sheets instead of one. To get only one, you need to
specify duplex printing (as explained above). Otherwise, your printer
would print as its default properties specify.

There is even a \setupinteractionscreen[option=page] option, which
enables single-sided (or simplex) printing. This is required for
printers that are configured to print doublesided per default.

> I think it's clear now, thank you.

I hope it may be clearer after my explanation.

> I did a try to get a booklet but the result is not correct because the
> text or formulas of mathematics are overflowing in the colums

Sorry, but overflowing is normal here, the formula has too many data to
fit in that column width.

I would discourage the use of columns to create the booklet.

My advice would be to compose the standard text and then impose the pages:

\starttext
  \dorecurse{4}{\chapter{Chapter \Romannumerals{\recurselevel}}
  \section{\TeX}\input knuth\par
\section{Zapf}\input zapf\par
\section{Math}
\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 +
400\times 1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
\stopformula}
\stoptext

And then use the following code with the output PDF document from the
code above:

\setuppapersize [A5][A4,landscape]
\setupexternalfigures[interaction=all]
\enabledirectives[references.border]
\setuparranging [2UP]
\setuplayout
  [backspace=0pt,
topspace=0pt,
   width=middle,
  height=middle,
location=middle,
  header=0pt,
  footer=0pt]
\setupinteraction[state=start]
\setupinteractionscreen[option={landscape, fixed, paper}]
\starttext
\insertpages[document.pdf][width=0pt]
\stoptext

You should get something similar to the attached booklet.

Of course, you may have to increase font size in the original document.
But to know which increase in size the font needs, you have to check it
in the printed version of the final booklet.

With an already released booklet,
https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4.pdf
is the basis to be imposed in the final booklet
https://github.com/ousia/from-pandoc-to-context/blob/master/doc/from-pandoc-to-context_A4-booklet.pdf.

The approach I’m suggesting is simpler and easier to implement.

Just in case it helps,

Pablo
-- 
http://www.ousia.tk


A5-to-A4_landscape-booklet.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] Page printed upside down

2017-10-21 Thread Fabrice Couvreur
Hi Pablo,
Sorry for the late response. I did some tests before answering to
understand your explanations.

- With the commands \ setuppapersize [A4, landscape] and \
setupinteractionscreen [option = landscape] and without selecting anything
in Acrobat, I get the desired double-sided document

- With the command \ setupinteractionscreen [option = landscape] and
without selecting anything in Acrobat, I get a document in double-sided
portrait mode but the back side is upside down

- With the command \ setuppapersize [A4, landscape] and without selecting
anything in Acrobat, I get two documents in landscape mode in the same
direction

I think it's clear now, thank you.

I did a try to get a booklet but the result is not correct because the text
or formulas of mathematics are overflowing in the colums

###
document.tex
###

\definemixedcolumns
  [MyColumns]
  [
n=2,
separator=rule,
rulecolor=,
balance=yes,
  ]

\setupalign[verytolerant,stretch,hanging]

\starttext
\startMyColumns
  \dorecurse{6}{\input knuth}

\startformula
\startmathalignment[n=2,align={left,left}]
\NC P_1 + P_2 + \dots + P_{12} \NC = 400 + 400\times 1,05 + 400\times
1,05^2 + \dots + 400 \times 1,05^{11}\NR
\NC  \NC = 400\times (1 + 1,05 + 1,05^2 + \dots + 1,05^{11})\NR
\NC  \NC = 400\times \frac{1-1,05^{12}}{1-1,05}\approx 6\,367.\NR
\stopmathalignment
  \stopformula

\stopMyColumns
\stoptext


Fabrice

2017-10-18 18:44 GMT+02:00 Pablo Rodriguez <oi...@gmx.es>:

> On 10/18/2017 06:00 PM, Fabrice Couvreur wrote:
> > Hi,
> > With this
> >
> > \setuppapersize[A4,landscape]
> > \setupinteractionscreen[option=landscape]
> >
> > I get a double-sided page that I can read without having to return the
> > page on the back. But I wish I could fold the sheet to have a booklet.
> >
> > Difficult to explain without showing. Is it possible ?
>
> Hi Fabrice,
>
> for a booklet I would recommend imposition.
>
> 1. Generate the document in the standard way (no landscape).
>
> 2. Impose it using the following code:
>
> \setuppapersize [A5][A4,landscape]
> \setupexternalfigures[interaction=all]
> \enabledirectives[references.border]
> \setuparranging [2UP]
> \setuplayout
>   [backspace=0pt,
> topspace=0pt,
>width=middle,
>   height=middle,
> location=middle,
>   header=0pt,
>   footer=0pt]
> \setupinteraction[state=start]
> \setupinteractionscreen[option={landscape, fixed, paper}]
> \starttext
> \insertpages[document.pdf][width=0pt]
> \stoptext
>
> A sample for document would be:
>
> \setupbodyfont[600pt]
> \starttext
> \dorecurse{4}{\startstandardmakeup[style={\bf\ss}, align=center]
> \recurselevel
> \stopstandardmakeup}
> \stoptext
>
> Althought the paper size from the document is A4, imposition handles it
> as A5, so it works fine.
>
> BTW, page order in the final booklet is different (you may see it
> yourself :-)).
>
> I hope 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] Font DejaVu with a font for Mathematics

2017-09-06 Thread Fabrice Couvreur
Sorry for the noise !
It is true that \math{\cal N}, it is not very beautiful, so I will
associate another font even if it should avoid, I believe, to write
documents with different fonts
Fabrice

2017-09-06 18:53 GMT+02:00 Herbert Voss <herbert.v...@fu-berlin.de>:

>
> Fabrice Couvreur schrieb:
>
> > I use for the documents of my students the font DejaVu because I find
> that
> > it is very readable on paper. Unfortunately, this is not a font for
> > writing
> > Mathematics. I would like to use DejaVu font for text and a font to write
> > mathematical formulas. What do you recommend ?
>
> DejaVu Math ... ;-)
> https://ctan.org/tex-archive/fonts/tex-gyre-math
> https://ctan.org/tex-archive/fonts/tex-gyre-math/opentype
>
> Herbert
>
> 
> ___
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> listinfo/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] Font DejaVu with a font for Mathematics

2017-09-06 Thread Herbert Voss

Fabrice Couvreur schrieb:

> I use for the documents of my students the font DejaVu because I find that
> it is very readable on paper. Unfortunately, this is not a font for
> writing
> Mathematics. I would like to use DejaVu font for text and a font to write
> mathematical formulas. What do you recommend ?

DejaVu Math ... ;-)
https://ctan.org/tex-archive/fonts/tex-gyre-math
https://ctan.org/tex-archive/fonts/tex-gyre-math/opentype

Herbert

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

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

Re: [NTG-context] Font DejaVu with a font for Mathematics

2017-09-06 Thread Parchd
TeX Gyre DejaVu Math

http://www.gust.org.pl/projects/e-foundry/tex-gyre-dejavu-math

To quote the page above: "The TeX Gyre DejaVu Math font is a math companion to 
the fine and popular DejaVu text fonts."

I seem to remember that I didn't like $\cal N$ when I used it.

Best,

Parchd.

On Wed, Sep 06, 2017 at 06:27:40PM +0200, Fabrice Couvreur wrote:
> Hello,
> I use for the documents of my students the font DejaVu because I find that
> it is very readable on paper. Unfortunately, this is not a font for writing
> Mathematics. I would like to use DejaVu font for text and a font to write
> mathematical formulas. What do you recommend ?
> Thank you.
> Fabrice

> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Font DejaVu with a font for Mathematics

2017-09-06 Thread Fabrice Couvreur
Hello,
I use for the documents of my students the font DejaVu because I find that
it is very readable on paper. Unfortunately, this is not a font for writing
Mathematics. I would like to use DejaVu font for text and a font to write
mathematical formulas. What do you recommend ?
Thank you.
Fabrice
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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 <pra...@wxs.nl> 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 <pra...@wxs.nl> 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 Hans Hagen

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
___

Re: [NTG-context] STIX Two Text and Math

2017-08-12 Thread Ken Moffat
On Sun, Aug 13, 2017 at 12:08:06AM +0200, Fabrice Couvreur wrote:
> Hi Hans,
> I downloaded the fonts and it works perfectly.
> What do you think are the finest fonts for writing a book with mathematics ?
> Are Cambria fonts free ? If so where can they be downloaded ?
> Thank you
> Fabrice
> 
I'm not Hans, so I won't offer my opinions about finest.  But I can
clarify re Cambria:

Cambria is not free in the sense of 'libre'.  The alternative is
Caladea which has the same metrics but is not the same (e.g. higher
curl from top of lowercase 'g').  I have a comparison using a short
part of Lorem ipsum at
http://zarniwhoop.uk/files/PDF-substitutes/cambria-substitutes.pdf

If you want it, you can downlaod it from
http://gsdview.appspot.com/chromeos-localmirror/distfiles/crosextrafonts-20130214.tar.gz

Since I've pointed to my site, I'll mention that I have details,
including PDFs of language coverage and the glyphs in a font, at
http://zarniwhoop.uk/ttf-otf-notes.html .

My interest is in maximising the languages I can render when I'm off
following links on wikipedia, not in outputing maths.  So no examples
of italics, although the 'contents' PDFs attempt to show everything
included in a font in its normal style - they will show maths glyphs
if you know the unicode codepoint to look for.

Of course, for plain text there are many other OTF/TTF fonts.  My
site has over 190, but not all of them cover English.  Some are easy
to read, others can look small at the same nominal size.  The
lipsum-serif-*.pdf files in http://zarniwhoop.uk/files/PDF-lipsum/
might be useful.

ĸen
-- 
I live in a city. I know sparrows from starlings.  After that
everything is a duck as far as I'm concerned.  -- Monstrous Regiment
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] STIX Two Text and Math

2017-08-12 Thread Hans Hagen

On 8/13/2017 12:08 AM, Fabrice Couvreur wrote:

Hi Hans,
I downloaded the fonts and it works perfectly.
What do you think are the finest fonts for writing a book with mathematics ?


pagella or lucida


Are Cambria fonts free ? If so where can they be downloaded ?


on windows machines


Thank you
Fabrice

2017-08-12 13:01 GMT+02:00 Hans Hagen <pra...@wxs.nl 
<mailto:pra...@wxs.nl>>:


On 8/12/2017 11:49 AM, Fabrice Couvreur wrote:

Has anyone ever used these fonts ?


not me

If so, do you need to write a script to use them ?


no, you can say:

\setupbodyfont[stixtwo]

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




--

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

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

Re: [NTG-context] STIX Two Text and Math

2017-08-12 Thread Fabrice Couvreur
Hi Hans,
I downloaded the fonts and it works perfectly.
What do you think are the finest fonts for writing a book with mathematics ?
Are Cambria fonts free ? If so where can they be downloaded ?
Thank you
Fabrice

2017-08-12 13:01 GMT+02:00 Hans Hagen <pra...@wxs.nl>:

> On 8/12/2017 11:49 AM, Fabrice Couvreur wrote:
>
> Has anyone ever used these fonts ?
>>
>
> not me
>
> If so, do you need to write a script to use them ?
>>
>
> no, you can say:
>
> \setupbodyfont[stixtwo]
>
> 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/list
> info/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] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Mon, Jul 31, 2017 at 9:15 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote:
>>
>> On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen <pra...@wxs.nl> wrote:
>>>
>>> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:
>>>>
>>>>
>>>> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pra...@wxs.nl> wrote:
>>>>>
>>>>>
>>>>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>>>>>
>>>>>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist"
>>>>>> <mic...@gmail.com
>>>>>> <mailto:mic...@gmail.com>>:
>>>>>>
>>>>>>   Dear Hans,
>>>>>>
>>>>>>   now, in luatex 1.05, that the primes are "constructed" in new
>>>>>> manner,
>>>>>>   I wonder if there is a way to specify in a goodie file the
>>>>>> kerning
>>>>>>   between characters, in particular primes and the left
>>>>>> parenthesis?
>>>>>>
>>>>>>   I tried
>>>>>>
>>>>>>kernpairs = {
>>>>>>   [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>>>>>},
>>>>>>
>>>>>>   but that does not seem to have any effect.
>>>>>>
>>>>>>   The pre-1.05 modification
>>>>>>
>>>>>>dimensions = {
>>>>>>default = {
>>>>>>[0x2044] = { xoffset = 275, width = 600 },
>>>>>>[0x2032] = { xoffset = 50, width = 290 }, --
>>>>>> prime
>>>>>>[0x2033] = { xoffset = 50, width = 690 }, --
>>>>>> double
>>>>>>   prime
>>>>>>[0x2034] = { xoffset = 50, width = 1090}, --
>>>>>> triple
>>>>>>   prime
>>>>>>[0x2057] = { xoffset = 50, width = 1490}, --
>>>>>>   quadruple prime
>>>>>>},
>>>>>>},
>>>>>>
>>>>>>   (which is a non-optimal way of solving this issue since it has
>>>>>> side
>>>>>>   effects) does not change anything anymore.
>>>>>>
>>>>>>   So, is there now a way to do this cleanly now that the mechanism
>>>>>> is
>>>>>>   changed?
>>>>>>
>>>>>>   /Mikael
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> should I interpret the silence that this is currently not possible, or
>>>>>> that you, Hans, is completely fed up with this subject? :-)
>>>>>
>>>>>
>>>>>
>>>>> you rule out the possibility that i have other things to do
>>>>>
>>>>> anyway, use
>>>>>
>>>>>   0xFE932
>>>>>
>>>>> etc instead as primes get remapped
>>>>>
>>>>> -
>>>>> 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
>>>>>
>>>>>
>>>>> ___
>>>>
>>>>
>>&g

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Hans Hagen

On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote:

On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen <pra...@wxs.nl> wrote:

On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:


On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pra...@wxs.nl> wrote:


On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:


Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" <mic...@gmail.com
<mailto:mic...@gmail.com>>:

  Dear Hans,

  now, in luatex 1.05, that the primes are "constructed" in new
manner,
  I wonder if there is a way to specify in a goodie file the kerning
  between characters, in particular primes and the left parenthesis?

  I tried

   kernpairs = {
  [0x2032] = {[0x0028] = -1000, }, -- prime and (
   },

  but that does not seem to have any effect.

  The pre-1.05 modification

   dimensions = {
   default = {
   [0x2044] = { xoffset = 275, width = 600 },
   [0x2032] = { xoffset = 50, width = 290 }, -- prime
   [0x2033] = { xoffset = 50, width = 690 }, --
double
  prime
   [0x2034] = { xoffset = 50, width = 1090}, --
triple
  prime
   [0x2057] = { xoffset = 50, width = 1490}, --
  quadruple prime
   },
   },

  (which is a non-optimal way of solving this issue since it has side
  effects) does not change anything anymore.

  So, is there now a way to do this cleanly now that the mechanism is
  changed?

  /Mikael


Hi,

should I interpret the silence that this is currently not possible, or
that you, Hans, is completely fed up with this subject? :-)



you rule out the possibility that i have other things to do

anyway, use

  0xFE932

etc instead as primes get remapped

-
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

___



I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
  local o = original.mathparameters.RadicalVerticalGap -- 50
  return 2 * o * target.parameters.factor
end

return {
  name = "lucida-opentype-math",
  version = "1.00",
  comment = "Goodies that complement lucida opentype.",
  author = "Hans Hagen",
  copyright = "ConTeXt development team",
  mathematics = {
  parameters = {
  RadicalDisplayStyleVerticalGap =
FixRadicalDisplayStyleVerticalGap,
  },
  kernpairs = {
 [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
 [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
  },
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?


just change the dimensions

 dimensions = {
 default = { -- experimental values
 [0x2044] = { xoffset = 275, width = 600 },
  -- [0x2032] = { yoffset = -10 },
[0xFE932] = { width = 200 },
[0xFE933] = { width = 500 },
[0xFE934] = { width = 800 },
 },
 },



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

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:
>>
>> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pra...@wxs.nl> wrote:
>>>
>>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>>>
>>>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" <mic...@gmail.com
>>>> <mailto:mic...@gmail.com>>:
>>>>
>>>>  Dear Hans,
>>>>
>>>>  now, in luatex 1.05, that the primes are "constructed" in new
>>>> manner,
>>>>  I wonder if there is a way to specify in a goodie file the kerning
>>>>  between characters, in particular primes and the left parenthesis?
>>>>
>>>>  I tried
>>>>
>>>>   kernpairs = {
>>>>  [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>>>   },
>>>>
>>>>  but that does not seem to have any effect.
>>>>
>>>>  The pre-1.05 modification
>>>>
>>>>   dimensions = {
>>>>   default = {
>>>>   [0x2044] = { xoffset = 275, width = 600 },
>>>>   [0x2032] = { xoffset = 50, width = 290 }, -- prime
>>>>   [0x2033] = { xoffset = 50, width = 690 }, --
>>>> double
>>>>  prime
>>>>   [0x2034] = { xoffset = 50, width = 1090}, --
>>>> triple
>>>>  prime
>>>>   [0x2057] = { xoffset = 50, width = 1490}, --
>>>>  quadruple prime
>>>>   },
>>>>   },
>>>>
>>>>  (which is a non-optimal way of solving this issue since it has side
>>>>  effects) does not change anything anymore.
>>>>
>>>>  So, is there now a way to do this cleanly now that the mechanism is
>>>>  changed?
>>>>
>>>>  /Mikael
>>>>
>>>>
>>>> Hi,
>>>>
>>>> should I interpret the silence that this is currently not possible, or
>>>> that you, Hans, is completely fed up with this subject? :-)
>>>
>>>
>>> you rule out the possibility that i have other things to do
>>>
>>> anyway, use
>>>
>>>  0xFE932
>>>
>>> etc instead as primes get remapped
>>>
>>> -
>>>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
>>>
>>> ___
>>
>>
>> I'm sorry but I cannot get it to work.
>>
>> %%% my local lucida-opentype-math.lfg, located in the same directory
>> as the tex file (and loaded)
>> - kern_250 = { bottomright = { { kern = -250 } }, force = true }
>>
>> local function FixRadicalDisplayStyleVerticalGap(value,target,original)
>>  local o = original.mathparameters.RadicalVerticalGap -- 50
>>  return 2 * o * target.parameters.factor
>> end
>>
>> return {
>>  name = "lucida-opentype-math",
>>  version = "1.00",
>>  comment = "Goodies that complement lucida opentype.",
>>  author = "Hans Hagen",
>>  copyright = "ConTeXt development team",
>>  mathematics = {
>>  parameters = {
>>  RadicalDisplayStyleVerticalGap =
>> FixRadicalDisplayStyleVerticalGap,
>>  },
>>  kernpairs = {
>> [0x1D44E] = {[0x1D44F] = 100

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Hans Hagen

On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:

On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pra...@wxs.nl> wrote:

On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:


Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" <mic...@gmail.com
<mailto:mic...@gmail.com>>:

 Dear Hans,

 now, in luatex 1.05, that the primes are "constructed" in new manner,
 I wonder if there is a way to specify in a goodie file the kerning
 between characters, in particular primes and the left parenthesis?

 I tried

  kernpairs = {
 [0x2032] = {[0x0028] = -1000, }, -- prime and (
  },

 but that does not seem to have any effect.

 The pre-1.05 modification

  dimensions = {
  default = {
  [0x2044] = { xoffset = 275, width = 600 },
  [0x2032] = { xoffset = 50, width = 290 }, -- prime
  [0x2033] = { xoffset = 50, width = 690 }, -- double
 prime
  [0x2034] = { xoffset = 50, width = 1090}, -- triple
 prime
  [0x2057] = { xoffset = 50, width = 1490}, --
 quadruple prime
  },
  },

 (which is a non-optimal way of solving this issue since it has side
 effects) does not change anything anymore.

 So, is there now a way to do this cleanly now that the mechanism is
 changed?

 /Mikael


Hi,

should I interpret the silence that this is currently not possible, or
that you, Hans, is completely fed up with this subject? :-)


you rule out the possibility that i have other things to do

anyway, use

 0xFE932

etc instead as primes get remapped

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


I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
 local o = original.mathparameters.RadicalVerticalGap -- 50
 return 2 * o * target.parameters.factor
end

return {
 name = "lucida-opentype-math",
 version = "1.00",
 comment = "Goodies that complement lucida opentype.",
 author = "Hans Hagen",
 copyright = "ConTeXt development team",
 mathematics = {
 parameters = {
 RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap,
 },
 kernpairs = {
[0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
[0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
 },
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?

just change the dimensions

dimensions = {
default = { -- experimental values
[0x2044] = { xoffset = 275, width = 600 },
 -- [0x2032] = { yoffset = -10 },
[0xFE932] = { width = 200 },
[0xFE933] = { width = 500 },
[0xFE934] = { width = 800 },
},
},


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

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

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>
>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" <mic...@gmail.com
>> <mailto:mic...@gmail.com>>:
>>
>> Dear Hans,
>>
>> now, in luatex 1.05, that the primes are "constructed" in new manner,
>> I wonder if there is a way to specify in a goodie file the kerning
>> between characters, in particular primes and the left parenthesis?
>>
>> I tried
>>
>>  kernpairs = {
>> [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>  },
>>
>> but that does not seem to have any effect.
>>
>> The pre-1.05 modification
>>
>>  dimensions = {
>>  default = {
>>  [0x2044] = { xoffset = 275, width = 600 },
>>  [0x2032] = { xoffset = 50, width = 290 }, -- prime
>>  [0x2033] = { xoffset = 50, width = 690 }, -- double
>> prime
>>  [0x2034] = { xoffset = 50, width = 1090}, -- triple
>> prime
>>  [0x2057] = { xoffset = 50, width = 1490}, --
>> quadruple prime
>>  },
>>  },
>>
>> (which is a non-optimal way of solving this issue since it has side
>> effects) does not change anything anymore.
>>
>> So, is there now a way to do this cleanly now that the mechanism is
>> changed?
>>
>> /Mikael
>>
>>
>> Hi,
>>
>> should I interpret the silence that this is currently not possible, or
>> that you, Hans, is completely fed up with this subject? :-)
>
> you rule out the possibility that i have other things to do
>
> anyway, use
>
> 0xFE932
>
> etc instead as primes get remapped
>
> -
>   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
> ___

I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
local o = original.mathparameters.RadicalVerticalGap -- 50
return 2 * o * target.parameters.factor
end

return {
name = "lucida-opentype-math",
version = "1.00",
comment = "Goodies that complement lucida opentype.",
author = "Hans Hagen",
copyright = "ConTeXt development team",
mathematics = {
parameters = {
RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap,
},
kernpairs = {
   [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
   [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
},
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?

/Mikael


ctx-listexample36.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
___

[NTG-context] t-bnf module with MKIV

2017-07-26 Thread Antoine Cailliau
Hi,

I'm trying to typeset a BNF grammar. The module t-bnf appears to not work
with mkiv.

http://ctan.math.washington.edu/tex-archive/macros/context/contrib/context-bnf/doc/context/third/bnf/t-bnf.pdf

tex error   > tex error on line 157 in file
/Users/acailliau/context/tex/texmf-modules/tex/context/third/bnf/t-bnf.tex:
! Undefined control sequence
 \c!terminalstart
 =\tttf
\syst_helpers_process_comma_item #1,#2->\if ,#1
   ,\expandafter
\syst_helpers_p... \c!terminalstart =\tttf , \c!terminalstop
  =, \c!nonterminalstart =\mathematics
\syst_helpers_get_parameters ...cess_comma_item #1
  ,],\_e_o_p_
l.157\c!indentnext=\v!no]


147 \def\setupbnfgrammar%
148   {\dosingleargument\dosetupbnfgrammar}
149
150 \setupbnfgrammar
151   [\c!terminalstart=\tttf,
152\c!terminalstop=,
153\c!nonterminalstart=\mathematics{\langle},
154\c!nonterminalstop=\mathematics{\rangle},
155\c!is={ \mathematics{\longrightarrow}},
156\c!option=\mathematics{\vert},
157 >> \c!indentnext=\v!no]
158
159 %D \macros
160 %D   {BNF}
161 %D
162 %D We also define a useful abbreviation to be used for header
texts and labels.
163
164 \logo[BNF]{bnf}
165
166 %D And we use it here:
167


Can anyone provides me clues on how to make it work ?

Here is a minimal example:

\usemodule[t-bnf]

\starttext

\startbnfgrammar[]
:  |  "+" 
: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
\stopbnfgrammar

\stoptext

Thanks in advance,

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

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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 regarding placement and size of primes

2017-06-12 Thread Mathias Schickel
the alternative is that i waste time again and again on getting something to work for all fonts and all combinations which leads to a mess that i then need to maintain without any gainAt first: Thank you very much for your work!so, i decided to follow a route that works for most fonts / cases and not some messy hybrid solution (and i don't want a different setup or bag of tricks for each font that is out there as that is a long term no-go)But I have to contradict you here: It has nothing to do with special or hybrid fonts. The problem persists at present (using the LuaTeX version that is shipped with the Garden version) in all fonts. The primes are not rendered as they should in any font I tried out.As Mikael told me, you optimised the code for LuaTeX 1.05 which seems to be terminated September this year. But until then the output of primes will be not correct. I have no possibility to switch back to the current (non-beta) version of ConTeXt, because this version contains the bugs with primes you have already resolved.This means that ConTeXt is not usable for me until LuaTeX 1.05 will be released or until I am able to compile the source of LuaTeX 1.05 on my own. Some of the latest betas (the version one or two weeks ago) did solve all problems regarding primes. The problem I am referring to rose up in the most recent betas. As Mikael told me, this is because you introduced new code to work with LuaTeX 1.05. This is very nice, but because this version is not yet released, this decision is questionable, since this makes ConTeXt unusable until this release (if you need primes).So I appreciate your hard work, but I would be nice to have a version that runs with the current LuaTeX version of the beta of ConTeXt (or alternatively it would be nice if instructions are provided to compile the source of LuaTeX for every OS that can be used simply).And (to repeat myself) the problem has nothing to do with special fonts of hybrid version or whatever. You get the problem using standard Latin Modern or any font else. Simply try%%%\starttext%$f’$, $f^{''}$.%\stoptext%%%and you will get something like attached.BestMathias

Primes.pdf
Description: Adobe PDF document
Am 12.06.2017 um 16:35 schrieb Hans Hagen <pra...@wxs.nl>:On 6/12/2017 3:53 PM, Mathias Schickel wrote:Thank you very much for providing the instructions, Mikael! Unfortunately1) get the filessvn checkout --username anonsvn --password anonsvnhttps://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/does not work on MacOS (which I am using). Can someone tell me which command I need to use at MacOS (current version)?Besides, Hans, I think it is a questionable decision to include the new mechanism for primes in the beta but not the required LuaTeX version for them to work correctly. I tried out the ConTeXt version „current“ (--context=current downloading the standalone) and there the old bugs persist. That means that I cannot use ConTeXt to typeset mathematics now, since no version works correctly when primes are required (until I can handle it to compile LuaTeX 1.05, but I think it would be much more comfortable the beta version of ConTeXt could run using the LuaTeX version it provides on it’s own).the alternative is that i waste time again and again on getting something to work for all fonts and all combinations which leads to a mess that i then need to maintain without any gainso, i decided to follow a route that works for most fonts / cases and not some messy hybrid solution (and i don't want a different setup or bag of tricks for each font that is out there as that is a long term no-go)(it already has costs me more time that i liked)Hans- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands  tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl-___
If your question is of interest to others as well, please add an entry to the 
Wiki!

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

Re: [NTG-context] Bug regarding placement and size of primes

2017-06-12 Thread Hans Hagen

On 6/12/2017 3:53 PM, Mathias Schickel wrote:

Thank you very much for providing the instructions, Mikael! Unfortunately


1) get the files

svn checkout --username anonsvn --password anonsvn
https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/


does not work on MacOS (which I am using). Can someone tell me which 
command I need to use at MacOS (current version)?


Besides, Hans, I think it is a questionable decision to include the new 
mechanism for primes in the beta but not the required LuaTeX version for 
them to work correctly. I tried out the ConTeXt version „current“ 
(--context=current downloading the standalone) and there the old bugs 
persist. That means that I cannot use ConTeXt to typeset mathematics 
now, since no version works correctly when primes are required (until I 
can handle it to compile LuaTeX 1.05, but I think it would be much more 
comfortable the beta version of ConTeXt could run using the LuaTeX 
version it provides on it’s own).
the alternative is that i waste time again and again on getting 
something to work for all fonts and all combinations which leads to a 
mess that i then need to maintain without any gain


so, i decided to follow a route that works for most fonts / cases and 
not some messy hybrid solution (and i don't want a different setup or 
bag of tricks for each font that is out there as that is a long term no-go)


(it already has costs me more time that i liked)

Hans


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

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

Re: [NTG-context] Bug regarding placement and size of primes

2017-06-12 Thread Mathias Schickel
Thank you very much for providing the instructions, Mikael! Unfortunately

> 1) get the files
> 
> svn checkout --username anonsvn --password anonsvn
> https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/ 
> <https://serveur-svn.lri.fr/svn/modhel/luatex/branches/experimental/>
does not work on MacOS (which I am using). Can someone tell me which command I 
need to use at MacOS (current version)?

Besides, Hans, I think it is a questionable decision to include the new 
mechanism for primes in the beta but not the required LuaTeX version for them 
to work correctly. I tried out the ConTeXt version „current“ (--context=current 
downloading the standalone) and there the old bugs persist. That means that I 
cannot use ConTeXt to typeset mathematics now, since no version works correctly 
when primes are required (until I can handle it to compile LuaTeX 1.05, but I 
think it would be much more comfortable the beta version of ConTeXt could run 
using the LuaTeX version it provides on it’s own).

Best
/Mathias



> Am 12.06.2017 um 13:46 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
> 
> On Mon, Jun 12, 2017 at 1:30 PM, Mathias Schickel
> <m...@fa.uni-tuebingen.de> wrote:
>> Hi Mikael,
>> 
>> when will LuaTeX 1.05 be released? And how can I get the source for 
>> compilation (and what exactly will I have to do to get everything to work)?
>> Besides: Do you have a link to the thread you are referring to?
>> 
>> Best
>> /Mathias
>> 
>> 
>>> Am 12.06.2017 um 12:57 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
>>> 
>>> On Mon, Jun 12, 2017 at 12:32 PM, Mathias Schickel
>>> <m...@fa.uni-tuebingen.de> wrote:
>>>> Dear Hans,
>>>> 
>>>> the newest beta (I have updated some hours ago) contains again some bugs 
>>>> regarding the size and placement of primes. You can verify that by using 
>>>> the following minimal example (created to show some older bugs being 
>>>> resolved meanwhile):
>>>> 
>>>> %%%
>>>> \starttext
>>>> %
>>>> Compare $f'$ to $(f')$ and to $f''$, $(f'')$, $f^{''}$ and $(f^{''})$.
>>>> %
>>>> \startformula
>>>>   %
>>>>   \int\nolimits_a^b \bigl(\|f(x)\|\bigr)\, {\mathrm d}x
>>>>   %
>>>> \stopformula
>>>> %
>>>> \stoptext
>>>> %%%
>>>> 
>>>> The output is attached. The primes are obviously rendered too small. And 
>>>> while $f'$ seems to lead to a placement of the prime a little too low, 
>>>> $f^{'}$ seems to cause the prime being placed too high.
>>>> 
>>>> Best
>>>> Mathias
>>>> 
>>>> 
>>>> 
>>>> ___
>>>> If your question is of interest to others as well, please add an entry to 
>>>> the Wiki!
>>>> 
>>>> maillist : ntg-context@ntg.nl / 
>>>> http://www.ntg.nl/mailman/listinfo/ntg-context
>>>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>>> wiki : http://contextgarden.net
>>>> ___
>>> 
>>> I think this is intended (see the other thread). Hans decided to do
>>> the primes differently, which means that they will look strange until
>>> luatex 1.05 is out. You can compile luatex 1.05 yourself, and you will
>>> see that the primes look OK. I attach a pdf result of your file,
>>> compiled with 1.05.
>>> 
>>> /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-c

Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?

2017-06-07 Thread Mikael P. Sundqvist
On Wed, Jun 7, 2017 at 7:31 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote:
>>
>> On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist <mic...@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>
>>> this might be a matter of taste.
>>>
>>> look at the output of (attached). In my opinion the first square root
>>> is to "high", while it looks better on the second line. From
>>> setup-en.pdf it looks like the default of \setupmathradical is set to
>>> normal (and not default). I don't understand what normal should mean,
>>> but I think the alternative=default looks better. (The lucida fonts
>>> are loaded in this example, since the effect is more clear for them).
>
> Ok, this is the story
>
> -- radicals (roots) are rather special and have some hard coded properties
> (like always scriptscript in the degree)
>
> -- \over (and friends) that are used in \frac (which by the way can be
> configured in many ways) has the danger of getting the wrong style as side
> effect of parsing (math list construction) and processing
>
> -- in context we want to support color etc for noth in a consistent way as
> well as style control (important in educational math)
>
> Normally it works out ok with the 'normal' setting but there is some catch
> here. The size of the radical symbols is determine by
>
> -- RadicalVerticalGap =  50
> -- RadicalDisplayStyleVerticalGap = 175
>
> (These are lucide values) and it happens that the second one if too large
> which can give a bad threshold in our case. In cambria it's
>
> RadicalVerticalGap = 166
> RadicalDisplayStyleVerticalGap = 345
>
> So a 1:2 ratio. If we use that for lucida it looks better, so
>
>   lucida-opentype-math.lfg
>
> can become:
>
> local function FixRadicalDisplayStyleVerticalGap(value,target,original)
> local o = original.mathparameters.RadicalVerticalGap -- 50
> return 2 * o * target.parameters.factor
> end
>
> return {
> name = "lucida-opentype-math",
> version = "1.00",
> comment = "Goodies that complement lucida opentype.",
> author = "Hans Hagen",
> copyright = "ConTeXt development team",
> mathematics = {
> parameters = {
> RadicalDisplayStyleVerticalGap =
> FixRadicalDisplayStyleVerticalGap,
> },
> alternates = {
> italic   = { feature = 'ss01', value = 1, comment =
> "Mathematical Alternative Lowercase Italic" },
> arrow= { feature = 'ss02', value = 1, comment =
> "Mathematical Alternative Smaller Arrows" },
> operator = { feature = 'ss03', value = 1, comment =
> "Mathematical Alternative Smaller Operators" },
> calligraphic = { feature = 'ss04', value = 1, comment =
> "Mathematical Alternative Calligraphic Characters" },
> zero = { feature = 'ss05', value = 1, comment =
> "Mathematical Alternative Zero" },
> partial  = { feature = 'ss20', value = 1, comment =
> "Mathematical Alternative Upright Partial Differential" },
> },
> },
> }
>
> It's sort of a font property: the more sizes the better and sometimes you're
> simply hit by the threshold not suiting your case.
>
>
> 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
> ___

Hans,

many thanks for your explanation, it is really appreciated when you
take your time to do this!

I updated my local lucida-opentype-math.lfg and indeed it works like
charm. I think the uncramped version I get now looks better than what
I forced with the temporary solution that I did not understand.

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

Re: [NTG-context] mathradical defaults to "normal", should it perhaps be "default"?

2017-06-07 Thread Hans Hagen

On 6/7/2017 4:50 PM, Mikael P. Sundqvist wrote:

On Mon, Jun 5, 2017 at 10:24 AM, Mikael P. Sundqvist <mic...@gmail.com> wrote:

Hi,

this might be a matter of taste.

look at the output of (attached). In my opinion the first square root
is to "high", while it looks better on the second line. From
setup-en.pdf it looks like the default of \setupmathradical is set to
normal (and not default). I don't understand what normal should mean,
but I think the alternative=default looks better. (The lucida fonts
are loaded in this example, since the effect is more clear for them).

Ok, this is the story

-- radicals (roots) are rather special and have some hard coded 
properties (like always scriptscript in the degree)


-- \over (and friends) that are used in \frac (which by the way can be 
configured in many ways) has the danger of getting the wrong style as 
side effect of parsing (math list construction) and processing


-- in context we want to support color etc for noth in a consistent way 
as well as style control (important in educational math)


Normally it works out ok with the 'normal' setting but there is some 
catch here. The size of the radical symbols is determine by


-- RadicalVerticalGap =  50
-- RadicalDisplayStyleVerticalGap = 175

(These are lucide values) and it happens that the second one if too 
large which can give a bad threshold in our case. In cambria it's


RadicalVerticalGap = 166
RadicalDisplayStyleVerticalGap = 345

So a 1:2 ratio. If we use that for lucida it looks better, so

  lucida-opentype-math.lfg

can become:

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
local o = original.mathparameters.RadicalVerticalGap -- 50
return 2 * o * target.parameters.factor
end

return {
name = "lucida-opentype-math",
version = "1.00",
comment = "Goodies that complement lucida opentype.",
author = "Hans Hagen",
    copyright = "ConTeXt development team",
mathematics = {
parameters = {
RadicalDisplayStyleVerticalGap = 
FixRadicalDisplayStyleVerticalGap,

},
alternates = {
italic   = { feature = 'ss01', value = 1, comment = 
"Mathematical Alternative Lowercase Italic" },
arrow= { feature = 'ss02', value = 1, comment = 
"Mathematical Alternative Smaller Arrows" },
operator = { feature = 'ss03', value = 1, comment = 
"Mathematical Alternative Smaller Operators" },
calligraphic = { feature = 'ss04', value = 1, comment = 
"Mathematical Alternative Calligraphic Characters" },
zero = { feature = 'ss05', value = 1, comment = 
"Mathematical Alternative Zero" },
partial  = { feature = 'ss20', value = 1, comment = 
"Mathematical Alternative Upright Partial Differential" },

},
},
}

It's sort of a font property: the more sizes the better and sometimes 
you're simply hit by the threshold not suiting your case.


Hans

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

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

Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Mikael P. Sundqvist
On Fri, Jun 2, 2017 at 4:24 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote:
>>
>> Hi!
>>
>> Now that the bug with primes is fixed in ConTeXt, I wonder if there is
>> a way to change the kerning between certain characters in mathematics
>> (in case one is not happy with the output from the font)? After
>> reading in fonts-mkiv.pdf this is what I came up with:
>
>
> you can also play withj:
>
> return {
> name = "cambria-math",
> mathematics = {
>kerns = {
>   [0x1D453] = {
>   force = true,
>   topright = {
>   {
>   kern = 1000,
>   },
>   },
>   bottomright = {
>   {
>   kern = 1000,
>   },
>   },
>   },
>   },
> },
> }
>
> currently you need to enable this:
>
> \enabledirectives[fontgoodies.mathkerning]
>
> keep in mind that some cambria (not all) have such staircase kerns which is
> why force is needed in order to overload
>
>> \startluacode
>> fonts.handlers.otf.addfeature {
>> name = "kerntest",
>> type = "kern",
>> data = {
>> [0x61] = { [0x62] = -150 }, -- a and b in text
>> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
>> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
>> }
>> }
>> \stopluacode
>>
>> \definefontfeature[kerntest][kerntest=yes]
>>
>> \definefontfamily[lucidaopentype][rm][Lucida Bright OT]
>> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]
>>
>> \setupbodyfont[lucidaopentype,10pt]
>>
>>
>> \startTEXpage[offset=3pt]
>> abba $abba f'(x)$
>>
>> \addff{kerntest}
>>
>> abba $abba f'(x)$
>>
>> I prefer $f'\mkern-3mu(x)$
>> \stopTEXpage
>>
>> The output is attached as a png file. As you see the kerning works as
>> expected in text mode, but not at all in math mode, even not for the a
>> and b (which I hope I entered correctly).
>>
>> Something like the third line is what I'm after, but not having to use
>> \mkern in all places. Is it possible?
>>
>> /Mikael
>>
>> PS: This is a cross post of the question
>> https://tex.stackexchange.com/q/372857/52406, where I got the
>> suggestion to ask on the list.
>>
>>
>>
>>
>> ___
>> If your question is of interest to others as well, please add an entry to
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl /
>> http://www.ntg.nl/mailman/listinfo/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
> ___

Thank you Hans, that works.

Is there also a similar way to use the "kernpairs" instead of "kerns"?
I get no effect, even after adding force = true and
\enabledirectives[fontgoodies.mathkerning].

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

Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Hans Hagen

On 6/2/2017 10:59 AM, Mikael P. Sundqvist wrote:

Hi!

Now that the bug with primes is fixed in ConTeXt, I wonder if there is
a way to change the kerning between certain characters in mathematics
(in case one is not happy with the output from the font)? After
reading in fonts-mkiv.pdf this is what I came up with:


you can also play withj:

return {
name = "cambria-math",
mathematics = {
   kerns = {
  [0x1D453] = {
  force = true,
  topright = {
  {
  kern = 1000,
  },
  },
  bottomright = {
  {
  kern = 1000,
  },
  },
  },
  },
},
}

currently you need to enable this:

\enabledirectives[fontgoodies.mathkerning]

keep in mind that some cambria (not all) have such staircase kerns which 
is why force is needed in order to overload



\startluacode
fonts.handlers.otf.addfeature {
name = "kerntest",
type = "kern",
data = {
[0x61] = { [0x62] = -150 }, -- a and b in text
[0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
[0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
}
}
\stopluacode

\definefontfeature[kerntest][kerntest=yes]

\definefontfamily[lucidaopentype][rm][Lucida Bright OT]
\definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]

\setupbodyfont[lucidaopentype,10pt]


\startTEXpage[offset=3pt]
abba $abba f'(x)$

\addff{kerntest}

abba $abba f'(x)$

I prefer $f'\mkern-3mu(x)$
\stopTEXpage

The output is attached as a png file. As you see the kerning works as
expected in text mode, but not at all in math mode, even not for the a
and b (which I hope I entered correctly).

Something like the third line is what I'm after, but not having to use
\mkern in all places. Is it possible?

/Mikael

PS: This is a cross post of the question
https://tex.stackexchange.com/q/372857/52406, where I got the
suggestion to ask on the list.



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

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




--

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

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

Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Mikael P. Sundqvist
On Fri, Jun 2, 2017 at 1:39 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote:
> On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel
> <m...@fa.uni-tuebingen.de> wrote:
>> Hi Mikael,
>>
>> math fonts are a bit different from text fonts. This means that you need 
>> special methods to influence them. Because I once had a similar concern like 
>> you I asked Hans to implement a way to influence kerning in math fonts 
>> between certain glyphs. I have attached an lfg-file that shows how to use it.
>>
>> To enable a goodie file like the one attached you have to define your 
>> typescript like
>>
>> \starttypescript [\s!math][cambriaown][\s!all]
>> \loadfontgoodies[cambriaown-math]
>> \definefontsynonym[\s!MathRoman][Cambria-Math]   
>>
>> [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math]
>> \stoptypescript
>>
>> I hope this helps!
>>
>> Best
>> Mathias
>>
>>
>>
>>
>>
>>> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
>>>
>>> Hi!
>>>
>>> Now that the bug with primes is fixed in ConTeXt, I wonder if there is
>>> a way to change the kerning between certain characters in mathematics
>>> (in case one is not happy with the output from the font)? After
>>> reading in fonts-mkiv.pdf this is what I came up with:
>>>
>>> \startluacode
>>> fonts.handlers.otf.addfeature {
>>> name = "kerntest",
>>> type = "kern",
>>> data = {
>>> [0x61] = { [0x62] = -150 }, -- a and b in text
>>> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
>>> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
>>> }
>>> }
>>> \stopluacode
>>>
>>> \definefontfeature[kerntest][kerntest=yes]
>>>
>>> \definefontfamily[lucidaopentype][rm][Lucida Bright OT]
>>> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]
>>>
>>> \setupbodyfont[lucidaopentype,10pt]
>>>
>>>
>>> \startTEXpage[offset=3pt]
>>> abba $abba f'(x)$
>>>
>>> \addff{kerntest}
>>>
>>> abba $abba f'(x)$
>>>
>>> I prefer $f'\mkern-3mu(x)$
>>> \stopTEXpage
>>>
>>> The output is attached as a png file. As you see the kerning works as
>>> expected in text mode, but not at all in math mode, even not for the a
>>> and b (which I hope I entered correctly).
>>>
>>> Something like the third line is what I'm after, but not having to use
>>> \mkern in all places. Is it possible?
>>>
>>> /Mikael
>>>
>>> PS: This is a cross post of the question
>>> https://tex.stackexchange.com/q/372857/52406, where I got the
>>> suggestion to ask on the list.
>>> ___
>>> If your question is of interest to others as well, please add an entry to 
>>> the Wiki!
>>>
>>> maillist : ntg-context@ntg.nl / 
>>> http://www.ntg.nl/mailman/listinfo/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 very much for your reply, Mathias!
>
> I'm not sure I get it, though. I find that there is already a file
> lucida-opentype-math.lfg in the distribution.
>
> Just experimenting, I added to this file an entry with kernpairs (see
> below), to see if I could make a change with a and b (if I cannot
> manage that, I don't see how I could get the prime and parenthesis
> case to work).
>
> %%% start of my new lucida-opentype-math.lfg
> - kern_250 = { bottomright = { { kern = -250 } }, force = true }
>
> return {
> nam

Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Mikael P. Sundqvist
On Fri, Jun 2, 2017 at 11:39 AM, Mathias Schickel
<m...@fa.uni-tuebingen.de> wrote:
> Hi Mikael,
>
> math fonts are a bit different from text fonts. This means that you need 
> special methods to influence them. Because I once had a similar concern like 
> you I asked Hans to implement a way to influence kerning in math fonts 
> between certain glyphs. I have attached an lfg-file that shows how to use it.
>
> To enable a goodie file like the one attached you have to define your 
> typescript like
>
> \starttypescript [\s!math][cambriaown][\s!all]
> \loadfontgoodies[cambriaown-math]
> \definefontsynonym[\s!MathRoman][Cambria-Math]
>   
> [\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math]
> \stoptypescript
>
> I hope this helps!
>
> Best
> Mathias
>
>
>
>
>
>> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
>>
>> Hi!
>>
>> Now that the bug with primes is fixed in ConTeXt, I wonder if there is
>> a way to change the kerning between certain characters in mathematics
>> (in case one is not happy with the output from the font)? After
>> reading in fonts-mkiv.pdf this is what I came up with:
>>
>> \startluacode
>> fonts.handlers.otf.addfeature {
>> name = "kerntest",
>> type = "kern",
>> data = {
>> [0x61] = { [0x62] = -150 }, -- a and b in text
>> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
>> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
>> }
>> }
>> \stopluacode
>>
>> \definefontfeature[kerntest][kerntest=yes]
>>
>> \definefontfamily[lucidaopentype][rm][Lucida Bright OT]
>> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]
>>
>> \setupbodyfont[lucidaopentype,10pt]
>>
>>
>> \startTEXpage[offset=3pt]
>> abba $abba f'(x)$
>>
>> \addff{kerntest}
>>
>> abba $abba f'(x)$
>>
>> I prefer $f'\mkern-3mu(x)$
>> \stopTEXpage
>>
>> The output is attached as a png file. As you see the kerning works as
>> expected in text mode, but not at all in math mode, even not for the a
>> and b (which I hope I entered correctly).
>>
>> Something like the third line is what I'm after, but not having to use
>> \mkern in all places. Is it possible?
>>
>> /Mikael
>>
>> PS: This is a cross post of the question
>> https://tex.stackexchange.com/q/372857/52406, where I got the
>> suggestion to ask on the list.
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/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 very much for your reply, Mathias!

I'm not sure I get it, though. I find that there is already a file
lucida-opentype-math.lfg in the distribution.

Just experimenting, I added to this file an entry with kernpairs (see
below), to see if I could make a change with a and b (if I cannot
manage that, I don't see how I could get the prime and parenthesis
case to work).

%%% start of my new lucida-opentype-math.lfg
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

return {
name = "lucida-opentype-math",
version = "1.00",
comment = "Goodies that complement lucida opentype.",
author = "Hans Hagen",
copyright = "ConTeXt development team",
mathematics = {
alternates = {
italic   = { feature = 'ss01', value = 1, comment =
"Mathematical Alternative Lowercase Italic" },
arrow= { feature = 'ss02', value = 1, comment =
"Mathematical Alternative Smaller Arrows" },
operator = { feature = 'ss03',

Re: [NTG-context] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Mathias Schickel
Hi Mikael,

math fonts are a bit different from text fonts. This means that you need 
special methods to influence them. Because I once had a similar concern like 
you I asked Hans to implement a way to influence kerning in math fonts between 
certain glyphs. I have attached an lfg-file that shows how to use it.

To enable a goodie file like the one attached you have to define your 
typescript like

\starttypescript [\s!math][cambriaown][\s!all]
\loadfontgoodies[cambriaown-math]
\definefontsynonym[\s!MathRoman][Cambria-Math]  
[\s!features={\s!math\mathsizesuffix},\s!designsize=\s!auto,\s!goodies=cambriaown-math]
\stoptypescript

I hope this helps!

Best
Mathias



cambriaown-math.lfg
Description: Binary data



> Am 02.06.2017 um 10:59 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
> 
> Hi!
> 
> Now that the bug with primes is fixed in ConTeXt, I wonder if there is
> a way to change the kerning between certain characters in mathematics
> (in case one is not happy with the output from the font)? After
> reading in fonts-mkiv.pdf this is what I came up with:
> 
> \startluacode
> fonts.handlers.otf.addfeature {
> name = "kerntest",
> type = "kern",
> data = {
> [0x61] = { [0x62] = -150 }, -- a and b in text
> [0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
> [0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
> }
> }
> \stopluacode
> 
> \definefontfeature[kerntest][kerntest=yes]
> 
> \definefontfamily[lucidaopentype][rm][Lucida Bright OT]
> \definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]
> 
> \setupbodyfont[lucidaopentype,10pt]
> 
> 
> \startTEXpage[offset=3pt]
> abba $abba f'(x)$
> 
> \addff{kerntest}
> 
> abba $abba f'(x)$
> 
> I prefer $f'\mkern-3mu(x)$
> \stopTEXpage
> 
> The output is attached as a png file. As you see the kerning works as
> expected in text mode, but not at all in math mode, even not for the a
> and b (which I hope I entered correctly).
> 
> Something like the third line is what I'm after, but not having to use
> \mkern in all places. Is it possible?
> 
> /Mikael
> 
> PS: This is a cross post of the question
> https://tex.stackexchange.com/q/372857/52406, where I got the
> suggestion to ask on the list.
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Change kerning between math characters (prime and left parenthesis)

2017-06-02 Thread Mikael P. Sundqvist
Hi!

Now that the bug with primes is fixed in ConTeXt, I wonder if there is
a way to change the kerning between certain characters in mathematics
(in case one is not happy with the output from the font)? After
reading in fonts-mkiv.pdf this is what I came up with:

\startluacode
fonts.handlers.otf.addfeature {
name = "kerntest",
type = "kern",
data = {
[0x61] = { [0x62] = -150 }, -- a and b in text
[0x1d44e] = { [0x1d44f] = -150 }, -- mathematical italic small a and b
[0x02032] = { [0x00028] = -150 }, -- prime and left parenthesis
}
}
\stopluacode

\definefontfeature[kerntest][kerntest=yes]

\definefontfamily[lucidaopentype][rm][Lucida Bright OT]
\definefontfamily[lucidaopentype][mm][Lucida Bright Math OT]

\setupbodyfont[lucidaopentype,10pt]


\startTEXpage[offset=3pt]
abba $abba f'(x)$

\addff{kerntest}

abba $abba f'(x)$

I prefer $f'\mkern-3mu(x)$
\stopTEXpage

The output is attached as a png file. As you see the kerning works as
expected in text mode, but not at all in math mode, even not for the a
and b (which I hope I entered correctly).

Something like the third line is what I'm after, but not having to use
\mkern in all places. Is it possible?

/Mikael

PS: This is a cross post of the question
https://tex.stackexchange.com/q/372857/52406, where I got the
suggestion to ask on the list.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Location of primes and strange latin modern font

2017-05-13 Thread Mikael P. Sundqvist
On Sat, May 13, 2017 at 7:05 PM, Hans Hagen <pra...@wxs.nl> wrote:
> On 5/11/2017 8:35 PM, Mathias Schickel wrote:
>>>
>>> 2) The math font looks strange (or should I say different) in the
>>> ConTeXt example. (Wrong size, scaled?)
>>
>>
>> Yeah, this seems to be a bug in the current version. I have observed that,
>> too. Hans did recently add (due to my suggestion, so thanks again, Hans,
>> even if this seems to have caused some trouble) support for optical sizes in
>> fallbacks and I suppose the bug has been introduced there. So at present the
>> bug occurs that ConTeXt uses the smallest optical size for every symbol
>> (independent of the size). This results in strange looking mathematics.
>> Maybe you can fix this, Hans?
>
>
> Yes, in that process i swapped text and scriptscipt sizes but it has been
> 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
> ___

Hans, thanks for the fix with the sizes in math.

Will the primes also get fixed? In the latest standalone (I downloaded
it minutes ago), I get the attached result running the same test file.

/Mikael

PS Sorry if I'm too quick, if you are in the progress of solving this.
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/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] Location of primes and strange latin modern font

2017-05-13 Thread Hans Hagen

On 5/11/2017 8:35 PM, Mathias Schickel wrote:

2) The math font looks strange (or should I say different) in the
ConTeXt example. (Wrong size, scaled?)


Yeah, this seems to be a bug in the current version. I have observed that, too. 
Hans did recently add (due to my suggestion, so thanks again, Hans, even if 
this seems to have caused some trouble) support for optical sizes in fallbacks 
and I suppose the bug has been introduced there. So at present the bug occurs 
that ConTeXt uses the smallest optical size for every symbol (independent of 
the size). This results in strange looking mathematics. Maybe you can fix this, 
Hans?


Yes, in that process i swapped text and scriptscipt sizes but it has 
been 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
___

Re: [NTG-context] Bold italic font in Math (\definefallbackfamily)

2017-05-12 Thread Jose Luis Arellano
Dear list.
Please your help
I've troubles to use this code from Wolfgang.

\definefontfamily [minionmath] [rm] [Minion Pro]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasenormal]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercaseitalic]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasebold]
\definefallbackfamily [minionmath] [mm] [Minion Pro]
[preset=math:lowercasebolditalic]
\definefontfamily [minionmath] [mm] [TeX Gyre Pagella Math]

\setupbodyfont[pagella]

\starttext

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

\switchtobodyfont[minionmath]

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

\stoptext

It seems that \definefallbackfamily doesn't works like before.
What is the right way to use \it, \bf, etc. in maths?

2016-09-15 17:06 GMT-03:00 Hans Åberg <haber...@telia.com>:

>
> > On 15 Sep 2016, at 20:19, Wolfgang Schuster <schuster.wolfg...@gmail.com>
> wrote:
>
> > Another input method is shown in the following video [1] where each
> symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source
> table mentioned in the video can be found on the STIX page [2].
> >
> > [1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/
> > [2] http://www.ams.org/STIX/
>
> The video speaks about a file stix-tbl.txt containing those translation
> commands, but on [2], the stix-tbl.* table files, not ending with .txt, do
> not contain those.
>
>
> 
> ___
> If your question is of interest to others as well, please add an 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  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Location of primes and strange latin modern font

2017-05-12 Thread Mikael P. Sundqvist
On Thu, May 11, 2017 at 8:35 PM, Mathias Schickel
<m...@fa.uni-tuebingen.de> wrote:
>> 2) The math font looks strange (or should I say different) in the
>> ConTeXt example. (Wrong size, scaled?)
>
> Yeah, this seems to be a bug in the current version. I have observed that, 
> too. Hans did recently add (due to my suggestion, so thanks again, Hans, even 
> if this seems to have caused some trouble) support for optical sizes in 
> fallbacks and I suppose the bug has been introduced there. So at present the 
> bug occurs that ConTeXt uses the smallest optical size for every symbol 
> (independent of the size). This results in strange looking mathematics. Maybe 
> you can fix this, Hans?
>
> -Mathias
>
>
>> Am 11.05.2017 um 18:51 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
>>
>> Dear list,
>>
>> I posted this question on stack exchange
>> (https://tex.stackexchange.com/q/369226/52406), and got the suggestion
>> that it might be a bug, and therefore I post it here as well:
>>
>> I have a problem with typesetting derivatives (and latin modern) in
>> ConTeXt in latest standalone.
>>
>> Minimal example:
>>
>> \starttext
>> Compare $u_p''$ and $u''_p$ with $u''$
>> \stoptext
>>
>> Please see the attached image for the output (here I have also
>> included the corresponding output, compiling a similar simple document
>> in LaTeX, where things look as I expect.)
>>
>> Basically, I have two questions:
>>
>> 1) How should I write derivatives (say second derivatives) in ConTeXt?
>> I think that the primes are too far away from each other. In
>> particular when the subscript $p$ is there (the first formula).
>>
>> 2) The math font looks strange (or should I say different) in the
>> ConTeXt example. (Wrong size, scaled?)
>>
>> For a while I thought that the second problem might be because I
>> define no font. But the following example gives a similar result.
>>
>> \definefontfamily[myface][rm][Latin Modern Roman]
>> \definefontfamily[myface][mm][Latin Modern Math]
>>
>> \setupbodyfont[myface]
>>
>> \starttext
>> Compare $u_p''$ and $u''_p$ with $u''$
>> \stoptext
>>
>> Any ideas?
>>
>> /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
> ___

Thank you Mathias for your answer! That is most likely the problem!
Then we can only wait for Hans to put a new beta out. Hans, will that
happen soon?

Also, Hans, what is the official ConTeXt-way to write u with double
prime and subscript p, as in the example? Should both $u_p''$ and
$u''_p$ work?

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

Re: [NTG-context] Location of primes and strange latin modern font

2017-05-11 Thread Mathias Schickel
> 2) The math font looks strange (or should I say different) in the
> ConTeXt example. (Wrong size, scaled?)

Yeah, this seems to be a bug in the current version. I have observed that, too. 
Hans did recently add (due to my suggestion, so thanks again, Hans, even if 
this seems to have caused some trouble) support for optical sizes in fallbacks 
and I suppose the bug has been introduced there. So at present the bug occurs 
that ConTeXt uses the smallest optical size for every symbol (independent of 
the size). This results in strange looking mathematics. Maybe you can fix this, 
Hans?

-Mathias


> Am 11.05.2017 um 18:51 schrieb Mikael P. Sundqvist <mic...@gmail.com>:
> 
> Dear list,
> 
> I posted this question on stack exchange
> (https://tex.stackexchange.com/q/369226/52406), and got the suggestion
> that it might be a bug, and therefore I post it here as well:
> 
> I have a problem with typesetting derivatives (and latin modern) in
> ConTeXt in latest standalone.
> 
> Minimal example:
> 
> \starttext
> Compare $u_p''$ and $u''_p$ with $u''$
> \stoptext
> 
> Please see the attached image for the output (here I have also
> included the corresponding output, compiling a similar simple document
> in LaTeX, where things look as I expect.)
> 
> Basically, I have two questions:
> 
> 1) How should I write derivatives (say second derivatives) in ConTeXt?
> I think that the primes are too far away from each other. In
> particular when the subscript $p$ is there (the first formula).
> 
> 2) The math font looks strange (or should I say different) in the
> ConTeXt example. (Wrong size, scaled?)
> 
> For a while I thought that the second problem might be because I
> define no font. But the following example gives a similar result.
> 
> \definefontfamily[myface][rm][Latin Modern Roman]
> \definefontfamily[myface][mm][Latin Modern Math]
> 
> \setupbodyfont[myface]
> 
> \starttext
> Compare $u_p''$ and $u''_p$ with $u''$
> \stoptext
> 
> Any ideas?
> 
> /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] \overline and \overbar

2017-05-10 Thread Henri Menke
Neither is correct in a mathematics context.  Use \bar.

On 05/10/2017 05:54 PM, Jeong Dal wrote:
> Dear all,
> 
> In the following sample, the outputs of \overline and of \overbar are 
> slightly different.
> I used \overline in LaTeX. 
> But  it takes more vertical space that cause the alignment trouble while 
> using \overbar has no problem at all.
> Is it normal behavior? 
> 
> Thank you.
> 
> Best regards,
> 
> Dalyoung
> 
> 
> \starttext
> \startitemize[n]
> \item Which is true?
> 
>   \startitemize[n, packed, columns, two][stopper=,left=(, right=)]
>   \item $\overline{A} = A \cup A^\circ$
>   \item $\overline{A\cup B} = \overline{A} \cup \overline{B}$
>   \item If $A \subset B$ then $\overline{B} \subset \overline{A}$
>   \item $A\cup A'$ is an open set.
>   \stopitemize
>   
> \item Which is true?
> 
>   \startitemize[n, packed, columns, two][stopper=,left=(, right=)]
>   \item $\overbar{A} = A \cup A^\circ$
>   \item If $A \subset B$ then $\overbar{B} \subset \overbar{A}$
>   \item $\overbar{A\cup B} = \overbar{A} \cup \overbar{B}$
>   \item $A\cup A'$ is an open set.
>   \stopitemize
> 
> \stopitemize
> 
> \stoptext
> 
> 
>> 2017. 5. 9. 오후 7:00, ntg-context-requ...@ntg.nl 작성:
>>
>> Send ntg-context mailing list submissions to
>>  ntg-context@ntg.nl
>>
>> To subscribe or unsubscribe via the World Wide Web, visit
>>  https://mailman.ntg.nl/mailman/listinfo/ntg-context
>> or, via email, send a message with subject or body 'help' to
>>  ntg-context-requ...@ntg.nl
>>
>> You can reach the person managing the list at
>>  ntg-context-ow...@ntg.nl
>>
>> When replying, please edit your Subject line so it is more specific
>> than "Re: Contents of ntg-context digest..."
>>
>>
>> Today's Topics:
>>
>>   1. Re: BUG: % is comment in btx fields (Henri Menke)
>>   2. Re: BUG: % is comment in btx fields (Rik Kabel)
>>   3. Re: BUG: % is comment in btx fields (Ulrike Fischer)
>>
>>
>> --
>>
>> Message: 1
>> Date: Tue, 09 May 2017 13:40:55 +1200
>> From: Henri Menke <henrime...@gmail.com>
>> To: ntg-context@ntg.nl
>> Subject: Re: [NTG-context] BUG: % is comment in btx fields
>> Message-ID: <1494294055.19890.36.ca...@gmail.com>
>> Content-Type: text/plain; charset="UTF-8"
>>
>> On Mon, 2017-05-08 at 20:15 -0400, Rik Kabel wrote:
>>> On 2017-05-08 17:44, Henri Menke wrote:
>>>> Dear list,
>>>>
>>>> The percent character in btx field is taken as a comment characters
>>>> which leads to the rest of the field being discarded.  In the MWE
>>>> below, the URL is cut off at the % sign and everything after it is
>>>> lost.
>>>>
>>>> Cheers, Henri
>>>>
>>>>
>>>> ---
>>>>
>>>>
>>>> \startbuffer[references]
>>>> @misc{kraft,
>>>>   author = "Kraft, Nathan",
>>>>   title = "Mr Kraft's Virtual Filing Cabinet",
>>>>   year = "2015",
>>>>   url = "http://mrkraft.wikispaces.com/Mr+Kraft%27s+Virtual+Filing+
>>>> Cabi
>>>> net"
>>>> }
>>>> \stopbuffer
>>>>
>>>> \usebtxdataset[references.buffer]
>>>> \usebtxdefinitions[apa]
>>>>
>>>> \starttext
>>>>
>>>> \nocite[kraft]
>>>> \placelistofpublications
>>>>
>>>> \stoptext
>>>  The bibtex entry in this example is provided in a buffer. The buffer
>>> mechanism does not handle characters any differently than other text
>>> in the file, and % in a ConTeXt buffer has to be escaped if it does
>>> not signify a comment.
>>
>> That is simply not true!  Content inside ConTeXt buffers is as verbatim
>> as reading an external file.  Try \typebuffer instead of \getbuffer
>> your example below and observe that the comment sign is perfectly
>> preserved.
>>
>>> If you specify an external (.bib or .bibtex) file to supply the
>>> data,  % does not need to be escaped. So, this part is simple user
>>> error.
>>> (With
>>> \starttext
>>> \startbuffer
>>>   abc%def
>>>
>>>   ghi\%jkl
>>> \stopbuffer
>>> \getbuffer
>>> \stoptext
>>> you do not get %def in the output. Why do yo

Re: [NTG-context] Question about " ! Infinite glue shrinkage inserted from \skip131" error

2017-03-10 Thread Hans Hagen

On 3/10/2017 5:34 PM, Jeong Dal wrote:

Dear all,

I have an error " ! Infinite glue shrinkage inserted from \skip131”
What is the meaning of this error?


latest luatex and latest context?


Also, depending on the position of “\stopcomponent”, the error varies.

There are many similar lines in the file.
I am sorry that I can't give a sample file which invoke the same error.

Thank you for reading.

Best regards,

Dalyoung


putting \stopcomponent at the position (1), (2) are OK, no error.
putting \stopcomponent at the position (4) invoke the following  error.
…
pages   > flushing realpage 5, userpage 5
fonts   > bodyfont '24.0414pt' is defined (can better be done
global)

tex error   > tex error on line 7 in file
/Users/graph/Documents/Mathematics/MathModelling/MathModel2.tex: !
Infinite glue shrinkage inserted from \skip131


\handlenoteinsert ...enoteitself {#1}{#2}}\egroup
  \the
\everyafternoteinsert...
l.7 }



\clf_flushpostponednotes ...f_flushpostponednotes



\flushnotes ...es \relax \clf_flushpostponednotes
  \global \setfalse
\postpon...
\page_breaks_process ...the \everybeforepagebreak

\c_page_breaks_prevpage \r...
 ...t \nonoindentation \else \page [\v!preference ]

\page_otr_command_check_if...
...
l.50 \stopplacefigure




 1 % !TEX root =../../Main.tex
 2
 3 \startcomponent MathModel2
 4 \product Main
 5
 6 \SlideTitle{미적분학}
 7 >>  \null\vfill
 8 자연과일상생활에서일어나는많은일들의수학적모델을잘찾아낼수만있다
면앞으로의변화나예상되는일들을정확하게파악할수있을것이다. 하지만이런일들
의정확한수학적모델을찾는다는것은매우어려운일이다.
 9 대부분의경우어느정도오차를인정하고수학적모델을만들수밖에없는데많
은경우에미분방정식혹은편미분방정식으로모델링된다. 따라서, 이를분석하기위
해서는미적분학, 넓게는해석학의도움이많이필요하다. 대학수학에서미적분학을
필수로다루는이유도여기에있다.
10 \vfill
11
12 \SlideTitle{개체군 증가모델}
13 \null\vfill
14 인구증가나어떤동물의개체증가는현재존재하는개체수가많을수록더많이
증가할것이라고예상할수있다.
15 즉, 인구가작은나라의인구증가울보다인구가많은나라의인구증가율이높
을것이라는짐작이다. 이런예상을바탕으로개체수가$N$이고증가율이$r$인개체의
시간에따른증가율은대체로다음과같은방정식으로표현할수있다.
16 \nowhitespace
17 \startformula


? x

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path:
/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans
with scantime 0.000 seconds, 0 shared scans, 55 found files, scanned
paths: 



putting \stopcomponent at the position (3), (5), (6) invoke the error
…..
pages   > flushing realpage 5, userpage 5
fonts   > bodyfont '24.0414pt' is defined (can better be done
global)

mtx-context | fatal error: no return code, message: luatex:
execution interrupted
Process aborted
…..

Here is a part of the text.
% !TEX root =../../Main.tex

\startcomponent MathModel2
\product Main

\SlideTitle{미적분학}
\null\vfill
자연과 일상생활에서 일어나는 많은 일들의 수학적 모델을 잘 찾아낼 수만 있
다면 앞으로의 변화나 예상되는 일들을 정확하게 파악할 수 있을 것이다. 하
지만 이런 일들의 정확한 수학적모델을 찾는다는 것은 매우 어려운 일이다.
대부분의 경우 어느 정도 오차를 인정하고 수학적모델을 만들 수 밖에 없는데
많은 경우에 미분방정식 혹은 편미분방정식으로 모델링된다. 따라서, 이를 분
석하기위해서는 미적분학, 넓게는 해석학의 도움이 많이 필요하다. 대학수학
에서 미적분학을 필수로 다루는 이유도 여기에 있다.
\vfill

\SlideTitle{개체군 증가모델}
\null\vfill
인구증가나 어떤 동물의 개체증가는 현재 존재하는 개체수가 많을수록 더 많
이 증가할 것이라고 예상할 수 있다.
즉, 인구가 작은 나라의 인구증가울보다 인구가 많은 나라의 인구증가율이 높
을 것이라는 짐작이다. 이런 예상을 바탕으로 개체수가 $N$이고 증가율이
$r$인 개체의 시간에 따른 증가율은 대체로 다음과 같은 방정식으로 표현할
수 있다.
\nowhitespace
\startformula
{dN \over dt} = r \cdot N
\stopformula
\nbb{활동} 개체군 증가모델이 만족해야할 조건들이 어떤 것들이 있는지 살펴
보고 좀 더 나은 모델링을 찾아보자.
\vfill

\SlideTitle{로지스트형 개체군 성장모델}
\null\vfill
개체군 증가 모델이 실제로는 잘 맞지 않는 경우가 생긴다. 이는 환경, 자원
등의 문제때문이다.
이를 감안한 모델이 다음과 같다.
\startformula
{dN \over dt} = r \cdot N(1 - {N \over K})
\stopformula
여기서 $k$는 환경수용능력을 나타내는 수로 개체당 출생률, 개체당 사망률,
개체군 크기에 따른 개체당 출생률의 변화율, 그리고 개체군 크기에 따른 개
체당 사망률의 변화율에 따라 정해지는 수이다.
\vfill

\SlideTitle{퀘니히스베르그의 7개 다리}
%\null\vfill
\startplacefigure[location=none]
\startanimation[menu=yes]

 {\externalfigure[./MathShapes/7Bridges/konigsberg][width=.6\makeupwidth]}

 {\externalfigure[./MathShapes/7Bridges/konigsbergDots][width=.6\makeupwidth]}

 {\externalfigure[./MathShapes/7Bridges/konigsbergLines][width=.6\makeupwidth]}

 {\externalfigure[./MathShapes/7Bridges/konigsbergGraph][width=.6\makeupwidth]}
\stopanimation
\stopplacefigure
%\vfill
%\stopcomponent(1)
\SlideTitle{지하철 지도}
\null\vfill
\startplacefigure[title={서울 지하철\footnote{네이버}}]
 {\externalfigure[./GraphBook/SubwaySeoul][width=.7\makeupwidth]}
\stopplacefigure
 \vfill
%%%\stopcomponent(2)

\SlideTitle{길 찾 기}
\null\vfill
\startplacefigure[title={길찾기 예}]
 {\externalfigure[./graphbook/Path2][width=.8\makeupwidth]}
\stopplacefigure
 \vfill
%%%(3)

\SlideTitle{연결하기 문제}
\null\vfill
\startplacefigure[title={전기, 개스, 상수도 연결하기}]
 {\externalfigure[./GraphBook/fig103][width=.8\makeupwidth]}
\stopplacefigure
 \vfill

%%%  

[NTG-context] Question about " ! Infinite glue shrinkage inserted from \skip131" error

2017-03-10 Thread Jeong Dal
Dear all,

I have an error " ! Infinite glue shrinkage inserted from \skip131”
What is the meaning of this error?

Also, depending on the position of “\stopcomponent”, the error varies.

There are many similar lines in the file.
I am sorry that I can't give a sample file which invoke the same error.

Thank you for reading.

Best regards,

Dalyoung


putting \stopcomponent at the position (1), (2) are OK, no error.
putting \stopcomponent at the position (4) invoke the following  error.
…
pages   > flushing realpage 5, userpage 5
fonts   > bodyfont '24.0414pt' is defined (can better be done global)

tex error   > tex error on line 7 in file 
/Users/graph/Documents/Mathematics/MathModelling/MathModel2.tex: ! Infinite 
glue shrinkage inserted from \skip131


\handlenoteinsert ...enoteitself {#1}{#2}}\egroup 
  \the \everyafternoteinsert...
l.7 }
   
\clf_flushpostponednotes ...f_flushpostponednotes 
  
\flushnotes ...es \relax \clf_flushpostponednotes 
  \global \setfalse \postpon...
\page_breaks_process ...the \everybeforepagebreak 
  \c_page_breaks_prevpage \r...
 ...t \nonoindentation \else \page [\v!preference ]
  \page_otr_command_check_if...
...
l.50 \stopplacefigure
   

 1 % !TEX root =../../Main.tex
 2 
 3 \startcomponent MathModel2
 4 \product Main
 5 
 6 \SlideTitle{미적분학}
 7 >>  \null\vfill
 8 자연과 일상생활에서 일어나는 많은 일들의 수학적 모델을 잘 찾아낼 수만 있다면 앞으로의 변화나 예상되는 일들을 정확하게 파악할 수 
있을 것이다. 하지만 이런 일들의 정확한 수학적모델을 찾는다는 것은 매우 어려운 일이다. 
 9 대부분의 경우 어느 정도 오차를 인정하고 수학적모델을 만들 수 밖에 없는데 많은 경우에 미분방정식 혹은 편미분방정식으로 
모델링된다. 따라서, 이를 분석하기위해서는 미적분학, 넓게는 해석학의 도움이 많이 필요하다. 대학수학에서 미적분학을 필수로 다루는 이유도 
여기에 있다. 
10 \vfill
11 
12 \SlideTitle{개체군 증가모델}
13 \null\vfill
14 인구증가나 어떤 동물의 개체증가는 현재 존재하는 개체수가 많을수록 더 많이 증가할 것이라고 예상할 수 있다. 
15 즉, 인구가 작은 나라의 인구증가울보다 인구가 많은 나라의 인구증가율이 높을 것이라는 짐작이다. 이런 예상을 바탕으로 개체수가 
$N$이고 증가율이 $r$인 개체의 시간에 따른 증가율은 대체로 다음과 같은 방정식으로 표현할 수 있다. 
16 \nowhitespace
17 \startformula


? x

mkiv lua stats  > used config file: selfautoparent:/texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path: 
/Users/graph/ConTeXt/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e
mkiv lua stats  > resource resolver: loadtime 0.007 seconds, 0 scans with 
scantime 0.000 seconds, 0 shared scans, 55 found files, scanned paths: 



putting \stopcomponent at the position (3), (5), (6) invoke the error
…..
pages   > flushing realpage 5, userpage 5
fonts   > bodyfont '24.0414pt' is defined (can better be done global)

mtx-context | fatal error: no return code, message: luatex: execution 
interrupted
Process aborted
…..

Here is a part of the text.
% !TEX root =../../Main.tex

\startcomponent MathModel2
\product Main

\SlideTitle{미적분학}
\null\vfill
자연과 일상생활에서 일어나는 많은 일들의 수학적 모델을 잘 찾아낼 수만 있다면 앞으로의 변화나 예상되는 일들을 정확하게 파악할 수 있을 
것이다. 하지만 이런 일들의 정확한 수학적모델을 찾는다는 것은 매우 어려운 일이다. 
대부분의 경우 어느 정도 오차를 인정하고 수학적모델을 만들 수 밖에 없는데 많은 경우에 미분방정식 혹은 편미분방정식으로 모델링된다. 따라서, 
이를 분석하기위해서는 미적분학, 넓게는 해석학의 도움이 많이 필요하다. 대학수학에서 미적분학을 필수로 다루는 이유도 여기에 있다. 
\vfill

\SlideTitle{개체군 증가모델}
\null\vfill
인구증가나 어떤 동물의 개체증가는 현재 존재하는 개체수가 많을수록 더 많이 증가할 것이라고 예상할 수 있다. 
즉, 인구가 작은 나라의 인구증가울보다 인구가 많은 나라의 인구증가율이 높을 것이라는 짐작이다. 이런 예상을 바탕으로 개체수가 $N$이고 
증가율이 $r$인 개체의 시간에 따른 증가율은 대체로 다음과 같은 방정식으로 표현할 수 있다. 
\nowhitespace
\startformula
{dN \over dt} = r \cdot N
\stopformula
\nbb{활동} 개체군 증가모델이 만족해야할 조건들이 어떤 것들이 있는지 살펴보고 좀 더 나은 모델링을 찾아보자.
\vfill

\SlideTitle{로지스트형 개체군 성장모델}
\null\vfill
개체군 증가 모델이 실제로는 잘 맞지 않는 경우가 생긴다. 이는 환경, 자원 등의 문제때문이다. 
이를 감안한 모델이 다음과 같다.
\startformula
{dN \over dt} = r \cdot N(1 - {N \over K})
\stopformula
여기서 $k$는 환경수용능력을 나타내는 수로 개체당 출생률, 개체당 사망률, 개체군 크기에 따른 개체당 출생률의 변화율, 그리고 개체군 크기에 
따른 개체당 사망률의 변화율에 따라 정해지는 수이다. 
\vfill

\SlideTitle{퀘니히스베르그의 7개 다리}
%\null\vfill
\startplacefigure[location=none]
\startanimation[menu=yes]
 {\externalfigure[./MathShapes/7Bridges/konigsberg][width=.6\makeupwidth]}
 
{\externalfigure[./MathShapes/7Bridges/konigsbergDots][width=.6\makeupwidth]}
 
{\externalfigure[./MathShapes/7Bridges/konigsbergLines][width=.6\makeupwidth]}
 
{\externalfigure[./MathShapes/7Bridges/konigsbergGraph][width=.6\makeupwidth]}
\stopanimation
\stopplacefigure
%\vfill
%\stopcomponent(1)
\SlideTitle{지하철 지도}
\null\vfill
\startplacefigure[title={서울 지하철\footnote{네이버}}]
 {\externalfigure[./GraphBook/SubwaySeoul][width=.7\makeupwidth]}
\stopplacefigure
 \vfill
%%%\stopcomponent(2)

\SlideTitle{길 찾 기}
\null\vfill
\startplacefigure[title={길찾기 예}]
 {\externalfigure[./graphbook/Path2][width=.8\mak

Re: [NTG-context] BUG(?): asciimath does not support ||

2017-01-23 Thread Henri Menke
Thanks Aditya!

Seems like there is no double vertical bar in the ASCIIMATH specs.  I
don’t use it anyway.

Sorry for making noise.

On 01/23/2017 09:05 AM, Aditya Mahajan wrote:
> On Fri, 20 Jan 2017, Henri Menke wrote:
> 
>> Dear devs,
>>
>> In mathematics the norm of something is usually denoted by the double
>> vertical bars, e.g. ||v||.  This is not available in asciimath.
>>
>> \usemodule[asciimath]
>> \starttext
>> $\asciimath{ x^* = min { x | sum_{kk} ||f(x_{kk}^{20})|| } }$
>> \stoptext
>>
>> Could you please add this to the parser?
> 
> IIRC, x-asciimath implements (part of?) the asciimath markup:
> http://asciimath.org
> https://en.wikipedia.org/wiki/AsciiMath
> 
> Typing the above formula on the asciimath website does not render it
> correctly.
> 
> 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] BUG(?): asciimath does not support ||

2017-01-23 Thread Aditya Mahajan

On Fri, 20 Jan 2017, Henri Menke wrote:


Dear devs,

In mathematics the norm of something is usually denoted by the double vertical 
bars, e.g. ||v||.  This is not available in asciimath.

\usemodule[asciimath]
\starttext
$\asciimath{ x^* = min { x | sum_{kk} ||f(x_{kk}^{20})|| } }$
\stoptext

Could you please add this to the parser?


IIRC, x-asciimath implements (part of?) the asciimath markup:
http://asciimath.org
https://en.wikipedia.org/wiki/AsciiMath

Typing the above formula on the asciimath website does not render it 
correctly.


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
___

[NTG-context] BUG(?): asciimath does not support ||

2017-01-20 Thread Henri Menke
Dear devs,

In mathematics the norm of something is usually denoted by the double vertical 
bars, e.g. ||v||.  This is not available in asciimath.

\usemodule[asciimath]
\starttext
$\asciimath{ x^* = min { x | sum_{kk} ||f(x_{kk}^{20})|| } }$
\stoptext

Could you please add this to the parser?

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

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

Re: [NTG-context] Different column modes and NAW

2016-12-19 Thread Mikael P. Sundqvist
On Sun, Dec 18, 2016 at 9:19 PM, Mikael P. Sundqvist <mic...@gmail.com> wrote:
> Dear list,
>
> I just realized that the very nice articles in "Nieuw archief voor
> Wiskunde" (see 
> http://www.nieuwarchief.nl/serie5/index.php?deel=17=4=1
> ) are typeset with ConTeXt (at least it says so at
> http://www.nieuwarchief.nl/homeitems.php?onderwerp=2=1).
>
> I get curious. Does anyone here know what column mode (i.e.
> \startcolumn \stopcolumn, \startmixedcolumn\stopmixedcolumn,
> columnsets or even the new module newcolumnsets?) they use, and how
> they get mathematics to play with it without breaking the grid?
>
> Also, if I start to write a new document with two columns today (it
> will contain lots of images and lots of formulas and enumerations),
> which column mode is the preferred one? Is there any documentation
> (except the source) for the newcolumnsets? I want to be able to have
> images span both columns and it would be nice if it played well with
> sections as well.
>
> Best regards, Mikael

Dear list,

(I got some information offlist from Hans regarding NAW, it seems they
used an old pdftex-based hacked version)

I gave no example. I decided now that I would like to try the new
pagegrid out (loaded via newcolumnsets module now). But I somehow fail
even with a simple(?) example: Could someone point out what I do
wrong? If you have a small snippet of working code (even with
columnsetspans, I left them out since I think this simpler document
must work first) I'm very happy to look at it.

Also, the placement options for \placefigure seem to be ignored (try
for example bottom). Are they not implemented yet?

Best regards, Mikael

% start of example
\usemodule[newcolumnsets]

\setupbodyfont[9pt]

\definecolumnset[example][n=2]

\starttext

\startcolumnset[example]
\section{Test}
\input tufte
\startformula
f(x)=f(0)+\int_0^x f'(t)\,dt
\stopformula
\input knuth
\placefigure{Caption}{\blackrule[width=4cm,height=3cm]}
\dorecurse{6}{\input knuth \par}
\stopcolumnset

\stoptext
% end of example


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

[NTG-context] Different column modes and NAW

2016-12-18 Thread Mikael P. Sundqvist
Dear list,

I just realized that the very nice articles in "Nieuw archief voor
Wiskunde" (see 
http://www.nieuwarchief.nl/serie5/index.php?deel=17=4=1
) are typeset with ConTeXt (at least it says so at
http://www.nieuwarchief.nl/homeitems.php?onderwerp=2=1).

I get curious. Does anyone here know what column mode (i.e.
\startcolumn \stopcolumn, \startmixedcolumn\stopmixedcolumn,
columnsets or even the new module newcolumnsets?) they use, and how
they get mathematics to play with it without breaking the grid?

Also, if I start to write a new document with two columns today (it
will contain lots of images and lots of formulas and enumerations),
which column mode is the preferred one? Is there any documentation
(except the source) for the newcolumnsets? I want to be able to have
images span both columns and it would be nice if it played well with
sections as well.

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

Re: [NTG-context] mathsf / mathversions in context

2016-10-11 Thread Wolfgang Schuster

Csikos Bela <mailto:bcsikos...@freemail.hu>
11. Oktober 2016 um 21:52
Dear list members:

I would like to set up Tex Gyre Adventor sans serif font as my math 
font (even if it doesn't have

math symbols). I have two questions related to this problem.

1. In latex I can specify math font versions, define a specific font 
as math serif / normal, another as math
sans serif etc. 
(http://milde.users.sourceforge.net/LUCR/Math/math-font-selection.xhtml). 
Is this possible

in context, and if yes, how?

ConTeXt doesn’t use the same style switches as LaTeX.
2. If I specify Tex Gyre Adventor as default math font in context, I 
get compile error.

Here is a MWE, file name is mathfont.tex:


\definefontfamily [mathfont] [sf] [Tex Gyre Bonum]
\definefontfamily [mathfont] [mm] [Tex Gyre Adventor]
\setupbodyfont[mathfont,10pt]

\starttext

Normal text.

\math{Inline math expression.}

Normal text.

\stoptext


1. sf is not a valid argument for the second argument of \definefontfamily

2. You need a real math font for mathematics, a text font doesn’t work 
because it lacks many parameter for math mode.


3. You can use the font fallback mechanism to replace certain character 
in the math font with characters from a text font.


\definefontfamily [mathfont] [rm] [Tex Gyre Bonum]
\definefallbackfamily [mathfont] [mm] [Tex Gyre Adventor] 
[preset=math:lowercaseitalic]
\definefallbackfamily [mathfont] [mm] [Tex Gyre Adventor] 
[tf=style:italic,range=0x068,offset=0x0210E]% Planck constant

\definefontfamily [mathfont] [mm] [Tex Gyre Pagella Math]

\setupbodyfont[mathfont,10pt]

\starttext

Normal text.

\math{a + b = c}

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

Re: [NTG-context] Bold italic font in Math (\definefallbackfamily)

2016-09-15 Thread Hans Åberg

> On 15 Sep 2016, at 20:19, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:

> Another input method is shown in the following video [1] where each symbol 
> get its own command, e.g. \mbfitx is equal to {\bi x}. The source table 
> mentioned in the video can be found on the STIX page [2].
> 
> [1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/
> [2] http://www.ams.org/STIX/

The video speaks about a file stix-tbl.txt containing those translation 
commands, but on [2], the stix-tbl.* table files, not ending with .txt, do not 
contain those.


___
If your question is of interest to others as well, please add an 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] Bold italic font in Math (\definefallbackfamily)

2016-09-15 Thread Wolfgang Schuster

Hans Åberg <mailto:haber...@telia.com>
15. September 2016 um 19:44

I use Xcode on MacOS (former OS X), which has very good Unicode 
support (including RTL scripts). There is a Unicode symbols table, but 
it is slow. One can also design one's own keyboard map, but that is 
very time consuming.
Another input method is shown in the following video [1] where each 
symbol get its own command, e.g. \mbfitx is equal to {\bi x}. The source 
table mentioned in the video can be found on the STIX page [2].


[1] http://zeeba.tv/reconciling-unicode-math-with-latex2e-mathematics/
[2] http://www.ams.org/STIX/

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

<    1   2   3   4   5   6   7   >