尝试在 overleaf 上编译此文件。出现错误。有人能帮忙吗?
\documentclass{beamer}
\usetheme{Singapore}
\usepackage{fontspec}
\usepackage{polyglossia}
\setmainlanguage{english}
\setotherlanguages{sanskrit} %% or other languages
\newfontfamily\devanagarifont[Script=Devanagari]{Lohit Devanagari}
%\usecolortheme{beetle}
\useinnertheme{circles}
\usepackage{palatino, amssymb, wasysym, animate, multicol}
\useoutertheme{infolines}
\usepackage{xcolor}
\title{Demo}
\begin{document}
\begin{frame} {basti}
\begin{exampleblock}
\begin{sanskrit}
वस्तिना दीयते इति वस्तिः।(अ.हृ.सू.१९/१, अरुणदत्त)
बस्तिभिः दीयते यस्मात् तस्मात् वस्तिः इति स्मृतः।(शा.उ.ख.५/१)
\end{Sanskrit}
\begin{exampleblock}
\begin{itemize}
\item Mother of all Panchakarma therapies
\item Cleanses all the accumulated toxins from all 3 doshas (Vaat, Pitta, and Kapha) through the colon
\item Highly beneficial rejuvinating therapy
\end {itemize}
\end{frame}
\end{document}
答案1
主要错误是由于使用的标准字体系列beamer
是无衬线字体,因此需要定义\devanagarifontsf
(错误消息确实没有什么信息量,是一个已知问题)。
删除palatino
它只会让事情变得更加困难。
\documentclass{beamer}
\usetheme{Singapore}
\usefonttheme{professionalfonts}
%\usecolortheme{beetle}
\useinnertheme{circles}
\useoutertheme{infolines}
\usepackage{amssymb, wasysym, animate, multicol}
\usepackage{fontspec}
\usepackage{polyglossia}
\usepackage{xcolor}
\setmainlanguage{english}
\setotherlanguages{sanskrit} %% or other languages
\newfontfamily\devanagarifont[Script=Devanagari]{ITF Devanagari}
\newfontfamily\devanagarifontsf[Script=Devanagari]{ITF Devanagari}
\title{Demo}
\begin{document}
\begin{frame}
\frametitle{basti}
\begin{exampleblock}{}
\begin{sanskrit}
वस्तिना दीयते इति वस्तिः।(अ.हृ.सू.१९/१, अरुणदत्त)
बस्तिभिः दीयते यस्मात् तस्मात् वस्तिः इति स्मृतः।(शा.उ.ख.५/१)
\end{sanskrit}
\end{exampleblock}
\begin{itemize}
\item Mother of all Panchakarma therapies
\item Cleanses all the accumulated toxins from all 3 doshas (Vaat, Pitta, and Kapha) through the colon
\item Highly beneficial rejuvinating therapy
\end {itemize}
\end{frame}
\end{document}
我使用了我机器上的天城文字体。
其他几点:
- 你有
\end{Sanskrit}
,但应该是\end{sanskrit}
- 你有需要的
\begin{exampleblock}
地方\end{exampleblock}
- 你错过了以下强制论点
\begin{exampleblock}