Math & Sciencemathptmx ps2pdf issue with \sum \prod

Information and discussion about LaTeX's math and science related features (e.g. formulas, graphs).
Post Reply
EdGatzke
Posts: 13
Joined: Thu Dec 02, 2010 5:48 pm

mathptmx ps2pdf issue with \sum \prod

Post by EdGatzke »

Using ps2pdf with \sum and \prod I get bad symbols. Instead of a sigma I get a dot, instead of a pi I get a division symbol.

Without mathptmx I get the correct symbols but type 3 fonts.

With mathptmx I get garbage but type 1 fonts.


Using ps2pdf on a linux RH (FC 13?).

\documentclass[12pt,english]{article}
\usepackage{mathptmx}
\usepackage[T1]{fontenc}
\usepackage[latin9]{inputenc}
\usepackage[letterpaper]{geometry}
\geometry{verbose,tmargin=1in,bmargin=1in,lmargin=1in,rmargin=1in}
\usepackage{amsmath}
\usepackage{babel}

\begin{document}
Test one two \[
\sum\prod\]

\[
\sqrt{x+\sqrt{y}}\]

\[
\sum_{\substack{1\le m\le N,\\
m\text{ odd}}
}P(m)\]


\[
\prod_{\alpha\in U}\]

\end{document}


Edit: Solved below.
Last edited by EdGatzke on Thu Dec 09, 2010 5:50 pm, edited 1 time in total.

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

mathptmx ps2pdf issue with \sum \prod

Post by frabjous »

Many questions:
  1. Have you examined the intermediate dvi and ps files to see if they look all right? Or is the problem only with the pdf?
  2. Do you still get the problem if you use pdflatex directly, or dvipdfmx, rather than dvips and ps2pdf? Nothing in your sample code requires using ps2pdf. (I realize this may be an excerpt from a longer document which does require ps2pdf, but it would be worth trying with the sample document just for the purposes of diagnosing where the problem is coming in.)
  3. Does it make a difference if you call dvips with the -Ppdf flag:

    Code: Select all

    dvips -Ppdf myfile.dvi
    
    What if you call ps2pdf with the -dEmbedAllFonts=true flag, e.g.

    Code: Select all

    ps2pdf -dEmbedAllFonts=true myfile.ps
    
  4. Do you have the cm-super package installed? This should give you type1 versions of the Computer Modern fonts.
  5. What sorts of results do you get with other font packages in place of mathptmx: try, e.g., txfonts or pxfonts or kpfonts or lmodern.
  6. What version of LaTeX and the various packages are you using? I think Fedora tends to lag behind other linux distros when it comes to its LaTeX packages (--does RH use the same ones?). Try adding \listfiles to the beginning of your sample code, latex it, and then post the .log file here; that would contain this information.
I can't personally verify the problem (running TeXlive 2010 on Arch Linux).

One final note: I'm a bit perplexed by your latin9 setting for inputenc. Nearly all modern Linuxes are configured to use utf8 as their default character encoding. Of course, you might have set your editor to use latin9 instead, but this seems unlikely. (But this isn't really important for this document, which is all ASCII.)
EdGatzke
Posts: 13
Joined: Thu Dec 02, 2010 5:48 pm

mathptmx ps2pdf issue with \sum \prod

Post by EdGatzke »

# Have you examined the intermediate dvi and ps files to see if they look all right? Or is the problem only with the pdf?
I forgot to post that the dvi and ps are fine.
# Do you still get the problem if you use pdflatex directly, or dvipdfmx, rather than dvips and ps2pdf? Nothing in your sample code requires using ps2pdf.
Should have thought of that. pdftex directly works. This came up in some slides using beamer and I need pstricks, so I think pdftex is out. dvipdfm mostly works (title slide got dropped!)

# Does it make a difference if you call dvips with the -Ppdf flag:
Been doing that all along. Taking it away does not help either.

What if you call ps2pdf with the -dEmbedAllFonts=true flag, e.g.
That does not seem to help.
# Do you have the cm-super package installed? This should give you type1 versions of the Computer Modern fonts.
Not sure how to do this easily. Yum did not find it as a package, so a manual install may be required...
# What sorts of results do you get with other font packages in place of mathptmx: try, e.g., txfonts or pxfonts or kpfonts or lmodern.
Using lyx front end and it embeds mathptmx if you are using times, which you need to get type 1 fonts. lmodern works with type 1 fonts,

And if you put it in the lyx preamble, it comes after the mathptmx so it seems to supercede mathptmx and you still get type 1 fonts. Solution!

Thanks a ton for the detailed response! You made my day!
Post Reply