公式下标位置错误

公式下标位置错误

这个公式有什么问题?

$ E = \hbar ν \textsubscript{F}k $

F应该是 的下标v,但是它出现在 之下h,为什么?

答案1

除非以某种方式启用它,否则您不能直接使用ν它进行输入。标准方法是键入\nu

我猜你正在使用pdflatex排版引擎;如果你仅有的在数学中使用希腊文本,您可以轻松启用所需的字母。

\documentclass{article}

\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}

\newunicodechar{ν}{\nu}

\begin{document}

$ E = \hbar ν_{F} k $

\end{document}

在此处输入图片描述

请注意,数学模式下的下标应该是_{F}_{\mathrm{F}}(如果您希望它是直立的)而不是\textsubscript{F}

这是一个扩展版本,允许在数学和文本中使用(几乎)所有希腊字符,只要您加载textgreek(没有必要,除非您需要希腊文本)。

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[italian]{babel}
\usepackage{textgreek}

\newcommand{\DeclareGreekCharacter}[2]{%
  \begingroup\edef\x{\endgroup
    \noexpand\DeclareUnicodeCharacter{#1}{%
      \noexpand\TextOrMath
        {\expandafter\noexpand\csname text#2\endcsname}%
        {\expandafter\noexpand\csname #2\endcsname}%
      }%
  }\x
}
\newcommand{\DeclareGreekCharacterX}[3]{%
  \begingroup\edef\x{\endgroup
    \noexpand\DeclareUnicodeCharacter{#1}{%
      \noexpand\TextOrMath
        {\expandafter\noexpand\csname text#2\endcsname}%
        {#3}%
      }%
  }\x
}

\DeclareGreekCharacterX{0391}{Alpha}{A}              % Α
\DeclareGreekCharacterX{0392}{Beta}{B}               % Β
\DeclareGreekCharacter{0393}{Gamma}                  % Γ
\DeclareGreekCharacter{0394}{Delta}                  % Δ
\DeclareGreekCharacterX{0395}{Epsilon}{E}            % Ε
\DeclareGreekCharacterX{0396}{Zeta}{Z}               % Ζ
\DeclareGreekCharacterX{0397}{Eta}{H}                % Η
\DeclareGreekCharacter{0398}{Theta}                  % Θ
\DeclareGreekCharacterX{0399}{Iota}{I}               % Ι
\DeclareGreekCharacterX{039A}{Kappa}{K}              % Κ
\DeclareGreekCharacter{039B}{Lambda}                 % Λ
\DeclareGreekCharacterX{039C}{Mu}{M}                 % Μ
\DeclareGreekCharacterX{039D}{Nu}{N}                 % Ν
\DeclareGreekCharacter{039E}{Xi}                     % Ξ
\DeclareGreekCharacterX{039F}{Omicron}{O}            % Ο
\DeclareGreekCharacter{03A0}{Pi}                     % Π
\DeclareGreekCharacterX{03A1}{Rho}{P}                % Ρ
\DeclareGreekCharacter{03A3}{Sigma}                  % Σ
\DeclareGreekCharacterX{03A4}{Tau}{T}                % Τ
\DeclareGreekCharacter{03A5}{Upsilon}                % Υ
\DeclareGreekCharacter{03A6}{Phi}                    % Φ
\DeclareGreekCharacter{03A7}{Chi}                    % Χ
\DeclareGreekCharacter{03A8}{Psi}                    % Ψ
\DeclareGreekCharacter{03A9}{Omega}                  % Ω
\DeclareGreekCharacter{03B1}{alpha}                  % α
\DeclareGreekCharacter{03B2}{beta}                   % β
\DeclareGreekCharacter{03B3}{gamma}                  % γ
\DeclareGreekCharacter{03B4}{delta}                  % δ
\DeclareGreekCharacter{03B5}{epsilon}                % ε
\DeclareGreekCharacter{03B6}{zeta}                   % ζ
\DeclareGreekCharacter{03B7}{eta}                    % η
\DeclareGreekCharacter{03B8}{theta}                  % θ
\DeclareGreekCharacter{03B9}{iota}                   % ι
\DeclareGreekCharacter{03BA}{kappa}                  % κ
\DeclareGreekCharacter{03BB}{lambda}                 % λ
\DeclareGreekCharacter{03BC}{mu}                     % μ \textmugreek
\DeclareGreekCharacter{03BD}{nu}                     % ν
\DeclareGreekCharacter{03BE}{xi}                     % ξ
\DeclareGreekCharacterX{03BF}{omicron}{o}            % ο
\DeclareGreekCharacter{03C0}{pi}                     % π
\DeclareGreekCharacter{03C1}{rho}                    % ρ
\DeclareGreekCharacter{03C2}{varsigma}               % ς
\DeclareGreekCharacter{03C3}{sigma}                  % σ
\DeclareGreekCharacter{03C4}{tau}                    % τ
\DeclareGreekCharacter{03C5}{upsilon}                % υ
\DeclareGreekCharacter{03C6}{phi}                    % φ
\DeclareGreekCharacter{03C7}{chi}                    % χ
\DeclareGreekCharacter{03C8}{psi}                    % ψ
\DeclareGreekCharacter{03C9}{omega}                  % ω


\begin{document}

Text: ν

$ E = \hbar ν_{F} k $

\end{document}

在此处输入图片描述

答案2

问题在于ν\nu),如果在没有正确设置的情况下与 8 位 TeX 引擎一起使用。

ASCII 版本

\documentclass{article}
\begin{document}
$ E = \hbar\nu_{\mathrm{F}} k $
\end{document}

结果

带有 8 位 TeX 引擎 (TeX、pdfTeX) 的 UTF-8 版本

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{newunicodechar}
\newunicodechar{ν}{\ensuremath{\nu}}
\begin{document}
$ E = \hbar ν_{\mathrm{F}} k $
\end{document}

LuaTeX/XeTeX 的 UTF-8 版本

\documentclass{article}
\usepackage{unicode-math}
\begin{document}
$ E = \hbar ν_{\mathrm{F}} k $
\end{document}

相关内容