Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-tikhomirov/solidity-latex-highlighting
Include nice-looking Solidity examples into LaTeX files
https://github.com/s-tikhomirov/solidity-latex-highlighting
ethereum highlighting latex listings solidity tex
Last synced: 2 months ago
JSON representation
Include nice-looking Solidity examples into LaTeX files
- Host: GitHub
- URL: https://github.com/s-tikhomirov/solidity-latex-highlighting
- Owner: s-tikhomirov
- License: mit
- Created: 2017-09-08T12:52:59.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2022-12-05T16:45:41.000Z (about 2 years ago)
- Last Synced: 2024-08-01T13:36:49.528Z (5 months ago)
- Topics: ethereum, highlighting, latex, listings, solidity, tex
- Language: TeX
- Size: 162 KB
- Stars: 109
- Watchers: 4
- Forks: 43
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ccamel - s-tikhomirov/solidity-latex-highlighting - Include nice-looking Solidity examples into LaTeX files (TeX)
README
# Solidity LaTeX Highlighting
Solidity is a major programming language for [Ethereum](https://ethereum.org/) smart contracts.
**Solidity LaTeX highlighting** helps researchers include readable code examples in their papers.
Compared to [some](https://github.com/dccp/bachelor-thesis-report/blob/0852ba922aefa71d9c943cbff363f40685345fe3/include/settings/Settings.tex) [other](https://github.com/adrianwersching/ustutt-fachstudie-dapps/blob/6673825f916c5a98462c8291b1814f7ed0e23417/ausarbeitung/ausarbeitung.tex) [previous](https://github.com/dybber/blockchain-summerschool-2016/blob/440259e1c41f1efa175a0e782e5420a732cd0008/tex/master.tex) [attempts](https://github.com/DCReum/dcreum.github.io/blob/724c00d20801cefd977c26e475ddac08e33763a8/docs/report.tex), this highlighter fully supports the [Solidity syntax](https://solidity.readthedocs.io/) (if you think this is not the case, feel free to submit an issue or a pull request).# Usage
## Source
```latex
\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
![](example.png)