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:)

  • 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 2 '18 at 6: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 2 '18 at 6:40
  • show the log file and what happens with foo$\int(aba)$ bar – user2478 Aug 2 '18 at 6:51
  • Btw: amsmath is loaded by mathtools already – faltfe Aug 2 '18 at 6: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 2 '18 at 7:04
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).

| improve this answer | |

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.