# How to use mathptmx and txfonts combined?

I am a new LaTeX user. After a long search, I realized that the best fonts for my work are txfonts and mathptmx. However, I wish I could use both fonts combined. For example, using the font mathptmx as a primary font and use some elements of txfonts, as the symbol for the integral. Is this possible?

In the preamble, used the following:

\usepackage{amsmath, amsfonts, amssymb, mathrsfs}
\usepackage{txfonts}
\usepackage{mathptmx}


This preamble allows me to use mathptmx as math font. I can also use some elements of txfonts without any special configuration such as the command \varmathbb{R}.

But I can not replace the symbol of the integral of mathptmx by txfonts symbol...

Any solution?

-

The fonts of the mathptmx and txfonts packages are both derived from Times Roman. If you prefer the text fonts of the latter package but like the math fonts of the former package, you can type

\usepackage{txfonts}
\renewcommand{\rmdefault}{ptm}


in the preamble. The second instruction tells LaTeX to load the ptm text font. (For comparison, the corresponding instruction in the txfonts package is \renewcommand{\rmdefault}{txr}.) This way, you'll also get access to the monospaced fonts that come with the txfonts package; I personally find them very pleasing (as well as compatible with Times-like roman fonts).

How to go about retaining certain parts of the math-fonts part of the mathptmx package is not really possible to determine because you don't provide an explicit list of which parts of the mathptmx package you prefer over those provided by the txfonts package. The former package provides the following mathfont-related instructions:

\DeclareSymbolFont{operators}   {OT1}{ztmcm}{m}{n}
\DeclareSymbolFont{letters}     {OML}{ztmcm}{m}{it}
\DeclareSymbolFont{symbols}     {OMS}{ztmcm}{m}{n}
\DeclareSymbolFont{largesymbols}{OMX}{ztmcm}{m}{n}
\DeclareSymbolFont{bold}        {OT1}{ptm}{bx}{n}
\DeclareSymbolFont{italic}      {OT1}{ptm}{m}{it}
\@ifundefined{mathbf}{}{\DeclareMathAlphabet{\mathbf}{OT1}{ptm}{bx}{n}}
\@ifundefined{mathit}{}{\DeclareMathAlphabet{\mathit}{OT1}{ptm}{m}{it}}
\DeclareMathSymbol{\omicron}{0}{operators}{\o}


whereas the latter package sets:

\DeclareSymbolFont{operators}{OT1}{txr}{m}{n}
\SetSymbolFont{operators}{bold}{OT1}{txr}{bx}{n}
\def\operator@font{\mathgroup\symoperators}
\DeclareSymbolFont{italic}{OT1}{txr}{m}{it}
\SetSymbolFont{italic}{bold}{OT1}{txr}{bx}{it}
\DeclareSymbolFontAlphabet{\mathrm}{operators}
\DeclareMathAlphabet{\mathbf}{OT1}{txr}{bx}{n}
\DeclareMathAlphabet{\mathit}{OT1}{txr}{m}{it}
\SetMathAlphabet{\mathit}{bold}{OT1}{txr}{bx}{it}
\DeclareSymbolFont{letters}{OML}{txmi}{m}{it}
\SetSymbolFont{letters}{bold}{OML}{txmi}{bx}{it}
\DeclareFontSubstitution{OML}{txmi}{m}{it}
\DeclareSymbolFont{lettersA}{U}{txmia}{m}{it}
\SetSymbolFont{lettersA}{bold}{U}{txmia}{bx}{it}
\DeclareFontSubstitution{U}{txmia}{m}{it}
\DeclareSymbolFontAlphabet{\mathfrak}{lettersA}
\DeclareSymbolFont{symbols}{OMS}{txsy}{m}{n}
\SetSymbolFont{symbols}{bold}{OMS}{txsy}{bx}{n}
\DeclareFontSubstitution{OMS}{txsy}{m}{n}


I trust it won't be too hard to figure out how to mix-and-match the various combinations.

-
Thank you. However, not is the fonts of the text body that I looking for. There are elements I like best in mathptmx as the design of the radicals and the parentheses, and others that I prefer the txfonts, as the drawing of the symbol of the integral ... That is, the doubt is only in math mode: how to select certain styles of two or more packages. – mneto Mar 10 '12 at 20:48
times.sty is obsolete as it loads Helvetica as the sans serif font without scaling it appropriately. To set only the text font to Times, psnfss2e.pdf suggests using the basic NFSS command \renewcommand{\rmdefault}{ptm}. – diabonas Mar 11 '12 at 11:58
@diabonas -- good point about the times package setting the sans-serif font to Helvetica (and the monospaced font to Courier`) without regularizing the font sizes to achieve even a semblance of compatibility between Times, Helvetica, and Courier. I've modified my answer accordingly. – Mico Mar 11 '12 at 17:29
Thank you for editing your initial answer! That's what I was looking for! I think with a little study I can make the changes I need. – mneto Mar 12 '12 at 0:49