{"id":13566686,"url":"https://github.com/s-tikhomirov/solidity-latex-highlighting","last_synced_at":"2025-04-04T00:31:58.941Z","repository":{"id":42567909,"uuid":"102861142","full_name":"s-tikhomirov/solidity-latex-highlighting","owner":"s-tikhomirov","description":"Include nice-looking Solidity examples into LaTeX files","archived":false,"fork":false,"pushed_at":"2022-12-05T16:45:41.000Z","size":166,"stargazers_count":109,"open_issues_count":5,"forks_count":43,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-08-01T13:36:49.528Z","etag":null,"topics":["ethereum","highlighting","latex","listings","solidity","tex"],"latest_commit_sha":null,"homepage":null,"language":"TeX","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/s-tikhomirov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-08T12:52:59.000Z","updated_at":"2024-06-01T18:59:48.000Z","dependencies_parsed_at":"2023-01-23T03:00:18.119Z","dependency_job_id":null,"html_url":"https://github.com/s-tikhomirov/solidity-latex-highlighting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-tikhomirov%2Fsolidity-latex-highlighting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-tikhomirov%2Fsolidity-latex-highlighting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-tikhomirov%2Fsolidity-latex-highlighting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/s-tikhomirov%2Fsolidity-latex-highlighting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/s-tikhomirov","download_url":"https://codeload.github.com/s-tikhomirov/solidity-latex-highlighting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223075363,"owners_count":17083505,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ethereum","highlighting","latex","listings","solidity","tex"],"created_at":"2024-08-01T13:02:14.675Z","updated_at":"2025-04-04T00:31:58.933Z","avatar_url":"https://github.com/s-tikhomirov.png","language":"TeX","funding_links":[],"categories":["TeX"],"sub_categories":[],"readme":"# Solidity LaTeX Highlighting\n\nSolidity is a major programming language for [Ethereum](https://ethereum.org/) smart contracts.\n**Solidity LaTeX highlighting** helps researchers include readable code examples in their papers.\nCompared 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).\n\n# Usage\n\n## Source\n\n```latex\n\\documentclass{article}\n\n\\usepackage{listings}\n\\usepackage{listings-solidity} % copy listings-solidity.sty to your project\n\n\\usepackage{xcolor}\n\\definecolor{verylightgray}{rgb}{.97,.97,.97}\n\n\\lstset{ % define general preferences\n\tlanguage=Solidity,\n\tbackgroundcolor=\\color{verylightgray},\n\textendedchars=true,\n\tbasicstyle=\\footnotesize\\ttfamily,\n\tshowstringspaces=false,\n\tshowspaces=false,\n\tnumbers=left,\n\tnumberstyle=\\footnotesize,\n\tnumbersep=9pt,\n\ttabsize=2,\n\tbreaklines=true,\n\tshowtabs=false,\n\tcaptionpos=b\n}\n\n\\begin{lstlisting}[language=Solidity]\npragma solidity 0.4.16;\n\ncontract TestContract {\n    \n\tstring private myString = \"foo\";\n\t\n\tfunction getString() constant returns (string) {\n\t    return myString;\n\t}\n\t\n\tfunction setString (string _string) {\n\t    myString = _string;\n\t}\n}\n\\end{lstlisting}\n```\n\n## Result\n\n![](example.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-tikhomirov%2Fsolidity-latex-highlighting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fs-tikhomirov%2Fsolidity-latex-highlighting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fs-tikhomirov%2Fsolidity-latex-highlighting/lists"}