The tag has no wiki summary.

learn more… | top users | synonyms

32
votes
3answers
3k views

LaTeX code sniffer and/or beautifier?

I'm looking for a LaTeX code sniffer and/or code beautifier, because I'm creating a CI server for my LaTeX books and I wanted a few things. :D
17
votes
2answers
1k views

Print programs with its proper syntax

I have defined my own language whose syntax is very close to the one of Pascal. I would like to type the following program for instance. Many people use the packages algorithmicx or algorithm2e to ...
2
votes
0answers
156 views

Source code line numbers in PDF [duplicate]

Possible Duplicate: Extended draft mode which includes source information for manual print-out to source synchronisation I am writing a document in LaTeX which I compile to PDF, which I ...
2
votes
4answers
695 views

How to place a program and a text side by side?

My first question is how you write a program in LaTeX, with and without a line number for each line. The second question is, because often my program is not too large, I want to save some space for ...
7
votes
2answers
2k views

How to typeset VBA code in LaTeX?

I have a lot of VBA (Visual Basic for Applications, the programming language in Microsoft Office) code which I have to add to my thesis in the appendix. I wonder how I can most comfortably list those ...
3
votes
3answers
805 views

Right justify inline

I am trying to right justify some code as a text wrap for a memo on the C language and I encountered some issues... In the following exemple I'm trying to right justify the "const struct tm *ptm);" ...
17
votes
2answers
10k views

How to format an inline source code

I have a document where I quiet often refer to source code element, such as class names, I wanted to format these strings differently, but at the beginning I didn't want to fiddle with various options ...
4
votes
1answer
154 views

Code inside an equation environment is executed 4 times (or isn't it?).

I created a small example: \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \usepackage[pdfstartview=FitH]{hyperref} \usepackage{bookmark} \begin{document} one line \newcounter{test} ...
4
votes
1answer
439 views

Columns with Latex code and Output in a Beamer presentation

I am new to Latex and am working on a small presentation using Latex and Beamer. In one frame, I'm trying to show some Latex code and it's output. Initially I just took a screenshot of the Gummi tex ...
6
votes
1answer
335 views

Hyphenation of long Java identifiers

What is the best practice for hyphenating long identifiers like Character.isJavaIdentifierStart when they appear in body text? I am aware of the path package that also deals with otherwise active ...
4
votes
1answer
670 views

How can I input part of a file in verbatim?

I'm writing the documentation to a large piece of Matlab code. I would like include tags in my Matlab code and then read the lines of code between the tags into Latex and output them as verbatim (or ...
3
votes
1answer
254 views

The source code for accent commands

I'm using LaTeX on Ubuntu, it calls TeX Live here. I'm interested to see source code of accent commands behavior. Where can I find it?
4
votes
1answer
676 views

\fbox inside listings

I am trying to highlight a specific line inside a listing with listinline. The code I am currently using looks like this: \begin{lstlisting}[escapechar=!] class A { void m() { B b = ... ...
6
votes
1answer
767 views

Problem about program code included in LaTeX

I have some Matlab code which I would like to include in my LaTeX document. I use fancyvrb package, based on which I define a new environment called code. An complete and minimum example is: ...
18
votes
2answers
2k views

Code spanning over two pages with minted, inside listing with caption

I am trying using minted to display some code in my document, but the code is long and spans over two pages, this works fine, however when I place my code inside \begin{listing} ...
7
votes
1answer
650 views

visualize code indentation

How can I visualize code indentation? What I want is to draw a vertical line along the indentation. Since an example is easier to show then to explain you can see one in this paper (on page 2)
3
votes
1answer
200 views

Shrink code chunks in a documentation

i'm making a documentation of a system, and i have a lot of code chunks that i want to explain, but some of them are too long. My questions if there are some way to automatically shrink those too big ...
4
votes
1answer
239 views

Cg Code in Latex

I am writing some document which contains Cg (C for Graphics) code in the document. I want to show the code in a neat highlighted mode. Any easy method to suggest? I tried the listings package but it ...