Skip to content

Definitions so LaTeX's listings package can handle "Protocol Buffers" message declaration files

Notifications You must be signed in to change notification settings

aytchell/latex-listings-protobuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

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

About

Definitions so LaTeX's listings package can handle "Protocol Buffers" message declaration files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published