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

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

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .