有些字符(例如 ϕ)无法编译为 pdf

有些字符(例如 ϕ)无法编译为 pdf

我一直在努力让字符“ϕ”显示在我编译的 PDF 中。有些希腊字母会出现这种情况,但有些会编译。是否有任何特定的字体系列或包可用于帮助解决此问题?我正在使用 Xelatex 进行编译。

这是一个最简单的例子来证明这一点:

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[english]{babel}
\usepackage{alphabeta}
\title{Greek Letters}
\author{aakashguptachoudhury }
\date{November 2019}

\usepackage{natbib}
\usepackage{graphicx}
\usepackage{fontspec}
\setmainfont{CMU Serif}
\begin{document}

\maketitle

\section{Introduction}
There is a theory which states that if ever anyone discovers exactly what
the Universe is for and why it is here, it will instantly disappear and be
replaced by something even more bizarre and inexplicable.

There is another theory which states that this has already happened.

\begin{figure}[h!]
\centering
\includegraphics[scale=1.7]{universe}
\caption{The Universe}
\label{fig:universe}
\end{figure}

\section{Phi Phi}
Phi - ϕ

\bibliographystyle{plain}
\bibliography{references}
\end{document}

答案1

好的。我得到了答案。由于默认字体不支持所有希腊字母,因此我不得不使用类似这样的字体:-

\usepackage{fontspec}
\setmainfont{CMU Serif}

相关内容