1

My equation doesn't show the symbols: integral, equal, parentheses and etc.. These are the packages I've used and my latex code. Process exited normally. In log, no error messages related to equation, except for "bad box".Any idea on solving this? Thank you.

\usepackage{newtxtext,newtxmath}
\usepackage{txfonts}

\usepackage{mathtools} 
\usepackage{amsmath}
\usepackage{amssymb}

\begin{equation} \label{den_abel}
n_{e} (r) =\frac{\lambda n_{c}}{\pi^{2}}\int_{r}^{r_0} 
\frac{\mathit{\phi(x)}}{dx} \frac{1}{\sqrt{x^{2}-r^{2}}}dx.
\end{equation}`

enter image description here

tested with

foo $\int(aba)$ bar

output:

enter image description here

Process exited normally. Log screenshot: enter image description here

[SOLVED]

\documentclass{jjap3}
    %\usepackage{newtxtext,newtxmath}
    \usepackage{txfonts}

    \usepackage{mathtools} 
    \usepackage{amsmath}
    \usepackage{amssymb}

\begin{document}

    \begin{equation} \label{den_abel}
    n_{e} (r) =\frac{\lambda n_{c}}{\pi^{2}}\int_{r}^{r_0} 
    \frac{\mathit{\phi(x)}}{dx} \frac{1}{\sqrt{x^{2}-r^{2}}}dx.
    \end{equation}

\end{document}

enter image description here

Thank you all for your comments:)

egreg
  • 1,121,712
Jen
  • 21
  • 1
    you will have an error somewhere, put probably in code not shown. Please fix your example so that it is a complete small document that produces the image shown, so that people can debug the problem. – David Carlisle Aug 02 '18 at 06:37
  • also show the log file, which probably has either an undefined command error or a "there is no character...." warning, depending on the actual cause of the problem. – David Carlisle Aug 02 '18 at 06:40
  • show the log file and what happens with foo$\int(aba)$ bar –  Aug 02 '18 at 06:51
  • Btw: amsmath is loaded by mathtools already – faltfe Aug 02 '18 at 06:55
  • Please make the sniplet into a full minimal example, and test only that example. Currently there is no documnet class and no begin/end document – daleif Aug 02 '18 at 07:04
  • Problem solved. Thank you all. It is due to the packages redundancy. – Jen Aug 02 '18 at 07:11
  • Then please make a comment to your posting as to what solved it, might be useful to others in the future – daleif Aug 02 '18 at 07:12

1 Answers1

3

The newtx packages were written in order to remove the numerous weaknesses of txfonts (bad character bounding boxes, improper kerning and so on).

By loading txfonts after newtxmath you get a conflict and no integral sign because newtxmath defines (at begin document) a slot for it where txfonts has no glyph.

Solution: remove txfonts.

You don't need amssymb, as newtxmath already covers it. Loading mathtools will also load amsmath.

\documentclass{article}
\usepackage{newtxtext,newtxmath}

%\usepackage{amsmath}
\usepackage{mathtools}

\begin{document}

\begin{equation} \label{den_abel}
n_{e} (r) =
  \frac{\lambda n_{c}}{\pi^{2}}
  \int_{r}^{r_0} \frac{\mathit{\phi(x)}}{dx} \frac{1}{\sqrt{x^{2}-r^{2}}}\,dx.
\end{equation}

\end{document}

enter image description here

Just for comparison, here is the output with txfonts:

enter image description here

Apart from the different integral symbol (which could be recovered), note the placement of exponents in the two samples (disputable in the bottom one).

egreg
  • 1,121,712