Skip to content

svenvanhal/latex_highlight_pig_latin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Highlight Pig Latin in LaTeX

Highlight Pig Latin in LaTeX documents.

Pig Latin listing

Add the following line to your LaTeX file:

\include(pig_style.tex)

\lstset has been configured to use Pig by default. Highlighting a code block is as simple as:

\begin{lstlisting}
wikipedia = LOAD 'wikipedia' USING PigStorage('\t') AS (row:chararray);
tuples = FOREACH wikipedia GENERATE FLATTEN(splitsuc.SPLITSUC(*));
grouped = GROUP tuples BY (word1, word2, word3, word4) PARALLEL 16;
grouped_counted = FOREACH grouped GENERATE group, COUNT(tuples);
STORE grouped_counted INTO 'wikipedia.sql' USING splitsuc.STORESQL();
\end{lstlisting}

For different set-ups, add a language attribute to \begin{lstlisting}

\begin{lstlisting}[language=Pig]
wikipedia = LOAD 'wikipedia' USING PigStorage('\t') AS (row:chararray);
tuples = FOREACH wikipedia GENERATE FLATTEN(splitsuc.SPLITSUC(*));
grouped = GROUP tuples BY (word1, word2, word3, word4) PARALLEL 16;
grouped_counted = FOREACH grouped GENERATE group, COUNT(tuples);
STORE grouped_counted INTO 'wikipedia.sql' USING splitsuc.STORESQL();
\end{lstlisting}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages