我正在尝试将一些 JSON 格式的列表添加到幻灯片中,但出现了错误:
段落在 \lst@next 完成之前结束。
如何在 Latex Beamer 中添加列表?
代码
\documentclass[xcolor=dvipsnames]{beamer}
\usepackage[utf8]{inputenc}
\usepackage{listings}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usetheme{Antibes}
\usecolortheme[named=Maroon]{structure}
\setbeamercovered{transparent}
\title{Test}
\author{Alex XYZ}
\institute{University XYZ}
\date{20.01.16}
\begin{document}
\beamertemplatenavigationsymbolsempty
\begin{frame}
\titlepage
\end{frame}
\begin{frame}{Service Provider - Request and Response}
\begin{lstlisting}
{
"mac": "10:B5:S3:06:C6:E9",
"route":0,
"latitude":53.834588,
"longitude":10.704048,
"time":"12.09.2015 13:45:00",
"speed":3,
"direction":"",
"flag": "true"
}
\end{lstlisting}
\end{frame}
\end{document}
答案1
添加[fragile]
于\begin{frame}