3
votes
0answers
36 views

Code in listing not formatted correctly [duplicate]

My preamble is as follows: \documentclass{llncs} \usepackage{xcolor} \usepackage{harvard} \usepackage{listings} \usepackage{chngcntr} \makeatletter \lst@InstallKeywords ...
5
votes
3answers
140 views

When to break lines? [duplicate]

I am very new to LaTeX. A newline in the input file does not mean anything to LaTeX. An empty line in the input file means a new paragraph. Trouble is, when I view my sources with different text ...
3
votes
1answer
100 views

Formatting the thread call stack

Given a thread call stack as follows: FATAL org.apache.hadoop.mapred.TaskTracker: Error running child : java.lang.OutOfMemoryError: Java heap space ...
3
votes
4answers
397 views

Formatting the SQL-like script

Suppose we have a script as follows: a = LOAD 'data' USING BinStorage AS (user); b = GROUP a BY user; c = FOREACH b GENERATE COUNT(a) AS cnt; d = ORDER c BY cnt; How to write the latex code to ...
2
votes
0answers
37 views

Format Inline source code like Stack Exchange [duplicate]

Stack Exchange formats code nicely with backticks using Markdown. Example: int foo = bar++ I've seen other posts that recommend using listings, specifically \lstinline to do inline source code. ...
0
votes
0answers
58 views

How to format a block of source code? [duplicate]

Possible Duplicate: Package to indent and syntax highlight C++ code I want to format a block of C source code using TeX, how can I accomplish this work? for example: int main() { ...
6
votes
1answer
548 views

How to Format C Program Code Block Nicely

I am using the following settings to format my code blocks: % xxxxxxxxxxxxxxxxxxxxxxxxx Code Snippet STARTS xxxxxxxxxxxxxxxxxxxxxx \lstset{ language=C, % choose the language of ...
10
votes
1answer
1k views

What are the standard styles to format LaTeX source code?

In any other programming languages, we have several ways to format our source code. For example, some of the standard styles are: Allman(ANSI) K&R GNU .... Within LaTeX, I couldn't find a neat ...
38
votes
2answers
3k views

Styleguide for LaTeX similar to the Google styleguides?

Even though I don't work at Google, the Google Styleguides have been very helpful for me in adopting consistent, readable style conventions for my code. Unfortunately, there is no Google Styleguide ...