ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* How to get \iint?
@ 2010-11-23 16:18 Vladimir Lomov
  2010-11-23 17:07 ` Aditya Mahajan
  0 siblings, 1 reply; 4+ messages in thread
From: Vladimir Lomov @ 2010-11-23 16:18 UTC (permalink / raw)
  To: General mailing list for ConTeXt users

Hi.

The command \iint is defined in context (mkiv) but it doesn't produce
the desired sign. What I should do to make it appear? (in log file I see
that LMMath font desn't contain such symbol but I don't know much about
font mechanism of context, btw in latex I could easily get that symbol
so I think it should be in 'standard' math font).
Minimal example:
<example file="ex1.tex">
%%% By default context minimal doesn't give easy access to \iint — double integral sign
\starttext

This is ordinary integral (sign):
\startformula
  \int_{a}^{b}f(x) \text{d}x = F(x)+C
\stopformula

Though the command \type{\iint} is defined it doesn't give proper sign (in MkIV). Example:
\startformula
  \iint_{D}f(x,y)\text{d}x\text{d}y
\stopformula

\stoptext
</example>

---
WBR, Vladimir Lomov

-- 
We are using Linux daily to UP our productivity - so UP yours!
	-- Adapted from Pat Paulsen by Joe Sloan
___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to get \iint?
  2010-11-23 16:18 How to get \iint? Vladimir Lomov
@ 2010-11-23 17:07 ` Aditya Mahajan
  2010-11-23 20:45   ` Khaled Hosny
  2010-11-25  7:08   ` Vladimir Lomov
  0 siblings, 2 replies; 4+ messages in thread
From: Aditya Mahajan @ 2010-11-23 17:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Wed, 24 Nov 2010, Vladimir Lomov wrote:

> Hi.
>
> The command \iint is defined in context (mkiv) but it doesn't produce
> the desired sign. What I should do to make it appear? (in log file I see
> that LMMath font desn't contain such symbol but I don't know much about
> font mechanism of context, btw in latex I could easily get that symbol
> so I think it should be in 'standard' math font).

No, the symbol is not in the 'standard' math fonts, and this is trouble. 
Like LaTeX, we also fake the glyph in MkII. In MkIV, we check if the font 
contains that glyph; if not we fake it. Currently, that test is failing.

A temporary workaround (for LM) is to redefine:

\def\repeatintegral#1#2#3%
   {\let\dointlimits\donothing
    \let\dodointlimits\intlimits
    %\iffontchar\textfont\zerocount#1\relax
    % %\edef\dodorepeatintegral{\utfchar{#1}}%
    %  \let\dodorepeatintegral#2%
    %\else
       \fakerepeatintegral{#3}%
    %\fi
    \futurelet\next\dorepeatintegral}

and then \iint \iiint etc will work.

Hans, do you know what the \textfont check is not working for LM?

The ideal solution is to add esint glyphs to the LM math  virtual font. I 
did not work on this because I was assuming that opentype LM math will be 
out soon. But it seems that right now, the only decent opentype math font 
is Cambria. Both Stix and Asansa give really horrible spacing at times.

Aditya


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

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to get \iint?
  2010-11-23 17:07 ` Aditya Mahajan
@ 2010-11-23 20:45   ` Khaled Hosny
  2010-11-25  7:08   ` Vladimir Lomov
  1 sibling, 0 replies; 4+ messages in thread
From: Khaled Hosny @ 2010-11-23 20:45 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 23, 2010 at 12:07:56PM -0500, Aditya Mahajan wrote:
> The ideal solution is to add esint glyphs to the LM math  virtual
> font. I did not work on this because I was assuming that opentype LM
> math will be out soon. But it seems that right now, the only decent
> opentype math font is Cambria. Both Stix and Asansa give really
> horrible spacing at times.

Though I had a policy to not change XITS spacing from what STIX have
unless absolutely necessary, I've recently (silently) dropped that
policy, so if you can point to specific improvements, I can try to do
it.

(I'm still waiting for your final word on that slash-like symbol on the
other thread :)

Regards,
 Khaled

-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to get \iint?
  2010-11-23 17:07 ` Aditya Mahajan
  2010-11-23 20:45   ` Khaled Hosny
@ 2010-11-25  7:08   ` Vladimir Lomov
  1 sibling, 0 replies; 4+ messages in thread
From: Vladimir Lomov @ 2010-11-25  7:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Hi.

2010/11/24 Aditya Mahajan <adityam@umich.edu>:
> On Wed, 24 Nov 2010, Vladimir Lomov wrote:
>
>> Hi.
>>
>> The command \iint is defined in context (mkiv) but it doesn't produce
>> the desired sign. What I should do to make it appear? (in log file I see
>> that LMMath font desn't contain such symbol but I don't know much about
>> font mechanism of context, btw in latex I could easily get that symbol
>> so I think it should be in 'standard' math font).
>
> No, the symbol is not in the 'standard' math fonts, and this is trouble.
> Like LaTeX, we also fake the glyph in MkII. In MkIV, we check if the font
> contains that glyph; if not we fake it. Currently, that test is failing.
>
> A temporary workaround (for LM) is to redefine:
>
> \def\repeatintegral#1#2#3%
>  {\let\dointlimits\donothing
>   \let\dodointlimits\intlimits
>   %\iffontchar\textfont\zerocount#1\relax
>   % %\edef\dodorepeatintegral{\utfchar{#1}}%
>   %  \let\dodorepeatintegral#2%
>   %\else
>      \fakerepeatintegral{#3}%
>   %\fi
>   \futurelet\next\dorepeatintegral}
>
> and then \iint \iiint etc will work.
Thank you for advice (I had to regenerate format to see the result,
because I changed the definition in 'math-int.mkiv') but the result is
terrible for inline math and normal for displaystyle.

Moreover I found that this solution would give unexpected result if one use
\setupmathematics[integral=displaylimits], consider the following example:
<example name="ex7_1.tex">
\setupmathematics[integral=displaylimits]
\starttext

Ordinary integral: $\int_{a}^{b}f(x)\text{d}x=F(b)-F(a)$.

Ordinary integral: $\int\limits_{a}^{b}f(x)\text{d}x=F(b)-F(a)$.

\startformula
  \int_{a}^{b}f(x)\text{d}x=F(b)-F(a).
\stopformula

Double integral:
$\iint_{D} f(x,y) dx dy$

Double integral sign (faked symbol) could cause incorrect result:
\startformula
  \iint_{D} f(x,y) \text{d}x \text{d} y
\stopformula

\stoptext
</example>
(I didn't remember where exactly I found command \setupmathematics.)

> Hans, do you know what the \textfont check is not working for LM?

> The ideal solution is to add esint glyphs to the LM math  virtual font. I
> did not work on this because I was assuming that opentype LM math will be
> out soon. But it seems that right now, the only decent opentype math font is
> Cambria. Both Stix and Asansa give really horrible spacing at times.
IMHO, Cambria looks very odd. I prefer to use CM fonts, the design for
different font families (serif, sans, monospace) is more balanced than
any other font families have.


---
WBR, Vladimir Lomov
___________________________________________________________________________________
If your question is of interest to others as well, please add an 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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-25  7:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 16:18 How to get \iint? Vladimir Lomov
2010-11-23 17:07 ` Aditya Mahajan
2010-11-23 20:45   ` Khaled Hosny
2010-11-25  7:08   ` Vladimir Lomov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).