我正在使用以下清单:
\begin{lstlisting}
1pragma solidity 0.4.16;
2contract TestContract{
3 string private mystring =”foo”;
4 uint private lastupdated = now;
5 function getString() constant returns 6(string, uint) {
7 return (myStrig, lastUpdated);
8 }
9}
\end{lstlisting}
但它没有在输出中显示双引号。它会产生错误,并且行与行之间有很大的空格。我想减少空格。
图像如下所示:
documentclass 信息为:
\documentclass[manuscript,screen]{acmart}
\usepackage{listings}
\AtBeginDocument{%
\providecommand\BibTeX{{%
\normalfont B\kern-0.5em{\scshape i\kern-0.25em b}\kern-0.8em\TeX}}}
\setcopyright{acmcopyright}
\copyrightyear{2020}
\acmYear{2020}
\acmDOI{10.1145/1122445.1122456}
\begin{document}