3

Unicode-math provides \fint and \intbar symbols which can be used to typeset Princpal value of an integral. Unfortunately these symbols do not scale up as standard \int does as the followng example shows:

\documentclass{article}

\usepackage{ifxetex}
\ifxetex
\usepackage{fontspec}
    \defaultfontfeatures{Ligatures={TeX}}
    \setmainfont[Numbers={Proportional}]{Cambria}
    \setsansfont[Scale=MatchLowercase]{Corbel}
    \setmonofont[Scale=MatchLowercase]{Myriad Pro}
\usepackage[math-style=ISO,bold-style=ISO]{unicode-math}
    \setmathfont[Color=000066,Scale=MatchLowercase]{Cambria Math}
\else
    \usepackage{esint}
\fi

\begin{document}
\[
  \displaystyle      A\int B 
  \textstyle         A\int B 
  \scriptstyle       A\int B 
  \scriptscriptstyle A\int B 
\]

\[
  \displaystyle      A\fint B 
  \textstyle         A\fint B 
  \scriptstyle       A\fint B 
  \scriptscriptstyle A\fint B 
\]
\end{document}

How to device a macro from \fint or \intbar to device a functionally equivalent of \int? I am aware about other solutions providing commands to typeset principal value integral but they all need fine tuning after change of math OTF font.

  • Why did you make it more difficult to test your example by removing the preamble? – Ulrike Fischer Oct 28 '16 at 9:00
  • @UlrikeFischer: I updated the question. – Igor Kotelnikov Oct 28 '16 at 9:11
  • Did you see the posting The Principal Value Integral symbol in the UK TeX FAQ collection? – Mico Oct 28 '16 at 9:12
  • @Mico although that answer predates opentype math fonts by a decade or two:-) – David Carlisle Oct 28 '16 at 9:13
  • @Mico: As I said, the solution from UK TeX FAQ needs different tuning (\kern-.5\wd0) for different fonts. – Igor Kotelnikov Oct 28 '16 at 9:22
3

unicode-math defines the two characters in the same way, whether the symbol is available in multiple sizes is purely a choice of the font designer.

With stix (xits) I get

enter image description here

\documentclass{article}
\usepackage{unicode-math}
\setmathfont{xits-math.otf}
\begin{document}

\[
  \displaystyle      A\int B 
  \textstyle         A\int B 
  \scriptstyle       A\int B 
  \scriptscriptstyle A\int B 
\]

\[
  \displaystyle      A\fint B 
  \textstyle         A\fint B 
  \scriptstyle       A\fint B 
  \scriptscriptstyle A\fint B 
\]
\end{document}
  • Actially it means that Cambria Math is buggy. – Igor Kotelnikov Oct 28 '16 at 9:19
  • @IgorKotelnikov of course the version of your question that i answered above didn't even mention cambria:-) latin modern also doesn't scale fint – David Carlisle Oct 28 '16 at 9:24
  • So my question should be reformulates as How can I scale up \fint symbol in case of Latim Modern and Cambria Math assuming that XITS Math, STIX Math and Asana Math are not suitable for some reason. – Igor Kotelnikov Oct 28 '16 at 9:27
  • @IgorKotelnikov ideal (long term) answer would be to ask the font maintainers to fix the metrics of the variant integrals to match the standard integral sign, but a more pragmatic answer might be to take the uktug faq and just tweak the spacing for each font – David Carlisle Oct 28 '16 at 9:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.