![程序包 inputenc 错误:Unicode 字符 α (U+3B1) 未设置为用于 LaTeX](https://linux22.com/image/383441/%E7%A8%8B%E5%BA%8F%E5%8C%85%20inputenc%20%E9%94%99%E8%AF%AF%EF%BC%9AUnicode%20%E5%AD%97%E7%AC%A6%20%CE%B1%20(U%2B3B1)%20%E6%9C%AA%E8%AE%BE%E7%BD%AE%E4%B8%BA%E7%94%A8%E4%BA%8E%20LaTeX.png)
当我编译该.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
您可以α
在文本和数学模式下使用。