TransWikia.com

How to put caption in package solidity-highlighting.tex

TeX - LaTeX Asked on December 31, 2020

I am using following Latex code for displaying Solidity listing but it does not show any caption. I downloaded the file from here

Somebody please guide me how to put caption. Link for project files is: Project file link
My code is:

documentclass[manuscript,screen]{acmart}
usepackage{listings}
input{solidity-highlighting.tex}
AtBeginDocument{%
  providecommandBibTeX{{%
    normalfont Bkern-0.5em{scshape ikern-0.25em b}kern-0.8emTeX}}}
setcopyright{acmcopyright}
copyrightyear{2020}
acmYear{2020}
acmDOI{10.1145/1122445.1122456}
begin{document}
title{A Test of Latex}
author{A1}
begin{abstract}
  Testing abstract
end{abstract}
begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002978.10003022</concept_id>
<concept_desc> and application security</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10002944.10011122.10002945</concept_id>
<concept_desc>General and reference~Surveys and overviews</concept_desc>
<concept_significance>500</concept_significance>
</concept>
</ccs2012>
end{CCSXML}

ccsdesc[500]{Security and privacy~Software and application security}
ccsdesc[500]{General and reference~Surveys and overviews}
maketitle
section{Introduction}
begin{lstlisting}[language=Solidity] 
contract TestList1{

}
end{lstlisting}
bibliographystyle{ACM-Reference-Format}
bibliography{sourcefile-bib}


end{document}
endinput

The output of code is:

Output without Caption.

I am looking for something like this:

Required Output

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP