iosMath icon indicating copy to clipboard operation
iosMath copied to clipboard

Alternative to \stackrel {\frown} {AD}

Open kekearif opened this issue 7 years ago • 4 comments

Hey I am using the command \stackrel {\frown} {AD} to show the arc / frown symbol over letters. As seen in the image below:

screen shot 2017-06-11 at 19 36 10

Both of these commands aren't supported in the library. Is there an alternative to these or a way for me to add them in?

kekearif avatar Jun 11 '17 11:06 kekearif

I've managed to add the \frown symbol using @"frown" : [MTMathAtom atomWithType:kMTMathAtomRelation value:@"\u2312"], in MTMathAtomFactory.m not sure how to implement \stackrel though and make it float about a given symbol. Do I need to add it accents or something?

kekearif avatar Jun 11 '17 13:06 kekearif

\stackrel is defined as follows:

\def\stackrel#1#2{\mathrel{\mathop{#2}\limits^{#1}}}

So you could make an operator with limits as the \frown and value as AD. Note however, you may not want it to be a relation, as the spacing between AD and = is messed up.

Also you can add frown without modifying the source code as follows:

[MTMathAtomFactory addLatexSymbol:@"frown"
                            value:[MTMathAtom atomWithType:kMTMathAtomOrdinary
                                                     value:@"\u2312"]];

kostub avatar Jun 13 '17 18:06 kostub

[MTMathAtomFactory addLatexSymbol:@"frown" value:[MTMathAtom atomWithType:kMTMathAtomOrdinary value:@"\u2312"]]; This code doesn't work the way i want it How can I achieve the mathematical symbols in the picture above? I found that there was nothe Unicode \u2312 in the given font package I'm not sure if it's the reason why the code doesn't work

CodingSha avatar Jun 14 '17 02:06 CodingSha

Add @"arc" : @"\u0311", in the NSDictionary* accents in MTMathAtomFactory.m seems works fine arc

wingsiu avatar Jun 22 '17 19:06 wingsiu