overleaf.com 上的梵文

overleaf.com 上的梵文

尝试在 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} 

我使用了我机器上的天城文字体。

其他几点:

  1. 你有\end{Sanskrit},但应该是\end{sanskrit}
  2. 你有需要的\begin{exampleblock}地方\end{exampleblock}
  3. 你错过了以下强制论点\begin{exampleblock}

在此处输入图片描述

相关内容