Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.83 KB

README.md

File metadata and controls

56 lines (38 loc) · 1.83 KB

Protocol Buffers for LaTeX listings

Language definitions and styles for adding 'protobuf' highlighting to the 'listings' package in LaTeX.

Information about Protocol Buffers

Manual of the listings package

In case you don't know LaTeX yet ... Start reading here

Usage

\documentclass{article}
\usepackage{listings}
\usepackage{protobuf/lang}  % include language definition for protobuf
\usepackage{protobuf/style} % include custom style for proto declarations.
\begin{document}
% Use custom language and style for Protocol Buffers.
\lstinputlisting[language=protobuf2,style=protobuf]{search.proto}
\end{document}

Example

An example of this package's usage can be found in the 'example' directory.

As you can see below, there are three different styles available (of course you can define your own highlighting). Currently you can select the style to be used only by editing protobuf/style.sty (but this shouldn't be too much hassle).

Solarized style

Blue-ish style

'Tomorrow' style

Public domain

The source code and any original content of this repository is hereby released into the public domain.

Acknowledgments

The structure of the package, this README file and the blue-ish theme are inspired by Robin Eklind's definitions and styles for listings