1

I want to know how to make the symbol can be compiled and shown?

Thus I can use symbol of omega instead of writing $\omega$, or symbol of pi instead of $\pi$.

I am able to do this and compile it in other Linux OS (CAELinux) with TexLive version 2017, but it can't be done on this OS with TL version 2021. What package or setting do I need to adjust?

this is the MWE:


\documentclass[twoside]{book}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{latexsym}
\usepackage{enumerate}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage{cite}
\usepackage{cancel}
\usepackage{ulem}
\usepackage{makecell}
\usepackage[utf8]{inputenc}

\begin{document}
\begin{equation}
        \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}} = 0 \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂w}{∂t} \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂^{2}w}{∂t^{2}} 
\end{equation}

\end{document}

1

2

7
  • 2
    Please provide a minimal working example reproducing your issue, including the corresponding preamble. Do you use exactly the same TeX file on both operation systems?
    – epR8GaYuh
    Commented Jul 18, 2023 at 18:22
  • 1
    Please provide the source that duplicates this bug, as a code block (the brackets button), not a screenshot. We can’t copy and paste the screenshot.
    – Davislor
    Commented Jul 18, 2023 at 23:13
  • I don't know if this helps, but back in the days when LaTeX didn't support utf8-encoding yet, you had to use some input encoding, e.g. \usepackage[utf8]{inputenc}. But nowadays, this really shouldn't be necessary anymore.
    – Gargantuar
    Commented Jul 18, 2023 at 23:25
  • @Davislor, I just added my MWE, sorry for not putting it at first. Commented Jul 26, 2023 at 12:59
  • @FreyatheGoddess Thanks, looks great!
    – Davislor
    Commented Jul 26, 2023 at 22:21

1 Answer 1

2

The important part of the output is:

! LaTeX Error: Unicode character ∂ (U+2202)
               not set up for use with LaTeX.

There are two ways to fix this. First, if you can use LuaLaTeX or XeLaTeX, the unicode-math package does understand every Unicode math symbol. (PDFlaTex only understands characters from the legacy 8-bit encodings that have been loaded.) Removing some packages that are redundant with unicode-math, this works:

\documentclass[twoside]{book}
\usepackage{mathtools}
\usepackage{unicode-math}
\usepackage{enumerate}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage{cite}
\usepackage{cancel}
\usepackage{ulem}
\usepackage{makecell}

\begin{document}
\begin{equation}
        \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}} = 0 \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂w}{∂t} \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂^{2}w}{∂t^{2}} 
\end{equation}

\end{document}

Lstin Modern sample

If you are required to use PDFLaTeX, you need to set up that character. One way to do this is with newunicodechar.

\documentclass[twoside]{book}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{latexsym}
\usepackage{enumerate}
\usepackage{wrapfig}
\usepackage{siunitx}
\usepackage{cite}
\usepackage{cancel}
\usepackage{ulem}
\usepackage{makecell}
\usepackage{newunicodechar}
\usepackage[utf8]{inputenc}

\newunicodechar{∂}{\partial}

\begin{document}
\begin{equation}
        \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}} = 0 \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂w}{∂t} \\
        a^{2} \left( \frac{∂^{2}w}{∂x^{2}} + \frac{∂^{2}w}{∂y^{2}} + \frac{∂^{2}w}{∂z^{2}}  \right) = \frac{∂^{2}w}{∂t^{2}} 
\end{equation}

\end{document}

Computer Modern sample

If you also want to be able to use in text mode, not $∂$, you would change the command to

\newunicodechar{∂}{\ensuremath{\partial}}

But I recommend against this.

1
  • Yes this is the right one, I use \newunicodechar{∂}{\partial} it is more preferable for me and now I can work again. This is very helpful. Many thanks. Commented Jul 30, 2023 at 21:52

You must log in to answer this question.

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