Re: [NTG-context] About \definefallbackfamily

2016-08-28 Thread Jose Luis Arellano
Hello list,
I have another question for you, it is about diacritic's replacement
in math mode.

\definefontfamily[mainface][serif][Minion Pro]
\definefallbackfamily[mainface][math][Minion
Pro][tf=style:italic,preset=math:lowercaseitalic]
\definefallbackfamily[mainface][math][Minion
Pro][tf=style:italic,preset=math:uppercaseitalic]
\definefontfamily[mainface][math][Latin Modern Math]
\setupbodyfont[mainface]

\starttext
{\it Piña}\par
\m{Pi\tilde{n}a}\par
{\it Canción}\par
\m{Canci\acute{o}n}
\stoptext

As you can see, the accents are replaced with Latin Modern Math font.
So, how can i use accents from Minion Pro?

2016-08-28 19:45 GMT-03:00 Jose Luis Arellano :
> Thanks Wolfgang,
>
> For now, am using this work around to get italic in maths:
>
> \definefallbackfamily[mainface][math][Minion
> Pro][tf=style:italic,preset=math:lowercaseitalic]
>
> I have another couple of questions:
>
> 1) I am using a font that have the feature onum enabled by default, so
> how can i unset this feature for math (lnum,tnum)?
> 2)  Is there any way to use only some symbols like +, - from Minion
> Pro in math mode?
___
If your question is of interest to others as well, please add an 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] About \definefallbackfamily

2016-08-28 Thread Jose Luis Arellano
Thanks Wolfgang,

For now, am using this work around to get italic in maths:

\definefallbackfamily[mainface][math][Minion
Pro][tf=style:italic,preset=math:lowercaseitalic]

I have another couple of questions:

1) I am using a font that have the feature onum enabled by default, so
how can i unset this feature for math (lnum,tnum)?
2)  Is there any way to use only some symbols like +, - from Minion
Pro in math mode?
___
If your question is of interest to others as well, please add an 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] Marginrule levels after \placefigure[right]

2016-08-28 Thread Aditya Mahajan

On Sun, 28 Aug 2016, Aditya Mahajan wrote:


Hi,

This is based on a question on TeX.SE
https://tex.stackexchange.com/questions/326653/context-wrapfigure-interacts-with-marginrule

All marginrules except those of level 1 stop working after 
\placefigure[right]. Here is a minimal example:


\useexternalfigure[ctanlion][http://www.ctan.org/lion/ctan_lion_350x350.png][width=4cm]
\starttext

\placefigure[here,none,right]{}{\externalfigure[ctanlion]}
\input knuth

\startmarginrule[2]
 \input ward
\stopmarginrule

\startmarginrule[1]
 \input ward
\stopmarginrule

\startmarginrule[3]
 \input ward
\stopmarginrule

\stoptext

The output is attached.


The attached patch seems to fix the bug.

Aditya*** /opt/context-minimals/tex/texmf-context/tex/context/base/mkiv/anch-bar.mkiv	2016-08-28 16:55:00.0 -0400
--- anch-bar.mkiv	2016-08-28 16:52:47.0 -0400
***
*** 111,118 
 \advance\d_anch_sidebars_distance\scratchdistance\relax
   \fi
 \else
   \ifnum\m_level=\plusone
-\scratchdimen\sidebarparameter\c!leftmargindistance\relax
 \ifdim\scratchdimen=\zeropoint
   \advance\d_anch_sidebars_distance\scratchdistance\relax
 \else
--- 111,118 
 \advance\d_anch_sidebars_distance\scratchdistance\relax
   \fi
 \else
+  \scratchdimen\sidebarparameter\c!leftmargindistance\relax
   \ifnum\m_level=\plusone
 \ifdim\scratchdimen=\zeropoint
   \advance\d_anch_sidebars_distance\scratchdistance\relax
 \else
___
If your question is of interest to others as well, please add an 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
___

[NTG-context] Marginrule levels after \placefigure[right]

2016-08-28 Thread Aditya Mahajan

Hi,

This is based on a question on TeX.SE
https://tex.stackexchange.com/questions/326653/context-wrapfigure-interacts-with-marginrule

All marginrules except those of level 1 stop working after 
\placefigure[right]. Here is a minimal example:


\useexternalfigure[ctanlion][http://www.ctan.org/lion/ctan_lion_350x350.png][width=4cm]
\starttext

\placefigure[here,none,right]{}{\externalfigure[ctanlion]}
\input knuth

\startmarginrule[2]
  \input ward
\stopmarginrule

\startmarginrule[1]
  \input ward
\stopmarginrule

\startmarginrule[3]
  \input ward
\stopmarginrule

\stoptext

The output is attached.

Aditya

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

Re: [NTG-context] mathalignment and grid

2016-08-28 Thread Henri Menke
Dear list,

I did some research in math-ali.mkiv and found that when grid is enabled, the 
whole alignment is simply put in a vbox and snapped to the grid using

\def\math_alignment_snap_start
  {\ifgridsnapping
 \snaptogrid[\v!both]\vbox\bgroup
   \fi}

Unfortunately, the `both` option rounds down both depth and height which is 
inconvenient when the content has large descenders (as in the example).  It  
should be therefore changed to some other grid setting which rounds up.  I 
chose `top` for now but I'm not done experimenting yet.

Cheers, Henri


On 08/28/2016 03:27 PM, Henri Menke wrote:
> Dear list,
> 
> when I typeset multi line equations using mathalignment and grid the 
> descenders of the last line of equation run into the first line of text after 
> that equation.  The problem is particularly bad with the Lucida fonts (I 
> think the large operators are relatively larger than for Latin Modern).
> 
> I could just increase the spacing after equation (commented out in the MWE 
> below), but that would introduce an imbalance between space before and space 
> after for all equations without descenders.  Furthermore the problem does not 
> arise for single line equations with descenders.  Without grid there is also 
> no problem.
> 
> How do I fix mathalignment to prevent this?
> 
> Cheers, Henri
> 
> ---
> 
> \setuplayout[grid=yes]
> \setupbodyfont[lucidaot,9pt]
> %\setupformulas[spaceafter={back,nowhite,2*line}]
> 
> \showgrid
> \starttext
> 
> \input ward
> \startformula
>   \startmathalignment
>   \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
>   \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
>   \stopmathalignment
> \stopformula
> %\blank[2*line]
> \input ward
> \startformula
>   \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta}
> \stopformula
> \input ward
> \startformula
>   \text{no descenders}
> \stopformula
> \input ward
> 
> \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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] \restorecounter ignores first save

2016-08-28 Thread Hans Hagen

On 8/27/2016 3:41 PM, Wolfgang Schuster wrote:

Hi Hans,

the save/restore state for the counter in the example is ignored.

 begin example
\enabletrackers[structures.counters]

\definecounter[test]

\starttext

\incrementcounter[test]
\convertedcounter[test]

\dorecurse{10}
  {\savecounter[test]
   \incrementcounter[test]
   \convertedcounter[test]
   \restorecounter[test]
   \par}

\stoptext
 end example


The problem is the check for the table size in the counters.restore
function because after the first save the size of the table is 1:

function counters.restore(name)
local cd = counterdata[name]
if not cd then
report_counters("invalid restore, no counter %a",name)
return
end
local saved = cd.saved
if not saved then
-- is ok
elseif #saved > 1 then


should be > 0


cd.data = remove(saved)
else
report_counters("restore without save for counter %a",name)
end
end



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
___



--

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

Re: [NTG-context] \startalign \stopalign equation number placement seems wrong

2016-08-28 Thread Mikael P. Sundqvist
On Wed, Aug 17, 2016 at 3:23 PM, Otared Kavian  wrote:
> Hi Mikael,
>
> I confirm that the latest beta (ConTeXt version 2016.08.11 13:56 MKIV beta) 
> has the issue you are reporting.
> This bug is absent from the current version from TeXLive2016, that is ConTeXt 
>  version 2016.05.17 19:20 MKIV current.
>
> Some time ago I reported an analogous issue with startalign, and it seemed to 
> me that Hans fixed it. But it appeared again with the beta 2016.08.11 13:56.
>
> Best regards: OK
>
>> On 17 Aug 2016, at 14:20, Mikael P. Sundqvist  wrote:
>>
>> Hi,
>>
>> The test file
>>
>> \starttext
>> \placeformula
>> \startformula
>> \startalign
>> \NC \exp(t_1)\exp(t_2)\NC =x_1x_2=\exp(\ln(x_1x_2))\NR
>> \NC \NC =\exp(\ln x_1+\ln x_2)=\exp(t_1+t_2).\NR[eq:explag1]
>> \stopalign
>> \stopformula
>>
>> \placeformula
>> \startformula
>> 1+1=2
>> \stopformula
>> \stoptext
>>
>> gives the attached pdf. In the first formula, the location of the
>> equation number seems to be wrong (I would have expected it to be to
>> the right, like in the second example). In the (nice, but rather old
>> now) My Way by Aditya, this does not seem to happen.
>>
>> /Mikael
>> ___
>> If your question is of interest to others as well, please add an entry to 
>> the Wiki!
>>
>> maillist : ntg-context@ntg.nl / 
>> http://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
>> archive  : http://foundry.supelec.fr/projects/contextrev/
>> wiki : http://contextgarden.net
>> ___
>
> ___
> If your question is of interest to others as well, please add an entry to the 
> Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki : http://contextgarden.net
> ___


With the latest beta, it looks better, but not perfect (I'd expect the
(1) and the (2) to be aligned). Same input file as in the first email
in this thread gives the attached pdf.

/Mikael


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

[NTG-context] mathalignment and grid

2016-08-28 Thread Henri Menke
Dear list,

when I typeset multi line equations using mathalignment and grid the descenders 
of the last line of equation run into the first line of text after that 
equation.  The problem is particularly bad with the Lucida fonts (I think the 
large operators are relatively larger than for Latin Modern).

I could just increase the spacing after equation (commented out in the MWE 
below), but that would introduce an imbalance between space before and space 
after for all equations without descenders.  Furthermore the problem does not 
arise for single line equations with descenders.  Without grid there is also no 
problem.

How do I fix mathalignment to prevent this?

Cheers, Henri

---

\setuplayout[grid=yes]
\setupbodyfont[lucidaot,9pt]
%\setupformulas[spaceafter={back,nowhite,2*line}]

\showgrid
\starttext

\input ward
\startformula
  \startmathalignment
  \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
  \NC \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta} \NR
  \stopmathalignment
\stopformula
%\blank[2*line]
\input ward
\startformula
  \sum_{i,\alpha,\beta} c_{i,\alpha}^\dagger c_{i,\beta}
\stopformula
\input ward
\startformula
  \text{no descenders}
\stopformula
\input ward

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