Beamer 和 covington 之间有冲突吗?(使用 Beamer 3.50)

Beamer 和 covington 之间有冲突吗?(使用 Beamer 3.50)

Beamer (2018/02/20 的 3.50) 和 covington (2017/05/23 的 1.4) 之间有冲突吗?这个 (希望) 简单的文档:

\documentclass[english]{beamer}
\usepackage{fontspec}
\setmainfont[Mapping=tex-text]{DejaVu Serif}
\setsansfont[Mapping=tex-text]{DejaVu Sans}
\setmonofont{Fira Code}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{covington}

\makeatletter

\XeTeXdashbreakstate 0

\newcommand\makebeamertitle{\frame{\maketitle}}%
% (ERT) argument for the TOC
\AtBeginDocument{%
  \let\origtableofcontents=\tableofcontents
  \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}
  \def\gobbletableofcontents#1{\origtableofcontents}
}
\def\glosstr{}
\@ifundefined{linggloss}{%
\newenvironment{linggloss}[2][]{
        \def\glosstr{\glt #1}%
        \gll #2}
{\glosstr\glend}}{}

\makeatother

\usepackage{polyglossia}
\setdefaultlanguage[variant=american]{english}
\begin{document}
\title{Are Czech conditionals with an infinitival condition all Counterfactual?}
\makebeamertitle
\begin{frame}{And how does it look inCzech?}
    \begin{covexamples}
        \item real conditions – realistic, achievable, achieved?
        \item \begin{linggloss}[If Vašek comes on time we'll make it without any problems.]
            Když přijde        Vašek        včas,   tak  to          stihneme      v  pohodě.
            If   come-3sg.pres Vašek-nom.sg on time then that-acc.sg make-1pl.pres in ease.
        \end{linggloss}
    \end{covexamples}
\end{frame}

\end{document}

导致编译错误:

! LaTeX Error: Something's wrong--perhaps a missing \item.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.44

在我看来,这个注释和第 7 页的内容一模一样 http://ftp.cvut.cz/tex-archive/macros/latex/contrib/covington/covington.pdf我怎么了?

答案1

可以使用框架来编译该示例fragile

与问题无关:您的自定义\makebeamertitle宏是不必要的,beamer 定义为在框架环境之外使用\maketitle时自动在标题页周围创建一个框架。\maketitle

\documentclass{beamer}

\usepackage{covington}

\makeatletter
\def\glosstr{}
\@ifundefined{linggloss}{%
\newenvironment{linggloss}[2][]{
        \def\glosstr{\glt #1}%
        \gll #2}
{\glosstr\glend}}{}
\makeatother

\title{Are Czech conditionals with an infinitival condition all Counterfactual?}

\begin{document}

\maketitle

\begin{frame}[fragile]
    \frametitle{And how does it look inCzech?}
    \begin{covexamples}
        \item real conditions – realistic, achievable, achieved?
        \item \begin{linggloss}[If Vašek comes on time we'll make it without any problems.]
            Když přijde        Vašek        včas,   tak  to          stihneme      v  pohodě.
            If   come-3sg.pres Vašek-nom.sg on time then that-acc.sg make-1pl.pres in ease.
        \end{linggloss}
    \end{covexamples}
\end{frame}

\end{document}

在此处输入图片描述

相关内容