使用 hep-math 套件的奇怪數字

使用 hep-math 套件的奇怪數字

我想重現這個圖像,使用高等數學包裹

在此輸入影像描述

在連結處Diffcoeff 將普通導數轉換為偏導數

x但是當我將上標放入\sigma分母時,我看到一個奇怪的數字:

\documentclass[12pt]{article}
\usepackage{hep-math}
\renewcommand{\diffsymbol}{\mathrm d}
\begin{document}
\[
\pdv[]x^{\sigma} \dv[f]x
\]
\end{document}

在此輸入影像描述

為什麼?這是一個錯誤嗎?

答案1

該包需要一個數字指數。如果你使用x^{n}你會得到

! Missing number, treated as zero.
<to be read again> 
                   n

\sigma定義為:

> \sigma=\mathchar"11B.
l.4 \show\sigma

因此,如果在數位上下文中使用,它的工作方式為十六進位 11B(十進位 283)並產生您顯示的輸出。

如果您想使用宏,您可以將其x^\sigma視為變數而不是\sigma偏導數的順序,因此

在此輸入影像描述

\documentclass[12pt]{article}
\usepackage{hep-math}
\renewcommand{\diffsymbol}{\mathrm d}
\begin{document}
\[
\pdv[]{x^{\sigma}} 
\]
\end{document}

相關內容