Skip to content

ivan-homoliak-sutd/solidity-latex-highlighting

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Solidity is a major programming language for Ethereum smart contracts. Solidity LaTeX highlighting helps researchers include readable code examples in their papers. Compared to some other previous attempts, this highlighter fully supports the Solidity syntax (if you think this is not the case, feel free to submit an issue or a pull request).

Usage

Source

\documentclass{article}

\input{solidity-highlighting.tex}	% copy the file from this repo

\begin{lstlisting}[language=Solidity]
pragma solidity 0.4.16;

contract TestContract {
    
	string private myString = "foo";
	
	function getString() constant returns (string) {
	    return myString;
	}
	
	function setString (string _string) {
	    myString = _string;
	}
}
\end{lstlisting}

Result

About

Include nice-looking Solidity examples into LaTeX files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TeX 100.0%