程序包 inputenc 错误:Unicode 字符 α (U+3B1) 未设置为用于 LaTeX

程序包 inputenc 错误:Unicode 字符 α (U+3B1) 未设置为用于 LaTeX

当我编译该.tex文件时,出现了上述错误。它指出了.bbl以下行中的文件:

\bibitem{LIU20083883}
G.~Liu, T.~Nguyen-Thoi, K.~Lam,
  \href{http://www.sciencedirect.com/science/article/pii/S0045782508001199}{A
  novel alpha finite element method (αfem) for exact solution to mechanics
  problems using triangular and tetrahedral elements}, Computer Methods in
  Applied Mechanics and Engineering 197~(45) (2008) 3883 -- 3897.
\newblock \href {http://dx.doi.org/https://doi.org/10.1016/j.cma.2008.03.011}
  {\path{doi:https://doi.org/10.1016/j.cma.2008.03.011}}.
\newline\urlprefix\url{http://www.sciencedirect.com/science/article/pii/S0045782508001199}

如何解决这个问题?这个错误出现在新版本的 TeXStudio 中。我在旧版本中编译时没有看到这个错误。

答案1

您可以编辑.bib文件来读取$\alpha$FEM,但还有更好的方法,即加载textalpha

\begin{filecontents*}{\jobname.bib}
@article{LIU20083883,
title = "A novel alpha finite element method (α{FEM}) for exact solution to mechanics problems using triangular and tetrahedral elements",
journal = "Computer Methods in Applied Mechanics and Engineering",
volume = "197",
number = "45",
pages = "3883-3897",
year = "2008",
issn = "0045-7825",
doi = "https://doi.org/10.1016/j.cma.2008.03.011",
url = "http://www.sciencedirect.com/science/article/pii/S0045782508001199",
author = "G.R. Liu and T. Nguyen-Thoi and K.Y. Lam",
keywords = "Numerical methods, Finite element method (FEM), Node-based smoothed finite element method (N-SFEM), Upper bound, Lower bound, Alpha finite element method (FEM)"
}
\end{filecontents*}

\documentclass{article}

\usepackage{textalpha} % <--- Greek letters in text

\begin{document}

\cite{LIU20083883}

\bibliographystyle{plain}
\bibliography{\jobname}

\end{document}

在此处输入图片描述

请注意,.bib无论如何都要对文件进行稍微的编辑,因为αFEM会导致

自由能函数

打印出来(我们可以在您的打印件中看到它)。大写字母应保留,因此应将其括在括号中:

title = "A novel alpha finite element method (α{FEM}) for exact [...]

pages = "3883 -- 3897",

应该更好

pages = "3883-3897",

注:我.bib出版商网站

答案2

问题出在 中α(αfem)您可以更改 .bib 文件并替换(αfem)($\alpha$fem),也可以添加

\DeclareUnicodeCharacter{3B1}{\ensuremath{\alpha}}

你的序言。

\DeclareUnicodeCharacter命令将把代码分配\ensuremath{\alpha}给字符 3B1

根据您想要为 α 实现的外观,您可以加载upgreek包并使用\ensuremath{\upalpha}

保证\ensuremath您可以α在文本和数学模式下使用。

相关内容