I would like to use the standard \int and the \gammaup from the txfonts package. How can I mix these symbols?


    Not the int I like, but the gammaup I do like:
    \[\int \gammaup\]
  • 1
    Welcome to TeX.SX! Note that the txfonts package is deprecated. You should use newtxtext and newtxmath instead. Dec 2, 2019 at 15:27
  • Thank you @PhelypeOleinik, I did not know that! Upon exchanging txfonts with newtxmath it doesn't change the \int symbol, just as i wanted. That solves my question.
    – josh
    Dec 2, 2019 at 15:33
  • Hm... Actually the symbol does change, but the integral symbol is similar (but not identical) to Computer Modern's... Dec 2, 2019 at 15:36

1 Answer 1


Accidental answer :-)

The txfonts package is obsolete, and you usually can replace it by newtxtext (for the text fonts) and newtxmath (for, you guessed, the math fonts). However the \int symbol for newtxmath is rather similar to Computer Modern's, so it might work for you. Here's a comparison between them (left to right: txfonts, Computer Modern, and newtxmath):

enter image description here

\usepackage{newtxtext}% For text font
% From txfonts
% From Computer Modern
  \[\txint \cmrint \int \gammaup\]

To find the symbols it takes a bit of digging through the sources (that's how I did it, at least; there might be a better way).


The Computer Modern definition of the symbols can be found in fontmath.ltx (that's where LaTeX math fonts are initialised. You can find that file by running kpsewhich fontmath.ltx in a terminal). Searching for \int in the code you'll see that it's defined as:


which means that \int is just \intop\nolimits (\nolimits is a TeX primitive), and \intop is defined just above with:


which means that it is a \mathop (operator) taken from slot number "52 (that's hexadecimal 0x52) from the largesymbols font. Finally, the largesymbols font is declared at the beginning of fontmath.ltx with:


which means encoding OMX, family cmex, series m(edium), shape n(ormal).

To make the example above I just renamed largesymbols to largesymbolscmr and \int(op) to \cmrint(op) to avoid conflicts.


The process is similar, except that instead of looking into fontmath.ltx we'll look at txfonts.sty (use kpsewhich txfonts.sty to find the file). Though txfonts.sty doesn't redefine \int, so the definition of the command is the same as LaTeX's original. What txfonts does redefine is the largesymbols math font:


so to take the txfonts version of \int we need to declare that font and make a separate copy that uses txex rather than cmex:

\DeclareSymbolFont{largesymbolstx}{OMX}{txex}{m}{n} % declare a TX copy of largesymbols
\DeclareMathSymbol{\txintop}{\mathop}{largesymbolstx}{"52} % declare a TX copy of \intop that uses the above


This one is similar to the above. In txfonts.sty you'll find that \iint is defined with:


which uses largesymbolsA, defined previously with:


so you can adapt (to avoid the \re@Declare... command defined in that package):

\DeclareMathSymbol{\txiintop}{\mathop}{largesymbolstxA}{"21} % 33 (decimal) = "21 (hexadecimal)

Another way you could find a glyph in a font is by using the fonttable package, for example with {U}{txexa}{m}{n}:


which outputs:

enter image description here

that shows the double integral glyph in slot 33 of that font.


The Computer Modern font doesn't have a double integral glyph, so the approach above won't work. But there are other options:

amsmath emulates (up to) 4 integral signs with \MultiIntegral, which is defined:


and then \iint is defined as:


However this will use the default \intop glyph. To change the font you can create a copy of (or even redefine) \MultiIntegral which uses (say) the \cmrintop defined above.

You can also use the esint package, which defines several types of integral signs using (a clone of) the Computer Modern glyph. To use the Computer Modern integral sign with other font packages you just have to make sure you load esint after all font packages (and after amsmath).

  • 1
    You should load newtxtext first and newtxmath second. Try to type a formula containing numbers with your present setup and you'll see why :-)
    – campa
    Dec 3, 2019 at 8:21
  • @campa Thanks! I didn't knew about this explicit order (though in my head was newtxtext always first, so I've never seen the problem before; not sure why I changed this time :-). Dec 3, 2019 at 12:47
  • alright, so now i wanted to use \iint, but i don't understand what you did with the Declare* lines, where can i look up the "number" of the \iint?
    – josh
    Apr 29, 2020 at 13:45
  • @josh I added an explanation how I found the glyphs in the fonts and added the declaration of \iint in txfonts, plus some tips for looking up glyphs in fonts. I hope it's understandable. Apr 29, 2020 at 23:31
  • @PhelypeOleinik yes, thank you very much, this shows what little i actually know of what latex does to work in the background
    – josh
    Apr 30, 2020 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .