0

Generally i dont like the symbol pi given in the newpxmath package. So i tried to use the cmroman pi using the following command. But then due pi appears too small since i scale the text and math. Any idea how to scale the pi symbol??

   \documentclass[12pt]{article}
   \usepackage[margin=1in]{geometry}
    \usepackage[T1]{fontenc}
     \usepackage[scaled=1.2]{newtxtext}
      \usepackage[scaled=1.2,cmbraces,varbb]{newpxmath}

   \DeclareSymbolFont{lettersCM}{OML}{cmm} {m}{it}
    \SetSymbolFont{lettersCM}{bold}{OML}{cmm} {b}{it}
      \let\txpi\pi
    \DeclareMathSymbol{\pi}{\mathord}{lettersCM}{"19}
    \begin{document}
    \begin{flushleft}
    Pie appears very small
   $$\frac{k\pi}{12} = \frac{22}{7}$$
     \end{flushleft}
    \end{document}

and the output appears like thisenter image description here

  • Why are you scaling the fonts? Use extarticle if you want 14pt size. I'm also dubious about the combination of newtxtext and newpxmath. – egreg Jan 21 '17 at 16:06
  • @egreg Yeah that would be a good option. But can't i scale the pi symbol? Just curious :) – crskhr Jan 21 '17 at 16:18
  • @egreg 14pt becomes too big actually. I generally like to scale a little bit. As for the other question "the math of newpx appear much better and clearer than the math of the newtx". – crskhr Jan 21 '17 at 16:19
  • @If you have 12pt main size and scale the fonts by 1.2, you get 14.4pt, don't you? As for the other part, the letters in newpxfonts are completely different from and incompatible with the letters in newtxtext. – egreg Jan 21 '17 at 16:27
  • @egreg: I dont know how 1.2 works, but i can assure u that 14pt in extarticle looks far bigger than how the scaling 1.2 looks. Anyway, If there is a way to scale please do let me know :) – crskhr Jan 21 '17 at 16:38
1

Don't scale the fonts. Your main font size is 14pt (precisely 14.4pt) and it's much better, if you really want such humongous size, to use a proper package/class like extarticle.

For the comparison below I used your exact code, just adding a lipsum paragraph. The extarticle version is

\documentclass[14pt]{extarticle}
\usepackage[margin=1in]{geometry}
\usepackage[T1]{fontenc}
\usepackage{newtxtext}
\usepackage[cmbraces,varbb]{newpxmath}
\usepackage{fix-cm}
\usepackage{lipsum}

\DeclareSymbolFont{lettersCM}{OML}{cmm} {m}{it}
\SetSymbolFont{lettersCM}{bold}{OML}{cmm} {b}{it}
\let\txpi\pi
\DeclareMathSymbol{\pi}{\mathord}{lettersCM}{"19}
\begin{document}
\begin{flushleft}
Pie appears very small
\[\frac{k\pi}{12} = \frac{22}{7}\]
\end{flushleft}

\lipsum[2]

\end{document}

I left flushleft, although it doesn't appear necessary. I changed $$...$$ into the proper \[...\].

Here's the comparison. You will see that the pi is correctly sized and also the lines are well spaced.

The font size is the same in both versions, which have been scaled by the same amount.

enter image description here

Some more information. If I add a command for showing the font used in the document, I get

\T1/ntxtlf/m/n/12=select font ntx-Regular-tlf-t1 at 14.39996pt

for your version with scaling and

\T1/ntxtlf/m/n/14.4=select font ntx-Regular-tlf-t1 at 14.4pt

for my version with extarticle. The difference in the fifth decimal is surely not relevant.

Caveat Don't mix newtxtext with newpxmath: the letters are very different and visually incompatible with each other.

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.